{"id":15,"date":"2015-07-29T16:53:32","date_gmt":"2015-07-29T15:53:32","guid":{"rendered":"http:\/\/www.haxed.me.uk\/?p=15"},"modified":"2015-07-30T10:27:25","modified_gmt":"2015-07-30T09:27:25","slug":"argumentative-supernova-and-python-pip","status":"publish","type":"post","link":"https:\/\/haxed.me.uk\/index.php\/2015\/07\/29\/argumentative-supernova-and-python-pip\/","title":{"rendered":"Argumentative Supernova and python pip"},"content":{"rendered":"<p>My first few weeks at working in cloud, particularly openstack were challenging. There were quite a few tools ,and interpreters that I had to get used to using and debugging to properly use software, and as always, the compiler or interpreters messages aren&#8217;t usually helpful. It&#8217;s worth noting that before we start, some of the messages from python applications can be unhelpful and appear to be dependency issues but in one case it was because of an extra character lurking in my .supernova configuration, thanks to a colleague of mine who pointed this out yesterday.<\/p>\n<p><a href=\"http:\/\/www.haxed.me.uk\/wp-content\/uploads\/2015\/07\/openstack.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24\" src=\"http:\/\/www.haxed.me.uk\/wp-content\/uploads\/2015\/07\/openstack.jpg\" alt=\"openstack\" width=\"580\" height=\"200\" srcset=\"https:\/\/haxed.me.uk\/wp-content\/uploads\/2015\/07\/openstack.jpg 580w, https:\/\/haxed.me.uk\/wp-content\/uploads\/2015\/07\/openstack-300x103.jpg 300w, https:\/\/haxed.me.uk\/wp-content\/uploads\/2015\/07\/openstack-500x172.jpg 500w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>One of the important things to get a handle on was the installation and configuration of my supernova and nova openstack for use with the Rackspace UK API. Here is some of the &#8216;arguments&#8217; we had at the commandline.<\/p>\n<p>There is some pretty helpful information listed at: https:\/\/developer.rackspace.com\/blog\/supernova-managing-openstack-environments-made-easy\/<\/p>\n<p>but I decided that after all the problems I had, specific to my Mac OS X Yosemite 10.10.4 that some sort of additional documentation on getting started was necessary, if not for other people, but my own personal record! I list quite a few of the common mishaps I ran into when installing.<\/p>\n<blockquote><p># I had lots of problems so I started from scratch<\/p>\n<p>pip freeze |\u00a0 xargs pip uninstall -y<\/p>\n<p>git clone https:\/\/github.com\/major\/supernova<br \/>\n# install latest supernova from github (optional)<br \/>\nsudo python setup.py install<\/p><\/blockquote>\n<p>After doing this and running a &#8216;supernova&#8217; command from the commandline I am quickly informed that<\/p>\n<blockquote><p>ERROR (AuthSystemNotFound): AuthSystemNotFound: \u2018rackspace&#8217;<\/p><\/blockquote>\n<p>We should make sure that the novaclient and supernova are installed and note that the supernova application is merely a wrapper for the the nova openstack api connector.<\/p>\n<blockquote><p>pip install supernova rackspace-novaclient<\/p><\/blockquote>\n<p>I also got a bit crazy and started trying to install different versions of novaclient noting that there were some possible compatibility problems between supernova and nova due to differences in the packages. I also resorted to running a &#8216;brew install python&#8217; after getting fed up, but I won&#8217;t need to cover this here because brew is fairly simple<\/p>\n<blockquote><p>pip install -U python-novaclient==2.11.1<\/p><\/blockquote>\n<p>This didn&#8217;t bring me much luck and I was sitll encountering the AuthSystemNotFound error. So I started to try and dig deeper into what was going on, and what packages were available and\/or might be missing.<\/p>\n<blockquote><p>pip search rackspace<\/p>\n<p>pip search rackspace | grep auth<\/p>\n<p>rackspace-auth-openstack\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8211; Rackspace Auth Plugin for OpenStack Clients.<br \/>\nrackspace-auth-neutronclientext\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8211; Rackspace Auth Plugin for OpenStack Neutron Clients.<br \/>\nrackspace-glanceclient\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8211; Metapackage to install python-glanceclient and Rackspace auth package<\/p><\/blockquote>\n<p>Confirming my suspicions that a plugin was not installed by pip when I ran pip install supernova rackspace-novaclient. So I ran<\/p>\n<blockquote><p>pip install rackspace-auth-openstack<br \/>\nsupernova lon image-list<br \/>\n__ Error Output ______________________________________________________________<br \/>\nERROR: No module named auth_plugin<\/p><\/blockquote>\n<p>Which certainly meant progress, now a different error, &#8220;auth_plugin&#8221;. So I re-ran an install of rackspace-novaclient<\/p>\n<blockquote><p>pip install rackspace-novaclient<\/p>\n<p>&nbsp;<\/p><\/blockquote>\n<p>paying special attention to these particular entries:<\/p>\n<blockquote><p>Successfully installed os-diskconfig-python-novaclient-ext-0.1.2 os-networksv2-python-novaclient-ext-0.25 os-virtual-interfacesv2-python-novaclient-ext-0.19 rackspace-novaclient-1.4 rax-default-network-flags-python-novaclient-ext-0.3.1 rax-scheduled-images-python-novaclient-ext-0.3.1<\/p><\/blockquote>\n<p>It looked like the two were missing some dependencies that were causing this particular cryptic error above with auth_plugin.<\/p>\n<p>I found then when running a supernova lon image-list I was presented with a new difficulty:<\/p>\n<blockquote><p>supernova lon image-list<\/p>\n<p>__ Error Output ______________________________________________________________<br \/>\nERROR: cannot import name cliutils<\/p><\/blockquote>\n<p>This was probably the least cryptic error because simply searching for cliutils with pip was easy enough, and then i installed that package:<\/p>\n<blockquote><p>pip search cliutils<br \/>\ncliutils\u00a0\u00a0\u00a0\u00a0 &#8211; A collection of utilities easing the creation of command line scripts<\/p>\n<p>pip install cliutils<\/p><\/blockquote>\n<p>for special measure I also installed a package called &#8216;rack&#8217; and upgraded supernova once more from pip repository. I do not know if these steps are necessary but if your still having trouble running supernova you can always try them:<\/p>\n<blockquote><p>pip install rack<\/p>\n<p>pip install supernova &#8211;upgrade<\/p><\/blockquote>\n<p>Which gives the friendly and expected output:<\/p>\n<p>supernova customer image-list<br \/>\n[SUPERNOVA] Running nova against customer&#8230;<br \/>\n+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br \/>\n| ID\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | Name\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | Status | Server\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |<br \/>\n+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br \/>\n| 8785022e-a29c-4e31-9d9c-213b87c63e2a | Arch 2015.7 (PVHVM)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | ACTIVE |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |<br \/>\n| 6e44a225-85f4-4d53-858b-a3022939845b | CentOS 5 (PV)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |<br \/>\n&#8230;&#8230;. etc<\/p>\n<p><strong>Please note IMPORTANTLY that to properly query the Rackspace Openstack API thru supernova nova wrapper you will require a properly formatted .supernova config file. This actually takes some time to get to grips with. Your supernova file should , usually be in your user context home, ie cd ~<\/strong><\/p>\n<p>.supernova config template<\/p>\n[myopenstackconfig]\nOS_AUTH_URL=https:\/\/identity.api.rackspacecloud.com\/v2.0\/<br \/>\nOS_AUTH_SYSTEM=rackspace<br \/>\nOS_COMPUTE_API_VERSION=1.1<br \/>\nNOVA_RAX_AUTH=1<br \/>\nOS_REGION_NAME=LON<br \/>\nNOVA_SERVICE_NAME=cloudServersOpenStack<br \/>\nOS_PASSWORD=yourrackspaceAPIkeygoeshere<br \/>\nOS_USERNAME=yourrackspacemycloudusernamegoeshere<br \/>\nOS_TENANT_NAME=yourrackspaceaccountnumbergoeshere<\/p>\n<p>If you don&#8217;t like the idea of using plaintext in your config file you could use supernova-keyring your .supernova config file must look like this:<\/p>\n[myopenstackconfig]\nOS_AUTH_URL=https:\/\/identity.api.rackspacecloud.com\/v2.0\/<br \/>\nOS_AUTH_SYSTEM=rackspace<br \/>\nOS_COMPUTE_API_VERSION=1.1<br \/>\nNOVA_RAX_AUTH=1<br \/>\nOS_REGION_NAME=LON<br \/>\nNOVA_SERVICE_NAME=cloudServersOpenStack<br \/>\nOS_PASSWORD=USE_KEYRING[&#8216;UKRackspaceAccountAPIKey&#8217;]\nOS_USERNAME=USE_KEYRING[&#8216;UKRackspaceAccountUser&#8217;]\nOS_TENANT_NAME=USE_KEYRING[&#8216;UKRackspaceAccountDDI&#8217;]\n<p>at the shell you will have to set the variables for the &#8216;keyring&#8217; do that like this and you will be prompted to type in your account API Key, and username and DDI (which is the 6 or 7 digit number your account is in the url address when using mycloud) the details there:<\/p>\n<p>Type this at the commandline<\/p>\n<blockquote><p># something like myusername<br \/>\nsupernova-keyring -s global RackspaceAccountUser<br \/>\n# something like 80aa1af9a6Bc459076834592ab324a<\/p>\n<p>supernova-keyring -s global RackspaceAccountAPIKey<\/p>\n<p># something like 1004345<br \/>\nsupernova-keyring -s global RackspaceAccountDDI<\/p><\/blockquote>\n<p>Here are some critically important and helpful links for supernova guides , tutorials, examples and so on, the developer &#8220;Major Harden&#8221; is a great guy and I am sure if you have issues further to what I had he will be able to help you further over at GitHub.<\/p>\n<p>Supernova Developers&#8217; website and documentation <a href=\"https:\/\/major.io\/2012\/06\/05\/supernova-manage-multiple-openstack-nova-environments-with-ease\/\">https:\/\/major.io\/2012\/06\/05\/supernova-manage-multiple-openstack-nova-environments-with-ease\/<\/a><br \/>\nLatest github for cloning on Github <a href=\"https:\/\/github.com\/major\/supernova\">https:\/\/github.com\/major\/supernova<\/a><br \/>\n1 Hour Presentation on Supernova <a href=\"https:\/\/www.youtube.com\/watch?v=BZGhoCYZKEM\">https:\/\/www.youtube.com\/watch?v=BZGhoCYZKEM<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>My first few weeks at working in cloud, particularly openstack were challenging. There were quite a few tools ,and interpreters that I had to get used to using and debugging to properly use software, and as always, the compiler or &hellip; <a href=\"https:\/\/haxed.me.uk\/index.php\/2015\/07\/29\/argumentative-supernova-and-python-pip\/\">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":[1],"tags":[],"class_list":["post-15","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/15","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=15"}],"version-history":[{"count":0,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/15\/revisions"}],"wp:attachment":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/media?parent=15"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/categories?post=15"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/tags?post=15"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}