Skip to content

Hosted Chef related steps

Svyatoslav Reyentenko edited this page Aug 1, 2012 · 1 revision

Step 'chefrun'

Run chef run list on virtual machines with provided role

Example

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"
        ]
    ]
}

Step 'chefdatabag'

Create a chef databag to use in environments chef runs

Example

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
}

Step 'chefrole'

Create a chef role to use in environments chef runs

Example

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
}

Step 'clearChefEnv'

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.

Example

clearChefEnv {
    phase = "destroy"
}
Clone this wiki locally