{"id":1936,"date":"2013-04-16T12:46:02","date_gmt":"2013-04-16T12:46:02","guid":{"rendered":"http:\/\/www.cloudcomp.ch\/?p=1936"},"modified":"2013-04-16T12:46:02","modified_gmt":"2013-04-16T12:46:02","slug":"vagrant-devstack-and-the-icclab","status":"publish","type":"post","link":"https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/","title":{"rendered":"Vagrant, Devstack and the ICCLab"},"content":{"rendered":"<h2>What?<\/h2>\n<p>So what is <a href=\"http:\/\/www.vagrantup.com\/\">vagrant<\/a>? In the words of its creator it allows you to:<\/p>\n<blockquote><p>&#8220;Create and configure lightweight, reproducible, and portable development environments.&#8221;<\/p><\/blockquote>\n<p>Vagrant is a ruby framework that automates a lot of the boring, painful setup a developer needs to do to work with services. In the case of the ICCLab those services are generally OpenStack services. We use vagrant to create consistent reproducible setups of our testbed on local development machines.<\/p>\n<h2>Why?<\/h2>\n<p>In the ICCLab we operate two testbeds, one that is stable and operates an OpenStack environment that does not change often. The other is a research testbed that is used to investigate the latest features of OpenStack, evaluate our own modifications or experiments upon OpenStack (e.g. Hadoop, CloudFoundry etc.). In order for code modifications to be placed on to the research test bed it must first prove that it is worthy. To prove itself it must be shown that it can run locally on a laptop\/desktop and can be installed and configured automatically. The great advantage of this is that vagrant supports the same configuration framework, puppet, as is used on the test beds. Essentially what vagrant allows us to do is model our infrastructure but locally before deploying changes to metal.<\/p>\n<h2>How?<\/h2>\n<p>So the best way to get started with vagrant is by example. In this example, we&#8217;ll show you how to create a vagrant project to create an OpenStack <a href=\"http:\/\/www.devstack.org\">devstack<\/a> environment.<\/p>\n<h3>Install it!<\/h3>\n<p>To install vagrant, make sure you have virtualbox already installed. Then simply install it. On a mac it&#8217;s easiest to use the bundled installer but otherwise just execute <code>gem install vagrant<\/code>. Once installed execute <code>vagrant help<\/code> so see what you can do. You should see something like this:<\/p>\n<p>[gist id=5309928]<\/p>\n<p>The most common commands you&#8217;ll use are <code>up<\/code>, <code>halt<\/code>, <code>reload<\/code> and <code>ssh<\/code><\/p>\n<h3>Play with it!<\/h3>\n<p>The example we will bring you through is setting up a <a href=\"http:\/\/www.devstack.org\">devstack<\/a> environment. To see all the code check out <a href=\"https:\/\/github.com\/dizz\/vagrant-devstack\">the github project here<\/a>.<\/p>\n<p>The first thing you need to do when creating a new vagrant project is to create a directory to host all your files. Once done you&#8217;ll need to execute:<\/p>\n<p>[gist id=5310061]<\/p>\n<p>Once done you should find a <code>Vagrantfile<\/code> created in your directory. This contains a basic template of how your vagrant project. For the purposes of this example we&#8217;ll use the following content:<\/p>\n<p>[gist id=5310052]<\/p>\n<p>What is important to note in this <code>devstack_config.vm.box<\/code>. This tells vagrant what &#8216;box&#8217; it will use. A box is simply a VM image with a particular initial configuration (see <a href=\"http:\/\/docs-v1.vagrantup.com\/v1\/docs\/base_boxes.html\">here for more details<\/a>). Boxes can also be <a href=\"https:\/\/github.com\/jedi4ever\/veewee\">created with veewee<\/a>. You can also install other boxes from <a href=\"http:\/\/www.vagrantbox.es\/\">vagrantbox.es<\/a>.<\/p>\n<p>The next most important piece in this is the <code>devstack_config.vm.provision<\/code> block. This details how your software will be installed. In this example we are using puppet (in local mode) to install <a href=\"http:\/\/www.devstack.org\">devstack<\/a>. In the code block we specify where to find additional modules and where to find the vagrant specific manifests. Most importantly we note that the main &#8220;entry point&#8221; manifest is (<code>devstack_puppet.manifest_file<\/code> variable).<\/p>\n<p>In our example, <code>site.pp<\/code> encodes the following steps to create our devstack VM:<\/p>\n<ol>\n<li>Install <code>git<\/code><\/li>\n<li>Check out the devstack repository<\/li>\n<li>Customise the devstack installation by setting up the devstack <code>localrc<\/code> file<\/li>\n<li>Run devstack by executing <code>stack.sh<\/code><\/li>\n<\/ol>\n<p>You can see the <a href=\"https:\/\/github.com\/dizz\/vagrant-devstack\/blob\/master\/manifests\/site.pp\">contents of this manifest here<\/a>.<\/p>\n<p>If you&#8217;ve got this far then with the vagrant project cloned from github all you&#8217;ll have to do to get your devstack VM up and running is:<\/p>\n<pre><code>vagrant up\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>Easy eh?<\/p>\n<h2>Wrap up<\/h2>\n<p>The latest vagrant will add support for provisioning on the cloud (Amazon, OpenStack, Rackspace) and is also independent of hypervisor choice including support (paid) for VMware fusion.<\/p>\n<div class=\"pt-sm\">Schlagw\u00f6rter: <a href=\"https:\/\/blog.zhaw.ch\/icclab\/tag\/automation\/\">automation<\/a>, <a href=\"https:\/\/blog.zhaw.ch\/icclab\/tag\/devstack\/\">devstack<\/a>, <a href=\"https:\/\/blog.zhaw.ch\/icclab\/tag\/openstack\/\">openstack<\/a>, <a href=\"https:\/\/blog.zhaw.ch\/icclab\/tag\/vagrant\/\">vagrant<\/a><br><\/div>","protected":false},"excerpt":{"rendered":"<p>Vagrant is a ruby framework that automates a lot of the boring, painful setup a developer needs to do to work with services. In the case of the ICCLab those services are generally OpenStack services. We use vagrant to create consistent reproducible setups of our testbed on local development machines.<\/p>\n","protected":false},"author":72,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[5,20,21],"tags":[51,113,240,339],"features":[],"class_list":["post-1936","post","type-post","status-publish","format-standard","hentry","category-articles","category-open-source","category-openstack-2","tag-automation","tag-devstack","tag-openstack","tag-vagrant"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Vagrant, Devstack and the ICCLab - Service Engineering (ICCLab &amp; SPLab)<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Vagrant, Devstack and the ICCLab\" \/>\n<meta property=\"og:description\" content=\"Vagrant is a ruby framework that automates a lot of the boring, painful setup a developer needs to do to work with services. In the case of the ICCLab those services are generally OpenStack services. We use vagrant to create consistent reproducible setups of our testbed on local development machines.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/\" \/>\n<meta property=\"og:site_name\" content=\"Service Engineering (ICCLab &amp; SPLab)\" \/>\n<meta property=\"article:published_time\" content=\"2013-04-16T12:46:02+00:00\" \/>\n<meta name=\"author\" content=\"Andy Edmonds\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andy Edmonds\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/\"},\"author\":{\"name\":\"Andy Edmonds\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/a62f7b702361e11d635f4e59446e8684\"},\"headline\":\"Vagrant, Devstack and the ICCLab\",\"datePublished\":\"2013-04-16T12:46:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/\"},\"wordCount\":608,\"commentCount\":2,\"keywords\":[\"automation\",\"devstack\",\"openstack\",\"vagrant\"],\"articleSection\":[\"Articles\",\"Open Source\",\"OpenStack\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/\",\"url\":\"https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/\",\"name\":\"Vagrant, Devstack and the ICCLab - Service Engineering (ICCLab &amp; SPLab)\",\"isPartOf\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#website\"},\"datePublished\":\"2013-04-16T12:46:02+00:00\",\"author\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/a62f7b702361e11d635f4e59446e8684\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\/\/blog.zhaw.ch\/icclab\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Vagrant, Devstack and the ICCLab\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#website\",\"url\":\"https:\/\/blog.zhaw.ch\/icclab\/\",\"name\":\"Service Engineering (ICCLab &amp; SPLab)\",\"description\":\"A Blog of the ZHAW Zurich University of Applied Sciences\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.zhaw.ch\/icclab\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/a62f7b702361e11d635f4e59446e8684\",\"name\":\"Andy Edmonds\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/564b17a1126a2ed30e20d4c65842164e32a6cf798a8175e88bcf5b352ebd60c8?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/564b17a1126a2ed30e20d4c65842164e32a6cf798a8175e88bcf5b352ebd60c8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/564b17a1126a2ed30e20d4c65842164e32a6cf798a8175e88bcf5b352ebd60c8?s=96&d=mm&r=g\",\"caption\":\"Andy Edmonds\"},\"sameAs\":[\"http:\/\/andy.edmonds.be\"],\"url\":\"https:\/\/blog.zhaw.ch\/icclab\/author\/edmo\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Vagrant, Devstack and the ICCLab - Service Engineering (ICCLab &amp; SPLab)","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/","og_locale":"en_US","og_type":"article","og_title":"Vagrant, Devstack and the ICCLab","og_description":"Vagrant is a ruby framework that automates a lot of the boring, painful setup a developer needs to do to work with services. In the case of the ICCLab those services are generally OpenStack services. We use vagrant to create consistent reproducible setups of our testbed on local development machines.","og_url":"https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/","og_site_name":"Service Engineering (ICCLab &amp; SPLab)","article_published_time":"2013-04-16T12:46:02+00:00","author":"Andy Edmonds","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Andy Edmonds","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/#article","isPartOf":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/"},"author":{"name":"Andy Edmonds","@id":"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/a62f7b702361e11d635f4e59446e8684"},"headline":"Vagrant, Devstack and the ICCLab","datePublished":"2013-04-16T12:46:02+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/"},"wordCount":608,"commentCount":2,"keywords":["automation","devstack","openstack","vagrant"],"articleSection":["Articles","Open Source","OpenStack"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/","url":"https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/","name":"Vagrant, Devstack and the ICCLab - Service Engineering (ICCLab &amp; SPLab)","isPartOf":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/#website"},"datePublished":"2013-04-16T12:46:02+00:00","author":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/a62f7b702361e11d635f4e59446e8684"},"breadcrumb":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.zhaw.ch\/icclab\/vagrant-devstack-and-the-icclab\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/blog.zhaw.ch\/icclab\/"},{"@type":"ListItem","position":2,"name":"Vagrant, Devstack and the ICCLab"}]},{"@type":"WebSite","@id":"https:\/\/blog.zhaw.ch\/icclab\/#website","url":"https:\/\/blog.zhaw.ch\/icclab\/","name":"Service Engineering (ICCLab &amp; SPLab)","description":"A Blog of the ZHAW Zurich University of Applied Sciences","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.zhaw.ch\/icclab\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/a62f7b702361e11d635f4e59446e8684","name":"Andy Edmonds","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/564b17a1126a2ed30e20d4c65842164e32a6cf798a8175e88bcf5b352ebd60c8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/564b17a1126a2ed30e20d4c65842164e32a6cf798a8175e88bcf5b352ebd60c8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/564b17a1126a2ed30e20d4c65842164e32a6cf798a8175e88bcf5b352ebd60c8?s=96&d=mm&r=g","caption":"Andy Edmonds"},"sameAs":["http:\/\/andy.edmonds.be"],"url":"https:\/\/blog.zhaw.ch\/icclab\/author\/edmo\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/posts\/1936","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/users\/72"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/comments?post=1936"}],"version-history":[{"count":0,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/posts\/1936\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/media?parent=1936"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/categories?post=1936"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/tags?post=1936"},{"taxonomy":"features","embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/features?post=1936"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}