Skip to content

Instantly share code, notes, and snippets.

@blue-bird1
Last active November 16, 2018 06:45
Show Gist options
  • Select an option

  • Save blue-bird1/2064d3bba6c65591443538a067bb2f84 to your computer and use it in GitHub Desktop.

Select an option

Save blue-bird1/2064d3bba6c65591443538a067bb2f84 to your computer and use it in GitHub Desktop.
install bosh
# install bosh cli
wget https://github.com/cloudfoundry/bosh-cli/releases/download/v5.3.1/bosh-cli-5.3.1-linux-amd64
chmod +x bosh-cli-5.3.1-linux-amd64
mv bosh-cli-5.3.1-linux-amd64 /usr/local/bin/bosh
# nstall package
apt-get install -y build-essential zlibc zlib1g-dev ruby ruby-dev openssl libxslt-dev libxml2-dev libssl-dev libreadline6 libreadline6-dev libyaml-dev libsqlite3-dev sqlite3
git clone https://github.com/cloudfoundry/bosh-bootloader bosh && cd bosh
wget https://github.com/cloudfoundry/bosh-bootloader/releases/download/v6.10.18/bbl-v6.10.18_linux_x86-64
chmod +x bbl-v6.10.18_linux_x86-64
mv bbl-v6.10.18_linux_x86-64 /usr/local/bin/bbl
export BBL_IAAS=gcp
export BBL_GCP_REGION=<随便一个region>
export BBL_GCP_SERVICE_ACCOUNT_KEY=<你的凭证json路径>
bbl up
# https://github.com/cloudfoundry/bosh-bootloader/tree/master/plan-patches/cfcr-gcp
# 例如 cfcr.bluebird.biz
export kubernetes_master_host=your-domain-here
mkdir banana-env && cd banana-env
bbl plan --name banana-env
cp -r ../plan-patches/cfcr-gcp/. .
echo kubernetes_master_host=\"${kubernetes_master_host}\" > vars/cfcr.tfvars
bbl up
# 以后每次使用bosh都需要在这个目录执行 建议写.bashrc
eval "$(bbl print-env)"
bosh upload-stemcell https://bosh.io/d/stemcells/bosh-google-kvm-ubuntu-trusty-go_agent
# url是cfcr的安装包 现在是最新的 以后需要自己更新
bosh upload-release https://github.com/cloudfoundry-incubator/kubo-release/releases/download/v0.24.0/kubo-release-0.24.0.tgz
git clone git@github.com:cloudfoundry-incubator/kubo-deployment.git
export KD=$(pwd)/kubo-deployment
bosh deploy -d cfcr ${KD}/manifests/cfcr.yml \
-o ${KD}/manifests/ops-files/iaas/gcp/cloud-provider.yml \
-o cfcr-ops.yml -v deployment_name=cfcr \
-l <(bbl outputs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment