These example scripts use Major Tom's Scripting API to automate operations.
This provides an interactive menu to select your script. You will need access to a Major Tom instance and a token from the UI.
./run-docker.sh
- Setup a virtualenv (first time only)
pip3 install virtualenv virtualenv virtualenv -p `which python3` # or: python3 -m venv virtualenv
source virtualenv/bin/activate
pip3 install --upgrade -r requirements.txt
The structure of most scripts is:
python ./python/script_name.py {CLOUD_URL} {SCRIPT_TOKEN}
Examples:
python ./python/execute_command.py app.majortom.cloud 12345656780abcefghijkl12345656780
You can develop against a branch of the scripting API by adding something like the following to requirements.txt:
git+https://github.com/kubos/majortom_scripting_package@BRANCH_NAME#egg=majortom-scripting