Oracle Compute Cloud Service exposes a set of REST APIs for managing Compute Cloud resources programmatically. This post presents to you a sample implementation of the REST API using Python Requests package.
Inside the package,
After an instance is created, you can access it via SSH using the private key provided in the package. You can use the DeleteComputeCloudResources.py module to remove all resources created by the CreateComputeCloudInstance.py module.
If you are familiar with Oracle Compute Cloud, the sample code should be self-explanatory. Otherwise, a quick read through some documentations here should help you get started.
To run the sample code, you need:
Finally, a little disclaimer here. This is my first serious Python attempt beyond hello world. There are definitely rooms for improvement in terms Python best practices. So please leave a comment so that I can learn from this exercise. Any questions are welcome too.
Sample code available upon request.