This repository is designed to be run in Docker out of the box using docker-compose. Optionally the user can make minor configuration changes to run portions of the project on their local machine for easier programmatic interaction with Mobius directly.
git clone https://github.com/RENCI-NRIG/Mobius.git
cd ./Mobius/docker
Once images are ready, update configuration in docker as indicated below:
- Copy
config/application.properties.template
toconfig/application.properties
. Update user specific values for each cloud credentials (exogeni, chameleon, jetstream and mass open cloud)
mobius.exogeni.user=kthare10
mobius.exogeni.certKeyFile=<Exogeni Pem File Name(geni-kthare10.pem)>
Follow the instructions here https://chameleoncloud.readthedocs.io/en/latest/technical/cli.html to setup Chameleon API password. Download Openstack RC file from Chameleon GUI to get the value for client_id
.
mobius.chameleon.client_id=
mobius.chameleon.client_secret=none
mobius.chameleon.endpoint.scope=openid profile
mobius.chameleon.user.domain=default
mobius.chameleon.user=<User Name>
mobius.chameleon.user.password=<Password>
# Flynet Project Name and Project ID
mobius.chameleon.project=CHI-210827
mobius.chameleon.projectId=40753b15f6c34f9c8d4695c97b026796
mobius.chameleon.project.domain=default
mobius.jetstream.user.domain=<domain>
mobius.jetstream.user=<User Name>
mobius.jetstream.user.password=<Password>
First, go to https://sso.massopen.cloud/auth/realms/moc/account and after logging in, go to the password tab and set a password. This will be used to bypass the University/GitHub login, and login directly from SSO.
mobius.mos.user=<User Name>
mobius.mos.user.password=<Password>
- Using Mobius without SDX (network requests would not work in this case) Update docker-compose.yml for mobius_server to point the below parameters to user specific locations. User needs to modify the values before the colon to map to location on host machine.
# point to user specific keys below
volumes:
- "./logs:/code/logs"
- "./mobius-sync:/code/mobius-sync"
- "./config/application.properties:/code/config/application.properties"
- "./config/log4j.properties:/code/config/log4j.properties"
- "<Absolute Path of Exogeni Certficate File>:/code/ssh/<Exogeni Certificate File Name(geni-kthare10.pem)>"
- "<Absolute path to User public key>/id_rsa.pub:/code/ssh/id_rsa.pub"
- "<Absolute path to User private key>/id_rsa:/code/ssh/id_rsa"
- Using Mobius with SDX Update following fields docker/config/sdx.conf
slicename="<Slice Name>"
exogenipem="./ssh/<Exogeni Certificate File name(geni-kthare10.pem)"
Update docker-compose_sdx.yml for sdxserver to point the below parameters to user specific locations. User needs to modify the values before the colon to map to location on host machine.
# point to user specific keys below
volumes:
- "./sdxlog:/code/log"
- "./config/sdx.conf:/code/config/sdx.conf"
- "<Absolute Path of Exogeni Certficate File>:/code/ssh/<Exogeni Certificate File Name>"
- "<Absolute path to User public key>/id_rsa.pub:/code/ssh/id_rsa.pub"
- "<Absolute path to User private key>/id_rsa:/code/ssh/id_rsa"
- "./resources:/code/resources"
Run docker-compose up -d from Mobius/docker directory when running without SDX.
$ docker-compose up -d
Creating database ... done
Creating rabbitmq ... done
Creating mobius ... done
Creating notification ... done
Run docker-compose -f docker-compose_sdx.yml up -d from Mobius/docker directory when running with SDX.
$ docker-compose -f docker-compose_sdx.yml up -d
Creating database ... done
Creating rabbitmq ... done
Creating mobius ... done
Creating notification ... done
Creating sdxserver ... done
After a few moments the docker containers will have stood up and configured themselves. User can now trigger requests to Mobius. Refer to Interface to see the REST API
- Create a workflow
curl -X POST -i "localhost:8080/mobius/workflow?workflowID=abcd-5678" -H "accept: application/json"
- Get workflow status
curl -X GET -i "localhost:8080/mobius/workflow?workflowID=abcd-5678" -H "accept: application/json"
- Provision Compute node
curl -X POST -i "localhost:8080/mobius/compute?workflowID=abcd-5678" -H "accept: application/json" -H "Content-Type: application/json" -d @compute.json
- Provision Storage node
curl -X POST -i "localhost:8080/mobius/storage?workflowID=abcd-5678" -H "accept: application/json" -H "Content-Type: application/json" -d @storage.json
- Extablish a network link
curl -X POST -i "localhost:8080/mobius/network?workflowID=abcd-5678" -H "accept: application/json" -H "Content-Type: application/json" -d @network.json
- Delete workflow
curl -X DELETE -i "localhost:8080/mobius/workflow?workflowID=abcd-5678" -H "accept: application/json"
Example json files available at test directory.
- List workflows
curl -X GET -i "localhost:8080/mobius/listWorkflows"