Giter Site home page Giter Site logo

swift-operator's Introduction

swift-operator

The swift-operator is an OpenShift Operator built using the Operator Framework for Go and provides an easy way to install and manage an OpenStack Swift installation on OpenShift.

Available documentation

Getting Started

The easiest way is to deploy using the openstack-operator and install_yamls.

Deploy using the openstack-operator

git clone https://github.com/openstack-k8s-operators/install_yamls.git ~/install_yamls/

cd ~/install_yamls/devsetup/
make download_tools
CPUS=12 MEMORY=25600 DISK=100 make crc
make crc_attach_default_interface

cd ~/install_yamls
make crc_storage input openstack_wait openstack_wait_deploy

Accessing Swift using the CLI

You can use the openstackclient CLI to access the Swift deployment directly, for example:

$ oc rsh openstackclient
$ openstack container create test
$ openstack object save test obj

If you want to use the swift CLI instead, use the openstackclient pod and set the required OS_ env variables:

$ oc rsh openstackclient

$ export OS_AUTH_URL=$(grep -o 'https.*' ~/.config/openstack/clouds.yaml)
$ export OS_USERNAME=$(grep -Po '(?<=username: ).*' ~/.config/openstack/clouds.yaml)
$ export OS_PROJECT_NAME=$(grep -Po '(?<=project_name: ).*' ~/.config/openstack/clouds.yaml)
$ export OS_PASSWORD=$(grep -Po '(?<=password: ").*(?=")' ~/.config/openstack/secure.yaml)
$ export OS_AUTH_VERSION=3

You can now use the swift command directly, for example:

$ swift stat -v
            StorageURL: http://swift-public-openstack.apps-crc.testing/v1/AUTH_ebc5...
            Auth Token: gAAAAABklVH8utLpwDdfR_2_vDd-aYasUFzjoca7yo_YME8RUbiwyqhK6qp...
               Account: AUTH_ebc5787630474735905073de1fcd675f
            Containers: 0
               Objects: 0
                 Bytes: 0
          Content-Type: text/plain; charset=utf-8
           X-Timestamp: 1687507453.27883
       X-Put-Timestamp: 1687507453.27883
                  Vary: Accept
            X-Trans-Id: txbb13222da0d94527a7101-00649551fc
X-Openstack-Request-Id: txbb13222da0d94527a7101-00649551fc
            Set-Cookie: 8555ec7bc3b761f9a531b621867c3563=e9a23689a3c471db8c6babe532...
         Cache-Control: private

License

Copyright 2022.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

swift-operator's People

Contributors

abays avatar bshephar avatar cschwede avatar dprince avatar fao89 avatar fmount avatar gibizer avatar jparoly avatar kajinamit avatar mrkisaolamb avatar olliewalsh avatar openshift-ci[bot] avatar openshift-merge-bot[bot] avatar openshift-merge-robot avatar rabi avatar sandeepyadav93 avatar stuggi avatar yazug avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.