Use the "knife node run_list add" command to add the role to each of the Chef nodes:
# knife node run_list add setup1-controller 'role[single-controller]'
# knife node run_list add setup1-network 'role[single-network-node]'
# knife node run_list add setup1-compute 'role[single-compute]'
Use the "knife node show" command to see the node configuration:
# knife node show setup1-controller
Node Name: setup1-controller
Environment: _default
FQDN: setup1-controller
IP: 10.112.252.244
Run List: role[single-controller]
Roles:
Recipes:
Platform: ubuntu 12.04
Tags:
We see that the Environment is "_default". We need to change it to "grizzly-quantum-1" environment we created before.
Use the "knife node edit" command to edit the node configuration and change the environment from "_default" to "grizzly-quantum-1".
The node configuration will be in environment "_default" as here:
{
"name": "setup1-controller",
"chef_environment": "_default",
"normal": {
"tags": [
]
},
"run_list": [
"role[single-controller]"
]
}
We need to replace "_default" with "grizzly-quantum-1". As here:
{
"name": "setup1-controller",
"chef_environment": "grizzly-quantum-1",
"normal": {
"tags": [
]
},
"run_list": [
"role[single-controller]"
]
}
The same needs to be done for the other two nodes: setup1-network and setup1-compute.
# knife node run_list add setup1-controller 'role[single-controller]'
# knife node run_list add setup1-network 'role[single-network-node]'
# knife node run_list add setup1-compute 'role[single-compute]'
Use the "knife node show" command to see the node configuration:
# knife node show setup1-controller
Node Name: setup1-controller
Environment: _default
FQDN: setup1-controller
IP: 10.112.252.244
Run List: role[single-controller]
Roles:
Recipes:
Platform: ubuntu 12.04
Tags:
We see that the Environment is "_default". We need to change it to "grizzly-quantum-1" environment we created before.
Use the "knife node edit" command to edit the node configuration and change the environment from "_default" to "grizzly-quantum-1".
The node configuration will be in environment "_default" as here:
{
"name": "setup1-controller",
"chef_environment": "_default",
"normal": {
"tags": [
]
},
"run_list": [
"role[single-controller]"
]
}
We need to replace "_default" with "grizzly-quantum-1". As here:
{
"name": "setup1-controller",
"chef_environment": "grizzly-quantum-1",
"normal": {
"tags": [
]
},
"run_list": [
"role[single-controller]"
]
}
The same needs to be done for the other two nodes: setup1-network and setup1-compute.
No comments:
Post a Comment