Installs Enterprise Chef tools and provides custom resources
Key | Type | Description | Default |
---|---|---|---|
['chef']['config']['node_name'] | String | Chef config node name | pivotal |
['chef']['config']['client_key'] | String | Chef config client key | /etc/opscode/pivotal.pem |
['chef']['config']['chef_server_root'] | String | Chef config server root | https://localhost |
['chef']['config']['private_key_raw'] | String | Chef config private key string. Creates ['chef']['config']['client_key'] with provided key value if configured | nil |
['knife']['admin']['config'] | String | Knife config file for admin | /opt/opscode/embedded/conf/knife-pivotal.rb |
['knife']['admin']['bin'] | String | knife-opc bin file | /opt/opscode/embedded/bin/knife-opc |
- Adds Chef bin dir to system path
-
Installs the knife-opc gem
-
Creates a knife-opc bin script which is preconfigured and ready to execute
knife-opc user list
user
{
"id": "rockawesome",
"first_name": "Fred",
"last_name": "Mercury",
"email": "[email protected]",
"password": "bohemian"
}
org
{
"id":"neworgrockawesome",
"description": "My New Org",
"users" : [
"rockawesome"
],
"groups" : {
"admins" : [
"rockawesome"
],
"billing-admins" : [
"rockawesome"
]
}
}
myuser = 'fred'
chef_user myuser do
action :create
first_name 'Fred'
last_name 'Mercury'
email "#{myuser}@getchef.com"
password 'bohemian'
end
chef_org 'neworg' do
action :create
description 'My Organization'
users myuser # associates user with org. Supports String or an Array of users.
end
[ 'admins', 'billing-admins' ].each do |group|
chef_group group do
action :add
org myuser
users [ myuser ]
end
end
- When a user is created the private key is saved as a databag item (user/fred.json, org/neworg.json)
- add more knife-opc commands as resources
- install knife-acl and knife-opc-backup
- add knife-acl and knife-opc-backup commands as resources
- chef server status resources (commands as well?)
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write your change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request using Github
Authors: Patrick Wright