{"id":1425,"date":"2014-03-02T08:37:44","date_gmt":"2014-03-02T06:37:44","guid":{"rendered":"http:\/\/saisa.eu\/blogs\/Guidance\/?p=1425"},"modified":"2014-03-02T10:00:03","modified_gmt":"2014-03-02T08:00:03","slug":"openstack-concepts-via-ubuntu-cloud-live-in-virtualbox","status":"publish","type":"post","link":"https:\/\/saisa.eu\/blogs\/Guidance\/?p=1425","title":{"rendered":"OpenStack concepts via Ubuntu Cloud Live in VirtualBox"},"content":{"rendered":"<p>Ubuntu Cloud Live image is mentioned at <a href=\"https:\/\/help.ubuntu.com\/community\/UbuntuCloudInfrastructure\">Ubuntu&#8217;s site<\/a> and instructions are given on how to boot the system from USB. This image is nowadays a little outdated (based on Essex release). For more serious experiments, please use more up-to-date release of OpenStack.<\/p>\n<p>However, the live image can work well for the first introduction to the <a href=\"http:\/\/en.wikipedia.org\/wiki\/OpenStack\">OpenStack<\/a> concepts like<\/p>\n<ul>\n<li>\n<div>Nova for computing<\/div>\n<ul>\n<li>\n<div>nova-api<\/div>\n<\/li>\n<li>\n<div>nova-compute<\/div>\n<\/li>\n<li>\n<div>nova-network<\/div>\n<\/li>\n<li>\n<div>nova-volume<\/div>\n<ul>\n<li>\n<div>(this was not working on the live image)<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<div>Glance for Virtual Disk Images<\/div>\n<\/li>\n<li>\n<div>Keystone for Identity and<\/div>\n<\/li>\n<li>\n<div>Horizon for web gui (dashboard)<\/div>\n<\/li>\n<\/ul>\n<p>The good side of the live system is that it comes with Openstack software installed. The bad side is that it might be missing some linux components like Openssh server. Since it is a live image, the changes are not permanent. However when using the <a href=\"https:\/\/www.virtualbox.org\/\">VirtualBox<\/a>, one can use snapshots feature to save the work and to continue later. (For portable VirtualBox, see <a href=\"http:\/\/saisa.eu\/blogs\/Guidance\/?p=872\">here<\/a>).<\/p>\n<p><strong>Essex architecture<\/strong><\/p>\n<p><img loading=\"lazy\" alt=\"Essex-architecture\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-architecture.png\" width=\"600\" height=\"488\" \/><\/p>\n<p><strong>Step 1. Starting up the OpenStack in VirtualBox<\/strong><\/p>\n<ul>\n<li>\n<div>Tip: When booting the VM, one can choose the keyboard layout (press Shift\/Alt during boot, select F3 keymap)<\/div>\n<\/li>\n<\/ul>\n<p>After booting, additional instructions can be found in the GettingStarted.txt document (see figure below)<\/p>\n<p><a href=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-001-booted.png\"><img loading=\"lazy\" alt=\"essex-001-booted\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-001-booted-small.png\" width=\"600\" height=\"489\" \/><\/a><\/p>\n<p>However, I did not get the clipboard working across the host and guest, and then it can be more convinient to install the ssh sever, and use <a href=\"http:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/\">putty<\/a> for giving commands from the host.<\/p>\n<p><em>sudo apt-get install openssh-server<br \/><\/em><a href=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-001-openssh-1.png\"><img loading=\"lazy\" alt=\"essex-001-openssh\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-001-openssh-1-small.png\" width=\"300\" height=\"244\" \/><\/a><\/p>\n<p>For the situations, where VirtualBox &#8220;Host only&#8221; networkig is used, one can use offline method to install the openssh-server and ssh-import-id packages.<\/p>\n<p>In order to be able to login remotely, check the IP address and define a password for ubuntu user:<br \/>\n<em>ifconfig eth0<br \/>\nsudo passwd ubuntu<br \/><\/em><a href=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-002-passwd.png\"><img loading=\"lazy\" alt=\"essex-002-passwd\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-002-passwd-small.png\" width=\"300\" height=\"245\" \/><\/a><\/p>\n<p>Login via putty<br \/>\n<a href=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-003-putty.png\"><img loading=\"lazy\" alt=\"essex-003-putty\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-003-putty-small.png\" width=\"300\" height=\"189\" \/><\/a><\/p>\n<p>Configure and start the OpenStack, and add a test image called cirros:<br \/>\n<em>nova-setup.sh<br \/><\/em><em>start-openstack.sh<br \/><\/em><em>glance -T cloudlive -I ubuntu -K ubuntu123 -N<\/em> <a href=\"http:\/\/127.0.0.1:5000\/v2.0\/\"><em>http:\/\/127.0.0.1:5000\/v2.0\/<\/em><\/a> <em>add name=&#8221;cirros&#8221; is_public=true container_format=ovf disk_format=raw &lt; \/srv\/cirros-0.3.0-x86_64-disk.img<\/em><\/p>\n<p>(for this glance command above, please see the GettingStarted file for correct syntax and format)<br \/>\n<a href=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-004-startingopenstack.png\"><img loading=\"lazy\" alt=\"essex-004-startingopenstack\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-004-startingopenstack-small.png\" width=\"300\" height=\"233\" \/><\/a><\/p>\n<p><strong>Step 2. Login to Horizon (dashboard)<\/strong><\/p>\n<p>One can use the web browser inside the VirtualBox, or one can also login remotely (depending on VirtualBox configuration).<\/p>\n<p>After login, in the project area, lauch instance by using the cirros image<br \/>\n<a href=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-005-launchinstance.png\"><img loading=\"lazy\" alt=\"essex-005-launchinstance\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-005-launchinstance-small.png\" width=\"300\" height=\"244\" \/><\/a><\/p>\n<p>The running instance can be seen also in the admin area<br \/>\n<a href=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-006-instancevisible.png\"><img loading=\"lazy\" alt=\"essex-006-instancevisible\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-006-instancevisible-small.png\" width=\"300\" height=\"178\" \/><\/a><\/p>\n<p><strong>Step 3. Login into new Virtual Machine &#8220;cirros&#8221;<\/strong><\/p>\n<p>Using the IP address information (172.20.1.2) in the Horizon, one can login from Controller node (hostname ubuntu) into cirros<br \/>\n<a href=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-007-logintovm.png\"><img loading=\"lazy\" alt=\"essex-007-logintoVM\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-007-logintovm-small.png\" width=\"300\" height=\"259\" \/><\/a><\/p>\n<p><strong>Step 4. Setup Command line interface (CLI)<\/strong><\/p>\n<p>Before one can use CLI effectively, one need to define certain environment variables.<\/p>\n<p>One get the configuration file via the GUI: Choose Settings link, then &#8220;OpenStack Credentials&#8221; tab, then &#8220;Download RC File&#8221; button.<br \/>\n<a href=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-007-openrc.png\"><img loading=\"lazy\" alt=\"essex-007-openrc\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-007-openrc-small.png\" width=\"300\" height=\"204\" \/><\/a><\/p>\n<p>Give those commands in the ssh session before executing OpenStack CLI commands<br \/>\n<em>export OS_AUTH_URL=http:\/\/<u>192.168.0.35<\/u>:5000\/v2.0<br \/>\nexport OS_TENANT_ID=53c9fc86a0fd4348be511ff000088e61<br \/>\nexport OS_TENANT_NAME=cloudlive<br \/>\nexport OS_USERNAME=ubuntu<br \/>\nexport OS_PASSWORD= ubuntu123<\/em><br \/>\n(the http link above depends on your configuration)<\/p>\n<p>For example, list the active servers (instances running)<br \/>\n<em>nova list<br \/><\/em>and look content of nova-setup.sh<br \/>\n<a href=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-008-novasetup.png\"><img loading=\"lazy\" alt=\"essex-008-novasetup\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-008-novasetup-small.png\" width=\"300\" height=\"176\" \/><\/a><\/p>\n<p>One can find the MySql userid and passwrd for nova, and one can see how to admin command nova-manage is used to create an internal network.<\/p>\n<p>the second script start-openstack.sh shows that if virtualization is not supported then qemu is used instead of kvm (ie. command kvm-ok shows that virtualization is not supported). And how the keystone is configured before services are started.<\/p>\n<p><strong>Step 5. Create a VirtualBox snapshot<\/strong><\/p>\n<p><strong><a href=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-008-createvirtualboxsnapshot2.png\"><\/a><\/strong><\/p>\n<p><strong><a href=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-008-createvirtualboxsnapshot3.png\"><img loading=\"lazy\" alt=\"essex-008-createvirtualboxsnapshot3\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2014\/03\/essex-008-createvirtualboxsnapshot3-small.png\" width=\"300\" height=\"245\" \/><\/a><\/strong><\/p>\n<p><strong>Step 6. Play around<\/strong><\/p>\n<p>Test and try various linux and openstack commands! See the links below &#8230;<\/p>\n<p><strong>Links to Essex material<\/strong><\/p>\n<ul>\n<li>\n<div><a href=\"http:\/\/www.1cloudroad.com\/beginners-guide-to-openstack\/\">Beginner\u2019s Guide to OpenStack<\/a> by 1 Cloud Road<\/div>\n<\/li>\n<li>\n<div>About older OpenStack architecture and concepts, it is worth to look first <a href=\"http:\/\/ken.pepple.info\/openstack\/2011\/04\/22\/openstack-nova-architecture\/\">here<\/a>, and then <a href=\"http:\/\/ken.pepple.info\/openstack\/2012\/02\/21\/revisit-openstack-architecture-diablo\/\">here<\/a> (Essex)<\/div>\n<\/li>\n<li>\n<div><a href=\"http:\/\/dodeeric.s3-website-eu-west-1.amazonaws.com\/PDF\/Install-Your-Own-OpenStack-Cloud-Essex-Edition.pdf\">Install Your Own OpenStack Cloud, Essex Edition<\/a>, by <a href=\"http:\/\/www.dodeeric.be\/\">Eric Dod\u00e9mont<\/a><\/div>\n<ul>\n<li>\n<div>a very good pdf document with plenty of commands<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<div><a href=\"https:\/\/wiki.debian.org\/OpenStackHowto\/Essex\">OpenStackHowto: Essex<\/a><\/div>\n<ul>\n<li>\n<div>another good reference of commands on Essex release<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<div><a href=\"http:\/\/my1.fr\/blog\/wp-content\/uploads\/2012\/06\/How-to-setup-OpenStack-Essex.pdf\">Openstack Essex Guide for Ubuntu Precise<\/a><\/div>\n<\/li>\n<\/ul>\n<p><strong>OpenStack (Essex) Videos<\/strong><\/p>\n<p><a href=\"http:\/\/www.mirantis.com\/why-mirantis\/openstack-technology\/essexopenstackdiagram\/\">Open Stack Essex: Architecture and Demo Video<\/a> (6 min)<\/p>\n<p><strong>OpenStack material<\/strong><\/p>\n<ul>\n<li>\n<div><a href=\"http:\/\/docs.openstack.org\/index.html\">Documentation and manuals<\/a><\/div>\n<\/li>\n<li>\n<div><a href=\"http:\/\/docs.openstack.org\/trunk\/openstack-ops\/content\/logging_monitoring.html\">Logging and Monitoring<\/a> chapter from <a href=\"http:\/\/docs.openstack.org\/ops\/\">OpenStack Operations Guide<\/a><\/div>\n<\/li>\n<\/ul>\n<p><strong>Additional<\/strong><\/p>\n<ul>\n<li>\n<div>For more serious experiments, please use more up-to-date release of OpenStack. The Essex release is nowadays outdated.<\/div>\n<\/li>\n<li>\n<div>Please note, that by using <a href=\"http:\/\/unetbootin.sourceforge.net\/\">UNetbootin<\/a> to create a bootable USB, one can include the persistance as well. (ie. when not using VirtualBox)<\/div>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Ubuntu Cloud Live image is mentioned at Ubuntu&#8217;s site and instructions are given on how to boot the system from USB. This image is nowadays a little outdated (based on Essex release). For more serious experiments, please use more up-to-date &hellip; <a href=\"https:\/\/saisa.eu\/blogs\/Guidance\/?p=1425\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[25,74,24,45,51,10],"tags":[],"_links":{"self":[{"href":"https:\/\/saisa.eu\/blogs\/Guidance\/index.php?rest_route=\/wp\/v2\/posts\/1425"}],"collection":[{"href":"https:\/\/saisa.eu\/blogs\/Guidance\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/saisa.eu\/blogs\/Guidance\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/saisa.eu\/blogs\/Guidance\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/saisa.eu\/blogs\/Guidance\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1425"}],"version-history":[{"count":3,"href":"https:\/\/saisa.eu\/blogs\/Guidance\/index.php?rest_route=\/wp\/v2\/posts\/1425\/revisions"}],"predecessor-version":[{"id":1432,"href":"https:\/\/saisa.eu\/blogs\/Guidance\/index.php?rest_route=\/wp\/v2\/posts\/1425\/revisions\/1432"}],"wp:attachment":[{"href":"https:\/\/saisa.eu\/blogs\/Guidance\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1425"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/saisa.eu\/blogs\/Guidance\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1425"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/saisa.eu\/blogs\/Guidance\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1425"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}