|
|
Line 92: |
Line 92: |
| | | |
| | | |
− | ''' Step 3: Create a Nova administrator'''
| + | {{:[[NovaInstall]], , from="## Novainstall snippet"}} |
− | | |
− | Type or copy/paste in the following line to create a user named "anne."
| |
− | | |
− | | |
− | <pre><nowiki>
| |
− | sudo 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>
| |
− | | |
− | '''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>
| |
− | euca-bundle-image -i images/aki-lucid/image -p kernel --kernel true
| |
− | </nowiki></pre>
| |
− | | |
− | You should see this in response:
| |
− | | |
− | <pre><nowiki>
| |
− | Checking image
| |
− | Tarring image
| |
− | Encrypting image
| |
− | Splitting image...
| |
− | Part: kernel.part.0
| |
− | Generating manifest /tmp/kernel.manifest.xml
| |
− | </nowiki></pre>
| |
− | | |
− | | |
− | Type or copy/paste the following commands to create a manifest for the ramdisk.
| |
− | | |
− | <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>
| |
− | | |
− | | |
− | ----
| |
− | [[Category:HowTo]] [[Category:Nova]]
| |
These instructions are for the Austin release of Nova, 2010.1. This release is still in development. 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.
The instructions are based on Ubuntu commands. For Fedora, RHEL, or CentOS, refer to the last section in the InstallFromSource page.
Extract the file to the server where you want to install and run Nova.
Nova requires rabbitmq for messaging and optionally you can use redis for storing state, so install these first.
If you're running on Ubuntu 10.04, you'll need to install Twisted and python-gflags which is included in the OpenStack PPA.
Switch to the directory where the Python files for Nova are extracted.