Instantly share code, notes, and snippets.

Embed
What would you like to do?
gatling packer digitalocean + amazon example
{
"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