Name: marketplace_ami
Owner: Chef Partners
Description: The marketplace_ami cookbook provides a chef resource for publishing AMI's into the AWS Marketplace.
Created: 2015-08-19 01:06:25.0
Updated: 2016-03-12 01:36:45.0
Pushed: 2015-08-20 20:49:33.0
Homepage: null
Size: 124
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
The marketplace_ami cookbook provides a chef resource for publishing AMI's into the AWS Marketplace. The resource will provision a new EC2 instance, converge your application cookbook, create an AMI and share it with AWS Marketplace. Optionally you can enable a security recipe that will remove sensitive data and a chef-client audit mode recipe that will audit the image for known AWS security policies.
Chef 12.3.0 or higher. Chef Provisioning 1.2.0 or higher. Chef Provisioning AWS 1.2.1 or higher.
The latest versions are always recommended.
build-essential
xml
Only to be used if chef-provisioning-aws has not been installed
The attributes in this cookbook are used only by the the security recipe and audit controls.
Key | Type | Description | Default |
---|---|---|---|
['marketplace_ami']['controls']['cloud_init_enabled'] | Boolean | Whether or not the security audit should expect cloud-init to installed | true |
['marketplace_ami']['controls']['default_user'] | String | The default user for SSH access | ec2-user |
['marketplace_ami']['controls']['login_shell'] | String | The default users login_shell | /bin/bash |
Creates an AWS Marketplace AMI
create
- (default) Create an AWS Marketplace AMIname
The name of the AMI.product_code
The product code you wish to associate with the AMIsource_image_id
The base image to launch (Ubuntu 14.04)instance_type
The size of the instance to launch (m4.xlarge)ssh_keyname
The name of the SSH keypair (creates a default if not given)ssh_keypath
The path to the private SSH keyssh_username
The username (ubuntu)chef_server_url
The URL to the Chef Server (local default)machine_options
A Hash of additional chef-provisioning machine_optionssecurity
Enable to disable the security recipe (false)security_recipe
The security recipe (marketplace_ami::_security)audit
Enable to disable the audit recipe (true)audit_recipe
The audit recipe (marketplace_ami::_security_controls)attribute
Set an attribute for the chef-client runrecipe
Add a recipe to the runlistrole
Add a role to the runlistBefore you being you'll need to properly set up valid EC2 credentials on the node that will be converging the recipe.
Update the metadata.rb
of your application's cookbook to depend on 'marketplace_ami'
ur_application/metadata.rb
'your_application'
nds 'marketplace_ami'
Create a publishing recipe that utilizes the marketplace_ami
resource to build your Marketplace AMI
ur_application/recipes/ami_publisher.rb
etplace_ami "your_application-#{node['your_application']['version']}" do
stance_type 't2.medium'
urce_image_id 'ami-123456'
h_keyname 'publisher'
h_keypath '~/.aws/publisher.pem'
h_username 'ec2-user'
oduct_code '123799879'
curity true
dit true
le 'company_wide_role'
cipe 'your_application::setup'
cipe 'your_application::install'
tribute %w(your_application tofu), 'yes'
tribute %w(your_application brocolli), 'more_please'
tion :create
Run the chef-client!
Author:: Chef Partner Engineering (partnereng@chef.io)