<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Edmund Haselwanter's Blog Feed</title>
    <link>http://edmund.haselwanter.com/en/rss/</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>The main blog feed for my Web site.</description>
    
    
        <item>
          <title>How to configure your local Crowbar Chef Environment</title>
          <description>&lt;p&gt;Crowbar uses its own opens source Chef instance. After a default installation it is not very easy to update cookbooks from your local development environment. This howto describes a more usable configuration of local crowbar environment.&lt;/p&gt;
&lt;h2&gt;Setup your local environment&lt;/h2&gt;

&lt;p&gt;Clone the crowbar git repository to a local path&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git clone https://github.com/dellcloudedge/crowbar
cd crowbar
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Setup your development environment with the &lt;a href=&quot;https://github.com/dellcloudedge/crowbar/blob/master/README.dev-and-workflow&quot;&gt;dev tool&lt;/a&gt;. &lt;/p&gt;

&lt;h3&gt;Changes for OSX&lt;/h3&gt;

&lt;p&gt;The crowbar dev tool needs a bash version higher than 4. Here is a blog post on how to change the default shell to a &lt;a href=&quot;http://vigodome.com/blog/2011/12/30/change-default-shell/&quot;&gt;homebrew bash shell&lt;/a&gt;.
As long as the Crowbar team did not merge my change you additionally have to change the &lt;a href=&quot;http://en.wikipedia.org/wiki/Shebang_(Unix)&quot;&gt;shebang&lt;/a&gt; line in the &lt;a href=&quot;https://github.com/ehaselwanter/crowbar/commit/1a6c741f1ab741e77d5728e12580a4f2e7c27dfa&quot;&gt;dev tool&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Configure Crowbar Environment&lt;/h2&gt;

&lt;h3&gt;Set System Time&lt;/h3&gt;

&lt;p&gt;As chef protects against replay attacks we need to sync the system time of the crowbar admin server and the local development machine. If you did not configure a working ntp configuration in the crowbar environment you have to update the time on the crowbar environment every now and then (especially in a Virtualbox environment after resume). &lt;/p&gt;

&lt;p&gt;Get your local time &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;echo \'date -us \&quot;`date -u &quot;+%Y-%m-%d %H:%M&quot;`\&quot;\' 
'date -us &quot;2012-10-10 18:07&quot;'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and set it on all nodes (from the crowbar admin machine as root)&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;knife ssh node:* -- 'date -us &quot;2012-10-10 18:07&quot;'
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Create DevOps Chef Client Key&lt;/h3&gt;

