Build RHEL BOSH stemcell.
# $base_os_image_path should be full path (without using ~)
base_os_image_path=$HOME/base_os_image.tgz
# install pre-requirements
sudo apt-get update
sudo apt-get install -y git kpartx debootstrap qemu \
rubygems1.9.1 irb1.9.1 ri1.9.1 rdoc1.9.1 \
ruby1.9.1 ruby1.9.1-dev \
build-essential libopenssl-ruby1.9.1 libssl-dev zlib1g-dev \
libmysqlclient-dev libpq-dev libsqlite3-dev \
kpartx
# you need to install go1.3.3.
# you can take binaries from this page https://golang.org/dl/
sudo gem install bundler
sudo mkdir -p /mnt/stemcells
sudo chown <username> /mnt/stemcells # <username> belongs to user you use to build stemcell
# install bosh
git clone -b try-rhel --single-branch https://github.com/allomov/bosh.git bosh
cd bosh
git submodule foreach --recursive 'git submodule sync; git clean -d --force --force'
git submodule update --init --recursive --force
bundle install
# create stemcell
bundle exec rake stemcell:build_os_image[centos,red-hat-version,$base_os_image_path]
bundle exec rake stemcell:build_with_local_os_image[openstack,centos,red-hat-version,go,$base_os_image_path]
# in the end you'll find stemcell in ~/bosh/tmp