azurehpc/examples/cycleserver
Xavier Pillons b043e9e500 remove config=local option 2019-10-03 12:55:33 +02:00
..
config.json add CLI config file 2019-10-02 16:03:36 +02:00
config_cli.json use double curly braces 2019-10-03 12:53:18 +02:00
readme.md remove config=local option 2019-10-03 12:55:33 +02:00

readme.md

Deploying a CycleCloud application server with azhpc

Visualisation: config.json

This example shows how to silently setup a VM with CycleCloud installed and configured, plus installing and configuring the CycleCloue CLI for that instance.

NOTE: MAKE SURE you have followed the steps in prerequisite before proceeding here

Initialize your environment

First initialise a new project. AZHPC provides the azhpc-init command that will help here. Running with the -s parameter will show all the variables that need to be set, e.g.

$ azhpc-init -c $azhpc_dir/examples/cycleserver -d cycleserver -s

The variables can be set with the -v option where variables are comma separated. The -d option is required and will create a new directory name for you.

The required variables you need to set are :

Name Description
location The region where the resources are created
resource_group The resource group to put the resources
key_vault The Key Vault name to use. If it doesn't exists it will be created in the same resource_group. If it exists, make sure you have read/write access policies to secrets.
spn_name Service Principal Name to be used by CycleCloud. If it doesn't exists it will be created, you have to be owner of the subscription. If it exists you need to store its associated secret in the Key Vault key_vault under the secret CycleAdminPassword
projectstore The name of the Azure Storage to be created to store Cycel Project files

The optional variables you need to set are :

Name Description
appId The appId associated to the spn_name in case of an existing SPN not owned by the user running the script
$ azhpc-init -c $azhpc_dir/examples/cycleserver -d cycleserver -v location=eastus,resource_group=azhpc-cycle,key_vault=mykv,spn_name=CycleApp,projectstore=azhpccyclestore

Create the VM

$ cd cycleserver
$ azhpc-build

Once finished list the CycleCloud configuration

$ ~/bin/cyclecloud config list
Available Configurations:
cycleserverc33bef : url = https://cycleserverc33abc.eastus.cloudapp.azure.com  [CURRENT]

And retrieved the Cycle Admin password

$ key_vault="mykv"
$ az keyvault secret show --name "CycleAdminPassword" --vault-name $key_vault -o json | jq -r '.value'

Setup Cycle Cloud CLI

$ azhpc-build -c config_cli.json

Browse to the url displayed to start the Cycle Web UI, connect with the hpcadmin user and the password retrieved above.