Sha256: 600d5830796530786fd9e87a8df1f069c2c5c6dce1c6805b5905c84f48d35066

Contents?: true

Size: 1.35 KB

Versions: 3

Compression:

Stored size: 1.35 KB

Contents

#!/usr/bin/env bash

# Deploys a micro BOSH using "bosh micro deploy"
#
# Required:
# * $BOSH_NAME - name of bosh deployment
#   (thus /var/vcap/store/microboshes/deployments/$BOSH_NAME/micro_bosh.yml exists)
# * $MICRO_BOSH_STEMCELL_NAME - public stemcell name at
#   /var/vcap/store/stemcells/$MICRO_BOSH_STEMCELL_NAME

set -e # exit immediately if a simple command exits with a non-zero status
set -u # report the usage of uninitialized variables

MICRO_BOSH_STEMCELL_PATH=/var/vcap/store/stemcells/$MICRO_BOSH_STEMCELL_NAME

export COLUMNS=80 # force a small width for progress bar
export TMPDIR=/var/vcap/store/tmp

cd /var/vcap/store/microboshes/deployments/
bosh -n micro deployment $BOSH_NAME

if [[ "${MICRO_BOSH_STEMCELL_NAME}" == "custom" ]]; then
  MICRO_BOSH_STEMCELL_PATH=$(ls -t /var/tmp/bosh/agent-*/work/work/*.tgz | sort | tail -n 1)
  echo "Custom stemcell path $MICRO_BOSH_STEMCELL_PATH"
else
  echo "Downloaded stemcell path $MICRO_BOSH_STEMCELL_PATH"
fi

if [[ -f bosh-deployments.yml && "$(grep $BOSH_NAME bosh-deployments.yml)" != "" ]]; then
  echo "Performing update deploy to micro BOSH $BOSH_NAME"
  bosh -n micro deploy $MICRO_BOSH_STEMCELL_PATH --update
else
  echo "Performing initial deploy of micro BOSH $BOSH_NAME"
  bosh -n micro deploy $MICRO_BOSH_STEMCELL_PATH
  touch $BOSH_NAME/new_bosh_deployed # to communicate with setup_bosh_user script
fi

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bosh-bootstrap-0.6.0 lib/bosh-bootstrap/stages/stage_micro_bosh_deploy/bosh_micro_deploy
bosh-bootstrap-0.5.1 lib/bosh-bootstrap/stages/stage_micro_bosh_deploy/bosh_micro_deploy
bosh-bootstrap-0.5.0 lib/bosh-bootstrap/stages/stage_micro_bosh_deploy/bosh_micro_deploy