You are on page 1of 4

1/9/13

UbuntuCloudInfrastructure11.10 - Community Ubuntu Documentation

Partners Support Community Ubuntu.com Login to edit
Search

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

Ubuntu Cloud Live Image
1. Download the image from http://cdimage.ubuntu.com/ubuntu-cloud-live/releases/11.10/ 2. Create a USB stick using USB Creator or some other tools as described here 3. Boot from the created USB stick Your Ubuntu Cloud Infrastructure is ready to be used. See the section Use your cloud for more details.

Ubuntu Cloud Infrastructure with Orchestra and Juju
This install is done in 3 steps: 1. Install the Orchestra server 2. Install Juju 3. Deploy Ubuntu Cloud Infrastructure with Juju Which are described below.

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.

Installing the Orchestra server
1. Follow the usual steps to install Ubuntu Server 2. Once done, install the package named "ubuntu-orchestra-server"
s u d oa p t g e tu p d a t e s u d oa p t g e ti n s t a l lu b u n t u o r c h e s t r a s e r v e ry

3. Answer some questions about your networking setup
https://help.ubuntu.com/community/UbuntuCloudInfrastructure11.10 1/4

3 / w e b d a v #S p e c i f yc o b b l e r ' su s r / p a s s o r c h e s t r a u s e r :c o b b l e r o r c h e s t r a p a s s :c o b b l e r a d m i n s e c r e t :f o o o o o #B r a n c hf r o mw h e r ew ew i l li n s t a l le n s e m b l e #j u j u b r a n c h :l p : j u j u #M a n g e m e n tc l a s s e s a c q u i r e d m g m t c l a s s :o r c h e s t r a j u j u a c q u i r e d a v a i l a b l e m g m t c l a s s :o r c h e s t r a j u j u a v a i l a b l e 3. 1 . 3 #S p e c i f ys t o r a g e . 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. Configuring the environment s u d om k d i rp~ / . Installing juju Starting Oneiric 11. then we have to create them before we bootstrap our environment: s s h k e y g e ntr s a 4. s t o r a g e u r l :h t t p : / / 1 0 . Set Global Configuration We'll need to set some global configuration for the installation.10 n o v a r e l e a s e :d i s t r o 2/4 . 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.ubuntu. 2 . y a m l And we copy the following j u j u :e n v i r o n m e n t s e n v i r o n m e n t s : o r c h e s t r a : t y p e :o r c h e s t r a #S p e c i f yt h eo r c h e s t r as e r v e r ' sI Pa d d r e s s o r c h e s t r a s e r v e r :1 0 . j u j u s u d ov i m~ / .com/community/UbuntuCloudInfrastructure11.10.10 . Clone Charms Create local branches of the following Juju charms in ~/charms u b u n t u @ o r c h e s t r a s r v r : ~ $m k d i rpc h a r m s / o n e i r i c u b u n t u @ o r c h e s t r a s r v r : ~ $c dc h a r m s / u b u n t u @ o r c h e s t r a s r v r : ~ / c h a r m s $b z rb r a n c hl p : c h a r m / r a b b i t m q s e r v e ro n e i r i c / r a b b i t m q s e r v e r u b u n t u @ o r c h e s t r a s r v r : ~ / c h a r m s $b z rb r a n c hl p : c h a r m / m y s q lo n e i r i c / m y s q l u b u n t u @ o r c h e s t r a s r v r : ~ / c h a r m s $b z rb r a n c hl p : c h a r m / n o v a c o m p u t eo n e i r i c / n 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 : ~ / c h a r m s $b z rb r a n c hl p : c h a r m / n o v a c l o u d c o n t r o l l e ro n e i r i c / n 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 : ~ / c h a r m s $b z rb r a n c hl p : c h a r m / g l a n c eo n e i r i c / g l a n c e 2. 1. 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 . m a c h i n e s : 0 :{ d n s n a m e :m a b o l o . check out the juju documentation 2. Create a file /home/ubuntu/charms/openstack.1/9/13 UbuntuCloudInfrastructure11. To learn more about Orchestra see Dustin Kirland's excellent blog post on the subject. 1 . j u j u / e n v i r o n m e n t s .yaml: n o v a c l o u d c o n t r o l l e r : https://help.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 Deploying Ubuntu Cloud Infrastructure with Juju 1.I nt h i sc a s ew ea r eu s i n gw e b d a vi n s t a l l e db yo r c h e s t r a . In this example. Bootstrapping the environment After the configuration done above. 2 . l a n . Creating SSH keys Ensemble requires SSH keys to be able to access the deployed nodes. 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 . Install Juju This can be done on the same server you have deployed Orchestra onto.Community Ubuntu Documentation Your basic Orchestra setup is now done. In case those keys do not exist.