&lt;p&gt;In order to work from your local machine we must register it as a chef-client. To do so login to your Crowbar admin server (if you followed &lt;a href=&quot;http://edmund.haselwanter.com/en/blog/2012/10/11/deployment-of-openstack-on-a-virtualbox-multi-node-environment/&quot;&gt;Deployment of Openstack on a Virtualbox Multi Node Environment&lt;/a&gt; the server IP is 10.124.0.10) and create a devops client key (for a more detailed discussion please visit &lt;a href=&quot;http://wiki.opscode.com/display/chef/Workstation+Setup&quot;&gt;http://wiki.opscode.com/display/chef/Workstation+Setup&lt;/a&gt; and &lt;a href=&quot;http://wiki.opscode.com/display/chef/Installing+Chef+Server+Manually#InstallingChefServerManually-ConfiguretheCommandLineClient&quot;&gt;http://wiki.opscode.com/display/chef/Installing+Chef+Server+Manually#InstallingChefServerManually-ConfiguretheCommandLineClient&lt;/a&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;root@admin:~# export MY_CLIENT_NAME=&quot;devops&quot; ;knife client create $MY_CLIENT_NAME -d -a -f /tmp/$MY_CLIENT_NAME.pem
Created client[devops]    
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Next copy your &lt;code&gt;devops.pem&lt;/code&gt; file from the admin machine to the local crowbar repository directory&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;your-laptop &amp;gt; mkdir .chef
your-laptop &amp;gt; MY_CLIENT_NAME=&quot;devops&quot;; scp crowbar@10.124.0.10:/tmp/$MY_CLIENT_NAME.pem ~/.chef/$MY_CLIENT_NAME.pem
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Copy the template knife.rb file and set the server url to the correct value (if its not already merged you can find it here: &lt;a href=&quot;https://github.com/ehaselwanter/crowbar/blob/master/.chef/knife.rb.example&quot;&gt;https://github.com/ehaselwanter/crowbar/blob/master/.chef/knife.rb.example&lt;/a&gt;)&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cp .chef/knife.rb.example .chef/knife.rb 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;copy the template &lt;code&gt;.rvmrc&lt;/code&gt; in place and trust it (or install the corresponding ruby) (if its not already merged you can find it here:&lt;a href=&quot;https://github.com/ehaselwanter/crowbar/blob/master/dot-rvmrc&quot;&gt;https://github.com/ehaselwanter/crowbar/blob/master/dot-rvmrc&lt;/a&gt;)&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cp dot-rvmrc .rvmrc
rvm rvmrc trust .
rvm rvmrc load
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;install chef with the Gemfile (if its not already merged you can find it here:&lt;a href=&quot;https://github.com/ehaselwanter/crowbar/blob/master/Gemfile&quot;&gt;https://github.com/ehaselwanter/crowbar/blob/master/Gemfile&lt;/a&gt;)&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;bundle install
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;finally you can work with knife from your local maschine:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ knife status
6 minutes ago, admin.v1.cr0wbar.de, admin.v1.cr0wbar.de, 10.124.0.10, ubuntu 12.04.
4 minutes ago, dc0-ff-ee-00-00-02.v1.cr0wbar.de, dc0-ff-ee-00-00-02.v1.cr0wbar.de, 10.124.3.2, ubuntu 12.04.
4 minutes ago, dc0-ff-ee-00-00-01.v1.cr0wbar.de, dc0-ff-ee-00-00-01.v1.cr0wbar.de, 10.124.3.3, ubuntu 12.04.
3 minutes ago, dc0-ff-ee-00-00-03.v1.cr0wbar.de, dc0-ff-ee-00-00-03.v1.cr0wbar.de, 10.124.3.1, ubuntu 12.04.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now you can do all sorts of things like uploading cookbooks, uploading or edit data_bags and roles etc.
More on knife can be found here: &lt;a href=&quot;http://wiki.opscode.com/display/chef/Knife&quot;&gt;http://wiki.opscode.com/display/chef/Knife&lt;/a&gt;&lt;/p&gt;
&lt;br/&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tag/crowbar&quot; rel=&quot;tag&quot;&gt;crowbar&lt;/a&gt;, &lt;a href=&quot;http://technorati.com/tag/openstack&quot; rel=&quot;tag&quot;&gt;openstack&lt;/a&gt;, &lt;a href=&quot;http://technorati.com/tag/opschef&quot; rel=&quot;tag&quot;&gt;opschef&lt;/a&gt;</description>
          <pubDate>Fri, 19 Oct 2012 15:59:30 GMT</pubDate>
          <guid>http://edmund.haselwanter.com/en/blog/2012/10/19/how-to-configure-your-local-crowbar-chef-environment/</guid>
          <link>http://edmund.haselwanter.com/en/blog/2012/10/19/how-to-configure-your-local-crowbar-chef-environment/</link>
        </item>
    
        <item>
          <title>Deployment of Openstack on a Virtualbox Multi Node Environment</title>
          <description>&lt;p&gt;First get the project files from the &lt;a href=&quot;https://github.com/iteh/crowbar-virtualbox&quot;&gt;Github repository&lt;/a&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git clone https://github.com/iteh/crowbar-virtualbox.git
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Goal&lt;/h2&gt;

&lt;p&gt;Provide a transportable virtual environment for crowbar/openstack&lt;/p&gt;

&lt;p&gt;The solution is inspired by:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://jedi.be/blog/2011/11/04/vagrant-virtualbox-hostonly-pxe-vlans/&quot;&gt;vagrant virtualbox hostonly pxe vlans&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Its opinionated in a sense as we need ubuntu-12.04 to work, so fork and help to make it more useable for other distros :-)   &lt;/p&gt;
&lt;h2&gt;Prerequisites&lt;/h2&gt;

&lt;p&gt;A running and tested &lt;a href=&quot;https://www.virtualbox.org/wiki/Downloads&quot;&gt;VirtualBox environment&lt;/a&gt; with the VirtualBox Extension Pack installed. Tested on Ubuntu 12.04 LTS with the installation instructions and packages from &lt;a href=&quot;https://www.virtualbox.org/wiki/Linux_Downloads&quot;&gt;https://www.virtualbox.org/wiki/Linux_Downloads&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A crowbar iso image. See &lt;a href=&quot;https://github.com/dellcloudedge/crowbar/wiki/Build-Crowbar.ISO&quot;&gt;https://github.com/dellcloudedge/crowbar/wiki/Build-Crowbar.ISO&lt;/a&gt; or use &lt;a href=&quot;https://github.com/iteh/crowbar-iso&quot;&gt;https://github.com/iteh/crowbar-iso&lt;/a&gt; to build one (ubuntu) &lt;/p&gt;

&lt;p&gt;copy the config file to customize it &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cp config.sh.example config.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Install Virtualbox&lt;/h2&gt;

&lt;p&gt;See &lt;a href=&quot;https://github.com/iteh/crowbar-virtualbox/blob/master/README-install-virtualbox.md&quot;&gt;VirtualBox environment&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Setup Crowbar Openstack Environment&lt;/h2&gt;

&lt;p&gt;Copy the config file to customize the memory and networking settings. Depending on the hardware you have at hand you should set the admin server at 2GB or higher and the compute nodes at 1GB or higher.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; cp config.sh.example config.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This is the tested config.sh for the crowbar-virtualbox.git project:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; CONFIG_SH_SOURCED=1

 BASE_BOX_NAME=&quot;crowbar-base-box&quot; 

 ADMIN_MEMORY=4048
 COMPUTE_MEMORY=2048
 SWIFT_MEMORY=512

 # one of Am79C970A|Am79C973|82540EM|82543GC|82545EM|virtio  
 # according to http://humbledown.org/virtualbox-intel-vlan-tag-stripping.xhtml
 # the Intel Familiy does not work in VLAN setups
 # virtio causes problems (enumartion of device) in ubunut 12.04
 # please verify and update this information ...

 IF_TYPE=Am79C973  
 #IF_TYPE=82540EM  
 #IF_TYPE=virtio

 VBOXNET_4_IP=&quot;10.124.0.1&quot; 
 VBOXNET_5_IP=&quot;10.125.0.1&quot; 
 VBOXNET_6_IP=&quot;10.122.0.1&quot;  
 VBOXNET_7_IP=&quot;10.123.0.1&quot; 

 VBOXNET_MASK=&quot;255.255.0.0&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;You can always change this but this is prepared to work for the sample configuration&lt;/strong&gt;    &lt;/p&gt;

&lt;p&gt;To create a 6 node openstack environment you need to download or build a crowbar iso first. An ISO to start with can be found at &lt;a href=&quot;http://crowbar.zehicle.com&quot;&gt;@Zehicle Crowbar Resources&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Next create the crowbar environment with the following commands (tested on Ubuntu 11.10 with Virtualbox 4.1.10r76795):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; ./create_base_nodes_and_hostonly_ifs.sh   
 ./reset-network.sh

 # you MUST use an absolute path to the iso

 ./create_bonding_testcluster.sh /home/crowbar/crowbar.iso 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now you can start the the admin server. Either use the Virtualbox GUI or run one of the following commands:&lt;/p&gt;

&lt;p&gt;On your local environment you can use the GUI:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; VBoxManage startvm crowbar_admin
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;On a remote environment (e.g. a server with decent RAM and CPU) you should use the headless mode:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; VBoxManage startvm crowbar_admin --type headless
 VBoxManage controlvm crowbar_admin vrde on
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Next we have to change the default IP configuration&lt;/p&gt;

&lt;p&gt;Login to the crowbar server with your favorite remote desktop application (windows rdp client on default port 3389. Do NOT forget to install the Extensionpack) and change the network config in the file &lt;code&gt;/etc/network/interfaces&lt;/code&gt;. This is for testing that all the networking settings in crowbar are not using hardcoded values. &lt;/p&gt;

&lt;pre&gt;&lt;code&gt; # This file describes the network interfaces available on your system
 # and how to activate them. For more information, see interfaces(5).

 # The loopback network interface
 auto lo
 iface lo inet loopback
 auto eth0
 iface eth0 inet static
     address 10.124.0.10
     netmask 255.255.0.0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and restart the network:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; /etc/init.d/networking restart
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now we can start installing the Crowbar Environment&lt;/p&gt;

&lt;h3&gt;Install the Crowbar Admin Server&lt;/h3&gt;

&lt;p&gt;The official installation documentation can be found here: &lt;a href=&quot;https://github.com/dellcloudedge/crowbar/wiki/Install-crowbar&quot;&gt;Crowbar Install Guide&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;connect to it with the default IP  and crowbar:crowbar&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ssh crowbar@10.124.0.10
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;become root to start the install process #&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo -i
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;At this point in time you must choose the network config you want to use. You can find some pre-defined configs in the configs folder. Please read the corresponding README for further instructions! This might change the admin IP address of the test cluster!&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cd /tftpboot/ubuntu_dvd/extra 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;As an example we deploy the bonding network config from &lt;code&gt;configs/bc-template-network-bonding-virtualbox.json&lt;/code&gt;. Edit the file &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;vi /opt/dell/barclamps/network/chef/data_bags/crowbar/bc-template-network.json
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and install the admin server:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;./install admin.cr0wbar.org
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;you can watch the install with&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;tail -f /var/log/install* 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;it is finished if you see this in the install log file&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;root@admin:~# tail -3 /var/log/install.log 
Deleted role[crowbar-dtest-machine-2_dell_com]

Script done on Tue Aug 28 10:49:58 2012    
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;depending on the Virtualbox host this might take some time (&amp;gt;15 min)&lt;/p&gt;

&lt;p&gt;After successful installation you can reach the individual vms on the vboxnet hostonly network. Check &lt;code&gt;http://10.124.0.10:3000&lt;/code&gt; with your browser.  &lt;/p&gt;

&lt;p&gt;Now its a good time to create a snapshot of the admin server. The &lt;code&gt;--pause&lt;/code&gt; is essential if you did not stop the machine&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;vboxmanage snapshot crowbar_admin take fresh-crowbar-admin-test --pause
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Install Additional Nodes&lt;/h3&gt;

&lt;p&gt;The next step is to start additional nodes so Crowbar has something. Turn on one or more VMs (it is suggested to use 3 VMs at the moment) that will act as hosts which Crowbar can provision (as described above)&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;for I in 1 2 3 
do
  VBoxManage startvm crowbar-essex-${I} --type headless  
  # starting at 5010  crowbar-essex-${I} -&amp;gt; 5010 - 1 + ${I}
  VBoxManage controlvm crowbar-essex-${I} vrde on  
  
done
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Wait for the VM to show up in the Crowbar Admin web UI with a &lt;strong&gt;blinking yellow&lt;/strong&gt; icon indicating Sledgehammer is waiting for instructions (the VM is ready to be allocated)&lt;/p&gt;

&lt;p&gt;The VM will display something like the following on the console when it has reached a state ready for allocation (watch it with the Virtualbox GUI or a RDP client):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;BMC_ROUTER=
BMC_ADDRESS=10.124.0.163
BMC_NETMASK=255.255.0.0
HOSTNAME=dc0-ff-ee-00-00-01.crOwbar.org
NODE_STATE=false 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now we are ready to allocate the nodes. This will:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Initial Chef run&lt;/li&gt;
  &lt;li&gt;Reboot&lt;/li&gt;
  &lt;li&gt;Install of base system via PXE &amp;amp; preseed&lt;/li&gt;
  &lt;li&gt;Reboot into newly installed system (login prompt)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Install OpenStack&lt;/h2&gt;

&lt;h3&gt;Install Point and Click&lt;/h3&gt;

&lt;p&gt;See &lt;a href=&quot;https://github.com/dellcloudedge/crowbar/wiki/Install-crowbar&quot;&gt;Crowbar Install Guide&lt;/a&gt; for the official documentation on howto install Openstack with the Crowbar Webapplication.&lt;/p&gt;

&lt;h3&gt;Install Commandline&lt;/h3&gt;

&lt;p&gt;Make sure to re login after crowbar is installed, so that the &lt;code&gt;CROWBAR_KEY&lt;/code&gt; ENV variable is set. To make sure the IP numbering is consistent and reflects the VM numbering, wait after each allocate until the currently allocating VM is allocated.&lt;/p&gt;

&lt;p&gt;On the Crowbar Admin server:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/opt/dell/bin/crowbar machines allocate dc0-ff-ee-00-00-01.cr0wbar.org
/opt/dell/bin/crowbar machines allocate dc0-ff-ee-00-00-02.cr0wbar.org
/opt/dell/bin/crowbar machines allocate dc0-ff-ee-00-00-03.cr0wbar.org

/opt/dell/bin/crowbar node_state status  --no-ready
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Wait until all nodes are ready. Then create the proposals in the following order as they depend on each other. When editing the JSON files, make sure, that the assignment of the nodes is according to your plans. No other options need to be changed.&lt;/p&gt;

&lt;p&gt;mysql, keystone, glance, nova_dashboard is known to work on one machine (call it nova-control) &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/opt/dell/bin/crowbar mysql proposal create proposal 
/opt/dell/bin/crowbar mysql proposal show proposal &amp;gt; mysql.json 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;edit the json file (put the host in the appropriate elements element) e.g.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;...
&quot;elements&quot;: {
  &quot;mysql-server&quot;: [
    &quot;dc0-ff-ee-00-00-01.cr0wbar.org&quot;
  ]
...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and save it:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/opt/dell/bin/crowbar mysql proposal edit proposal  --file mysql.json
/opt/dell/bin/crowbar mysql proposal commit proposal  
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;you can follow watching the progress with&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;tail -f /var/log/syslog             
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;in another console. Additionally, the webu-ui gives feedback on the current state of the cluster. Open &lt;a href=&quot;http://192.168.224.10:3000/crowbar/openstack/1.0&quot;&gt;Crowbar Admin Web UI&lt;/a&gt; in your browser. You should see a green dot on the barclamp if it finished successfully.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/opt/dell/bin/crowbar keystone proposal create proposal
/opt/dell/bin/crowbar keystone proposal show proposal &amp;gt; keystone.json
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;edit the json file (put the host in the appropriate elements element)&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/opt/dell/bin/crowbar keystone proposal edit proposal --file keystone.json
/opt/dell/bin/crowbar keystone proposal commit proposal

/opt/dell/bin/crowbar glance proposal create proposal  
/opt/dell/bin/crowbar glance proposal show proposal &amp;gt; glance.json
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;edit the json file (put the host in the appropriate elements element)&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/opt/dell/bin/crowbar glance proposal edit proposal --file glance.json
/opt/dell/bin/crowbar glance proposal commit proposal

/opt/dell/bin/crowbar nova_dashboard proposal create proposal
/opt/dell/bin/crowbar nova_dashboard proposal show proposal &amp;gt; nova_dashboard.json
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;edit the json file (put the host in the appropriate elements element)&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/opt/dell/bin/crowbar nova_dashboard proposal edit proposal --file nova_dashboard.json
/opt/dell/bin/crowbar nova_dashboard proposal commit proposal

/opt/dell/bin/crowbar nova proposal create proposal
/opt/dell/bin/crowbar nova proposal show proposal &amp;gt; nova.json
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;edit the json file (put the host in the appropriate elements element)&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&quot;elements&quot;: {
  &quot;nova-multi-volume&quot;: [
    &quot;dc0-ff-ee-00-00-04.cr0wbar.org&quot;,
    &quot;dc0-ff-ee-00-00-05.cr0wbar.org&quot;
  ],
  &quot;nova-multi-controller&quot;: [
    &quot;dc0-ff-ee-00-00-01.cr0wbar.org&quot;
  ],
  &quot;nova-multi-compute&quot;: [
    &quot;dc0-ff-ee-00-00-02.cr0wbar.org&quot;,
    &quot;dc0-ff-ee-00-00-03.cr0wbar.org&quot;
  ]
},

/opt/dell/bin/crowbar nova proposal edit proposal --file nova.json
/opt/dell/bin/crowbar nova proposal commit proposal
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Usernames and Passwords&lt;/h2&gt;

&lt;p&gt;Chef is a configuration management database so a lot of the information is IN chef.&lt;/p&gt;

&lt;p&gt;e.g. to get the current MySql password issue:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;root@admin:~# knife search node mysql:* -a mysql |grep password
db_maker_password:       dwrwet9yc3zf
old_passwords:           0
server_debian_password:  9eh6sdfsy39a
server_repl_password:    d5n6xzcvcxvv
server_root_password:    vptcxvbnnqmv
old_passwords:   0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Knife search documentation can be found at http://wiki.opscode.com/display/chef/Search    &lt;/p&gt;

&lt;h3&gt;Default Passwords:&lt;/h3&gt;

&lt;p&gt;The IP might differ in your environment!&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Crowbar UI on &lt;a href=&quot;http://10.124.0.10:3000&quot;&gt;http://10.124.0.10:3000&lt;/a&gt; (crowbar/crowbar)&lt;/li&gt;
  &lt;li&gt;Chef UI on &lt;a href=&quot;http://10.124.0.10:4040&quot;&gt;http://10.124.0.10:4040&lt;/a&gt; (admin/password)&lt;/li&gt;
  &lt;li&gt;Nagios on &lt;a href=&quot;http://10.124.0.10/nagios3&quot;&gt;http://10.124.0.10/nagios3&lt;/a&gt; (nagiosadmin/password)&lt;/li&gt;
  &lt;li&gt;Ganglia on &lt;a href=&quot;http://10.124.0.10/ganglia&quot;&gt;http://10.124.0.10/ganglia&lt;/a&gt; (nagiosadmin/password)&lt;/li&gt;
  &lt;li&gt;Openstack Dashboard on &lt;a href=&quot;http://10.124.3.3/&quot;&gt;http://10.124.3.3/&lt;/a&gt; (crowbar/crowbar)&lt;/li&gt;
  &lt;li&gt;Openstack Dashboard on &lt;a href=&quot;http://10.124.3.3/&quot;&gt;http://10.124.3.3/&lt;/a&gt; (admin/crowbar)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Commandline Access&lt;/h3&gt;

&lt;p&gt;there is a credentials file in the root account of the nova-control node. just source .openrc and things should work.&lt;/p&gt;

&lt;p&gt;or export this in your environment and use the nova-control instance IP for 10.124.3.3:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# NOVA ENV VARIABLES
export NOVA_USERNAME=crowbar
export NOVA_PASSWORD=crowbar
export NOVA_PROJECT_ID=openstack

# COMMON ENV VARIABLES
export OS_AUTH_USER=${NOVA_USERNAME}
export OS_AUTH_KEY=${NOVA_PASSWORD}
export OS_AUTH_TENANT=${NOVA_PROJECT_ID}
export OS_AUTH_URL=${NOVA_URL}
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Destroy cluster&lt;/h2&gt;

&lt;p&gt;To start over use:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;./destroy_cluster.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Snapshots&lt;/h2&gt;

&lt;p&gt;The scripting is not generic but uses the names chosen above &lt;/p&gt;

&lt;h3&gt;create a snapshot:&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;./snapshot_cluster.sh &quot;snapshot_name&quot;     
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;save the snapshot name somewere&lt;/p&gt;

&lt;h3&gt;restore a snapshot:&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;./stop_cluster.sh
./restore_from_snapshot.sh &quot;snapshot_name&quot; 
./start_cluster.sh 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and give it some time, you are starting 6 vms at once!&lt;/p&gt;

&lt;h2&gt;Useful Virtualbox Commands&lt;/h2&gt;

&lt;p&gt;list running vms:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;vboxmanage list runningvms
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;list vms:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;vboxmanage list vms
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;poweroff a vm:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;vboxmanage controlvm &amp;lt;vm-name&amp;gt; poweroff
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;start a vm in headless mode:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;vboxheadless -s &amp;lt;vm-name&amp;gt; poweroff
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;unregister and delete a vm:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;vboxmanage unregistervm &amp;lt;vm-name&amp;gt; --delete  
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;set nic config according to the settings in config.sh&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;./reset-network.sh
&lt;/code&gt;&lt;/pre&gt;
&lt;br/&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tag/crowbar&quot; rel=&quot;tag&quot;&gt;crowbar&lt;/a&gt;, &lt;a href=&quot;http://technorati.com/tag/openstack&quot; rel=&quot;tag&quot;&gt;openstack&lt;/a&gt;, &lt;a href=&quot;http://technorati.com/tag/opschef&quot; rel=&quot;tag&quot;&gt;opschef&lt;/a&gt;</description>
          <pubDate>Wed, 10 Oct 2012 22:00:00 GMT</pubDate>
          <guid>http://edmund.haselwanter.com/en/blog/2012/10/11/deployment-of-openstack-on-a-virtualbox-multi-node-environment/</guid>
          <link>http://edmund.haselwanter.com/en/blog/2012/10/11/deployment-of-openstack-on-a-virtualbox-multi-node-environment/</link>
        </item>
    
        <item>
          <title>Data Driven Deployment of a Java Web Application with Chef Solo and Vagrant</title>
          <description>&lt;h2&gt;Chef Application Cookbook Showcase&lt;/h2&gt;
&lt;p&gt;This &lt;a href=&quot;http://vagrantup.com&quot;&gt;Vagrant&lt;/a&gt; project on github ( &lt;a href=&quot;https://github.com/iteh/vagrant-demos/tree/master/vagrant-java-application&quot;&gt;https://github.com/iteh/vagrant-demos/&lt;/a&gt; ) showcases the &lt;a href=&quot;http://www.opscode.com/blog/2010/05/06/data-driven-application-deployment-with-chef/&quot;&gt;application cookbook for chef&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;read on &lt;a href=&quot;http://www.iteh.at/en/blog/2011/04/16/data-driven-deployment-of-a-java-web-application-with-chef-solo/&quot;&gt;iteh.at&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tag/java&quot; rel=&quot;tag&quot;&gt;java&lt;/a&gt;, &lt;a href=&quot;http://technorati.com/tag/ruby&quot; rel=&quot;tag&quot;&gt;ruby&lt;/a&gt;, &lt;a href=&quot;http://technorati.com/tag/vagrant&quot; rel=&quot;tag&quot;&gt;vagrant&lt;/a&gt;</description>
          <pubDate>Sat, 16 Apr 2011 00:00:00 GMT</pubDate>
          <guid>http://edmund.haselwanter.com/en/blog/2011/04/16/data-driven-deployment-of-a-java-web-application-with-chef-solo-and-vagrant/</guid>
          <link>http://edmund.haselwanter.com/en/blog/2011/04/16/data-driven-deployment-of-a-java-web-application-with-chef-solo-and-vagrant/</link>
        </item>
    
        <item>
          <title>Mechanize Screencast and IRB copy history</title>
          <description>&lt;p&gt;And again Ryan Bates did a great screencast. This time on &lt;a href=&quot;http://railscasts.com/episodes/191-mechanize&quot; title=&quot;#191&quot;&gt;mechanize&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&amp;#8220;Mechanize extends the power of Nokogiri allowing you to interact with multiple pages on the site: click links, submit forms, etc.&amp;#8221;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;And if you ever wanted to extract the history of an &lt;span class=&quot;caps&quot;&gt;IRB&lt;/span&gt; session, here it is:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;puts Readline::HISTORY.entries.split(&quot;exit&quot;).last[0..-2].join(&quot;\n&quot;)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;and another great tool from this episode:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.selectorgadget.com/&quot;&gt;SelectorGadget: point and click &lt;span class=&quot;caps&quot;&gt;CSS&lt;/span&gt; selectors&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tag/ruby&quot; rel=&quot;tag&quot;&gt;ruby&lt;/a&gt;</description>
          <pubDate>Fri, 12 Mar 2010 00:00:00 GMT</pubDate>
          <guid>http://edmund.haselwanter.com/en/blog/2010/03/12/mechanize-screencast-and-irb-copy-history/</guid>
          <link>http://edmund.haselwanter.com/en/blog/2010/03/12/mechanize-screencast-and-irb-copy-history/</link>
        </item>
    
        <item>
          <title>HTTP Basic Auth for Mysql password and old_password in Rails</title>
          <description>&lt;p&gt;I recently had to develop a small application for a client. The goal was to add a feature to grown Java web application.&lt;/p&gt;
&lt;p&gt;As the software was maintained for several years there are users with old an new MySql passwords in the system.&lt;/p&gt;&lt;p&gt;To authenticate the user I have chosen &lt;code&gt;authenticate_or_request_with_http_basic&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;As I just needed handful of actions all of them go in one controller:&lt;br /&gt;
&lt;code&gt;&lt;pre class=&quot;sunburst&quot;&gt;&lt;span class=&quot;Keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;JEntityNameType&quot;&gt;MyController&lt;span class=&quot;EntityInheritedClass&quot;&gt; &lt;span class=&quot;EntityInheritedClass&quot;&gt;&amp;lt;&lt;/span&gt; ApplicationController&lt;/span&gt;&lt;/span&gt;
  before_filter &lt;span class=&quot;Constant&quot;&gt;&lt;span class=&quot;Constant&quot;&gt;:&lt;/span&gt;authenticate&lt;code&gt;&amp;lt;pre class=&quot;sunburst&quot;&amp;gt;&amp;lt;span class=&quot;Keyword&quot;&amp;gt;class&amp;lt;/span&amp;gt; &amp;lt;span class=&quot;JEntityNameType&quot;&amp;gt;MyController&amp;lt;span class=&quot;EntityInheritedClass&quot;&amp;gt; &amp;lt;span class=&quot;EntityInheritedClass&quot;&amp;gt;&amp;amp;lt;&amp;lt;/span&amp;gt; ApplicationController&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;
  before_filter &amp;lt;span class=&quot;Constant&quot;&amp;gt;&amp;lt;span class=&quot;Constant&quot;&amp;gt;:&amp;lt;/span&amp;gt;authenticate&amp;lt;/span&amp;gt;&lt;/p&gt;
&lt;span class=&quot;Keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;Entity&quot;&gt;index&lt;/span&gt;
&lt;p&gt;&lt;span class=&quot;Comment&quot;&gt;   &lt;span class=&quot;Comment&quot;&gt;#&lt;/span&gt; [ &amp;#8230; ]&lt;/span&gt;&lt;br /&gt;
  &lt;span class=&quot;Keyword&quot;&gt;end&lt;/span&gt;&lt;/p&gt;
&lt;span class=&quot;Keyword&quot;&gt;protected&lt;/span&gt;
&lt;span class=&quot;Keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;Entity&quot;&gt;authenticate&lt;/span&gt;
authenticate_or_request_with_http_basic &lt;span class=&quot;Keyword&quot;&gt;do &lt;/span&gt;|&lt;span class=&quot;Variable&quot;&gt;id&lt;/span&gt;, &lt;span class=&quot;Variable&quot;&gt;password&lt;/span&gt;|
&lt;span class=&quot;Variable&quot;&gt;&lt;span class=&quot;Variable&quot;&gt;@&lt;/span&gt;user&lt;/span&gt; &lt;span class=&quot;Keyword&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;Support&quot;&gt;User&lt;/span&gt;.&lt;span class=&quot;Entity&quot;&gt;find_by_name&lt;/span&gt;(id)
login_ok &lt;span class=&quot;Keyword&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;Variable&quot;&gt;&lt;span class=&quot;Variable&quot;&gt;@&lt;/span&gt;user&lt;/span&gt;.&lt;span class=&quot;Entity&quot;&gt;authenticate&lt;/span&gt;(password)
login_ok
&lt;span class=&quot;Keyword&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;Keyword&quot;&gt;end&lt;/span&gt;
&lt;p&gt;&lt;span class=&quot;Keyword&quot;&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;/pre&gt;&lt;/code&gt;&lt;/notextile&gt;&lt;/p&gt;
&lt;p&gt;To check if the user can be authenticated:&lt;/p&gt;
&lt;code&gt;&lt;pre class=&quot;sunburst&quot;&gt;&lt;span class=&quot;Keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;JEntityNameType&quot;&gt;User&lt;span class=&quot;EntityInheritedClass&quot;&gt; &lt;span class=&quot;EntityInheritedClass&quot;&gt;&amp;lt;&lt;/span&gt; ActiveRecord::Base&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;Keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;Entity&quot;&gt;authenticate&lt;/span&gt;(&lt;span class=&quot;Variable&quot;&gt;password&lt;/span&gt;)
    user &lt;span class=&quot;Keyword&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;Support&quot;&gt;User&lt;/span&gt;.&lt;span class=&quot;Entity&quot;&gt;find_by_sql&lt;/span&gt;([&lt;span class=&quot;String&quot;&gt;&lt;span class=&quot;String&quot;&gt;&amp;quot;&lt;/span&gt;select * from user where user_pass=password('%s') \&lt;/span&gt;
&lt;span class=&quot;String&quot;&gt;                              OR user_pass=old_password('%s')&lt;span class=&quot;String&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;,password,password])
    (user.&lt;span class=&quot;Entity&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;Keyword&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;Constant&quot;&gt;0&lt;/span&gt;)&lt;span class=&quot;Constant&quot;&gt;?t&lt;/span&gt;rue&lt;span class=&quot;Constant&quot;&gt;&lt;span class=&quot;Constant&quot;&gt;:&lt;/span&gt;false&lt;/span&gt;
  &lt;span class=&quot;Keyword&quot;&gt;end&lt;/span&gt;


&lt;span class=&quot;Keyword&quot;&gt;end&lt;/span&gt;

&lt;/pre&gt;&lt;/code&gt;&lt;p&gt;Its a very simple approach.&lt;/p&gt;
&lt;p&gt;What do you think?&lt;/p&gt;&lt;br/&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tag/http+basic+auth&quot; rel=&quot;tag&quot;&gt;http basic auth&lt;/a&gt;, &lt;a href=&quot;http://technorati.com/tag/mysql&quot; rel=&quot;tag&quot;&gt;mysql&lt;/a&gt;, &lt;a href=&quot;http://technorati.com/tag/rails&quot; rel=&quot;tag&quot;&gt;rails&lt;/a&gt;</description>
          <pubDate>Mon, 02 Nov 2009 14:52:00 GMT</pubDate>
          <guid>http://edmund.haselwanter.com/en/blog/2009/11/02/http-basic-auth-for-mysql-password-and-old_password-in-rails/</guid>
          <link>http://edmund.haselwanter.com/en/blog/2009/11/02/http-basic-auth-for-mysql-password-and-old_password-in-rails/</link>
        </item>
    
    
  </channel>
</rss>

