QubitProducts / bamboo

HAProxy auto configuration and auto service discovery for Mesos Marathon
Apache License 2.0
793 stars 214 forks source link

How to build source of bamboo to rpm package? #184

Closed VFT closed 8 years ago

VFT commented 8 years ago

There is only build script for deb package in build.sh,How to build source of bamboo to rpm package?

because my system is centos.

j1n6 commented 8 years ago

On 24 Nov 2015, at 09:14, VFT notifications@github.com wrote:

There is only build script for deb package in build.sh,How to build source of bamboo to rpm package?

because my system is centos.

— Reply to this email directly or view it on GitHub.

rasputnik commented 8 years ago

@VFT we build our RPMs on CentOS 6.x . you need

# build dependencies
sudo yum install -y golang rpm-build rubygems ruby-devel
sudo gem install  fpm  --no-ri --no-rdoc

# setup a go build tree
sudo yum install -y git mercurial
export GOPATH=~/gopath
mkdir $GOPATH
go get github.com/tools/godep
go install github.com/tools/godep

# build the binary
go get https://github.com/QubitProducts/bamboo
cd ${GOPATH}/src/github.com/QubitProducts/bamboo
go build

That creates the bamboo binary, then build an RPM by making these changes

edit builder/build.after-install

edit builder/build.sh and set:

VFT commented 8 years ago

@activars @rasputnik thank you very mush,rpm package was created under your guidance.

j1n6 commented 8 years ago

Your solution might be useful and save time for other users. Would it possible you can share and make a Pull Request about your solution?

rasputnik commented 8 years ago

Sure, shell isn't my thing really but it shouldn't be that hard.