Name: atomic-cookbook
Owner: Chef Partners
Description: A Chef library cookbook that provides resources for configuring Atomic Masters and Minions
Created: 2015-05-29 16:52:21.0
Updated: 2015-10-30 14:31:58.0
Pushed: 2015-10-09 15:11:25.0
Homepage: null
Size: 206
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
The “atomic” cookbook provides Chef resources to create nodes based in Red Hat's Project Atomic. See the project's website for more information on Project Atomic.
This cookbook has been tested in CentOS 7 and uses KVM/libvirt to create the Atomic hosts.
NOTE: This cookbook is a very rough implementation and will likely need changes to work in larger, multi-master production environments. We look forward to your feedback and pull requests!
Key | Type | Description | Default |
---|---|---|---|
['atomic']['work_dir'] | String | Location on host to store VM data, including disk images, cloud-init ISOs, etc. | /var/lib/atomic |
['atomic']['image_base_uri'] | String | Base URI from where to download the Atomic host images. | http://buildlogs.centos.org/rolling/7/isos/x86_64 |
['atomic']['image_version'] | String | Name of the Atomic Host image to use. | CentOS-7-x86_64-AtomicHost-20150228_01.qcow2.xz |
This is a library cookbook which provides the atomic_host
resource for you to use in your own recipes. In addition, the atomic::default
recipe should be included in your own recipe or your host's run_list
which will baseline your host as a KVM hypervisor.
To create an Atomic “master” host:
ic_host 'my_master' do
_address '192.168.122.50'
de_ips [ '192.168.122.51', '192.168.122.52', '192.168.122.53' ]
le :master
tion :create
To create an Atomic “node” host:
ic_host 'node_1' do
_address '192.168.122.51'
ster_ip '192.168.122.50'
le :node
tion :create
The following attributes are accepted in the atomic_host
resource:
ip_address
: required - IP address to assign to the Atomic host. You should ensure this is an IP in an available subnet in your virtualization setup (i.e. libvirt's default of 192.168.122.0/24)role
: required - should be either :master
or :node
master_ip
: required if role == :node - the IP address of the master. The node will not be able to function without knowing which master to join.node_ips
: required if role == :master - an array of IP address of atomic nodes that this master should manage.password
: optional - password to assign to the centos
user during cloud-init. If not provided, a random password will be generated for you and placed in the user-data
file.ssh_keys
: optional - an array of SSH public keys to add to the new Atomic host. This cookbook will create a hypervisor-specific key to be used during the provisioning process, as well.ram
: optional - amount of RAM, in MB, to allocate to this Atomic host. Defaults to 2048.cpus
: optional - number of vCPUs to allocate to this Atomic host. Defaults to 2.flannel_network
: optional - the supernet to be used by the flannel network overlay service. Defaults to 172.16.0.0/12
flannel_subnet_length
: optional - the size of the subnet to be reserved by the flannel network overlay service from within the flannel_network
supernet, stated in CIDR bits as an integer. Defaults to 24
(i.e. a '/24' network)flannel_backend_type
: optional - backend network device. Defaults to vxlan
.A test-atomic
cookbook can be found in test/fixtures/cookbooks which uses the atomic_host
resource to spin up one master and two nodes. Because these nodes are virtual machines, if your test environment is also a VM, your test environment must support nested virtualization.
VirtualBox does not support nested virtualization, though it will appear to work and just be incredibly slow. Therefore, the .kitchen.yml
file provided with this repository targets using VMware Fusion via Vagrant, and enables nested virtualization via a provider customization. VMware Fusion, and the Vagrant VMware plugin, are commercial software and are not free.
Author:: Chef Partner Engineering (partnereng@chef.io)
Copyright:: Copyright (c) 2015 Chef Software, Inc.
License:: Apache License, Version 2.0
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.