Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.
Versions
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store
Close

Configuration Management provider integration example for Cloud Management

Configuration Management provider integration example for Cloud Management

You can provision cloud resources based on resource types on your Chef server and manage newly provisioned resources through both the Chef Server and your ServiceNow instance.

Chef integration involves registering your Chef server to the instance, running Discovery, and creating customized blueprints and application profiles.

Requirements

  • Role required: cloud_admin
  • Install and configure a Chef server

What to do

Create a configuration management provider and run Discovery
First create a configuration management provider record with the necessary credentials that can access the server. Then run Discovery on the configuration management provider to populate the CMDB. See Create a configuration management provider and run Discovery for instructions.
Create an application profile and template
Your users can select a virtual machine that is based on an application profile, which in turn is based on a Chef resource. You must map an application profile template to a cloud resource profile of type Application. See Example: create an application profile template for configuration management provider integration and Create a cloud resource profile for instructions.
Create a blueprint
Create a new blueprint with BootstrapNode and ExecuteConfigPackages resource operations and customize the form to allow the user to select the application profile template, organization, and credential ID. See Example: create a blueprint for configuration management provider integration for an example.

Next steps

After a user provisions a resource from the blueprint, the Stack Status indicates how the system runs through the Create node, Bootstrap, and ExecuteConfigPackage steps. You can obtain the IP address of a virtual machine in the User Portal by going to Stacks > {category} and selecting the new virtual machine. Open the Chef server to see the newly provisioned resource on the node the user specified.

Create a configuration management provider and run Discovery

Create a configuration management provider like Chef or Ansible and run discovery on the provider to discover the resources for the provider.

Before you begin

Let's take an example of a chef server provider and run Discovery.

Procedure

  1. Navigate to Cloud Management > Cloud Admin Portal > Manage > Config Management.
  2. Click New.
  3. Fill out the form fields (see table). Obtain most of this information from your Chef server etup.
    Field Description
    Name Enter a descriptive name.
    URL Enter the URL of your Chef server, including port number.
    Organization Enter the Chef organization for access control.
    Version Select a version.
    Server Type Select a server type.
    Service Category Select one of the Cloud Service categories.
    Provider Type Select Chef Server12 or Ansible Tower.
    Credential Select the Chef credentials
  4. Click Submit.
  5. Click Discover Now. The discovered resources appear under Entities. The discovered resources for Chef are Chef Server Cookbook, Chef Server Node, and Cfg Installable. The discovered resources for Ansible are Ansible Inventory and Cfg Installable.

Example: create an application profile template for configuration management provider integration

Create an application profile template from discovered resources in a Chef server. You can use these to allow users to select the type of application profile when they provision a virtual machine.

Before you begin

Let's take an example of a chef server provider.

Procedure

  1. Navigate to Cloud Management > Cloud Admin Portal > Manage > Resource Profiles > Application Profile.
  2. Click New.
  3. Fill out the form fields (see table).
    Field Description
    Name Provide a descriptive name.
    Template ID Enter an ID to use for the template.
    Config Installable Click the lookup icon and select a value from tTable Name and choose the records for the table from the Document field.
    Config runlist provider Select a value
    Provider Instance Select a Chef server or Ansible Tower provider.
  4. Right-click the header and select Save.

Example: create a blueprint for configuration management provider integration

This example shows you how to create a custom blueprint that you can use in a Chef integration.

Before you begin

Role required: cloud_admin

Procedure

  1. Navigate to Cloud Management > Cloud Service Design > Blueprints.
  2. Click New.
  3. Create a deployment model with a container, virtual machine, and a datacenter.

  4. Click the Operations tab, and then click Steps.
  5. Add these resource operations based on the Virtual Server:
    • Bootstrap Node
    • Register Node
    • ExecuteConfigPackages

      Adding the bootstrap operation

    You should have five operations:
    • Blueprint Container Resource.Provision
    • Virtual Server.Provision
    • Bootstrap Node
    • Register Node
    • ExecuteConfigPackages
  6. Make the following changes to these operations and click Save after each change:
    Operation Make this change
    Blueprint Container Resource.Provision Enable WorkloadConfigProvider and WorkloadConfigProvider Type. The user uses this field to select the configuration management provider.
    Management Attributes Every operation will have it's own management attributes.
    Ensure that for the form parameters, Virtual_Server_ApplicationProfile, Virtual_Server_ConfigurationOverrides, and Virtual_Server_ManagementAttributes, the value in the Form UI Group field is set to General Info. This enables the data to load in the order catalog form for these attributes.
  7. Publish the catalog item and make it active.

Result

Your users can provision a resource based on this blueprint. See Configuration Management provider integration example for Cloud Management for a high-level overview of what happens during an example Chef integration and provisioning.