This tutorial will walk you through how to set up connections to each cloud provider, and how to deploy an instance. We include the steps for deploying to both Amazon Web Services (AWS) and Google Cloud Platform (GCP) using our system.

Adding Home Page

Before the multi-cloud application can be run, there are a few necessary steps that need to be taken in order to establish a connection through the Apache Libcloud API. The file that you need to make changes to is config.py located in the app director.

In order to deploy an instance, a user needs to have both an AWS and GCP accounts, and create keys to connect to the respective cloud provider.

AWS:

  1. Log in to the AWS console here.
  2. Click on services in the navigation bar and select IAM.IAM Page
  3. On the left side navigation pane, click on Users.
  4. Click on Add User and make sure that programmatic access is checked.Add User
  5. Click next to assign permissions to the user. Click on Create Group and type in any group name. Then select AmazonEC2FullAccess from the selection of policies.Create Group AWS
  6. Continue through the steps until the User is created. Once created, select the user from the Users page.user_CreateAccessKey
  7. Click on Create Access Key and a window will pop up with your new key.Access Key
  8. Copy the Access Key ID and the Secret Access Key to the variables EC2_ACCESS_ID and EC2_SECRET_KEY in the config.py file.

GCP:

  1. Log in to the GCP console here.
  2. Create a new project by clicking on the navigation bar at the top.GCP Project
  3. Once created, copy the project ID to the variable GCP_PROJECT_ID in the config.py file. The project ID is listed on the home page of the project.Project Home
  4. Next, use the navigation pane to find APIs and Services. Click on Create Credential and select OAuth Client ID.GCP Create Credential
  5. Select Other and create a name for the key.GCP Oauth
  6. Copy the client ID and client Secret to the GCP_CLIENT_ID and the GCP_SECRET_KEY variables in config.py.GCP KeyNote: GCP requires that billing is set up in order to use the Apache Libcloud API.
    Now, wee are ready to run the application. In the directory that contains run.py, run the following command:
    Python run.py
    
    Note: On first run, GCP sometimes requires a user to navigate to a website that is listed in the terminal and enter the code listed to allow connection. This is a one time thing.
  1. After going to the IP address listed after running application (localhost in most cases), click on the custom or predefined buttons that are located on the home page.Home Page
  2. If you clicked on the Custom button, you will be taken to a page in which you are prompted for input.Custom Options
  3. If you clicked on the Predefined button, you will be takeen to a page in which you are to select a specific workload.Predefined Options
  4. Submit your input.
  1. After submitting your input, you will be given a series of options to choose from (three max). You can scroll between each of the options.options1options2
    The option highlighted in green is the cheapest option.
  2. Click on the option you want to use, and click on the deploy button.
  3. You will be brought to a deployment page in which the status of deployment is listed.Deployment
    Your instance will be pending until initialization, or provisioning, is complete.
  4. When you log in to the respective cloud provider, you will see the instance created.
    For example, if you deployed to AWS, navigate to EC2 using the services navigation bar. Select running instances.AWS Running