rcbops/docker-openstack-cli

Name: docker-openstack-cli

Owner: rcbops

Description: null

Created: 2017-07-11 15:18:49.0

Updated: 2017-07-28 21:13:23.0

Pushed: 2017-11-16 17:54:11.0

Homepage: null

Size: 15

Language: null

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

OpenStack CLI

Use a Docker image for OpenStack client tooling! Docker Repository on Quay

Quick start

Download the openrc.sh file from Horizon in your OpenStack Cloud.

ce openrc.sh

PWD} is mounted to allow for actions requiring host filesystem access.
e 'Tips' section below
er run -it --rm --volume ${PWD}:/data --env-file <(env | grep OS_) quay.io/rackspace/openstack-cli
openstack --version
openstack server list
openstack volume list
Tips
Openstack Clusters with Self-Signed CA certs

If your cluster is using a self signed certificate for the API endpoints, you can provide that when you run the container:

Accessing a host directory

The /data directory is exposed as a volume that can be mounted. This is convenient for OpenStack commands that might require reading/writing host filesystems. It is important to remember that commands such as openstack image save should ensure that the location where the image is saved is in the /data folder when using the --rm command line option. Example:

ce openrc.sh

er run -it --rm \
volume ${PWD}:/data \
env-file <(env | grep OS_) \
ay.io/rackspace/openstack-cli \
enstack image save --file /data/test_image.img ${IMAGE_GUID}
Run one-off commands

Run individual commands easily by passing them as the command to run and overriding the default /bin/sh command. For one-off commands, it's a good practice to remove the container with the --rm argument so that you don't collect a bunch of orphaned containers.

ce openrc.sh

er run -it --rm \
volume ${PWD}:/data \
env-file <(env | grep OS_) \
ay.io/rackspace/openstack-cli \
enstack volume list
Simplify your typing with aliases
ce openrc.sh

t into a shell to run openstack commands
s osc='docker run -it --rm --volume ${PWD}:/data --env-file <(env | grep OS_) quay.io/rackspace/openstack-cli'

ke it look like you're running openstack locally
s openstack='osc openstack'
Update the OpenStack CLI version

Submit a PR with an update to the version in the Dockerfile. Once the PR merges, the master tag images at quay.io/rackspace/openstack-cli will automatically be updated to that version.

To also update the latest tag do the following:

  1. Go to the tags page.
  2. Click the gear icon for the master tag.
  3. Choose Add New Tag.
  4. Enter latest and click Move Tag.
Inspired by

https://github.com/jmcvea/docker-openstack-client


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.