Created
August 17, 2019 01:20
-
-
Save Adron/de993a7053bbd8f27aa850b16b279d57 to your computer and use it in GitHub Desktop.
Apache Cassandra 3.11.4 on Ubuntu 18.04 LTS Packer Template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"variables": { | |
"client_id": "{{env `TF_VAR_clientid`}}", | |
"client_secret": "{{env `TF_VAR_clientsecret`}}", | |
"tenant_id": "{{env `TF_VAR_tenant_id`}}", | |
"subscription_id": "{{env `TF_VAR_subscription_id`}}", | |
"imagename": "", | |
"storage_account": "adronsimagestorage", | |
"resource_group_name": "adrons-images" | |
}, | |
"builders": [{ | |
"type": "azure-arm", | |
"client_id": "{{user `client_id`}}", | |
"client_secret": "{{user `client_secret`}}", | |
"tenant_id": "{{user `tenant_id`}}", | |
"subscription_id": "{{user `subscription_id`}}", | |
"managed_image_resource_group_name": "{{user `resource_group_name`}}", | |
"managed_image_name": "{{user `imagename`}}", | |
"os_type": "Linux", | |
"image_publisher": "Canonical", | |
"image_offer": "UbuntuServer", | |
"image_sku": "18.04-LTS", | |
"azure_tags": { | |
"dept": "Engineering", | |
"task": "Image deployment" | |
}, | |
"location": "westus2", | |
"vm_size": "Standard_DS2_v2" | |
}], | |
"provisioners": [{ | |
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E sh '{{ .Path }}'", | |
"inline": [ | |
"echo 'Starting Cassandra Repo Add & Installation.'", | |
"echo 'deb http://www.apache.org/dist/cassandra/debian 311x main' | tee -a /etc/apt/sources.list.d/cassandra.sources.list", | |
"curl https://www.apache.org/dist/cassandra/KEYS | apt-key add -", | |
"apt-get update", | |
"apt-key adv --keyserver pool.sks-keyservers.net --recv-key A278B781FE4B2BDA", | |
"apt-get -y install cassandra" | |
], | |
"inline_shebang": "/bin/sh -x", | |
"type": "shell" | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment