<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Leonardo Borda &#187; Ubuntu</title>
	<atom:link href="http://www.leonardoborda.com/blog/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.leonardoborda.com/blog</link>
	<description>A bit of everything and answers that really work!</description>
	<lastBuildDate>Thu, 06 Oct 2011 00:47:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to install Openstack Nova (2011.3-nova-milestone) in all-in-one setup</title>
		<link>http://www.leonardoborda.com/blog/how-to-install-openstack-2011-3-nova-milestone-in-all-in-one-setup/</link>
		<comments>http://www.leonardoborda.com/blog/how-to-install-openstack-2011-3-nova-milestone-in-all-in-one-setup/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 15:13:05 +0000</pubDate>
		<dc:creator>Leo</dc:creator>
				<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[Eucalyptus]]></category>
		<category><![CDATA[Openstack]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.leonardoborda.com/blog/?p=260</guid>
		<description><![CDATA[ARTICLE: Openstack Cloud Software &#8211; Ubuntu Openstack &#8211; Ubuntu Cloud In this article I will talk about how to install Openstack (2011.3-nova-milestone) on All-in-One setup. This kind of installation is useful for proof of concept (POC), development environments or if you want to have a basic cloud environment on your local computer. Overview ======= OpenStack [...]]]></description>
			<content:encoded><![CDATA[<p><strong>ARTICLE: Openstack Cloud Software &#8211; Ubuntu Openstack &#8211; Ubuntu Cloud<br />
</strong></p>
<p>In this article I will talk about how to install Openstack (2011.3-nova-milestone) on All-in-One setup. This kind of installation is useful for proof of concept (POC), development environments or if you want to have a basic cloud environment on your local computer.</p>
<p><strong>Overview</strong><br />
=======<br />
OpenStack [1] is an IaaS cloud computing project by Rackspace Cloud and NASA. Currently more than 110 companies have joined the project among which are Citrix Systems, Dell, AMD, Intel, Canonical, HP, and Cisco. It is free open source software released under the terms of the Apache License [2].</p>
<p>OpenStack Compute (Nova) is a cloud computing fabric controller (the main part of an IaaS system). It is written in Python, using the Eventlet and Twisted frameworks, and relies on the standard AMQP messaging protocol, and SQLAlchemy for data store access.</p>
<p><strong>Configure Prerequisites</strong><br />
==============</p>
<p>Make sure the host in question supports VT ( Virtualisation Technology ) since we will be using KVM as the virtualization technology. This article was tested on Ubuntu 11.04 with the latest updates.</p>
<p>1. Configure bridging mode<br />
sudo apt-get install bridge-utils</p>
<p>2. Install NTP Server<br />
sudo apt-get install ntp</p>
<p>3. Install MySQL Server<br />
Configure mysql&#8217;s root password<br />
sudo apt-get install mysql-server</p>
<p>4. Create a database and mysql user for Openstack<br />
sudo mysql -uroot -p&lt;password&gt; -e &#8220;CREATE DATABASE nova;&#8221;<br />
sudo mysql -uroot -p&lt;password&gt; -e &#8216;GRANT ALL ON nova.* TO novauser@localhost IDENTIFIED BY &#8220;novapassword&#8221; &#8216;;</p>
<p>5. Install RabbitMQ &#8211; Advanced Message Queuing Protocol (AMQP)<br />
sudo apt-get install rabbitmq-server</p>
<p><strong>Install Openstack</strong><br />
==========</p>
<p>6. Configure Official PPA repositories<br />
sudo apt-get install python-software-properties<br />
sudo add-apt-repository ppa:nova-core/milestone<br />
sudo apt-get update</p>
<p>PS: Note that trunk is changing rapidly so installing ppa:/nova-core/trunk may or may not work any given day. An alternative package installation is ppa:nova-core/milestone .</p>
<p>7. Install Openstack components<br />
sudo apt-get install nova-api nova-network nova-volume nova-objectstore nova-scheduler nova-compute euca2ools unzip<br />
sudo apt-get install glance</p>
<p>8. Restart libvirt-bin just to make sure libvirtd is aware of ebtables.<br />
sudo service libvirt-bin restart</p>
<p>9. Edit /etc/nova/nova.conf and add the following<br />
&#8211;sql_connection=mysql://novauser:novapassword@localhost/nova<br />
&#8211;flat_injected=true<br />
&#8211;network_manager=nova.network.manager.FlatDHCPManager<br />
&#8211;fixed_range=10.0.0.0/24</p>
<p>10. restart Openstack services<br />
for i in nova-api nova-network nova-objectstore nova-scheduler nova-volume nova-compute; do sudo stop $i; sleep 2; done<br />
for i in nova-api nova-network nova-objectstore nova-scheduler nova-volume nova-compute; do sudo start $i; sleep 2; done</p>
<p>11. Migrate nova database from sqlite db to MySQL db.<br />
sudo nova-manage db sync<br />
PS: It may take a while.</p>
<p>12. Define a specific private network where all your Instances will run. This will be used in the network of fixed Ips set inside nova.conf.<br />
sudo nova-manage network create &#8211;fixed_range_v4 10.0.0.0/24 &#8211;label private &#8211;bridge_interface br100</p>
<p>12.1 Define a specific public network and allocate 32 Floating Public IP addresses for use with the instances starting from 192.168.2.32.<br />
sudo nova-manage floating create &#8211;ip_range=192.168.2.32/27</p>
<p>13. Create a user, a project, download credentials and source them:<br />
cd<br />
mkdir nova<br />
cd nova<br />
sudo nova-manage user admin lborda<br />
sudo nova-manage project create project1 lborda<br />
sudo nova-manage project zipfile project1 lborda<br />
unzip nova.zip<br />
source novarc</p>
<p><strong>Register an Ubuntu cloud image</strong><br />
===================</p>
<p>14. Publish an image</p>
<p>distro=&#8221;lucid&#8221;<br />
wget http://uec-images.ubuntu.com/$distro/current/$distro-server-cloudimg-amd64.tar.gz</p>
<p>uec-publish-tarball lucid-server-cloudimg-amd64.tar.gz lucid_amd64</p>
<p><strong>Running an instance</strong><br />
============</p>
<p>15. Create a key par<br />
euca-add-keypair lborda &gt; lborda.priv<br />
chmod 0600 lborda.priv</p>
<p>16. Allow icmp (ping) and ssh access to instances<br />
euca-authorize default -P tcp -p 22 -s 0.0.0.0/0<br />
euca-authorize -P icmp -t -1:-1 default</p>
<p>17. Then start the instance</p>
<p>emi=`euca-describe-images | awk &#8216;{print $2}&#8217; |grep -m1 ami`<br />
euca-run-instances $emi -k lborda -t m1.tiny<br />
euca-describe-instances</p>
<p>17.1 Assign public address to the instance<br />
euca-allocate-address<br />
euca-assocate-address  -i &lt;instance_id&gt; &lt;public_ip_address&gt;</p>
<p>18. SSH to the instance<br />
ssh -i lborda.priv ubuntu@&lt;ipaddress&gt;</p>
<p>19. Terminate instances<br />
euca-terminate-instances &lt;instance_id&gt;</p>
<p>20. That is it! Just start using the instance!</p>
<p><strong>Nice commands to know [3]</strong><br />
====================</p>
<p>nova-manage instance_type list<br />
nova-manage flavor list<br />
nova-manage instance_type create m1.xxlarge 32768 16 320 0 0 0<br />
nova-manage instance_type delete m1.xxlarge</p>
<p><strong>References</strong><br />
=======</p>
<p>[1] &#8211; http://www.openstack.org<br />
[2] &#8211; http://en.wikipedia.org/wiki/OpenStack<br />
[3] &#8211; http://ken.pepple.info/openstack/2011/03/03/Configurable-Instance-Types-For-OpenStack-Nova/</p>
<p><strong>Other links</strong><br />
=========<br />
[4] &#8211; http://fnords.wordpress.com/2010/12/02/bleeding-edge-openstack-nova-on-maverick/<br />
[5] &#8211; http://wiki.openstack.org/NovaInstall/DevPkgInstall</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardoborda.com/blog/how-to-install-openstack-2011-3-nova-milestone-in-all-in-one-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to find all the regions in Amazon EC2</title>
		<link>http://www.leonardoborda.com/blog/how-to-find-all-the-regions-in-amazon-ec2/</link>
		<comments>http://www.leonardoborda.com/blog/how-to-find-all-the-regions-in-amazon-ec2/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 20:15:50 +0000</pubDate>
		<dc:creator>Leo</dc:creator>
				<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.leonardoborda.com/blog/?p=254</guid>
		<description><![CDATA[After you have sourced your credentials file you must run: bordalnx:~/.ec2$ ec2-describe-regions REGION    eu-west-1    ec2.eu-west-1.amazonaws.com REGION    us-east-1    ec2.us-east-1.amazonaws.com REGION    ap-northeast-1    ec2.ap-northeast-1.amazonaws.com REGION    us-west-1    ec2.us-west-1.amazonaws.com REGION    ap-southeast-1    ec2.ap-southeast-1.amazonaws.com Leonardo]]></description>
			<content:encoded><![CDATA[<pre><strong><code><strong>After you have sourced your credentials file you must run:

</strong></code></strong>bordalnx:~/.ec2$ ec2-describe-regions
REGION    eu-west-1    ec2.eu-west-1.amazonaws.com
REGION    us-east-1    ec2.us-east-1.amazonaws.com
REGION    ap-northeast-1    ec2.ap-northeast-1.amazonaws.com
REGION    us-west-1    ec2.us-west-1.amazonaws.com
REGION    ap-southeast-1    ec2.ap-southeast-1.amazonaws.com
<strong><code><strong>
Leonardo

</strong></code></strong></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardoborda.com/blog/how-to-find-all-the-regions-in-amazon-ec2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create LVM on Ubuntu</title>
		<link>http://www.leonardoborda.com/blog/how-to-create-lvm-on-ubuntu/</link>
		<comments>http://www.leonardoborda.com/blog/how-to-create-lvm-on-ubuntu/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 21:45:11 +0000</pubDate>
		<dc:creator>Leo</dc:creator>
				<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[fdisk]]></category>
		<category><![CDATA[fstab]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.leonardoborda.com/blog/?p=248</guid>
		<description><![CDATA[Create LVM on Ubuntu 1. Using the whole secondary hard disk for LVM partition: sudo fdisk /dev/sdb Once in the fdisk menu: 1. press n to create a new disk partition, 2. press p to create a primary disk partition, 3. press 1 to define it as the first disk partition, 4. press ENTER twice. [...]]]></description>
			<content:encoded><![CDATA[<p>Create LVM on Ubuntu</p>
<p>1. Using the whole secondary hard disk for LVM partition:<br />
<code>sudo fdisk /dev/sdb</code></p>
<p>Once in the fdisk menu:<br />
1. press n to create a new disk partition,<br />
2. press p to create a primary disk partition,<br />
3. press 1 to define it as the first disk partition,<br />
4. press ENTER twice. This converts the whole secondary disk into a single disk partition,<br />
5. press t to select the partition type,<br />
6. press L to list all the supported partition types,<br />
7. press 8e to select Linux LVM partition type,<br />
8. press p to display the secondary hard disk partition setup. it shows you as /dev/sdb1.<br />
9. press w to write the partition table<br />
10. exit fdisk upon completion.</p>
<p>1.1 Assign disk partitions to physical volumes<br />
<code>sudo pvcreate /dev/sdb1</code></p>
<p>1.2 Create Volume Group VG for the /data and /backup volumes<br />
<code>sudo vgcreate myvg_data /dev/sdb1<br />
pvdisplay<br />
vgdisplay</code></p>
<p>pvdisplay and vgdisplay gives you information about LVM.</p>
<p>1.3 Create Logical Volumes ( LV )<br />
<code>sudo lvcreate -L 500G --name data myvg_data</code></p>
<p>1.4 Format file system<br />
sudo mke2fs -t ext4 -L /data /dev/myvg_data/data</p>
<p>1.5 Mount file system<br />
<code>sudo mkdir /data<br />
sudo mount /dev/myvg_data/data /data<br />
df -hT</code><br />
Make sure you see the partition mounted and its correct size.</p>
<p>1.7. Add it to the system startup<br />
Check disks UUID by installing blkid and takes not of the UUID from /dev/sdb1 &#8211; /dev/myvg_data/data<br />
sudo apt-get install id-utils<br />
sudo blkid</p>
<p>1.8 Add the following entry in /etc/fstab to have the partition mounted<br />
<code>sudo vi /etc/fstab</code><br />
Add at the end of the file the following lines:<br />
UUID=&lt;enter the uuid number found with blkid&gt;	/data               ext4    errors=remount-ro	0       1<br />
<code><br />
sudo mount -v<br />
sudo umount --force /data<br />
sudo mount -a<br />
sudo mount -v<br />
</code><br />
1.9 Make sure you can write something in to the new partition<br />
<code>touch /data/file1.asc<br />
ls -la /data<br />
</code><br />
2 Reboot the server and make sure that the /data partition is mounted.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardoborda.com/blog/how-to-create-lvm-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Path not the same in Ubuntu when using sudo</title>
		<link>http://www.leonardoborda.com/blog/path-environment-not-the-same-in-ubuntu-when-using-sudo/</link>
		<comments>http://www.leonardoborda.com/blog/path-environment-not-the-same-in-ubuntu-when-using-sudo/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 21:46:43 +0000</pubDate>
		<dc:creator>Leo</dc:creator>
				<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[path]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[trojan]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.leonardoborda.com/blog/?p=235</guid>
		<description><![CDATA[Hello, In case you run in to the same problem when running an application with sudo. Sudo does not keep the same $path environment as the current user. This behaviour is the expected behaviour since sudo has been compiled with &#8211;with-secure-path=&#8221;/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin for security purposes. This change was intentionally done in order to make it harder [...]]]></description>
			<content:encoded><![CDATA[<p>Hello,</p>
<p>In case you run in to the same problem when running an application with sudo. Sudo does not keep the same $path environment as the current user.<br />
This behaviour is the expected behaviour since sudo has been  compiled with  &#8211;with-secure-path=&#8221;/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin  for security purposes. This change was intentionally done in order to  make it harder to run Trojan scripts as root user.</p>
<p>If you want to change that behaviour you can follow the steps below:</p>
<p>Edit /etc/sudoers<br />
$ sudo visudo<br />
Add the following entry to the file<br />
Defaults        secure_path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:<strong>/other_paths/ </strong></p>
<p>Save the file.<br />
It should work as expected.</p>
<p>Leonardo</p>
<p>useful words: sudo, ubuntu, $path in ubuntu, environment path</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardoborda.com/blog/path-environment-not-the-same-in-ubuntu-when-using-sudo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>127.0.1.1 ? Ubuntu / Debian</title>
		<link>http://www.leonardoborda.com/blog/127-0-1-1-ubuntu-debian/</link>
		<comments>http://www.leonardoborda.com/blog/127-0-1-1-ubuntu-debian/#comments</comments>
		<pubDate>Tue, 14 Dec 2010 04:34:51 +0000</pubDate>
		<dc:creator>Leo</dc:creator>
				<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[127.0.1.1]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[RFC1700]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.leonardoborda.com/blog/?p=197</guid>
		<description><![CDATA[127.0.1.1 ? What is it used for? If you&#8217;re curious about why Ubuntu and Debian have an entry in /etc/hosts mapping 127.0.1.1 to your server name. You&#8217;re not alone, in fact this is not a bug nor it has been put in there by mistake. Looking at the example below we can see the entries [...]]]></description>
			<content:encoded><![CDATA[<p>127.0.1.1 ? What is it used for?</p>
<p>If you&#8217;re curious about why Ubuntu and Debian have an entry in /etc/hosts mapping 127.0.1.1 to your server name. You&#8217;re not alone, in fact this is not a bug nor it has been put in there by mistake.<br />
Looking at the example below we can see the entries of my testbox:</p>
<p>192.168.1.13    linuxlnx    # Added by NetworkManager<br />
127.0.0.1    localhost.localdomain    localhost<br />
::1    linuxlnx    localhost6.localdomain6    localhost6<br />
<strong>127.0.1.1    linuxlnx</strong><strong>.</strong>linuxlnx<strong>.int </strong>linuxlnx</p>
<p>The reason why you find the 127.0.1.1 in your /etc/hosts is that some applications like GNOME expects that the hostname to be resolved to an ip address with a canonical fully qualified domain name &#8211; FQDN. As you can see on <a title="127.0.1.1" href="http://qref.sourceforge.net/quick/ch-gateway.en.html" target="_blank">Debian documentation</a>:</p>
<blockquote><p>Some software (e.g., GNOME) expects the system hostname to be resolvable to an IP address with a canonical fully qualified domain name.  This is really improper because system hostnames and domain names are two very different things; but there you have it.  In order to support that software, it is necessary to ensure that the system hostname can be resolved.  Most often this is done by putting a line in <code>/etc/hosts</code> containing some IP address and the system hostname.  If your system has a permanent IP address then use that; otherwise use the address 127.0.1.1.</p>
<pre>        127.0.0.1 localhost
        127.0.1.1 linuxlnx</pre>
</blockquote>
<p>To see whether your system hostname can be resolved to an IP address with a fully qualified domain name, use the <samp>hostname &#8211;fqdn</samp> command.</p>
<p>Also it could be any ip address in the 127.0.0.1/8 address block since according to the <a href="http://tools.ietf.org/html/rfc1700">RFC 1700</a> , 127.0.0.0/8 addresses are reserved for loopback purposes.</p>
<p>Leonardo (using Ubuntu 10.10 Maverick Meerkat )</p>
<p>useful words: why debian 127.0.1.1</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardoborda.com/blog/127-0-1-1-ubuntu-debian/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to get or retrieve Dell Service tag from a Ubuntu linux server</title>
		<link>http://www.leonardoborda.com/blog/how-to-get-or-retrieve-dell-service-tag-from-a-ubuntu-linux-server/</link>
		<comments>http://www.leonardoborda.com/blog/how-to-get-or-retrieve-dell-service-tag-from-a-ubuntu-linux-server/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 20:14:53 +0000</pubDate>
		<dc:creator>Leo</dc:creator>
				<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[Dell]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.leonardoborda.com/blog/?p=163</guid>
		<description><![CDATA[#apt-get install dmidecode # dmidecode -s system-serial-number it works!]]></description>
			<content:encoded><![CDATA[<p>#apt-get install dmidecode<br />
# dmidecode -s system-serial-number</p>
<p>it works!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardoborda.com/blog/how-to-get-or-retrieve-dell-service-tag-from-a-ubuntu-linux-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

