Conductor Documentation

Infrablock Plugin

Requirements

Workflows

The following workflows are available in Infrablock plugin:

1. Provision Sysctrl

Comments in the code:

# assumption: 
# 1, install workflow executed successfully, 
# 2, during install workflow, bmo_node_instance 
# has stored 'site_name', 'ciq_values' to runtime_properties 
# 3, there must be 1 and only 1 bmo_node_instance 
# bmo discover servers, wrcp audit servers, bmo update hwprofiles 
# subgraph_name = 'predeploy_wrcp' 

Objective:

Runs a set of pre-defined operations.

Summary: Creates a set of operations including:

Builds a workflow graph using these operations as parameter: for each instance of node_instances adds a sub tasks as dependency of the parent’s workflow graph.

2. Provision Subclouds

Comments in the code:

# bmo discover servers, wrcp audit servers, bmo update hwprofiles 

Objective:

Discovers and audit servers to update hwprofiles.

Summary:

Receives a blueprint id and sites names, checks if there is a deployment for each site name, if there isn’t, uses the predeploy method to get bmo info and uses it to create a set of operations that will be added to the workflow graph.

The operations in each set includes:

3. Decommission subclouds

Objective:

Decommission a list of subclouds that were installed by the Provision subclouds workflow. This will power off all nodes of each subcloud, unmanage and delete them from the System Controller, and delete their subenvironments in Conductor.

Requirements:

  1. Infrablock plugin environment successfully installed, with Provision sysctrl and Provision subclouds already executed.
  2. The subclouds named as input for the workflow must still exist in Conductor as subenvironments for the System Controller environment.
  3. The subclouds named as input for the workflow must still have their secrets stored in Conductor.

Inputs:

  1. site_names (required): a list with the names of the subclouds to be decommissioned, e.g. ["cellsite-1", "cellsite-2", "cellsite-3"].

Usage:

  1. Run the Decommission subclouds workflow from the System Controller deployment with the specified inputs. It will:
    1. Power off all servers from each subcloud provided as input and wait until the subcloud becomes offline in the system controller;
    2. Unmanage the subclouds if they’re still managed in the system controller;
    3. Delete the subclouds from the system controller;
    4. Mark their status as decommissioned in the WRCP node’s runtime properties;
    5. Delete their subenvironments in Conductor.

Tests and Set Up

Running the tests:

In the terminal, run the following command:

tox

Running tests without tox

To run tests directly with pytest, run the following:

python3.6 -m venv venv 
source venv/bin/activate 
pip install --upgrade pip 
pip install -r test-requirements.txt 
pip install -r dev-requirements.txt 
 

python -m pytest 

or 
python -m pytest path/to/test/file 

Build wagon with docker helper

sudo docker run -v "$(pwd):/packaging" cloudifyplatform/cloudify-centos-7-py3-wagon-builder 

or

sudo docker run -e HTTP_PROXY="http://147.11.252.42:9090" -e HTTPS_PROXY="http://147.11.252.42:9090" -v "$(pwd):/packaging" cloudifyplatform/cloudify-centos-7-py3-wagon-builder 

Validate wagon

virtualenv env3 -p /usr/bin/python3 
source env3/bin/activate 
pip install wagon[venv] 
wagon validate ./conductor_wrcp_plugin-0.0.33-py36-none-linux_x86_64.wgn 
wagon install ./conductor_wrcp_plugin-0.0.33-py36-none-linux_x86_64.wgn 
ls env3/lib/python3.6/site-packages/ |grep conductor_wrcp_plugin 
deactivate 

Installing and using the plugin

Upload the built wagon alongside the plugin’s yaml. Then, upload the desired blueprint (there are some samples inside the examples folder).

Blueprints found in the repository

  1. Blueprint_ib.yaml

    This blueprint can be used to provision system controllers.

    Imports:

    Inputs:

    • file_server
    • ciq_file_path
    • ciq_file_list
    • golden_config_file_path
    • golden_config_file_list
    • audit_use_external_resource
    • bmc_use_external_resource
    • dm_use_external_resource
    • dm_chart_file

    Dsl Definitions:

    • deployment_config
    • dmfiles_config
    • subclouddeployfiles_config

    Node Templates:

    • bmo_global_controller
    • ibprofile_auditor
    • master_iso
    • Redfish
    • Wrcp
    • master_iso_cleaner

    Capabilities:

    • wrcp-custom-iso-url
    • wrcp-os-auth-url
    • wrcp-os-user
    • wrcp-os-password
    • wrcp-os-cacert
    • wrcp-os-insecure
    • wrcp-os-region-name
    • k8s-cluster-name
    • k8s-admin-user
    • k8s-ip
    • k8s-service-account-token
    • k8s-cacert
    • k8s-admin-client-cert
    • k8s-admin-client-key
  2. Blueprint_subcloud.yaml

    This blueprint can be used to provision subclouds.

    • Inputs:

      • site_name
      • systemcontroller_ssh_host
      • systemcontroller_ssh_username
      • systemcontroller_ssh_password
      • bmo_info
      • file_server
      • ciq_file_path
      • ciq_file_list
      • golden_config_file_path
      • golden_config_file_list
    • Dsl definitions:

      • systemcontroller_ssh_config
      • deployment_config
    • Node Templates:

      • Subcloudcontroller
    • Removed the following capabilities

      • wrcp-os-user
      • wrcp-os-auth-url
      • wrcp-os-password
      • wrcp-os-cacert
      • wrcp-os-insecure
      • wrcp-os-region-name
      • openstack-ip
      • openstack-key