This has been tested under Python3, and requires the following modules:
Building and testing have been done under PyCharm CE on MacOS.
This script is a very rough POC and is not in any way intended for production.
A copy of the file can be seen in this repository, at bin/create-docker.py.
/Users/jschmidt/PycharmProjects/mexapi/venv/bin/python /Users/jschmidt/PycharmProjects/mexapi/create-docker.py
Creating the application...
{}
Creating the cluster...
{"data":{"message":"Creating"}}
{"data":{"message":"Creating Dedicated VM for Docker"}}
{"data":{"message":"Creating Heat Stack for munich-main-testcluster-demoorg"}}
{"data":{"message":"Creating Heat Stack for munich-main-testcluster-demoorg, Heat Stack Status: CREATE_IN_PROGRESS"}}
{"data":{"message":"Setting Up Root LB"}}
{"data":{"message":"Ready"}}
{"data":{"message":"Created ClusterInst successfully"}}
Creating the AppInst...
{"data":{"message":"Creating"}}
{"data":{"message":"Seeding docker secret"}}
{"data":{"message":"Deploying Docker App"}}
{"data":{"message":"Configuring Firewall Rules and DNS"}}
{"data":{"message":"Creating"}}
{"data":{"message":"Ready"}}
{"data":{"message":"Created AppInst successfully"}}
Process finished with exit code 0