Sunday, October 27, 2013

Setup the Chef Environment

Under chef-cookbooks/environments directory setup the environment json file. For example create a grizzly-quantum-1.json file with the following contents:

{
  "name": "grizzly-quantum-1",
  "description": "Chef-server Grizzly Quantum Multinode environment",
  "json_class": "Chef::Environment",
  "chef_type": "environment",
  "override_attributes": {
    "nova": {
      "libvirt": { "virt_type": "qemu" },
      "network": {
        "provider": "quantum"
      }
    },
    "mysql": {
      "allow_remote_root": true,
      "root_network_acl": "%",
      "server_root_password": "fr3sca",
      "server_debian_password": "fr3sca"
    },
    "osops_networks": {
      "nova": "10.112.252.0/24",
      "public": "10.112.252.0/24",
      "management": "10.112.252.0/24"
    }
  }
}



You need to mention the Network you are using on your eth0 as the "nova", "public" and "management" attributes. Change these attributes to the network address you are using:

"osops_networks": {
"nova": "10.112.252.0/24",
"public": "10.112.252.0/24",
"management": "10.112.252.0/24"
}


Upload the environment to the Chef Server as below:

# knife environment from file grizzly-quantum-1.json


You can verify that the environment file has been uploaded to Chef Server using the following command:

# knife environment list
_default
grizzly-quantum-1

No comments:

Post a Comment