4.3. Development Environment Sandbox

This section relates to the usage of a sandbox repository that has been created for the development of all the services that are required to run the HDAs. It is considered as a baseline repository to fork and develop your custom HDA in a working CICD environment which is connected to the HDAR and thus enables you to later deploy and test your applications. See image below.

../_images/dev-sandbox.png

Development Environment Sandbox

The objective is to simplify how HDAs are developed and provide a common CICD environment which ensures a minimal level of quality and reliability to all artifacts entering the Nephele SMO Platform. The Development Environment Sandbox is complemented with a second pipeline of verification which is performed at the HDA Registry, which includes more advanced tests, as shown in the figure below:

../_images/dev-cycle.png

Development Environment Cycle

4.3.1. Prerequesites

A HDA developer needs to configure its own local environment with:

  1. Fork the development environment sandbox

  2. Create user and password to the Nephele Platform. Refer to Dashboard.

  3. Configure them as cicd variables in gitlab (NEPHELE_USER and NEPHELE_PASSWORD).

  4. Create a Gitlab Personal Access Token to interact with gitlab

  5. Clone your forked repository with the PAT

  6. Install a local docker CLI (e.g., docker desktop)

  7. Load the hdarctl CLI to your PATH

cd <forked-dev-env-sandbox>
TOOLS_DIR=$(realpath ./tools/)
export PATH=$TOOLS_DIR:$PATH
hdarctl --help

4.3.2. Quickstart

  1. Login to HDAR with the Nephele platform credentials

hdarctl login registry.nephele-hdar.netmode.ece.ntua.gr -u <NEPHELE_USERNAME> -p <NEPHELE_PASSWORD>
  1. Create your first VO

hdarctl login registry.nephele-hdar.netmode.ece.ntua.gr -u <NEPHELE_USERNAME> -p <NEPHELE_PASSWORD>
  1. For each new virtual-object or hda-graph:

cd <corresponding directory>
hdarctl create --help   # Make sure to use the --adapt-dev-env tag
# Select the right artifact type and any option required
git add .
git commit -m "baseline artifact"
git push
# See the first CICD executed
  1. Until the artifact is considered finished continue with the dev cycle:

# Adapt descriptors as required to represent your use case
hdarctl lint <path to artifact>
# See logs and adapt the descriptors accordingly