Steps for building BOSH openstack stemcell on POWER
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
\curl -sSL https://get.rvm.io | 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 '1.6.6.2' -- --use-system-libraries | |
git clone --recursive https://github.com/cloudfoundry/bosh.git | |
cd bosh | |
bundle install | |
sudo apt-get install -y libsystemd-journal-dev libestr-dev libjson0 libjson0-dev uuid-dev python-docutils libcurl4-openssl-dev | |
wget http://download.rsyslog.com/liblogging/liblogging-1.0.5.tar.gz | |
wget http://www.rsyslog.com/download/files/download/rsyslog/rsyslog-8.15.0.tar.gz | |
wget http://download.rsyslog.com/librelp/librelp-1.2.9.tar.gz | |
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