mex-docs

Deploying a VM via Python

Prerequisites

This has been tested under Python3, and requires the following modules:

Building and testing have been done under PyCharm CE on MacOS.

Notes

This script is a very rough POC and is not in any way intended for production.

Source

A copy of the file can be seen in this repository, at bin/create-vm.py.

Example Run

/Users/jschmidt/PycharmProjects/mexapi/venv/bin/python /Users/jschmidt/PycharmProjects/mexapi/create-vm.py
Creating the application...
{}
Creating the AppInst...
{"data":{"message":"Creating"}}
{"data":{"message":"Deploying VM"}}
{"data":{"message":"Creating Heat Stack for demoorgvmtwo10"}}
{"data":{"message":"Creating Heat Stack for demoorgvmtwo10, Heat Stack Status: CREATE_IN_PROGRESS"}}
{"data":{"message":"Creating Heat Stack for demoorgvmtwo10, Heat Stack Status: CREATE_COMPLETE"}}
{"data":{"message":"Creating"}}
{"data":{"message":"Ready"}}
{"data":{"message":"Created AppInst successfully"}}


Process finished with exit code 0