Difference between revisions of "Obsolete:NovaInstall/Austin"
Line 40: | Line 40: | ||
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 | + | sudo sh -c 'echo "deb http://launchpad.net/~openstack/+archive/openstack-ppa 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 | ||
Revision as of 19:48, 21 October 2010
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.
<<TableOfContents()>>
Single Machine Installation
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.
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.
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://launchpad.net/~openstack/+archive/openstack-ppa 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
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 confirming:
Adding system user `nova' (UID 106) ... Adding new user `nova' (UID 106) with group `nogroup' ... 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 ...
Step 3: Create a Nova administrator
Type or copy/paste in the following line to create a user named "anne."
nova-manage user admin anne
You can safely ignore the DeprecationWarning. You see an access key and a secret key export, such as these made-up ones:
/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
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.
sudo nova-manage project create IRT anne
You can safely ignore the DeprecationWarning which was the only line returned when I tested this.
/usr/lib/pymodules/python2.6/nova/db/sqlalchemy/api.py:42: DeprecationWarning: Use of empty request context is deprecated DeprecationWarning)
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.
sudo nova-manage project zipfile IRT anne
After ignoring more deprecation warnings, you see the following:
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
Step 6: Unzip the nova. zip You should have a nova.zip file in your current working directory. Unzip it with this command:
unzip nova.zip
You'll see these files extract.
Archive: nova.zip extracting: novarc extracting: pk.pem extracting: cert.pem extracting: nova-vpn.conf extracting: cacert.pem
Step 6: Source the RC file
Type or copy/paste the following to source the novarc file in your current working directory.
. novarc
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.
wget http://c2477062.cdn.cloudfiles.rackspacecloud.com/images.tgz
It should take less than 5 seconds to get the file.
--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]
Step 9: Decompress the image file
Use this command to extract the image files.
tar xvzf images.tgz
You get a directory listing like so:
images |-- aki-lucid | |-- image | `-- info.json |-- ami-tiny | |-- image | `-- info.json `-- ari-lucid |-- image `-- info.json
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.
euca-bundle-image -i images/aki-lucid/image -p kernel --kernel true
You should see this in response:
Checking image Tarring image Encrypting image Splitting image... Part: kernel.part.0 Generating manifest /tmp/kernel.manifest.xml
Type or copy/paste the following commands to create a manifest for the ramdisk.
euca-bundle-image -i images/ari-lucid/image -p ramdisk --ramdisk true
You should see this in response:
Checking image Tarring image Encrypting image Splitting image... Part: ramdisk.part.0 Generating manifest /tmp/ramdisk.manifest.xml
Type or copy/paste the following commands to upload the kernel bundle.
euca-upload-bundle -m /tmp/kernel.manifest.xml -b mybucket
You should see this in response:
Checking bucket: mybucket Creating bucket: mybucket Uploading manifest file Uploading part: kernel.part.0 Uploaded image as mybucket/kernel.manifest.xml
Type or copy/paste the following commands to upload the ramdisk bundle.
euca-upload-bundle -m /tmp/ramdisk.manifest.xml -b mybucket
You should see this in response:
Checking bucket: mybucket Uploading manifest file Uploading part: ramdisk.part.0 Uploaded image as mybucket/ramdisk.manifest.xml
Type or copy/paste the following commands to register the kernel and get its ID.
euca-register mybucket/kernel.manifest.xml
You should see this in response:
IMAGE ami-fcbj2non
Type or copy/paste the following commands to register the ramdisk and get its ID.
euca-register mybucket/ramdisk.manifest.xml
You should see this in response:
IMAGE ami-orukptrc
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.
euca-bundle-image -i images/ami-tiny/image -p machine --kernel ami-fcbj2non --ramdisk ami-orukptrc
You should see this in response:
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
Type or copy/paste the following commands to upload the machine image bundle.
euca-upload-bundle -m /tmp/machine.manifest.xml -b mybucket
You should see this in response:
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
Type or copy/paste the following commands to register the machine image and get its ID.
euca-register mybucket/machine.manifest.xml
You should see this in response:
IMAGE ami-g06qbntt
Type or copy/paste the following commands to register a SSH keypair for use in starting and accessing the instances.
euca-add-keypair mykey > mykey.priv chmod 600 mykey.priv
Type or copy/paste the following commands to run an instance using the keypair and IDs that we previously created.
euca-run-instances ami-g06qbntt --kernel ami-fcbj2non --ramdisk ami-orukptrc -k mykey
You should see this in response:
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
Type or copy/paste the following commands to watch as the scheduler launches, and completes booting your instance.
euca-describe-instances
You should see this in response:
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
Type or copy/paste the following commands to see when loading is completed and the instance is running.
euca-describe-instances
You should see this in response:
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
Type or copy/paste the following commands to check that the virtual machine is running.
virsh list
You should see this in response:
Id Name State ---------------------------------- 1 2842445831 running
Type or copy/paste the following commands to ssh to the instance using your private key.
ssh -i mykey.priv root@10.0.0.3
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.
cp /etc/ssl/openssl.cnf ~ sudo reboot