Sign inSign up

iksaku/openstack-swift-container

By iksaku

•Updated over 6 years ago

Docker container that integrates OpenStack's Swift CLI client

Image
0

2.8K

iksaku/openstack-swift-container repository overview

⁠OpenStack Swift Container

CI/CD

⁠Table of Contents

⁠Tags

⁠Description

This container comes with an installation of OpenStack's Swift and Keystone CLI clients.

If you're not familiarized with the Swift client, checkout the following links:

⁠Usage

In order to authenticate against your service provider, you must pass your Swift credentias via environment variables. If you don't quite get it, please refer to the following links:

Uppon running this image, it will automatically execute the swift command, followed by any arguments you provide.

⁠Examples
  • ⁠Authentication

    Assume we're going to authenticate using Keystone v3 to a generic Object Storage service provider. As Swift's documentation states for Authentication⁠, we will need to pass the following variables (filled with credentials) to our docker image:

    VariablesValue
    ST_AUTH_VERSION3
    OS_USER_IDabcdef0123456789abcdef0123456789
    OS_PASSWORDpassword
    OS_PROJECT_ID0123456789abcdef0123456789abcdef
    OS_AUTH_URLhttps://api.example.com:5000/v3⁠

    In order to tell docker to include those variables during runtime, we need to execute the following:

    docker run -e ST_AUTH_VERSION -e OS_USER_ID -e OS_PASSWORD -e OS_PROJECT_ID -e OS_AUTH_URL openstack-swift-container --version
    

    If the image is unable to authenticate against your service provider, it will show an error message and exit from execution.

  • ⁠Skip Authentication Pre-Check

    By default, this image does a pre-check of authentication against your service provider before running your specified Swift command. You can disable this behaviour by passing the INPUT_AUTH_CHECK environment variable with a string value of 'false':

    INPUT_AUTH_CHECK='false'
    docker run -e ST_AUTH_VERSION -e OS_USER_ID -e OS_PASSWORD -e OS_PROJECT_ID -e OS_AUTH_URL -e INPUT_AUTH_CHECK openstack-swift-container --version
    
  • ⁠Swift Commands

    To execute Swift Commands⁠ with this image, we need to call them via args in the docker run command.

    Let's say we want to list our available containers. We must run:

    docker run <--env ...> openstack-swift-container list
    

    If we would like to upload Log.1 and Log.2 files to our logs container, we could run:

    docker run <--env ...> openstack-swift-container upload logs Log.1 Log.2
    

Tag summary

Content type

Image

Digest

Size

79.5 MB

Last updated

over 6 years ago

docker pull iksaku/openstack-swift-container