Verify the InstallationYou can run these commands from the proxy server or any
server that has access to the Identity Service.If you use the Identity Service, use the following
commands. If you use swauth, use the
default_swift_cluster variable to
connect to your swift cluster. Follow the swauth documentation to verify your
installation.To verify the installationExport the swift admin password, which you set up
previously, to a variable:$export ADMINPASS=secreteIf you do not wish to have the swift admin
password stored in your shell's history, you can
run the following command:$export SWIFT_PROXY_CONF="/etc/swift/proxy-server.conf export ADMINPASS=$( grep admin_password ${SWIFT_PROXY_CONF} | awk '{ print $NF }' )Export the ADMINPASS environment variable:$export ADMINPASS=secreteRun the following swift command with the correct Identity
Service URL:$swift -V 2.0 -A http://<AUTH_HOSTNAME>:5000/v2.0 -U demo:admin -K $ADMINPASS statGet the X-Storage-Url and
X-Auth-Token headers:$curl -s http://<AUTH_HOSTNAME>:5000/v2.0/tokens -X 'POST' -d '{"auth":{"passwordCredentials":{"username":"demo", "password":"$DEMOPASS"}}}' -H "Content-Type: application/json" | python -mjson.toolCheck that you can HEAD the account:$curl -X HEAD -i -H "X-Auth-Token:<token-returned-from-above-request>' <internal-url-returned-above-including-AUTHnnnnnn>For example:HTTP/1.1 204 No Content
Content-Length: 0
Accept-Ranges: bytes
X-Timestamp: 1375369982.17376
X-Account-Bytes-Used: 0
X-Account-Container-Count: 0
Content-Type: text/plain; charset=utf-8
X-Account-Object-Count: 0
X-Trans-Id: txb014c725573b44f48e260002f39ce2b6
Date: Thu, 01 Aug 2013 18:39:00 GMTRun the following swift commands to upload files to
a container:$swift -V 2.0 -A http://<AUTH_HOSTNAME>:5000/v2.0 -U demo:admin -K $ADMINPASS upload myfiles bigfile1.tgz$swift -V 2.0 -A http://<AUTH_HOSTNAME>:5000/v2.0 -U demo:admin -K $ADMINPASS upload myfiles bigfile2.tgzRun the following swift command to download all
files from the ‘myfiles’ container:$swift -V 2.0 -A http://<AUTH_HOSTNAME>:5000/v2.0 -U demo:admin -K $ADMINPASS download myfiles