Skip to content

Instantly share code, notes, and snippets.

@knm3000
Created September 14, 2016 13:37
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save knm3000/06e6b88f78a962d5103134b006a83c38 to your computer and use it in GitHub Desktop.
concourse bosh release build steps for POWER
# concourse bosh release build steps for POWER:
1. Install and configure docker
Run steps 1.1 - 1.3 from this link:
https://gist.github.com/barthy1/246cd6892d5db2cec9b6f866de70c089
# disable apparmor (latest docker does not work with apparmor)
sudo /etc/init.d/apparmor stop
sudo /etc/init.d/apparmor teardown
sudo update-rc.d -f apparmor remove
# Restart the machine
sudo reboot
# Login again after the restart and remove apparmor
sudo apt-get remove -y apparmor
2. Build concourse bosh release:
cd ~
mkdir -p ~/releases
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable --ruby=2.3.0
source ~/.rvm/scripts/rvm
gem install bosh_cli
sudo apt-get update
sudo apt-get install -y git zip aufs-tools linux-image-extra-`uname -r`
# start docker
sudo service docker start
# download and install golang from unicamp.br
wget ftp://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/cloud-foundry/go-1.7-ppc64le.tar.gz
sudo tar xvfz go-1.7-ppc64le.tar.gz -C /usr/local
sudo ln -s /usr/local/go/bin/go /usr/local/bin
cd ~/releases
git clone --recursive https://github.com/concourse/concourse
cd ~/releases/concourse
bosh create release --name concourse
# btrfs-tools
cd ~/releases/concourse/blobs/btrfs
wget -O ppc64le-btrfs-tools.tar.gz ftp://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/cloud-foundry/btrfs-tools-4.4-ppc64le.tar.gz
fname=$(ls btrfs-tools*); dst=$(readlink $fname); rm -f $dst $fname; mv ppc64le-btrfs-tools.tar.gz $fname
# golang 1.7
cd ~/releases/concourse/blobs/golang
wget -O ppc64le-go.tar.gz ftp://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/cloud-foundry/go-1.7-ppc64le.tar.gz
fname=$(ls golang-*); dst=$(readlink $fname); rm -f $dst; mv ppc64le-go.tar.gz $fname
# resources
cd ~/releases
git clone https://github.com/barthy1/ppc64le-local-images
cd ~/releases/ppc64le-local-images/concourse_build
./build_resources.sh
cd ~/releases/concourse/blobs/resources
fname=$(ls archive-resource.tar.gz); dst=$(readlink $fname); rm -f $dst $fname
fname=$(ls docker-image-resource.tar.gz); dst=$(readlink $fname); rm -f $dst $fname
fname=$(ls time-resource.tar.gz); dst=$(readlink $fname); rm -f $dst $fname
fname=$(ls git-resource.tar.gz); dst=$(readlink $fname); rm -f $dst $fname
cd ~/releases/ppc64le-local-images/concourse_build/projects
cp archive-resource/built-resource/archive-resource.tar.gz ~/releases/concourse/blobs/resources
cp docker-image-resource/built-resource/docker-image-resource.tar.gz ~/releases/concourse/blobs/resources
cp time-resource/built-resource/time-resource.tar.gz ~/releases/concourse/blobs/resources
cp git-resource/git-resource.tar.gz ~/releases/concourse/blobs/resources
# final.yml
cd ~/releases/concourse/config
sed -i 's/provider: s3/provider: local/g' final.yml
sed -i 's/bucket_name: concourse-blobs/blobstore_path: ~\/releases\/concourse\/blobs/g' final.yml
cd ~/releases/concourse
bosh upload blobs
# type 'yes' for each blob
bosh create release --force --with-tarball --name concourse --version $(git describe --tags | sed 's/v//g')
# RESULT: Release tarball (concourse-X.X.X.tgz)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment