Deploy Ops Manager Control Plane onto Azure

This repo contains scripts and terraform configurations to deploy a control plane, opsmanager and PKS to Azure Cloud.

Setup Variables

cat > .envrc <<EOF
export AZURE_CLIENT_ID=<application client id>
export AZURE_CLIENT_SECRET=<application client secret>
export AZURE_REGION=<azure region>
export AZURE_TENANT_ID=<azure tenant it>
export AZURE_SUBSCRIPTION_ID=<azure subscription id>
export ENVIRONMENT_NAME=controlplane
EOF

Run the following source command to set the environment variables into your shell or install direnv to do this automatically.

source .envrc

DNS

  • Create a DNS zone in Azure Portal

  • Perform a DNS query to make sure the correct nameservers are resolved

    nslookup -type=SOA foo.example.com

Control Plane

Install Tools

  • Run ./scripts/install-cli-tools.sh to install required CLI tools

Update Versions

  • Update ./versions.yml to use latest versions

Create Azure Active Directory Service Account

  • Follow these instructions to create and configure the Service Principal account that is needed to run the terraform templates. To save time, you can run ./scripts/create-service-account.sh

Terraforming

  • Copy ./control-plane/vars/$ENVIRONMENT_NAME/terraform.tfvars.example to ./control-plane/vars/$ENVIRONMENT_NAME/terraform.tfvars and modify with your configuration choices and credentials.
  • Run ./scripts/terraform-apply.sh - this will create the infrastructure required in Azure for a control-plane.

Configure Operations Manager and Deploy Director

  • Configure opsman auth and the director tile
./scripts/deploy-control-plane-director.sh

Deploy Control Plane Product

  • Download the product and stemcell from pivnet. Ensure environment variable $PIVNET_TOKEN is set.
./scripts/download-control-plane.sh

The version is set in ./versions.yml:

control_plane_version: 0.0.37
  • Upload and Stage the product and upload/assign the stemcell.
./scripts/stage-control-plane.sh
  • Create VM Extensions for load balancers and Security Groups.
./scripts/create-vm-extensions.sh
  • Apply control-plane configuration and deploy.
./scripts/deploy-control-plane.sh

Access BOSH

source ./scripts/target-control-plane-bosh.sh

Access Credhub

source ./target-concourse-credhub.sh

Access Concourse

./scripts/login-concourse.sh