Automated deployment of an nginx cluster served by a load balancer. Provisioning is done in the Azure Cloud using Terraform, the machines are then configured using Ansible.
Clone the repo:
git clone https://github.com/pathei-kosmos/ansinetes.git
cd ansinetes
Initialize the Terraform project:
terraform init
Start by connecting Azure CLI to the Azure subscription you want to use for deployment:
az login
Create a terraform.tfvars
file in the project root.
Two variables need to be overridden:
subscription_id
: for the ID of the Azure subscription you wish to use for deployment (its explicit mention is mandatory since AzureRM version 4.0). Your subscription ID can be found with theaz account show
command (“id” field).vm_password
: to define the password of the virtual machines' administrator account.
The syntax of the terraform.tfvars
file is as follows:
subscription_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
vm_password = "xxxxxxxxxxxxx"
You can then check the resources to be deployed:
terraform plan
If everything looks fine, you can start the deployment:
terraform apply
To delete the deployed resources:
terraform destroy