i installed openstack using devstack then i discovered that the swift service (object store) is missed how i can add it ?

asked 2014-04-24 18:33:53 -0500

fahmi gravatar image

My work deal with setting up a private cloud storage

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2014-04-24 23:50:49 -0500

Abhay Dandekar gravatar image

updated 2014-04-24 23:51:46 -0500

Before going ahead with SWIFT, make sure your keystone is ready. If not, I'd suggest to go ahead with tempauth for time being, and later complete the picture with KeySTONE.

  1. If you already have a stack user, skip this step.

    ssh root@<ipv4 address="">

    adduser --gecos "" stack

    adduser stack sudo

    grep -q "^#includedir.*/etc/sudoers.d" /etc/sudoers || echo "#includedir /etc/sudoers.d" >> /etc/sudoers

    ( umask 226 && echo "stack ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/50_stack_sh )

    exit

Creating a stack user like this avoids the permission issues that I came across while installing mine.

  1. Now login as the stack user and setup Swift:

    ssh stack@<your address="">

    sudo apt-get -y update

    sudo apt-get -y install git

    git clone https://github.com/openstack-dev/devstack.git (https://github.com/openstack-dev/devs...)

    cd devstack

    vim localrc # copy in the contents of this one

    ./stack.sh

    screen -r stack

When running stack.sh you might see an error message that reads “ERROR: at least one rpc backend must be enabled”. Don’t worry about it, Swift/Keystone doesn’t need an rpc (AMQP) backend. Also, you might not even face this issue because you are having the devstack already installed. You can also ignore any ImportErrors.

When DevStack is done you can point your OpenStack clients and jclouds dev env all at <ipv4 address=""> When you’re done with your development/testing you can delete the server to save money and just start fresh next time.

Execute a few REST PUT and GET commands to test your installation. One typical REST command is to get the list of containers. Just google it across, you will find 10 different ways to go ahead.

Regards,

Abhay Dandekar

edit flag offensive delete link more
0

answered 2014-04-25 20:56:54 -0500

DanIzack gravatar image

View this link Don't forget

Create a swift user that the Object Storage Service can use to authenticate with the Identity Service. Choose a password and specify an email address for the swift user. Use the service tenant and give the user the admin role:

$ keystone user-create --name=swift --pass=SWIFT_PASS \
  --email=swift@example.com
$ keystone user-role-add --user=swift --tenant=service --role=admin

Create a service entry for the Object Storage Service:

$  keystone service-create --name=swift --type=object-store \
  --description="Object Storage Service"
+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| description |      Object Storage Service      |
|             |                                  |
|             |                                  |
|      id     | eede9296683e4b5ebfa13f5166375ef6 |
|     name    |              swift               |
|     type    |           object-store           |
+-------------+----------------------------------+


Specify an API endpoint for the Object Storage Service by using the returned service ID. When you specify an endpoint, you provide URLs for the public API, internal API, and admin API. In this guide, the controller host name is used:

$ keystone endpoint-create \
  --service-id=the_service_id_above \
  --publicurl='http://controller:8080/v1/AUTH_%(tenant_id)s' \
  --internalurl='http://controller:8080/v1/AUTH_%(tenant_id)s' \
  --adminurl=http://controller:8080
+-------------+---------------------------------------------------+
|   Property  |                       Value                       |
+-------------+---------------------------------------------------+
|   adminurl  |            http://controller:8080/                |
|      id     |          9e3ce428f82b40d38922f242c095982e         |
| internalurl | http://controller:8080/v1/AUTH_%(tenant_id)s      |
|  publicurl  | http://controller:8080/v1/AUTH_%(tenant_id)s      |
|    region   |                     regionOne                     |
|  service_id |          eede9296683e4b5ebfa13f5166375ef6         |
+-------------+---------------------------------------------------+
edit flag offensive delete link more

Comments

I installed the object store but i faced a strange exception : ServiceCatalogException at /project/containers/

Invalid service catalog service: object-store

Request Method: GET Request URL: http://127.0.0.1/project/containers/ Django Version: 1.6.2 Exception Type: ServiceCatalogException Exception Value:

Invalid service catalog service: object-store

Exception Location: /opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/api/base.py in url_for, line 270 Python Executable: /usr/bin/python Python Version: 2.7.5 Python Path:

['/opt/stack/horizon/openstack_dashboard/wsgi/../..', '/usr/local/lib/python2.7/dist-packages/pip-1.4.1-py2.7.egg', '/opt/stack/pbr', '/opt/stack/cliff', '/opt/stack/oslo.config', '/opt/stack/oslo.messaging', '/opt/stack/oslo.rootwrap', '/opt/stack/oslo.vmware', '/opt/stack/pycadf', '/opt/stack/stevedore', '/opt/stack/taskflow', '/opt/stack/python-keystoneclient', '/opt/stack/python-glanceclient', '/opt/stack/python-cinderclient', '/opt/stack/python-novaclient', '/opt/stack/python-swiftclient', '/opt/stack/python-neutronclient', '/opt/stack/python-heatclient', '/opt/stack/python-openstackclient', '/opt/stack/keystone', '/opt/stack ...(more)

fahmi gravatar imagefahmi ( 2014-04-26 17:59:33 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2014-04-24 18:33:53 -0500

Seen: 720 times

Last updated: Apr 26 '14