This repository contains samples and examples demonstrating cloud resource provisioning and usage for Amazon AWS and Google Cloud Platform (GCP).
-
Create virtual environment
$ virtualenv venv
$ source venv/bin/activate
-
Install requirements in the virtual environment
$ pip install -r requirements.txt
-
Setup PYTHONPATH
$ export PYTHONPATH=.:$PYTHONPATH
-
Do AWS setup as outlined below
-
Try examples as shown below
-
Sign up for AWS
-
Add AWS IAM user: Login to AWS Dashboard -> My Security Credentials -> Continue to Security Credentials -> Users -> Add User
-
Add permission to the user created: Select user -> Add permissions -> Attach existing policies directly -> Search for "AmazonEC2FullAccess"
-
Do AWS setup in your local account to allow SDK access to AWS. The sample examples will guide you through the setup process. You will be asked to enter aws_access_key_id, aws_secret_access_key, region, and output format. You can find names of AWS regions at the following link:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html
-
VM:
-
Examples demonstrating provisioning and management of Cloud VMs
-
Try:
$ python VM/ec2_handler.py
-
-
libvirt:
-
Examples demonstrating managing guest OSes (domains) on a host using libvirt
-
Try on EC2 Ubuntu 16.04 t2.micro instance
$ sudo apt install python-pip $ pip install libvirt-python $ python libvirt/domain_handler.py
-
-
ObjectStores:
-
Examples demonstrating use of Cloud Object Stores (e.g. AWS S3)
-
Grant AmazonS3FullAccess permission to your IAM Service Account / User
-
Try:
$ python ObjectStores/s3_handler.py
-
-
DynamoDB:
- Starter code for working with AWS DynamoDB
- Grant AmazonDynamoDBFullAccess to your IAM Service Account / User