github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/terraform/azure/env/EastUS/main.tf (about) 1 variable "location" { 2 description = "The Azure location to deploy to." 3 default = "East US" 4 } 5 6 variable "image_id" {} 7 8 variable "vm_size" { 9 description = "The Azure VM size to use for both clients and servers." 10 default = "Standard_DS1_v2" 11 } 12 13 variable "server_count" { 14 description = "The number of servers to provision." 15 default = "3" 16 } 17 18 variable "client_count" { 19 description = "The number of clients to provision." 20 default = "4" 21 } 22 23 variable "retry_join" { 24 description = "Used by Consul to automatically form a cluster." 25 } 26 27 terraform { 28 required_version = ">= 0.10.1" 29 } 30 31 provider "azurerm" {} 32 33 module "hashistack" { 34 source = "../../modules/hashistack" 35 36 location = "${var.location}" 37 image_id = "${var.image_id}" 38 vm_size = "${var.vm_size}" 39 server_count = "${var.server_count}" 40 client_count = "${var.client_count}" 41 retry_join = "${var.retry_join}" 42 } 43 44 output "IP_Addresses" { 45 value = <<CONFIGURATION 46 47 Client public IPs: ${join(", ", module.hashistack.client_public_ips)} 48 Server public IPs: ${join(", ", module.hashistack.server_public_ips)} 49 50 To connect, add your private key and SSH into any client or server with 51 `ssh ubuntu@PUBLIC_IP`. You can test the integrity of the cluster by running: 52 53 $ consul members 54 $ nomad server-members 55 $ nomad node-status 56 57 If you see an error message like the following when running any of the above 58 commands, it usually indicates that the configuration script has not finished 59 executing: 60 61 "Error querying servers: Get http://127.0.0.1:4646/v1/agent/members: dial tcp 62 127.0.0.1:4646: getsockopt: connection refused" 63 64 Simply wait a few seconds and rerun the command if this occurs. 65 66 The Nomad UI can be accessed at http://PUBLIC_IP:4646/ui. 67 The Consul UI can be accessed at http://PUBLIC_IP:8500/ui. 68 69 CONFIGURATION 70 }