Skip to content

Instantly share code, notes, and snippets.

Created July 25, 2016 19:34
  • 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
What would you like to do?
Steps for building BOSH openstack stemcell on POWER
prerequisites: go-1.6.2 binary (go-1.6.2-ppc64le.tar.gz)
cd ~
sudo tar xvfz go-1.6.2-ppc64le.tar.gz -C /usr/local
sudo ln -s /usr/local/go/bin/go /usr/local/bin
gpg --keyserver hkp:// --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL | bash -s stable --ruby=2.3.1
source /home/ubuntu/.rvm/scripts/rvm
gem install bundler -v 1.11
sudo apt-get update
sudo apt-get install -y libmysqlclient-dev libpq-dev libxml2-dev libxslt1-dev git debootstrap kpartx qemu-utils
gem install nokogiri -v '' -- --use-system-libraries
git clone --recursive
cd bosh
bundle install
sudo apt-get install -y libsystemd-journal-dev libestr-dev libjson0 libjson0-dev uuid-dev python-docutils libcurl4-openssl-dev
tar xvfz liblogging-1.0.5.tar.gz
cd liblogging-1.0.5
./configure --disable-man-pages --prefix=/usr
make && sudo make install
cd ..
tar xvfz librelp-1.2.9.tar.gz
cd librelp-1.2.9
./configure --prefix=/usr
make && sudo make install
cd ..
tar xvfz rsyslog-8.15.0.tar.gz
cd rsyslog-8.15.0
./configure --enable-mmjsonparse --enable-gnutls --enable-relp --prefix=/usr
make && sudo make install
cd ..
rm -rf liblogging-* librelp-* rsyslog-*
sudo mkdir -p /mnt/stemcells
sudo chown ubuntu /mnt/stemcells
mkdir -p ~/workspace
env BOSH_MICRO_ENABLED=no bundle exec rake stemcell:build_os_image[ubuntu,trusty,/home/ubuntu/workspace/ubuntu_base_image.tgz] --trace
sudo chown -R ubuntu /home/ubuntu/workspace/ubuntu_base_image.tgz
truncate -s 0 bosh-stemcell/spec/stemcells/stig_spec.rb
env STEMCELL_BUILD_NUMBER=3232 BOSH_MICRO_ENABLED=no bundle exec rake stemcell:build_with_local_os_image[openstack,kvm,ubuntu,trusty,go,/home/ubuntu/workspace/ubuntu_base_image.tgz] --trace
Possible problems:
If the process hangs up at this stage (does not produce any output for more that 15 minutes):
=== Applying 'image_create' stage ===
== Started Tue Jun 14 14:13:10 UTC 2016 ==
then restart and run the following command to resume:
sudo reboot
cd ~/bosh
env STEMCELL_BUILD_NUMBER=3232 BOSH_MICRO_ENABLED=no resume_from=image_create bundle exec rake stemcell:build_with_local_os_image[openstack,kvm,ubuntu,trusty,go,/home/ubuntu/workspace/ubuntu_base_image.tgz] --trace
The RESULT of the build is located in /mnt/stemcells/openstack/kvm/ubuntu/work/work (2 files):
- bosh-stemcell-ppc64le-3232-openstack-kvm-ubuntu-trusty-go_agent-raw.tgz
- bosh-stemcell-ppc64le-3232-openstack-kvm-ubuntu-trusty-go_agent.tgz
If anything goes wrong, reboot and run the cleanup command:
sudo reboot
sudo rm -rf /mnt/stemcells/
Then try the steps again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment