User Tools

Site Tools


cloud:recipe:coding

This is an old revision of the document!


Using the Cloud SDK

This document gives a quick introduction to using the Openstack Python client to discover and consume compute resources.

Before beginning, get an account as described in the Introduction

Installation

From a suitable host (this was done on linux.cs.uchicago.edu), create your environment.

$ python3 -m venv cloudsdk
$ source cloudsdk/bin/activate
$ pip3 install openstacksdk
$ python -m openstack version

Configuration

Obtain your configuration from the Web Interface . The preceding link is for authenticated and authorized users only. Please read Intro for access. After logging in to the web interface at https://overcloud.cs.uchicago.edu, click the menu on the left side, Project→API Access. On the right side of the top of the page, click "Download Openstack RC File"→"Openstack clouds.yaml file".

Save the clouds.yaml file to the current working directory, or see the Upstream Docs about config file search order:

USER_CONFIG_DIR
    Linux: ~/.config/openstack
    OSX: ~/Library/Application Support/openstack
    Windows: C:\Users\USERNAME\AppData\Local\OpenStack\openstack
SITE_CONFIG_DIR
    Linux: /etc/openstack
    OSX: /Library/Application Support/openstack
    Windows: C:\ProgramData\OpenStack\openstack

Sample Configuration File

clouds:
  openstack:
    auth:
      auth_url: https://overcloud.cs.uchicago.edu:5000
      username: "CNetID"
      password: "sekret"
      project_id: YOUR PROJECT UUID
      project_name: "CNetID"
      user_domain_name: "CS_LDAP"
    region_name: "RegionOne"
    interface: "public"
    identity_api_version: 3

Testing and Usage

Ensure you can load the python module

python -m openstack version

Check your configuration

python -m openstack.config.loader

Check the exact error if one is displayed. For example, if you see

keystoneauth1.exceptions.auth_plugins.MissingRequiredOptions: Auth plugin requires parameters which were not given: auth_url

You have failed to provide a configuration file. This is different from a syntax error, but not so different from a permission problem, for example.

/var/lib/dokuwiki/data/attic/cloud/recipe/coding.1589464238.txt.gz · Last modified: 2020/05/14 08:50 by chudler

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki