Using object storage on an instance

Now that we have seen how to get files in and out of Swift, let's look at installing the necessary client libraries on an instance to be able to interact with object storage on the instance. We will need to have the Swift client libraries installed so that the OpenStack command-line client can be executed on an instance. In this cluster, Swift is using Keystone for authentication. Swift can also use other authentication. It has a built-in authentication system and can also be used with other common authentication systems. Since Swift is configured to use Keystone for authentication, the Keystone client will also need to be installed. Let's install those clients now:

instance# sudo yum install -y https://www.rdoproject.org/repos/rdo-release.rpm
instance# sudo dnf install -y python-openstackclient

There will be a quite a few dependent packages that yum will install. Once those are installed, you will need to create a keystonerc file to source. Create a file with the same information that was used to create the overcloudrc file. The names of these rc files do not matter. The filename keystonerc is a traditional name for these files that hold this authentication information:

instance# cat > ~/keystonerc_danradez << EOF
export OS_USERNAME=danradez
export OS_TENANT_NAME=danradez
export OS_PASSWORD=supersecret
export OS_AUTH_URL=http://192.168.122.101:5000/v2.0/
export PS1='[u@h W(keystone_danradez)]$ '
EOF

Make sure that the auth_url matches the auth_url from your original overcloudrc file. Once you have this file, source it and execute object store commands from the instance, just as you have just done from the undercloud now.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.59.198