After you start the Chef shared service, you can add the
Chef software component to
patterns to install the Chef client to instances during deployment.
After the Chef client is installed to the instance, the virtual machines
in the instance are registered as nodes on the Chef server. Any required
cookbooks are downloaded from the Chef server, and the specified recipes
are run on the instance.
Before you begin
You must be granted access to patterns, access to create
patterns, or have the Workload resources administration with Full permission to
create or modify patterns.
Upload the installation
packages for the Chef client to the chefclient system
plug-in through .
Select the chefclient plug-in, and click Configure.
Specify the Chef client installation packages for each operating system.
These packages are used for the Chef client installation. The version
must be version 12 or later so that SSL communication with the Chef
server is supported.
Procedure
- Click .
- Click Create New to create a new
pattern, or select an existing pattern and click Open.
- Drag the Chef Client software component to
the canvas to add it to the pattern as a separate node, or drag it
onto an existing node.
- Select the software component and
configure the attributes:
- Environment
- Specify the Chef environment to use for the installation. For
example,
_default or production.
- Tags
- Specify the tags to apply to this node for use by the Chef processes.
- Install run list
- List the recipes or other elements that you want to run on this
instance during the installation of the Chef client. Refer to the Policy tab
on the Chef server to determine what recipes are available on the
Chef server. You cannot view the available recipes from the Cloud Pak System user
interface.
Specify the recipe in brackets, for example: recipe[sample_wlp_app].
- Default run list
- List the recipes or other elements that you want to run on this
instance by default (regardless of what occurs on the client or server).
Refer to the Policy tab on the Chef server
to determine what recipes are available on the Chef server. You cannot
view the available recipes from the Cloud Pak System user
interface.
Specify the recipe in brackets, for example: recipe[sample_wlp_app].
If
the Chef server has roles defined, you can also use roles to define
the run list. Specify the role name in brackets, for example: role[webServer].
- Stop run list
- List the recipes or other elements that you want to run when a Stop is
initiated for the instance (Stop is clicked
from the instance details page). Refer to the Policy tab
on the Chef server to determine what recipes are available on the
Chef server. You cannot view the available recipes from the Cloud Pak System user
interface.
Specify the recipe in brackets, for example: recipe[sample_wlp_app].
- JSON attributes for overriding
- Specify an attribute and value to override the default value for
that attribute in a recipe or role. Specify the attributes in a comma-separated
list in
attribute name:attribute
value format.
- Attributes file in JSON format
- Specify a JSON file that contains attributes and values to override
the default values for those attributes in a recipe or role. The specified
file must be a valid JSON file.
For example,
{
"getting-started-with-sender": {
"message": "Good Night",
"sender":"Pure Application System"
},
"run_list": [ "recipe[getting-started-with-sender]" ]
}
- Run as daemon
- If checked, the instance is checked periodically (based on the
interval set in the next field) to confirm that the configuration
that is specified in the Default run list is
still true. If an element in the configuration is no longer installed
or running due to a change on the system, it is reinstalled or restarted.
Restriction: This attribute is not supported
if the Chef Client software component is
installed to a Windows image.
- Periodic intervals
- If the client is configured to run as a daemon, specify the interval
between checks to be sure that the elements that are specified in
the Default run list are still installed.
What to do next
Deploy the pattern. If you want to update the Chef configuration
after the pattern is deployed, use the Instance Console.
For more information, see the Related tasks.