-
Notifications
You must be signed in to change notification settings - Fork 10
Hosted Chef related steps
Svyatoslav Reyentenko edited this page Aug 1, 2012
·
1 revision
Run chef run list on virtual machines with provided role
chefrun {
phase = "example"
roles = ["vmrole"] // list of roles of machines on which chef script should be runned
runList = ["recipe[erlang]"] // chef run list
isGlobal = false // run chef script on all machines or only on machines created during current workflow
jattrs = [ // JSON attributes for chef script
tomcat : [
java_options : "-Xms256M -Xmx512M"
]
]
}
Create a chef databag to use in environments chef runs
chefdatabag {
phase = "example"
name = "xwiki" // databag name
items = [ // JSON items of databag
"i1" : ["a1" : "v1"],
"i2" : ["a2" : "v2"]
]
overwrite = true | false // overwrite if databag with the same name exists
}
Create a chef role to use in environments chef runs
chefrole {
phase = "example"
name = "role" // role name
description = "desc" // role description
runList = ["recipe[erlang]"] // role run list
defaults = ["a1" : "v1"] // role default JSON attributes
overrides = ["a2" : "v2"] // role override JSON attributes
overwrite = true | false // overwrite if role with the same name exists
}
Usually placed in destroy workflow. This step destroys roles and databags associated with environments on hosted Chef server, and removes virtual machines registration from there.
clearChefEnv {
phase = "destroy"
}