How to access and use the OpenStack based Switch Engine IaaS?

OpenStack is a free open standard cloud computing platform, mostly deployed as infrastructure-as-a-service (IaaS) in both public and private clouds. In this course, we will use the OpenStack based SwitchEngine IaaS

Account creation

  1. Join one of the groups on this link. Please take note that you cannot be more than 5 members in the same group.
  2. Wait for the invitation voucher you will receive by email
  3. Once you receive your email voucher, click the link and follow the instructions on the web page.
  4. Create your Keystone API credentials https://help.switch.ch/engines/faq/how-to-create-api-credentials/
  5. Store the password you created above.

Create an instance on SwitchEngine

The following tutorial will guide you through the creation of your first instance on an OpenStack based IaaS:

https://docs.openstack.org/horizon/latest/user/launch-instances.html

As for SwitchEngine, the following tutorial will guide you through the creation of your first instance:

https://help.switch.ch/engines/documentation/start-virtual-machines/

Note: Do not create an instance using the "Create instance" button on the QuickStart page.

Setting up a local dev. environment

  1. Install the OpenStack Python SDK

    https://docs.openstack.org/openstacksdk/latest/user/index.html

  2. The URL below explains how to connect to Switch Engine using OpenStack SDK. 3 options of connection are possible:

    https://docs.openstack.org/openstacksdk/latest/user/guides/connect_from_config.html

  3. We will use the config file option. Switch Engine provides you with a pre-filled config file. Download your pre-filled clouds.yaml config file and put it in your project folder. (Connect on Switch Engine before clicking the link below)

    https://engines.switch.ch/horizon/project/api_access/clouds.yaml

  4. Download the following file, and change the $API_KEY_INPUT for the credential you got from step 4 of the Account Creation

    https://engines.switch.ch/horizon/project/api_access/openrc/
  5. Run the following command:

    source <Name of the file downloaded in the previous step>
  6. Open the clouds.yaml file and add your password between the username and the project_id lines, and put as a password the credentials you got from step 4 of Account Creation

    ...
    username: "<FIRSTNAME.LASTNAME@etu.hesge.ch>"
    password: <YOUR_PASSWORD>
    project_id: <PROJECT_ID>
    ...

Be sure that the clouds.yaml is either in the folder where you have the code or on ~/.config/openstack/

Resources and code examples

OpenStack Python SDK documentation

https://docs.openstack.org/openstacksdk/latest/user/index.html

API Documentation

https://docs.openstack.org/openstacksdk/latest/user/index.html#api-documentation

Code examples

https://docs.openstack.org/openstacksdk/latest/user/guides/compute.html

If you have any questions, please contact francisco(dot)mendonca(at)hesge(dot)ch

Modifié le: mercredi 6 octobre 2021, 13:25