# Create a workspace
git clone https://github.com/Altoros/ibm-power-bosh-workspace.git /home/ubuntu/workspace
# Build stemcell
sudo /home/ubuntu/stemcell-builder/bin/build-stemcell
cp ~/stemcell-builder/bosh-stemcell-ppc64-2915-openstack-kvm-ubuntu-trusty-go_agent.tgz /home/ubuntu/workspace/stemcells/stemcell.tgz
# Prepare
mkdir /home/ubuntu/releases
cd /home/ubuntu/releases
sudo gem uninstall bundler
sudo gem install bundler -v 1.7.4
# Build CPI release
git clone --branch power https://github.com/Altoros/bosh-openstack-cpi-release.git
cd bosh-openstack-cpi-release
bosh create release --force --with-tarball --name bosh-openstack-cpi
cp /home/ubuntu/releases/bosh-openstack-cpi-release/dev_releases/bosh-openstack-cpi/bosh-openstack-cpi-5+dev.1.tgz /home/ubuntu/workspace/releases/cpi-release.tgz
# Build BOSH release
cd /home/ubuntu/releases
git clone --recursive --branch power-2915 https://github.com/Altoros/bosh.git
cd ./bosh/release
mkdir blobs
cp -r /home/ubuntu/binary_builder/binaries/bosh/* blobs
sudo chown -R ubuntu /tmp/
bundle exec rake release:create_dev_release
bundle exec bosh create release --force --with-tarball --name bosh
cp /home/ubuntu/releases/bosh/release/dev_releases/bosh/bosh-156+dev.1.tgz /home/ubuntu/workspace/releases/bosh-release.tgz
# Build CF release
cd /home/ubuntu/releases
git clone --recursive --branch power-207 https://github.com/Altoros/cf-release.git
cd cf-release
mkdir blobs
./update
cp -r /home/ubuntu/binary_builder/binaries/cf/* blobs
bundle exec bosh create release --force --with-tarball --name cf
# Deploy MicroBOSH
cd ~/workspace
cp config/secret.yml{.example,}
vi config/secret.yml # enter your credentials
cp config/micro-bosh-stub.yml{.example,}
vi config/micro-bosh-stub.yml # put floating and private IP of the MicroBOSH instance
./generate_manifest micro-bosh
# be sure that you have you default SSH key for OpenStack in ~/.ssh/id_rsa.pem
bosh-init deploy manifests/micro-bosh.yml