Chef change attributes node level Java cookbook
How do you change the attributes at the node level. I just went through this recently with some Scala servers that required Oracle Java 7. The defaults for the Java cookbook at the marketplace: https://supermarket.getchef.com/cookbooks/java#readme are openJDK 6. To replace them you need to:
knife node edit <NODE_NAME>
In the editor that pops up add the java section under normal. In the precidence order normal will overwrite the attributes in the java file.
{
"name": "AWSSERVER-UE1T",
"chef_environment": "TEST",
"normal": {
"java": {
"install_flavor": "oracle",
"jdk_version": "7",
"oracle": {
"accept_oracle_download_terms": true
}
},
"set_fqdn": "AWSSERVER-UE1T.aws.test.local",
"agency": "VIV",
"tags": [
]
},
"run_list": [
"role[linux_base]",
"recipe[ubuntu_xfce_rdp]",
"recipe[scala]"
]
}
Now with that said after running chef-client locally on the server it didn’t pickup the changes. But you will see the change in the json attributes on the chef server.
Amazon has a good atricle on overriding attributes here: http://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook-json-override.html
You may also like
Putty is the worst ssh client ever!
Chef calculate checksum
Chef-client fails to complete
Archives
Calendar
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | 31 | |||||
Leave a Reply