Workflow: Azure¶
This workflow is based on setting up the power server and client for an Azure cluster created as explained in the Cloud Azure Workflow
Server Setup¶
Install Action Server¶
To install the action server on CentOS 7 x86_64, simply install the package with yum:
yum install flight-action-api
Note
This assumes that the OpenFlight Package Repositories are configured on the node
Install Power Scripts¶
To install the power scripts to jumpstart research environment management, install with yum:
yum install flight-action-api-power
Install Azure CLI¶
Refer to the Azure CLI documentation for help with installing the repository and tool.
Once installed, authenticate the tool with your Azure account:
$ az login
Add Nodes¶
Nodes are added to the config file at /opt/flight/opt/action-api/config/nodes.yaml, below is an example of the node configuration for a simple 3 node cluster consisting of a gateway and two compute nodes:
gateway1:
ranks: [azure]
azure_resource_group: mycluster-abcd123
azure_name: flightcloudclustergateway1
node01:
ranks: [azure]
azure_resource_group: mycluster-abcd123
azure_name: flightcloudclusternode01
node02:
ranks: [azure]
azure_resource_group: mycluster-abcd123
azure_name: flightcloudclusternode02
Start Service¶
The OpenFlight Service utility is used to start the service:
$ flight service start action-api
Note
The general OpenFlight webserver service also needs to be running, this can be launched with flight service start www
Enable Service¶
The OpenFlight Service utility is used to enable the service:
$ flight service enable action-api
Note
In order to integrate the service enabling with systemd (to ensure the service starts at boot), the flight-plugin-system-systemd-service package will need to be installed
Generate Token¶
To generate a 30-day authentication token for the client, run:
$ flight action-api generate-token
eyJhbGciOiJIUzI1NiJ9.eyJhZG1pbiI6bnVsbCwiZXhwIjoxNTgxODcyNjA2fQ.WXm-F07bAl78UTZHAsFKLXzYokBwVfgMabzIMgNfc5Y
This will return a token that can be entered into the config of a power client to authenticate against this server.
Client Setup¶
Install Action Client¶
To install the action client on CentOS 7 x86_64, simply install the package with yum:
yum install flight-action
Note
This assumes that the OpenFlight Package Repositories are configured on the node
Add Security Token¶
Add security token to /opt/flight/opt/action/etc/config.yaml so the file looks similar to the following:
base_url: https://gateway1/action
jwt_token: eyJhbGciOiJIUzI1NiJ9.eyJhZG1pbiI6bnVsbCwiZXhwIjoxNTgxODcyNjA2fQ.WXm-F07bAl78UTZHAsFKLXzYokBwVfgMabzIMgNfc5Y
Note
If using a self-signed certificate then add verify_ssl: false to the config
List Available Nodes¶
A list of the configured nodes can be seen from the client as so:
$ flight action estate-list
gateway1
node01
node02
Note
The flight command can be executed with it’s full path (/opt/flight/bin/flight) in the case that flight-starter has not been installed to add the command to the environment.
Check Power Status of Nodes¶
To check the power status of all nodes, simply:
$ flight power status -g gateway1,node0[1-2]
gateway1: ON
node01: ON
node02: ON
Power Off a Node¶
A node can be powered off as follows:
$ flight power off node02
Power off node02, confirm to proceed [y/n]?
y
OK
Restart a Node¶
To power cycle a node, simply:
$ flight power cycle node02
Power cycle node02, confirm to proceed [y/n]?
y
OK