Steps for building bosh release tarballs (diego, etcd, garden-linux, cflinuxfs2-rootfs, cf) for POWER platform
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
# 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/cloudfoundry/diego-release
cd ~/releases/diego-release
bosh create release --name diego
# golang 1.7.1
cd ~/releases/diego-release/blobs/golang
wget -O ppc64le-go.tar.gz ftp://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/cloud-foundry/go-1.7.1-ppc64le.tar.gz
fname=$(ls go1.7.1.linux-*); dst=$(readlink $fname); rm -f $dst; mv ppc64le-go.tar.gz $fname
# jq
cd ~/releases/diego-release/blobs/jq
wget ftp://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/cloud-foundry/jq-1.5-ppc64le
chmod +x jq-1.5-ppc64le
fname=$(ls jq-linux*); dst=$(readlink $fname); rm -f $dst; mv jq-1.5-ppc64le $fname
# docker
mkdir -p ~/docker_deb
cd ~/docker_deb
wget http://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/docker-1.9.1-ppc64el/pool/main/d/docker.io/docker.io_1.9.1~git20151210-18bfacb_ppc64el.deb
ar -x docker.io_1.9.1~git20151210-18bfacb_ppc64el.deb
tar xvfz data.tar.gz
cp usr/bin/docker ~/releases/diego-release/blobs/docker/ppc64le_docker
cd ~/releases/diego-release/blobs/docker
fname=$(ls docker-*); dst=$(readlink $fname); rm -f $dst; mv ppc64le_docker $fname
rm -rf ~/docker_deb
# final.yml
cd ~/releases/diego-release/config
sed -i 's/provider: s3/provider: local/g' final.yml
sed -i 's/bucket_name: diego-release-blobs/blobstore_path: ~\/releases\/diego-release\/blobs/g' final.yml
cd ~/releases/diego-release
bosh upload blobs
# type 'yes' for each blob
bosh create release --force --with-tarball --name diego --version $(git describe --tags | sed 's/v//g' | cut -d - -f 1)
# RESULT: Release tarball (diego-X.X.X.tgz)
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
cd ~/releases
git clone --recursive https://github.com/cloudfoundry-incubator/etcd-release.git
cd etcd-release
bosh create release --name etcd
# golang 1.6
cd ~/releases/etcd-release/blobs/golang
wget -O ppc64le-go.tar.gz ftp://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/cloud-foundry/go-1.6.2-ppc64le.tar.gz
fname=$(ls go1.6.*); dst=$(readlink $fname); rm -f $dst; mv ppc64le-go.tar.gz $fname
# final.yml
cd ~/releases/etcd-release/config
sed -i 's/provider: s3/provider: local/g' final.yml
sed -i 's/bucket_name: etcd-release-blobs/blobstore_path: ~\/releases\/etcd-release\/blobs/g' final.yml
cd ~/releases/etcd-release
bosh upload blobs
# type 'yes' for each blob
bosh create release --force --with-tarball --name etcd --version $(git describe --tags | sed 's/v//g')
# RESULT: Release tarball (etcd-X.X.X.tgz)
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
cd ~/releases
git clone --recursive https://github.com/cloudfoundry/garden-linux-release
cd ~/releases/garden-linux-release
bosh create release --force --name garden-linux
# golang 1.7.1
cd ~/releases/garden-linux-release/blobs/golang
wget -O ppc64le-go.tar.gz ftp://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/cloud-foundry/go-1.7.1-ppc64le.tar.gz
fname=$(ls go1.7.1.linux-*); dst=$(readlink $fname); rm -f $dst; mv ppc64le-go.tar.gz $fname
# final.yml
cd ~/releases/garden-linux-release/config
sed -i 's/provider: s3/provider: local/g' final.yml
sed -i 's/bucket_name: garden-linux-release/blobstore_path: ~\/releases\/garden-linux-release\/blobs/g' final.yml
cd ~/releases/garden-linux-release
bosh upload blobs
# type 'yes' for each blob
bosh create release --force --with-tarball --name garden-linux --version $(git describe --tags | sed 's/v//g' | cut -d - -f 1)
# RESULT: Release tarball (garden-linux-X.X.X.tgz)
cflinuxfs2-rootfs 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
cd ~/releases
git clone --recursive https://github.com/cloudfoundry/cflinuxfs2-rootfs-release
cd ~/releases/cflinuxfs2-rootfs-release
bosh create release --name cflinuxfs2-rootfs
# cflinuxfs2 blob
cd ~/releases/cflinuxfs2-rootfs-release/blobs/rootfs
wget -O ppc64le-cflinuxfs2.tar.gz ftp://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/cloud-foundry/cflinuxfs2.tar.gz
fname=$(ls cflinuxfs2-*); dst=$(readlink $fname); rm -f $dst; mv ppc64le-cflinuxfs2.tar.gz $fname
# final.yml
cd ~/releases/cflinuxfs2-rootfs-release/config
sed -i 's/provider: s3/provider: local/g' final.yml
sed -i 's/bucket_name: rootfs/blobstore_path: ~\/releases\/cflinuxfs2-rootfs-release\/blobs/g' final.yml
cd ~/releases/cflinuxfs2-rootfs-release
bosh upload blobs
# type 'yes' for each blob
bosh create release --force --with-tarball --name cflinuxfs2-rootfs --version $(git describe --tags | sed 's/v//g')
# RESULT: Release tarball (cflinuxfs2-rootfs-X.X.X.tgz)
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 add-apt-repository -y ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install -y git zip openjdk-8-jre openjdk-8-jdk
cd ~/releases
git clone https://github.com/cloudfoundry/cf-release.git
cd ~/releases/cf-release
./scripts/update
bosh create release --name cf
# openjdk
cd ~/releases/cf-release/blobs/openjdk
wget ftp://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/cloud-foundry/java-8-openjdk-ppc64le.tgz
cd ~/releases/cf-release/src/nats-release/packages/ruby-2.2.5
cat spec; echo -e '- architecture-support/config/config.sub\n- architecture-support/config/config.guess' >> spec
cd ~/releases/cf-release/src/uaa-release/packages/uaa
cat spec; echo -e '- openjdk/java-8-openjdk-ppc64le.tgz' >> spec
sed -i 's/openjdk-1.8.0_91-x86_64-trusty.tar.gz/java-8-openjdk-ppc64le.tgz/g' packaging
sed -i 's/`uname` = "Linux"/`uname -m` = "ppc64le"/g' pre_packaging
sed -i 's/openjdk-1.8.0_91-x86_64-trusty.tar.gz/java-8-openjdk-ppc64le.tgz/g' pre_packaging
# copy binaries
# golang 1.5
cd ~/releases/cf-release/blobs/golang
wget -O ppc64le-go.tar.gz ftp://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/cloud-foundry/go-1.5.4-ppc64le.tar.gz
fname=$(ls go1.5.*); dst=$(readlink $fname); rm -f $dst; mv ppc64le-go.tar.gz $fname
# golang 1.6
wget -O ppc64le-go.tar.gz ftp://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/cloud-foundry/go-1.6.2-ppc64le.tar.gz
fname=$(ls go1.6.*); dst=$(readlink $fname); rm -f $dst; mv ppc64le-go.tar.gz $fname
# cli
cd ~/releases/cf-release/blobs/cli
wget -O cf ftp://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/cloud-foundry/cf
chmod +x cf
fname=$(ls cf-cli*); dst=$(readlink $fname); rm -f $dst; rm $fname; tar zcvf $fname cf
rm cf
# consul, consul-template
cd ~/releases/cf-release/blobs/consul
wget -O consul ftp://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/cloud-foundry/consul-0.7.0-ppc64le
chmod +x consul
fname=$(ls consul_*); dst=$(readlink $fname); rm -f $dst; rm $fname; zip $fname consul
rm consul
wget -O consul-template ftp://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/cloud-foundry/consul-template-0.16.0rc1-ppc64le
chmod +x consul-template
fname=$(ls consul-template_*); dst=$(readlink $fname); rm -f $dst; rm $fname; zip $fname consul-template
rm consul-template
# libmariadb
cd ~/releases/cf-release/blobs/libmariadb
fname=$(ls libmariadb-*); dst=$(readlink $fname); rm -f $dst; rm -f $fname
wget ftp://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/cloud-foundry/libmariadb-5.5.36.tar.xz
# rootfs
cd ~/releases/cf-release/blobs/rootfs
wget -O rootfs.tar.gz ftp://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/cloud-foundry/cflinuxfs2.tar.gz
fname=$(ls cflinuxfs2*); dst=$(readlink $fname); rm -f $dst; mv rootfs.tar.gz $fname
# final.yml
cd ~/releases/cf-release/config
sed -i 's/provider: s3/provider: local/g' final.yml
sed -i 's/bucket_name: cf-release-blobs/blobstore_path: ~\/cf-release\/blobs/g' final.yml
cd ~/releases/cf-release
bosh upload blobs
# type 'yes' for each blob
sudo update-ca-certificates -f
bosh create release --force --with-tarball --name cf --version $(git describe --tags | sed 's/v//g')
# RESULT: Release tarball (cf-release-XXX-ppc64le.tar.gz)