It's a good idea to allow it time to complete entirely before adding the others.0 for Ubuntu 11. we can begin deploying the services.10 3/4 .ubuntu. See the section Use your cloud for more details. deploy the MySQL and RabbitMQ services.yaml. y a m l u b u n t u @ o r c h e s t r a s r v r : ~ $j u j ud e p l o yr e p o s i t o r y = $ R E P Ol o c a l : m y s q l u b u n t u @ o r c h e s t r a s r v r : ~ $j u j ud e p l o yr e p o s i t o r y = $ R E P Ol o c a l : r a b b i t m q Nova and Glance Deploy nova-cloud-controller. Give nova-cloud-controller.Community Ubuntu Documentation n o v a r e l e a s e :d i s t r o n o v a c o n f i g :/ e t c / n o v a / n o v a . c o n f d b u s e r :g l a n c e n o v a d b :n o v a Note: Most of these are defaults. nova will create a virtual network on these bridges for instances. The only option specific to our example deployment is 'flat-interface: eth1'.10 . nova-compute and glance to their own nodes: u b u n t u @ o r c h e s t r a s r v r : ~ $j u j ud e p l o yr e p o s i t o r y = $ R E P Oc o n f i g = $ C O N F I Gl o c a l : n 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 ud e p l o yr e p o s i t o r y = $ R E P Oc o n f i g = $ C O N F I Gl o c a l : n 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 ud e p l o yr e p o s i t o r y = $ R E P Oc o n f i g = $ C O N F I Gl o c a l : g l a n c e 6. MySQL and RabbitMQ First. Later. 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.1/9/13 UbuntuCloudInfrastructure11. u b u n t u @ o r c h e s t r a s r v r : ~ $e x p o r tR E P O = ~ / c h a r m s u b u n t u @ o r c h e s t r a s r v r : ~ $e x p o r tC O N F I G = ~ / c h a r m s / o p e n s t a c k . Ubuntu Cloud Infrastructure from packages This is a more complex process which is described in great details in the OpenStack Beginner’s Guide V2.10 written by CSS Corp. This will configure the virtual network on eth1. 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. Add Relations Now we can add the necessary relations between the services. c o n f d b u s e r :n o v a n o v a d b :n o v a r a b b i t u s e r :n o v a r a b b i t v h o s t :n o v a n e t w o r k m a n a g e r :F l a t D H C P M a n a g e r b r i d g e i n t e r f a c e :b r 1 0 0 n o v a c o m p u t e : n o v a r e l e a s e :d i s t r o n o v a c o n f i g :/ e t c / n o v a / n o v a . 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. 4. Use Your Cloud https://help. c o n f d b u s e r :n o v a n o v a d b :n o v a r a b b i t u s e r :n o v a r a b b i t v h o s t :n o v a f l a t i n t e r f a c e :e t h 1 v i r t t y p e :k v m g l a n c e : g l a n c e r e l e a s e :d i s t r o r e g i s t r y c o n f i g :/ e t c / g l a n c e / g l a n c e r e g i s t r y .com/community/UbuntuCloudInfrastructure11. c o n f a p i c o n f i g :/ e t c / g l a n c e / g l a n c e a p i . Deploy Services After branching the necessary charms to /home/ubuntu/charms/ and setting our configuration at /home/ubuntu/charms/openstack.

If you login to the nova-cloud-controller node (as reported by 'juju status').ubuntu.com/community/UbuntuCloudInfrastructure11.1/9/13 UbuntuCloudInfrastructure11.160]:nijaba) https://help.com/community/UEC/Images UbuntuCloudInfrastructure11.3. you can create the first nova users. 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 .181. networks and export credentials to be used with euca-tools or other API tools. 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 .com[88. t a r .openstack. 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 .com/ http://help. the Openstack cloud has been deployed and should be functioning. 0 . projects. 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 . u b u n t u @ m a r u l a : ~ $u n z i pn o v a . 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. u b u n t u . z i p u b u n t u @ m a r u l a : ~ $.barcet. / u b u n t u 1 1 . 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. t a r .10 (last edited 2012-04-10 09:33:11 by nijaba @ mx.ubuntu.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 .10 4/4 .ubuntu.org/ http://cloud.Community Ubuntu Documentation At this point.10 . 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. 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. 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 . 0 .