Conductor Documentation

StarlingX Plugin

The StarlingX plugin enables you to discover StarlingX systems and manage resources on StarlingX systems.

Start out by providing the credentials for an existing StarlingX system. The install workflow will gather information from the system, for example type and location.

To discover subclouds, execute the discover_and_deploy workflow over a Controller deployment. This workflow performs the following tasks:

NOTE: The StarlingX Plugin is designed to work with the StarlingX blueprint, which is located in the examples directory of the plugin repository.

Requirements

Labels

The following are possible for a StarlingX system deployment:

Sites

During installation the plugin requests a system’s location (latitude and longitude) from the StarlingX API, and creates a Site in Cloudify. You can see sites’ location on the map on the Dashboard screen.

Node Types

cloudify.nodes.starlingx.WRCP

This node represents a StarlingX System. A system can be a System Controller, Standalone system, or a Subcloud.

Properties

Runtime Properties:

Workflows

The following workflows are available for the in StarlingX plugin:

1. Discover Subclouds

Objective: Discover subclouds of starlingx controllers.

Summary

For a single controller a hint is used or for all nodes in the deployment discover subclouds is used. We get the controller objects, then search those for subclouds related to that controller. The controller node instance runtime properties are then updated with a dict of related subclouds info.

2. Discover and deploy

Objective:

Discovers and deploys subclouds.

Summary:

Checks if there are discovered subclouds using the “Discover Subclouds” workflow, then gets the controller node instance, and uses the parent deployment’s capabilities to get auth data.

Checks if the deployment_id passed from the workflow is valid and if there are 2 subclouds or more in the controller node instance runtime properties. If not, raises an Exception.

Then, for each of the subclouds, checks if the subcloud has already been discovered and deployed. If not, checks if the address of the subcloud is ipv4 or ipv6, formats and dict of “inputs”, adds the labels, adds the id of each of the deployments to a list, as the inputs and labels.

To complete, calls deploy_subclouds with the data gathered in the previous step.

Stories

The StarlingX plugin supports the following stories:

NOTE: Manual enrollment requires you to assign the csys-obj-parent label.

Prerequisites

All stories require that you provide a secrets for the following values:

You are free to change the names of the secrets, however, you must provide the secret names in the deployment inputs when enrolling a new system.

Tests and Set Up

Running the tests:

In the terminal, run the following commands:

export HTTP_PROXY=http://147.11.252.42:9090
export HTTPS_PROXY=http://147.11.252.42:9090
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 ./generated_wagon_file.wgn
wagon install ./generated_wagon_file.wgn

ls env3/lib/python3.6/site-packages/ | grep conductor_wrcp_plugin
deactivate