Beruflich Dokumente
Kultur Dokumente
UbuntuCloudInfrastructure11.10
Ubuntu Cloud Infrastructure
Introduction
This is instruction of Ubuntu 11.10. For Ubuntu 12.04 LTS, please see UbuntuCloudInfrastructure. Ubuntu Cloud Infrastructure, which is the successor of Ubuntu Enterprise Cloud, is a ready to deploy Infrastructure-as-a-Service (IaaS) based on OpenStack. It is making it's official entry into Ubuntu 11.10.
Contents 1. Introduction 2. Installation 1. Ubuntu Cloud Live Image 2. Ubuntu Cloud Infrastructure with Orchestra and Juju 1. Requirements 2. Installing the Orchestra server 3. Install Juju 1. 1. Installing juju 2. 2. Configuring the environment 3. 3. Creating SSH keys 4. 4. Bootstrapping the environment 4. Deploying Ubuntu Cloud Infrastructure with Juju 1. 1. Clone Charms 2. 2. Set Global Configuration 3. 4. Deploy Services 4. 6. Add Relations 3. Ubuntu Cloud Infrastructure from packages 4. Use Your Cloud 3. See Also
Installation
There are multiple ways to install Ubuntu Cloud Infrastructure. Ubuntu Cloud Live Image: a single node all in one cloud booting from USB Ubuntu Cloud Infrastructure with Orchestra and Juju: our recommended method Install Ubuntu Cloud Infrastructure from packages: the hard way
Requirements
It should be assumed that the user deploying this setup has all nodes with two network interfaces linked to two seperate physical networks. Deploying with a single network is possible with some hacking and workarounds, see original document for that. It's also assumed the user has sufficient number of nodes available in Orchestra. The minimum deployment outlined below requires a minimum of 6 machines including the juju bootstrap node.
1/9/13
Your basic Orchestra setup is now done. To learn more about Orchestra see Dustin Kirland's excellent blog post on the subject.
Install Juju
This can be done on the same server you have deployed Orchestra onto. 1. Installing juju Starting Oneiric 11.10, juju is available in universe
s u d oa p t g e ti n s t a l lj u j u
to install a daily build from PPA or to install from source code, check out the juju documentation 2. Configuring the environment
s u d om k d i rp~ / . j u j u s u d ov i m~ / . j u j u / e n v i r o n m e n t s . y a m l
3. Creating SSH keys Ensemble requires SSH keys to be able to access the deployed nodes. In case those keys do not exist, then we have to create them before we bootstrap our environment:
s s h k e y g e ntr s a
4. Bootstrapping the environment After the configuration done above, we bootstrapped the environment:
j u j ub o o t s t r a p
This process will select any of the machines available to orchestra to be the zookeeper node. In this example, the machine's name is mabolo
u b u n t u @ o r c h t r a s r v r : ~ $j u j us t a t u s 2 0 1 1 0 9 0 81 8 : 0 2 : 2 2 , 1 4 8I N F OC o n n e c t i n gt oe n v i r o n m e n t . m a c h i n e s : 0 :{ d n s n a m e :m a b o l o . l a n ,i n s t a n c e i d :M T M x N D M w N z I 0 O S 4 0 O D k y O D E 2 M z A u O D E 5 O D Y }
NOTE: Note that after executing the command we had to manually start/restart the system to PXE boot it. This can be automated if cobbler is configured to poweron the servers
2. Set Global Configuration We'll need to set some global configuration for the installation. Create a file /home/ubuntu/charms/openstack.yaml:
n o v a c l o u d c o n t r o l l e r :
https://help.ubuntu.com/community/UbuntuCloudInfrastructure11.10
n o v a r e l e a s e :d i s t r o
2/4
1/9/13
Note: Most of these are defaults. The only option specific to our example deployment is 'flat-interface: eth1'. This will configure the virtual network on eth1. Later, nova will create a virtual network on these bridges for instances. 4. Deploy Services After branching the necessary charms to /home/ubuntu/charms/ and setting our configuration at /home/ubuntu/charms/openstack.yaml, we can begin deploying the services.
MySQL and RabbitMQ
6. Add Relations Now we can add the necessary relations between the services. Give nova-cloud-controller, nova-compute and glance access to the database:
u b u n t u @ o r c h e s t r a s r v r : ~ $j u j ua d d r e l a t i o nm y s q ln o v a c l o u d c o n t r o l l e r u b u n t u @ o r c h e s t r a s r v r : ~ $j u j ua d d r e l a t i o nm y s q ln o v a c o m p u t e u b u n t u @ o r c h e s t r a s r v r : ~ $j u j ua d d r e l a t i o nm y s q lg l a n c e
NOTE: The first of these 3 relations runs the initial database migration. It's a good idea to allow it time to complete entirely before adding the others. Give the Nova components access to the messaging queue:
u b u n t u @ o r c h e s t r a s r v r : ~ $j u j ua d d r e l a t i o nr a b b i t m qn o v a c o m p u t e u b u n t u @ o r c h e s t r a s r v r : ~ $j u j ua d d r e l a t i o nr a b b i t m qn o v a c l o u d c o n t r o l l e r
Configure the compute node for the network manager specified in our config.
u b u n t u @ o r c h e s t r a s r v r : ~ $j u j ua d d r e l a t i o nn o v a c l o u d c o n t r o l l e r : n o v a n e t w o r kn o v a c o m p u t e : n o v a n e t w o r k
Let both the cloud controller and the compute nodes know where to fetch virtual machine images:
u b u n t u @ o r c h e s t r a s r v r : ~ $j u j ua d d r e l a t i o ng l a n c e : i m a g e s e r v i c en o v a c l o u d c o n t r o l l e r : i m a g e s e r v i c e u b u n t u @ o r c h e s t r a s r v r : ~ $j u j ua d d r e l a t i o ng l a n c e : i m a g e s e r v i c en o v a c o m p u t e : i m a g e s e r v i c e
Your Ubuntu Cloud Infrastructure is ready to be used. See the section Use your cloud for more details.
1/9/13
At this point, the Openstack cloud has been deployed and should be functioning. If you login to the nova-cloud-controller node (as reported by 'juju status'), you can create the first nova users, projects, networks and export credentials to be used with euca-tools or other API tools.
u b u n t u @ o r c h e s t r a s r v r : ~ $j u j us s h2 u b u n t u @ m a r u l a : ~ $s u d on o v a m a n a g eu s e ra d m i na d m i n u b u n t u @ m a r u l a : ~ $s u d on o v a m a n a g ep r o j e c tc r e a t en o v a p r o j e c ta d m i n u b u n t u @ m a r u l a : ~ $s u d on o v a m a n a g en e t w o r kc r e a t e\ l a b e l = n o v a n e t\ f i x e d _ r a n g e _ v 4 = 1 0 . 0 . 0 . 0 / 2 4\ n u m _ n e t w o r k s = 1\ n e t w o r k _ s i z e = 2 5 5\ b r i d g e = b r 1 0 0\ b r i d g e _ i n t e r f a c e = e t h 1\ m u l t i _ h o s t = T\ p r o j e c t _ i d = n o v a p r o j e c t u b u n t u @ m a r u l a : ~ $s u d on o v a m a n a g ep r o j e c tz i p f i l en o v a p r o j e c ta d m i n
Now we can unzip our credentials and begin using the cloud.
u b u n t u @ m a r u l a : ~ $u n z i pn o v a . z i p u b u n t u @ m a r u l a : ~ $.n o v a r c u b u n t u @ m a r u l a : ~ $w g e th t t p : / / u e c i m a g e s . u b u n t u . c o m / s e r v e r / s e r v e r / r e l e a s e s / o n e i r i c / b e t a 1 / u b u n t u 1 1 . 1 0 b e t a 1 s e r v e r c l o u d i m g a m d 6 4 . t a r . g z u b u n t u @ m a r u l a : ~ $u e c p u b l i s h t a r b a l l. / u b u n t u 1 1 . 1 0 b e t a 1 s e r v e r c l o u d i m g a m d 6 4 . t a r . g zi m a g e s u b u n t u @ m a r u l a : ~ $e u c a a d d k e y p a i ra d a m> a d a m . p k u b u n t u @ m a r u l a : ~ $e u c a r u n i n s t a n c e ska d a ma m i 0 0 0 0 0 0 0 2
We still have 1 extra machine. We can easily be added as a compute node through Juju to increase our resources:
u b u n t u @ o r c h e s t r a s r v r : ~ $j u j ua d d u n i tn o v a c o m p u t e
See Also
http://docs.openstack.org/ http://cloud.ubuntu.com/ http://help.ubuntu.com/community/UEC/Images UbuntuCloudInfrastructure11.10 (last edited 2012-04-10 09:33:11 by nijaba @ mx.barcet.com[88.181.3.160]:nijaba)
https://help.ubuntu.com/community/UbuntuCloudInfrastructure11.10
4/4