This repo is going to be archived. The terraform templates that should be used for deploying an Ops Manager, PAS and/or PKS, can be found at https://github.com/pivotal/paving No PRs or Issues will be responded to here.
Please note that the master branch is generally unstable. If you are looking for something "tested", please consume one of our releases.
Will go from zero to having a deployed ops-manager. You'll get networking, a storage account, and a booted ops-manager VM.
We have other terraform templates to help you!
brew update
brew install terraform
brew install az
brew install jq
You need a service principal account to deploy anything on top of Azure.
-
Login.
$ az login $ az account show | jq -r '.id, .tenantId' the-subscription-id the-tenant-id
-
Create the service principal where the name is a valid URI.
$ az ad sp create-for-rbac --name http://<service-principal-name> | jq -r '.appId, .password' the-app-id the-password
-
Create a
terraform.tfvars
file the following:subscription_id = "the-subscription-id" tenant_id = "the-tenant-id" client_id = "the-app-id" client_secret = "the-password"
Be sure to skip the creation of the Ops Manager VM. Do not include the ops_manager_image_uri
var as a variable. If you create your Ops Manager using terraform, you will not be able to manage it with Platform Automation.
Deployment of the infrastructure is still required.
Note: If you're using Platform Automation, be sure to skip this step as explained here. If you create your Ops Manager here, you will not be able to manage it with Platform Automation.
Depending if you're deploying PAS or PKS you need to perform the following steps:
cd
into the proper directory:- Create
terraform.tfvars
file - Run terraform apply:
terraform init
terraform plan -out=plan
terraform apply plan
Copy the stub content below into a file called terraform.tfvars
and put it in the root of this project.
These vars will be used when you run terraform apply
.
You should fill in the stub values with the correct content.
subscription_id = "the-subscription-id"
tenant_id = "the-tenant-id"
client_id = "the-app-id"
client_secret = "the-password"
env_name = "banana"
ops_manager_image_uri = "url-to-opsman-image"
location = "West US"
dns_suffix = "domain.com"
# optional. if left blank, will default to the pattern `env_name.dns_suffix`.
dns_subdomain = ""
- env_name: (required) An arbitrary unique name for namespacing resources
- subscription_id: (required) Azure account subscription id
- tenant_id: (required) Azure account tenant id
- client_id: (required) Azure automation account client id
- client_secret: (required) Azure automation account client secret
- ops_manager_image_uri: (optional) URL for an OpsMan image hosted on Azure (if not provided you get no Ops Manager)
- location: (required) Azure location to stand up environment in
- dns_suffix: (required) Domain to add environment subdomain to
When deploying the isolation segments tile you can optionally route traffic through a separate domain and load balancer by specifying:
- isolation_segment: (default false) Creates a DNS record and load balancer for isolation segment network traffic when set to true.
Note: please make sure you have created the terraform.tfvars
file above as mentioned.
terraform init
terraform plan -out=plan
terraform apply plan
Note: This will only destroy resources deployed by Terraform. You will need to clean up anything deployed on top of that infrastructure yourself (e.g. by running om delete-installation
)
terraform destroy