A knife-openstack wrapper with support for YAML profiles
Add this line to your Chef repository's Gemfile:
gem 'knife-openstack_launcher',
:git => 'git@github.com:greenalto/knife-openstack_launcher.git'And then execute:
$ bundleCreate a config/openstack.yml file in your Chef repository. Here's an example:
profiles:
instance:
security_groups:
- "default"
run_list:
- "role[base]"
flavor: "t1.micro"
image: "ami-f5998981"
distro: "chef-full"
To bootstrap an "instance" server with the right security group, flavor and image, launch from your Chef repository:
knife openstack server from profile instance.example.com --profile=instanceYou can specify the path to a YAML config file:
knife openstack server from profile instance.example.com --profile=instance \
--yaml-config=/path/to/config.ymlYou can override anything that can be set when bootstrapping a node using knife-openstack using the YAML profiles. See ec2_base and ec2_server_create for a complete reference.
You can also add any command-line switch from knife ec2 server create --help.
For example, if you want to create a more powerful SVN server in another region
as a one-time action:
knife openstack server from profile svn_us.example.com --profile=svn \
--region=us-west-1 --flavor=m1.smallIf you don't specify something in the profile, it is going to be taken from
your .chef/knife.rb or the defaults from the knife-ec2 plugin. For example:
knife[:flavor] = 'm1.small'
knife[:ssh_user] = 'ubuntu'At the time of this writing:
aws_access_key_idaws_secret_key_idregionflavorimagesecurity_groupssecurity_group_idsassociate_eiptagsavailability_zonechef_node_namessh_key_namessh_userssh_passwordssh_portssh_gatewayidentity_fileprereleasebootstrap_versiondistrotemplate_fileebs_sizeebs_optimizedebs_no_delete_on_termrun_listjson_attributessubnet_idprivate_ip_addresshost_key_verifybootstrap_protocolfqdnaws_user_datahintephemeralserver_connect_attribute
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request

