-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathfoundations-centos-7.4.json
39 lines (37 loc) · 1.41 KB
/
foundations-centos-7.4.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
"variables": {
"name": "Foundations Training - CentOS 7.4 - 1.0.0",
"workstation_version": "0.5.1"
},
"builders": [{
"ssh_username": "chef",
"ssh_password": "Cod3Can!",
"type": "amazon-ebs",
"ssh_pty": true,
"region": "us-east-1",
"instance_type": "m3.medium",
"source_ami": "ami-05e6876ba54c79c28",
"ami_name": "{{user `name`}}"
}],
"provisioners": [{
"type": "shell",
"inline": [
"echo 'The base image updated cloud-init. Waiting for cloud-init to finish (~ 5 minutes).'",
"while [ ! -f /var/lib/cloud/instance/boot-finished ]; do echo 'Waiting 15 seconds for cloud-init...'; sleep 15; done",
"curl https://omnitruck.chef.io/install.sh | sudo bash -s -- -v {{user `workstation_version`}} -c stable -P chef-workstation",
"sudo yum install -y git tree wget",
"mkdir /home/chef/.chef",
"git clone https://github.com/chef-training/chef-generator.git /home/chef/.chef/generator",
"echo 'chefdk.generator_cookbook = \"/home/chef/.chef/generator\"' > /home/chef/.chef/config.rb",
"/usr/bin/chef env --chef-license accept",
"/usr/bin/chef gem install kitchen-docker"
]
},
{
"type": "chef-solo",
"install_command": "curl -L https://www.chef.io/chef/install.sh | {{if .Sudo}}sudo{{end}} bash -s",
"cookbook_paths": ["cookbooks"],
"run_list": ["workstations::foundations"],
"chef_license": "accept"
}]
}