Skip to content

Automated deployment of a nginx cluster with Terraform and Ansible.

Notifications You must be signed in to change notification settings

pathei-kosmos/ansinetes

Repository files navigation

🏭 Ansinetes

Lab infrastructure diagram

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.

Requirements

Setup

Clone the repo:

git clone https://github.com/pathei-kosmos/ansinetes.git
cd ansinetes

Initialize the Terraform project:

terraform init

Usage

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 the az 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

About

Automated deployment of a nginx cluster with Terraform and Ansible.

Topics

Resources

Stars

Watchers

Forks

Languages