{"id":455,"date":"2016-02-16T15:21:18","date_gmt":"2016-02-16T15:21:18","guid":{"rendered":"http:\/\/www.haxed.me.uk\/?p=455"},"modified":"2016-02-16T15:21:18","modified_gmt":"2016-02-16T15:21:18","slug":"installing-and-using-swiftly-with-rackspace-cloud-files","status":"publish","type":"post","link":"https:\/\/haxed.me.uk\/index.php\/2016\/02\/16\/installing-and-using-swiftly-with-rackspace-cloud-files\/","title":{"rendered":"Installing and using Swiftly with Rackspace Cloud Files"},"content":{"rendered":"<p>So you want a commandline tool for managing cloud files containers? Enter, swiftly. Now you&#8217;ve seen examples before with curl, fog and pyrax, but here&#8217;s a special one which is a commandline application.<\/p>\n<pre>\r\n# Upgrade pip just for hoots\r\npip install --upgrade pip\r\n\r\n# Install swiftly\r\npip install swiftly\r\n\r\n<\/pre>\n<p>Now swiftly is installed, how about configuring it in your home directory<\/p>\n<pre>\r\n# put a .swiftly.conf in your home directory, if your root i.e. \/root\/.swiftly.\r\nvi ~\/.swiftly.conf\r\n<\/pre>\n<p>This is what the configuration should look like<\/p>\n<pre>\r\n[swiftly]                                                                       \r\nauth_user = mycloudusername                                                        \r\nauth_key = mycloudapikey                                  \r\nauth_url = https:\/\/identity.api.rackspacecloud.com\/v2.0                         \r\nregion = lon\r\n<\/pre>\n<pre>\r\nbash-4.2 Tue Feb 16 15:04:34 pirax-test ~# swiftly get\r\n\r\ncurrent\r\nexport\r\nexports\r\ngallery\r\nimages\r\nlb_153727_TESTING_Nov_2015\r\nlb_153727_TESTING_Oct_2015\r\nmagento-stack-single-magento_server-gxlxbm7b6be2\r\nmeh\r\nmeh2\r\nrackspace_orchestration_templates_store\r\nscripts\r\ntesting\r\ntesting999\r\nversions\r\n<\/pre>\n<p>This gives us the output of all of the cloud containers as shown above. Pretty cool. But what about placing files in a container?<\/p>\n<pre>\r\nswiftly put -i ~\/myfile.txt CONTAINER\/path\/to\/file\/somefilenamethatsdifferent.txt\r\n<\/pre>\n<p>So If I wanted to upload to meh2 I would do an<\/p>\n<pre>\r\nswiftly put -i ~\/mylocalfile.txt meh2\/some\/container\/path\/somefileiuploaded.txt\r\n<\/pre>\n<p>The destination file can be called mylocalfile.txt if you want but I want to illustrate the target name can be different to the local source name.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So you want a commandline tool for managing cloud files containers? Enter, swiftly. Now you&#8217;ve seen examples before with curl, fog and pyrax, but here&#8217;s a special one which is a commandline application. # Upgrade pip just for hoots pip &hellip; <a href=\"https:\/\/haxed.me.uk\/index.php\/2016\/02\/16\/installing-and-using-swiftly-with-rackspace-cloud-files\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,15,14,9,7],"tags":[],"class_list":["post-455","post","type-post","status-publish","format-standard","hentry","category-api","category-cloud","category-cloud-files","category-linux","category-management-tools"],"_links":{"self":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/comments?post=455"}],"version-history":[{"count":1,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/455\/revisions"}],"predecessor-version":[{"id":456,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/455\/revisions\/456"}],"wp:attachment":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/media?parent=455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/categories?post=455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/tags?post=455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}