Jump to: navigation, search

Difference between revisions of "Obsolete:NovaInstall/Austin"

m (Fifieldt moved page NovaInstall/Austin to Obsolete:NovaInstall/Austin: Austin?! Really?!)
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
+
 
 
= Installing an [[OpenStack]] Compute (Nova) Development Snapshot (Austin release) =
 
= Installing an [[OpenStack]] Compute (Nova) Development Snapshot (Austin release) =
  
These instructions are for the Austin release of Nova, 2010.1. Please ask for assistance in the #openstack IRC channel if you want more information or run into problems.
+
These instructions are for the Austin release of Nova, 2010.1. This release is still in development and has a bug: #668342 in nova "Austin released packaging error" [Undecided,New] https://launchpad.net/bugs/668342. So you may want to run the more recent code rather than the packaged release until this bug is fixed by referring to [[NovaInstall]].
 +
 
 +
Ideally, you have root access to where you want to install and can use the [http://github.com/vishvananda/novascript  install script on github] rather than stepping through all the dependencies and configuration.
  
<<[[TableOfContents]]()>>
+
Please ask for assistance in the #openstack IRC channel if you want more information or run into problems.
  
 
== Single Machine Installation ==
 
== Single Machine Installation ==
 +
 +
The instructions are based on Ubuntu commands. For Fedora, RHEL, or CentOS, refer to [[NovaInstall#Nova_installation_on_CentOS_5.5|Nova installation on CentOS 5.5]] on the [[NovaInstall]] page.
  
 
'''Step 1: Downloading the Nova packaged software '''
 
'''Step 1: Downloading the Nova packaged software '''
  
Download the released package at http://launchpad.net/nova/austin/austin-rc/+download/nova-2010.1.tar.gz.  
+
Download the released package at http://launchpad.net/nova/austin/2010.1/+download/nova-2010.1.tar.gz.  
  
 
Extract the file to the server where you want to install and run Nova.
 
Extract the file to the server where you want to install and run Nova.
Line 22: Line 26:
 
'''Step 2: Install dependencies'''
 
'''Step 2: Install dependencies'''
  
Nova requires rabbitmq for messaging and optionally you can use redis for storing state, so install these first.
+
Nova requires rabbitmq for messaging and optionally you can use redis for storing state, so install these first.
 +
 
 +
'''Note:''' You must have sudo installed to run these commands as shown here.  
  
  
Line 32: Line 38:
 
You'll see messages starting with "Reading package lists... Done" and you must confirm by typing Y that you want to continue.
 
You'll see messages starting with "Reading package lists... Done" and you must confirm by typing Y that you want to continue.
  
If you're running on Ubuntu 10.04, you'll need to install Twisted and python-gflags which are included in the [[OpenStack]] PPA.
+
If you're running on Ubuntu 10.04, you'll need to install Twisted and python-gflags which is included in the [[OpenStack]] PPA.
  
  
Line 40: Line 46:
  
 
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 95C71FE2
 
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 95C71FE2
sudo sh -c 'echo "deb http://launchpad.net/~openstack/+archive/openstack-ppa jaunty main" > /etc/apt/sources.list.d/openstackppa.list'
+
sudo sh -c 'echo "deb http://ppa.launchpad.net/openstack/openstack-ppa/ubuntu lucid main" > /etc/apt/sources.list.d/openstackppa.list'
 
sudo apt-get update && sudo apt-get install python-gflags
 
sudo apt-get update && sudo apt-get install python-gflags
  
Line 48: Line 54:
 
''' Step 3: Build and install Nova services '''
 
''' Step 3: Build and install Nova services '''
  
Type or copy/paste in the following line to compile the Python code for [[OpenStack]] Compute.
+
Switch to the directory where the Python files for Nova are extracted.
  
  
 
<pre><nowiki>
 
<pre><nowiki>
sudo python setup.py build
+
cd nova-2010.1
sudo python setup.py install
 
 
</nowiki></pre>
 
</nowiki></pre>
  
  
When the installation is complete, you'll see the following lines confirming:
+
Type or copy/paste in the following line to compile the Python code for [[OpenStack]] Compute.
  
  
 
<pre><nowiki>
 
<pre><nowiki>
Adding system user `nova' (UID 106) ...
+
sudo python setup.py build
Adding new user `nova' (UID 106) with group `nogroup' ...
+
sudo python setup.py install
Not creating home directory `/var/lib/nova'.
 
Setting up nova-scheduler (0.9.1~bzr331-0ubuntu2) ...
 
* Starting nova scheduler nova-scheduler
 
WARNING:root:Starting scheduler node
 
  ...done.
 
Processing triggers for libc-bin ...
 
ldconfig deferred processing now taking place
 
Processing triggers for python-support ...
 
</nowiki></pre>
 
 
 
 
 
''' Step 3: Create a Nova administrator'''
 
 
 
Type or copy/paste in the following line to create a user named "anne."
 
 
 
 
 
<pre><nowiki>
 
nova-manage user admin anne
 
</nowiki></pre>
 
 
 
You can safely ignore the [[DeprecationWarning]]. You see an access key and a secret key export, such as these made-up ones:
 
 
 
 
 
<pre><nowiki>
 
/usr/lib/pymodules/python2.6/nova/db/sqlalchemy/api.py:42: DeprecationWarning: Use of empty request context is deprecated
 
  DeprecationWarning)
 
export EC2_ACCESS_KEY=4e6498a2-blah-blah-blah-17d1333t97fd
 
export EC2_SECRET_KEY=0a520304-blah-blah-blah-340sp34k05bbe9a7
 
</nowiki></pre>
 
 
 
'''Step 4: Create a project with the user you created '''
 
 
 
Type or copy/paste in the following line to create a project named IRT (for Ice Road Truckers, of course) with the newly-created user named anne.
 
 
 
 
 
<pre><nowiki>
 
sudo nova-manage project create IRT anne
 
</nowiki></pre>
 
 
 
You can safely ignore the [[DeprecationWarning]] which was the only line returned when I tested this.
 
 
 
 
 
<pre><nowiki>
 
/usr/lib/pymodules/python2.6/nova/db/sqlalchemy/api.py:42: DeprecationWarning: Use of empty request context is deprecated
 
  DeprecationWarning)
 
</nowiki></pre>
 
 
 
'''Step 5: Get your credentials for the project '''
 
 
 
Next, type or copy/paste in the following line to get the credentials for the project, which also creates a zip file.
 
 
 
 
 
<pre><nowiki>
 
sudo nova-manage project zipfile IRT anne
 
</nowiki></pre>
 
 
 
After ignoring more deprecation warnings, you see the following:
 
 
 
 
 
<pre><nowiki>
 
Generating RSA private key, 1024 bit long modulus
 
.....++++++
 
..++++++
 
e is 65537 (0x10001)
 
Using configuration from ./openssl.cnf
 
Check that the request matches the signature
 
Signature ok
 
The Subject's Distinguished Name is as follows
 
countryName          :PRINTABLE:'US'
 
stateOrProvinceName  :PRINTABLE:'California'
 
localityName          :PRINTABLE:'MountainView'
 
organizationName      :PRINTABLE:'AnsoLabs'
 
organizationalUnitName:PRINTABLE:'NovaDev'
 
commonName            :PRINTABLE:'anne-2010-10-12T21:12:35Z'
 
Certificate is to be certified until Oct 12 21:12:35 2011 GMT (365 days)
 
 
 
Write out database with 1 new entries
 
Data Base Updated
 
</nowiki></pre>
 
 
 
''' Step 6: Unzip the nova. zip ''' You should have a nova.zip file in your current working directory. Unzip it with this command:
 
 
 
 
 
<pre><nowiki>
 
unzip nova.zip
 
</nowiki></pre>
 
 
 
You'll see these files extract.
 
 
 
 
 
<pre><nowiki>
 
Archive:  nova.zip
 
extracting: novarc
 
extracting: pk.pem
 
extracting: cert.pem
 
extracting: nova-vpn.conf
 
extracting: cacert.pem
 
</nowiki></pre>
 
 
 
''' Step 6:  Source the RC file'''
 
 
 
Type or copy/paste the following to source the novarc file in your current working directory.
 
 
 
 
 
<pre><nowiki>
 
. novarc
 
</nowiki></pre>
 
 
 
'''Step 7: Pat yourself on the back '''
 
 
 
Congratulations, your cloud is up and running, you’ve created an admin user, retrieved the user's credentials and put them in your environment.
 
 
 
Now you need an image.
 
 
 
'''Step 8: Get an image'''
 
 
 
To make things easier, we've provided a small image on the Rackspace CDN. Use this command to get it on your server.
 
 
 
 
 
<pre><nowiki>
 
wget http://c2477062.cdn.cloudfiles.rackspacecloud.com/images.tgz
 
</nowiki></pre>
 
 
 
It should take less than 5 seconds to get the file.
 
 
 
 
 
<pre><nowiki>
 
--2010-10-12 21:40:55--  http://c2477062.cdn.cloudfiles.rackspacecloud.com/images.tgz
 
Resolving cblah2.cdn.cloudfiles.rackspacecloud.com... 208.111.196.6, 208.111.196.7
 
Connecting to cblah2.cdn.cloudfiles.rackspacecloud.com|208.111.196.6|:80... connected.
 
HTTP request sent, awaiting response... 200 OK
 
Length: 58520278 (56M) [appication/x-gzip]
 
Saving to: `images.tgz'
 
 
 
100%[======================================>] 58,520,278  14.1M/s  in 3.9s
 
 
 
2010-10-12 21:40:59 (14.1 MB/s) - `images.tgz' saved [58520278/58520278]
 
</nowiki></pre>
 
 
 
''' Step 9: Decompress the image file '''
 
 
 
Use this command to extract the image files.
 
 
 
 
 
<pre><nowiki>
 
tar xvzf images.tgz
 
</nowiki></pre>
 
 
 
 
 
You get a directory listing like so:
 
 
 
 
 
<pre><nowiki>
 
images
 
|-- aki-lucid
 
|  |-- image
 
|  `-- info.json
 
|-- ami-tiny
 
|  |-- image
 
|  `-- info.json
 
`-- ari-lucid
 
    |-- image
 
    `-- info.json
 
 
</nowiki></pre>
 
</nowiki></pre>
  
'''Step 10: Send commands to upload sample image to the cloud '''
 
 
Type or copy/paste the following commands to create a manifest for the kernel.
 
  
<pre><nowiki>
+
When the installation is complete, you'll see the following lines:
euca-bundle-image -i images/aki-lucid/image -p kernel --kernel true
 
</nowiki></pre>
 
  
You should see this in response:
 
  
 
<pre><nowiki>
 
<pre><nowiki>
Checking image
+
Installing nova-network script to /usr/local/bin
Tarring image
+
Installing nova-volume script to /usr/local/bin
Encrypting image
+
Installing nova-objectstore script to /usr/local/bin
Splitting image...
+
Installing nova-manage script to /usr/local/bin
Part: kernel.part.0
+
Installing nova-scheduler script to /usr/local/bin
Generating manifest /tmp/kernel.manifest.xml
+
Installing nova-dhcpbridge script to /usr/local/bin
</nowiki></pre>
+
Installing nova-compute script to /usr/local/bin
 +
Installing nova-instancemonitor script to /usr/local/bin
 +
Installing nova-api script to /usr/local/bin
 +
Installing nova-import-canonical-imagestore script to /usr/local/bin
  
 
+
Installed /usr/local/lib/python2.6/dist-packages/nova-2010.1-py2.6.egg
Type or copy/paste the following commands to create a manifest for the ramdisk.
+
Processing dependencies for nova==2010.1
 
+
Finished processing dependencies for nova==2010.1
<pre><nowiki>
 
euca-bundle-image -i images/ari-lucid/image -p ramdisk --ramdisk true
 
</nowiki></pre>
 
 
 
You should see this in response:
 
 
 
<pre><nowiki>
 
Checking image
 
Tarring image
 
Encrypting image
 
Splitting image...
 
Part: ramdisk.part.0
 
Generating manifest /tmp/ramdisk.manifest.xml
 
</nowiki></pre>
 
 
 
 
 
Type or copy/paste the following commands to upload the kernel bundle.
 
 
 
<pre><nowiki>
 
euca-upload-bundle -m /tmp/kernel.manifest.xml -b mybucket
 
</nowiki></pre>
 
 
 
You should see this in response:
 
 
 
<pre><nowiki>
 
Checking bucket: mybucket
 
Creating bucket: mybucket
 
Uploading manifest file
 
Uploading part: kernel.part.0
 
Uploaded image as mybucket/kernel.manifest.xml
 
</nowiki></pre>
 
 
 
 
 
Type or copy/paste the following commands to upload the ramdisk bundle.
 
 
 
<pre><nowiki>
 
euca-upload-bundle -m /tmp/ramdisk.manifest.xml -b mybucket
 
</nowiki></pre>
 
 
 
You should see this in response:
 
 
 
<pre><nowiki>
 
Checking bucket: mybucket
 
Uploading manifest file
 
Uploading part: ramdisk.part.0
 
Uploaded image as mybucket/ramdisk.manifest.xml
 
</nowiki></pre>
 
 
 
 
 
Type or copy/paste the following commands to register the kernel and get its ID.
 
 
 
<pre><nowiki>
 
euca-register mybucket/kernel.manifest.xml
 
</nowiki></pre>
 
 
 
You should see this in response:
 
 
 
<pre><nowiki>
 
IMAGE  ami-fcbj2non
 
</nowiki></pre>
 
 
 
 
 
Type or copy/paste the following commands to register the ramdisk and get its ID.
 
 
 
<pre><nowiki>
 
euca-register mybucket/ramdisk.manifest.xml
 
</nowiki></pre>
 
 
 
You should see this in response:
 
 
 
<pre><nowiki>
 
IMAGE  ami-orukptrc
 
</nowiki></pre>
 
 
 
 
 
Type or copy/paste the following commands to create a manifest for the machine image associated with the ramdisk and kernel IDs that you got from the previous commands.
 
 
 
<pre><nowiki>
 
euca-bundle-image -i images/ami-tiny/image -p machine  --kernel ami-fcbj2non --ramdisk ami-orukptrc
 
</nowiki></pre>
 
 
 
You should see this in response:
 
 
 
<pre><nowiki>
 
Checking image
 
Tarring image
 
Encrypting image
 
Splitting image...
 
Part: machine.part.0
 
Part: machine.part.1
 
Part: machine.part.2
 
Part: machine.part.3
 
Part: machine.part.4
 
Generating manifest /tmp/machine.manifest.xml
 
</nowiki></pre>
 
 
 
 
 
Type or copy/paste the following commands to upload the machine image bundle.
 
 
 
<pre><nowiki>
 
euca-upload-bundle -m /tmp/machine.manifest.xml -b mybucket
 
</nowiki></pre>
 
 
 
You should see this in response:
 
 
 
<pre><nowiki>
 
Checking bucket: mybucket
 
Uploading manifest file
 
Uploading part: machine.part.0
 
Uploading part: machine.part.1
 
Uploading part: machine.part.2
 
Uploading part: machine.part.3
 
Uploading part: machine.part.4
 
Uploaded image as mybucket/machine.manifest.xml
 
</nowiki></pre>
 
 
 
 
 
Type or copy/paste the following commands to register the machine image and get its ID.
 
 
 
<pre><nowiki>
 
euca-register mybucket/machine.manifest.xml
 
</nowiki></pre>
 
 
 
You should see this in response:
 
 
 
<pre><nowiki>
 
IMAGE  ami-g06qbntt
 
</nowiki></pre>
 
 
 
 
 
Type or copy/paste the following commands to register a SSH keypair for use in starting and accessing the instances.
 
 
 
<pre><nowiki>
 
euca-add-keypair mykey > mykey.priv
 
chmod 600 mykey.priv
 
</nowiki></pre>
 
 
 
 
 
Type or copy/paste the following commands to run an instance using the keypair and IDs that we previously created.
 
 
 
<pre><nowiki>
 
euca-run-instances ami-g06qbntt --kernel  ami-fcbj2non --ramdisk ami-orukptrc -k mykey
 
</nowiki></pre>
 
 
 
You should see this in response:
 
 
 
<pre><nowiki>
 
RESERVATION    r-0at28z12      IRT
 
INSTANCE        i-1b0bh8n      ami-g06qbntt    10.0.0.3        10.0.0.3        scheduling      mykey (IRT, None)      m1.small 2010-10-18 19:02:10.443599
 
</nowiki></pre>
 
 
 
 
 
Type or copy/paste the following commands to watch as the scheduler launches, and completes booting your instance.
 
 
 
<pre><nowiki>
 
euca-describe-instances
 
</nowiki></pre>
 
 
 
You should see this in response:
 
 
 
<pre><nowiki>
 
RESERVATION    r-0at28z12      IRT
 
INSTANCE        i-1b0bh8n      ami-g06qbntt    10.0.0.3        10.0.0.3        launching      mykey (IRT, cloud02)  m1.small 2010-10-18 19:02:10.443599
 
</nowiki></pre>
 
 
 
 
 
Type or copy/paste the following commands to see when loading is completed and the instance is running.
 
 
 
<pre><nowiki>
 
euca-describe-instances
 
</nowiki></pre>
 
 
 
You should see this in response:
 
 
 
<pre><nowiki>
 
RESERVATION    r-0at28z12      IRT
 
INSTANCE        i-1b0bh8n      ami-g06qbntt    10.0.0.3        10.0.0.3        running mykey (IRT, cloud02)    0      m1.small 2010-10-18 19:02:10.443599
 
</nowiki></pre>
 
 
 
 
 
Type or copy/paste the following commands to check that the virtual machine is running.
 
 
 
<pre><nowiki>
 
virsh list
 
</nowiki></pre>
 
 
 
You should see this in response:
 
 
 
<pre><nowiki>
 
Id Name                State
 
----------------------------------
 
  1 2842445831          running
 
</nowiki></pre>
 
 
 
 
 
Type or copy/paste the following commands to ssh to the instance using your private key.
 
 
 
<pre><nowiki>
 
ssh -i mykey.priv root@10.0.0.3
 
</nowiki></pre>
 
 
 
 
 
== Troubleshooting Installation ==
 
If you see an "error loading the config file './openssl.cnf'" it means you can copy the openssl.cnf file to the location where Nova expects it and reboot, then try the command again.
 
 
 
 
 
<pre><nowiki>
 
cp /etc/ssl/openssl.cnf ~
 
sudo reboot
 
 
</nowiki></pre>
 
</nowiki></pre>
  
  
----
+
Next, refer to [[RunningNova]] for more information about getting images and starting instances.
[[Category:HowTo]] [[Category:Nova]]
 

Latest revision as of 18:30, 25 July 2013

Installing an OpenStack Compute (Nova) Development Snapshot (Austin release)

These instructions are for the Austin release of Nova, 2010.1. This release is still in development and has a bug: #668342 in nova "Austin released packaging error" [Undecided,New] https://launchpad.net/bugs/668342. So you may want to run the more recent code rather than the packaged release until this bug is fixed by referring to NovaInstall.

Ideally, you have root access to where you want to install and can use the install script on github rather than stepping through all the dependencies and configuration.

Please ask for assistance in the #openstack IRC channel if you want more information or run into problems.

Single Machine Installation

The instructions are based on Ubuntu commands. For Fedora, RHEL, or CentOS, refer to Nova installation on CentOS 5.5 on the NovaInstall page.

Step 1: Downloading the Nova packaged software

Download the released package at http://launchpad.net/nova/austin/2010.1/+download/nova-2010.1.tar.gz.

Extract the file to the server where you want to install and run Nova.


tar xvzf nova-2010.1.tar.gz


Step 2: Install dependencies

Nova requires rabbitmq for messaging and optionally you can use redis for storing state, so install these first.

Note: You must have sudo installed to run these commands as shown here.


sudo apt-get install rabbitmq-server redis-server


You'll see messages starting with "Reading package lists... Done" and you must confirm by typing Y that you want to continue.

If you're running on Ubuntu 10.04, you'll need to install Twisted and python-gflags which is included in the OpenStack PPA.



sudo apt-get install python-twisted

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 95C71FE2
sudo sh -c 'echo "deb http://ppa.launchpad.net/openstack/openstack-ppa/ubuntu lucid main" > /etc/apt/sources.list.d/openstackppa.list'
sudo apt-get update && sudo apt-get install python-gflags


Step 3: Build and install Nova services

Switch to the directory where the Python files for Nova are extracted.


cd nova-2010.1


Type or copy/paste in the following line to compile the Python code for OpenStack Compute.


sudo python setup.py build
sudo python setup.py install


When the installation is complete, you'll see the following lines:


Installing nova-network script to /usr/local/bin
Installing nova-volume script to /usr/local/bin
Installing nova-objectstore script to /usr/local/bin
Installing nova-manage script to /usr/local/bin
Installing nova-scheduler script to /usr/local/bin
Installing nova-dhcpbridge script to /usr/local/bin
Installing nova-compute script to /usr/local/bin
Installing nova-instancemonitor script to /usr/local/bin
Installing nova-api script to /usr/local/bin
Installing nova-import-canonical-imagestore script to /usr/local/bin

Installed /usr/local/lib/python2.6/dist-packages/nova-2010.1-py2.6.egg
Processing dependencies for nova==2010.1
Finished processing dependencies for nova==2010.1


Next, refer to RunningNova for more information about getting images and starting instances.