Search code examples
openstackopenstack-swift

How to configure openstack swift without other openstack projects?


I try to configure swift object storage but without success. If I use controller with keystone then all works good (like in documentation):
http://docs.openstack.org/mitaka/install-guide-rdo/swift-controller-install.html
But the problem is that I want to use only swift object storage. Nothing more.
I have tried to configure swift like in that documentation but without [filter:keystoneauth] and [filter:authtoken].
After that I tried to verify operations with this command: swift stat
It shows:

Auth version 1.0 requires ST_AUTH, ST_USER, and ST_KEY environment variables
to be set or overridden with -A, -U, or -K.

Auth version 2.0 requires OS_AUTH_URL, OS_USERNAME, OS_PASSWORD, and
OS_TENANT_NAME OS_TENANT_ID to be set or overridden with --os-auth-url,
--os-username, --os-password, --os-tenant-name or os-tenant-id. Note:
adding "-V 2" is necessary for this.

But I don't have a keystone. How can I get access to the swift?
If I am not wrong it is the article to configure swift without keystone: http://docs.openstack.org/developer/swift/development_saio.html
But it is little bit hard. I am not sure how to follow this article properly.


Solution

  • By default swift has the TempAuth, (also know as version 1.0) method of authentication (http://docs.openstack.org/developer/swift/overview_auth.html). You can use it for tests purposes but it isn't recommend for production.

    The SAIO article you quoted runs it. Here are some points it does that you might be missing:

    If you removed [filter:keystoneauth] and [filter:authtoken] you should:

    1 - add tempauth to [pipeline:main]

    pipeline = catch_errors gatekeeper healthcheck proxy-logging cache bulk tempurl ratelimit crossdomain container_sync tempauth staticweb copy container-quotas account-quotas slo dlo versioned_writes proxy-logging proxy-server
    

    2 - Configure tempauth section inside proxy-server.conf with something like this:

    [filter:tempauth]
    use = egg:swift#tempauth
    user_admin_admin = admin .admin .reseller_admin
    user_test_tester = testing .admin
    user_test2_tester2 = testing2 .admin
    user_test_tester3 = testing3
    

    Also, if you want run the swift client withou params you should configure the environment variables.

    $ export ST_USER=admin:admin
    $ export ST_KEY=admin