User Tools

Site Tools


cloud:cli

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revisionBoth sides next revision
cloud:cli [2020/05/14 09:36] – created chudlercloud:cli [2020/05/14 09:49] chudler
Line 1: Line 1:
-===== CLI ACCESS =====+===== CLOUD CLI ACCESS =====
  
 == INSTALL == == INSTALL ==
-It is installable in many ways. +Pip is preferred. The general CS infrastructure is good starting point. However, our experience has been that the software installs cleanly and is free from dependency problems.
- +
-Use your favorite package manager on your own computer. Pip is preferred because the upstream packages it for themselves and it is in pure python. The general CS infrastructure will become managed client for you to use in the near future (e.g., linux.cs.uchicago.edu). However, our experience has been that the software installs cleanly and is free from dependency problems.+
  
 Try: <code>python3 -m pip install --user python-openstackclient</code> Try: <code>python3 -m pip install --user python-openstackclient</code>
  
-== PRELIMINARY SETUP ==+===== CONFIGURATION =====
  
-Use environment variables to direct your client. Below is a canonical example, but you __will__ have to modify the variables according to your account.+Use a clouds.yaml file to direct your client. Below is a canonical example, but you __will__ have to modify the variables according to your account. 
 +''$HOME/.config/clouds.yaml''
 <code> <code>
-# Clear any old environment that may conflict. +clouds: 
-for key in $( set | awk '{FS="=" /^OS_/ {print $1}' ); do unset $key ; done +  openstack: 
-export OS_NO_CACHE=True +    auth: 
-export COMPUTE_API_VERSION=1.1 +      auth_url: https://overcloud.cs.uchicago.edu:5000 
-export OS_USERNAME=chudler +      username: "CNetID" 
-export no_proxy=overcloud.cs.uchicago.edu +      password: "sekret" 
-export OS_REGION_NAME=regionOne +      project_id: YOUR PROJECT UUID 
-export OS_USER_DOMAIN_NAME=Default +      project_name: "CNetID" 
-export OS_VOLUME_API_VERSION=3 +      user_domain_name: "CS_LDAP" 
-export OS_CLOUDNAME=overcloud +    region_name: "RegionOne" 
-export OS_AUTH_URL=https://overcloud.cs.uchicago.edu:13000 +    interface"public
-export NOVA_VERSION=1.1 +    identity_api_version: 3
-export OS_IMAGE_API_VERSION=2 +
-export OS_PASSWORD=sekret +
-export OS_PROJECT_DOMAIN_NAME=Default +
-export OS_IDENTITY_API_VERSION=3 +
-export OS_PROJECT_NAME=chudler +
-export OS_AUTH_TYPE=password +
-export PYTHONWARNINGS="ignore:Certificate has no, ignore:A true SSLContext object is not available+
-export OS_COMPUTE_API_VERSION=2.latest+
 </code> </code>
 +The [[ cloud:recipe:coding | Python Examples ]] use the same configuration, please read that document for detailed information about configuration and recommendations.
  
-You can also download a customized version of this data after you authenticate to the Web Interface (click API Access from the menu and then the button "Download Openstackrc File"). Make sure you read this file carefully in case you want to customize it.+You can also download a customized version of this data after you authenticate to the Web Interface (click API Access from the menu and then the button "Download Openstackrc File"). Make sure you read this file carefully in case you want to customize it. Your password is not included in the file by default.
  
-== USAGE ==+====== USAGE ======
  
 First, Take note of a loose UX pattern that the client has: First, Take note of a loose UX pattern that the client has:
Line 47: Line 39:
 For example<code>openstack server create --help</code> For example<code>openstack server create --help</code>
  
-Once you have the software installed and the shell's environment populated as above, you can start to use the client. What follows is an annotated example that will create an infrastructure of 10 Ubuntu hosts accessing the internet via a NAT device (SNAT), and with one of the hosts reachable at a separate pubic IP address (DNAT).+Once you have the software installed and the configuration file created, as above, you can start to use the client. What follows is an annotated example that will create an infrastructure of 10 Ubuntu hosts accessing the internet via a NAT device (SNAT), and with one of the hosts reachable at a separate pubic IP address (DNAT).
  
-==== Annotated Example ====+====== Annotated Example ======
 Read what has been written above before you read this. Read what has been written above before you read this.
  
-Look around. The list could be empty, but we use this command a lot!+We use this command a lot
 <code>openstack server list</code> <code>openstack server list</code>
  
/var/lib/dokuwiki/data/pages/cloud/cli.txt · Last modified: 2021/04/15 16:53 by chudler

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki