Developer Guide
This documentation provides information for admins and developers to install and deploy Skyway on the login node of a HPC system.
Pre-requisites
- Python 3.x
Installation
Installing Skyway is straightforward
1 2 3 4 5 6 7 |
|
Line 1: Check out the GitHub repo
Lines 3-4: Create a virtual environment and activate it
Line 5: Install the required packages into the environment
Lines 6-7: Set the environment variable SKYWAYROOT
and preppend it to PATH
Configuration
Under the SKYWAYROOT
folder, create a folder structure
etc/
- accounts/
- rcc-aws.yaml
- cloud.yaml
where the content of the file cloud.yaml
includes the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
This file lists all the supported cloud vendors such as aws
and their node (aka virtual machine (VM)) types.
- The
master_access_key_id
andmaster_secret_access_key
is for the AWS account that launches the ID of theio-node
instance (18.224.41.227
in this example) using the key pair namedrcc-skyway
. - The
username
entry indicates the user name used for logging into the instance (e.g. via SSH). - The
io-node
instance is up and running to provide the storage mount points (such as/software
or/cloud/rcc-aws
) if needed. - The
amd_id
entry shows the image ID used to launch theio-node
instance. These entries will be deprecated in the future versions.
Under the node-types
dictionary, we list all the VM configurations and their code names t1
, c1
and so on.
Each entry is a dictionary that defines the actual code name of the instance from the cloud vendor (t2.micro
and c5.large
for AWS in this example).
The prices are per hour for on-demand uses.
For Google Cloud Platform, you can add another entry gcp
with similar settings.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
The file rcc-aws.yaml
has the following information for the cloud account named rcc-aws
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
The cloud
entry maps the cloud vendor as defined in the cloud.yaml
file (aws
in this example).
The group
entry specifies the name of this particular cloud account.
Under the account
dictionary, we need the following entries:
- The
access_key_id
andsecret_access_key
is for this particular AWS account (e.g. a PI cloud account) that will be used to launch the instances. Theregion
andsecurity_group
entries are used to create the instances. - The
protected_nodes
entry lists the instance names that are not terminated, if any. - The
role_name
entry indicates which role is used to create instances (can be left empty). This entry exists for historical reason where the Skyway cloud account (that provides thercc-skway
role) needs to be added as a trusted agent to the cloud account to manage the instances. - The
ami_id
(orimage_id
) entry indicates the image used for the instances. Will be deprecated in the future. - The
key_name
entry indicates the key pair used for creating the instances.
Under the nodes
dictionary, we specify the number of nodes for a certain VM type, as defined in the aws
dictionary in cloud.yaml
.
The numbers just need to be greater than zero.
Under the users
dictionary, we specify the users that are allowed to use this cloud account and the corresponding budgets.
The cloud account file for gcp
is something like the following
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
Source code structure
The skyway
Python package has a simple structure as below
skyway/
- cloud/
- aws.py
- azure.py
- core.py
- gcp.py
- oci.py
- slurm.py
- __init__.py
- account.py
- utils.py
docs/
examples/
README.md