Last active
August 29, 2015 14:15
-
-
Save Nimrod007/01004f955195f81c87d8 to your computer and use it in GitHub Desktop.
gatling packer digitalocean + amazon example
This file contains 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
{ | |
"builders": [ | |
{ | |
"type": "digitalocean", | |
"api_token": "XXXX", | |
"image": "ubuntu-14-04-x64", | |
"region" : "nyc3", | |
"size" : "1gb", | |
"droplet_name" : "gatlingNode" | |
}, | |
{ | |
"type": "amazon-ebs", | |
"access_key": "XXX", | |
"secret_key": "XXX", | |
"region": "us-east-1", | |
"source_ami": "ami-b8067ed0", | |
"instance_type": "t2.micro", | |
"ssh_username": "ubuntu", | |
"ami_name": "gatlingNode" | |
} | |
], | |
"provisioners": [ | |
{ | |
"type": "shell", | |
"inline": [ | |
"sudo apt-get update", | |
"sudo apt-get install -y unzip", | |
"sudo apt-get install -y default-jre", | |
"wget https://repo1.maven.org/maven2/io/gatling/highcharts/gatling-charts-highcharts-bundle/2.1.4/gatling-charts-highcharts-bundle-2.1.4-bundle.zip -P /tmp", | |
"mkdir ~/gatling", | |
"unzip /tmp/gatling-charts-highcharts-bundle-2.1.4-bundle.zip -d ~/gatling/", | |
"ssh-keygen -f ~/.ssh/id_rsa -t rsa -N ''", | |
"touch ~/.ssh/authorized_keys", | |
"cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys", | |
"touch ~/.ssh/config", | |
"echo \"Host *\" >> ~/.ssh/config", | |
"echo \" StrictHostKeyChecking no\" >> ~/.ssh/config", | |
"sync", | |
"sleep 120", | |
"echo \"finished running the script\"" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment