Created
June 3, 2017 12:16
-
-
Save dasgoll/97ce8a4e595866e249460ffe4933c0ab to your computer and use it in GitHub Desktop.
Packer Docker and Chef
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
{ | |
"builders": [{ | |
"type": "docker", | |
"image": "centos" | |
}], | |
"provisioners" : [ | |
{ | |
"type": "shell", | |
"inline": ["yum update -y"] | |
}, | |
{ | |
"type": "chef-client", | |
"staging_directory": "/etc/chef", | |
"server_url": "https://yourchefserver.com", | |
"validation_client_name": "validator", | |
"validation_key_path": "/home/user/validator.pem", | |
"install_command": "curl -L https://www.opscode.com/chef/install.sh | sudo bash -s -- -v 12.6.0", | |
"chef_environment": "default", | |
"run_list": "role[yourrole]", | |
"node_name": "packer_and_chef" | |
}], | |
"post-processors" : [ | |
[ | |
{ | |
"type": "docker-tag", | |
"repository": "yourrepo/example", | |
"tag": "0.1" | |
}, | |
"docker-push" | |
] | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment