Home > Ubuntu, Ubuntu Server > Run your own Ubuntu Enterprise Cloud, part 3

Run your own Ubuntu Enterprise Cloud, part 3

October 13, 2009 Leave a comment Go to comments

Disclaimer: I’m now working on the OpenStack project, which provides the same kind of functionality as Eucalyptus.

Important update: This howto was targeted at 9.10. The 10.04 release of UEC introduces plenty of simplification (autoregistration of components, uec-publish-tarball automatically registering cloud images…) that makes some of this guide obsolete. Please see https://help.ubuntu.com/community/UEC/ which is kept much more up to date. As an alternative, see http://testcases.qa.ubuntu.com/Install/ServerUECTopology1, which details the testcase we run to validate UEC internally.

In part 1 and part 2 of this series, we saw how to set up a minimal cloud infrastructure and bundle a basic image (and test it). In this final article, we’ll play with our cloud from an end-user perspective.

Setting up the web UI

First of all, before accepting end users, as the administrator of the cloud you will have to setup a few things on the web UI. Using your favorite browser, you should:

  • Open https://cloudcontroller:8443/
  • Log in using the default user/password: admin/admin
  • Change the default password, setup the cloud admin email address
  • Logout

Setting up the cloud client

We’ll use Ubuntu 9.10 beta for this purpose, as it includes all the needed packages, and it’s so great ! You will have to install the following packages:

$ sudo apt-get install euca2ools unzip

Registering on UEC, getting credentials

As the end-user, fire up your favorite browser and:

If you set up the email correctly on your cloud controller, it should send an email to the cloud admin address asking him to approve that request. Follow the instructions on that email to approve the account as the admin.

You should then get an email at the end user email address asking you to confirm the account request. Follow the instructions on that email, then you can log in on the web UI:

  • Open https://cloudcontroller:8443/
  • Login using your end user username and password
  • Click “Download Credentials” in the “Credentials” tab
  • Note the EMI reference you can use on the “Images” tab

Starting up an instance

You should unzip the credentials zipfile you just downloaded, then source the eucarc file and test the connection:

$ unzip euca2-enduser-x509.zip
$ . eucarc
$ euca-describe-availability-zones verbose

Setup a SSH key and allow connection to the SSH port:

$ euca-add-keypair enduserkey > enduserkey.priv
$ chmod 0600 enduserkey.priv
$ euca-authorize default -P tcp -p 22 -s 0.0.0.0/0

Then starting up an instance is just a matter of passing the right EMI and type:

$ euca-run-instances -k enduserkey emi-XXXXXXXX -t c1.medium

Enjoy !

About these ads
Categories: Ubuntu, Ubuntu Server
  1. sniff
    October 13, 2009 at 17:37

    hi Thierry,

    good post; it’s part 3 & i wonder where on Planet i can find the previous part & other good technical posts.

  2. Dipak Chirmade
    November 18, 2009 at 10:32

    Hi there!
    I’ve configured my micro-cloud(minimal infrastructure)too.
    Currently for testing purposes I’m running my own customized instances over the cloud. I’d like to know about the best possible way by which I can install few packages *PERSISTENTLY* inside the instance when instance is active? I understand that the instance is virtual and one need to install the packages at the time of making-the-images etc. But still it’ll be really handy for me if I can install packages on-the-fly. I’m thinking to use externally attached storage volume to use as a install path so that even if instance gets reboot, upon bootup it can mount the externally attached storage and will start using installed packages accordingly etc Any comments?

  3. February 3, 2010 at 00:56

    Dipak,

    Maybe something like Puppet or Cfengine could help you with keeping the Vm’s in a state that you prefer, software wise – so when a new instance spools, you can have puppet run through and make sure all the items that you need to use the Vm in your environment are present.

    Hope that helps – Thanks!

  4. Dipak Chirmade
    February 8, 2010 at 08:10

    Hi Daniel,

    Thanks a lot for suggesting Puppet.
    It helped already!

    Thanks again!

  5. leon
    February 10, 2010 at 09:11

    i cant get to the web interface just keeps telling me page cannot be displayed?

    • Thierry Carrez
      February 10, 2010 at 16:31

      Try restarting eucalyptus (not rebooting the server), see if something runs on port 8443… If not, please use Launchpad to file bugs, this is not a support forum.

  6. James Carter
    April 3, 2010 at 16:43

    Hi all. I’ve read carefully 3 part of this topic. But i want to know that. When i install the UEC cd iso, reboot and have no gui interface. How to set up the interface to start the web UI? Thank all

    • Thierry Carrez
      April 4, 2010 at 19:46

      The cloud controller web UI can be accessed through a web browser (http://cloud_controller_name:8443)

      • James Carter
        April 5, 2010 at 15:19

        I know this. But in the text console it’s impossible. I want to set up Gnome for my OS. But when i run this command:
        #sudo apt-get install ubuntu-desktop

        There’s error:
        couldn’t find package…

        What must i do now?

      • Thierry Carrez
        April 5, 2010 at 18:08

        I’d advise strongly against running a GUI on top of a cloud controller… It should definitely be a separate, dedicated machine. You should use any desktop to access the Cloud administration web server.

  7. James Carter
    April 6, 2010 at 16:58

    Ah. I understood. Thank a lot,Carrez!!!

  8. Walt
    June 20, 2010 at 19:21

    Thierry Carrez said on April 5th, 2010;

    “I’d advise strongly against running a GUI on top of a cloud controller… It should definitely be a separate, dedicated machine. You should use any desktop to access the Cloud administration web server.”

    Prefaced with the desktop image is 64bit 10.4 running on a Quad Core 2.6Ghz 8GB memory, 500GB disk space.

    Why?????

  9. wanderbug
    July 30, 2010 at 07:47

    Hi Thierry,

    First of all , let me congratulate you on the fantastic effort in making the cloud setup to be simpler. Kudos to your team at Ubuntu.

    Couple of feedback… While I am a techie, I am still quite new in Virtualisation and Clouds. Did follow the 3 parts in verbatim and have had mixed outcomes. While most of it ran some had confusions,

    1. Please specify on which machine which commands need to be run. If the command have to be run on the CC or on the NC or on the end-user machine, please include lines to state that clearly

    2. Not clear what does the comman “$ . eucarc” does.

    3. The network bridge needs mention and also clarity. The bridge is created on the node, but not on the CC. This had lot of errors in the log files indicating that bridge is required on eth0. I added the br0 entries in the CC interfaces file also, the bridge errors got resolved; however the tunneling issues remain.

    4. Additional notepages on the constraining factors preventing virtualisation or instantiating images can be very helpful.

    5. Images from Eucalyptus and Ubuntu sites vary in naming. So following one set of instructions, can be quite an exercise.

    Thanks again and am very appreciative of your effort. This is undoubtedly one of the well documented guides for Cloud Computing

    • Thierry Carrez
      July 30, 2010 at 09:40

      Thanks for your kind words !

      Note that most of this guide is now outdated, since it applied to 9.10 and we made nice installer progress in 10.04. In particular, the components are now automatically registered, and we publish ready-to-use cloud images (with a nifty uec-publish-tarball utility that takes care of everything). You should have a look at https://help.ubuntu.com/community/UEC/ which is kept much more up to date. As an alternative, http://testcases.qa.ubuntu.com/Install/ServerUECTopology1 details the testcase we run to validate UEC internally. I should add a disclaimer at the top of those pages :)

      FYI, “. eucarc” sources the contents of the eucarc file, which contains a set of environment variables definition that is later used by the euca2ools.

  10. March 1, 2011 at 16:06

    Hello there !

    I’m sorry to ask help on this clichéd topic as I couldn’t get proper solution yet.

    I have done cloud setup with UEC x64 on single machine. Everything is OK till the running of instance. When I execute following command :

    $ euca-run-instances -k mykey emi-XXXXXXXX -t c1.medium

    and then

    $ watch -n 5 euca-describe-instances

    I get state as ‘pending’ for hours and hours. Plus sometimes it changes to ‘terminated’

    My output of tail /var/log/eucalyptus/nc.log is :

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    [Tue Mar 1 21:02:22 2011][003129][EUCADEBUG ] doDescribeInstances() invoked
    [Tue Mar 1 21:02:28 2011][003129][EUCADEBUG ] doDescribeResource() invoked
    [Tue Mar 1 21:02:28 2011][003129][EUCADEBUG ] doDescribeResource() invoked
    [Tue Mar 1 21:02:29 2011][003129][EUCADEBUG ] doDescribeResource() invoked
    [Tue Mar 1 21:02:49 2011][003129][EUCADEBUG ] doDescribeInstances() invoked
    [Tue Mar 1 21:02:49 2011][003129][EUCADEBUG ] doDescribeInstances() invoked
    [Tue Mar 1 21:02:49 2011][003129][EUCADEBUG ] doDescribeInstances() invoked
    [Tue Mar 1 21:02:55 2011][003129][EUCADEBUG ] doDescribeResource() invoked
    [Tue Mar 1 21:02:55 2011][003129][EUCADEBUG ] doDescribeResource() invoked
    [Tue Mar 1 21:02:55 2011][003129][EUCADEBUG ] doDescribeResource() invoked

    Obviously I cant ssh the instance until it runs.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    My cat /etc/network/interfaces output is :

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    auto eth0
    iface eth0 inet manual

    auto br0
    iface br0 inet static
    address 172.16.88.223
    netmask 255.255.248.0
    network 172.16.88.0
    broadcast 172.16.95.255
    gateway 172.16.88.1
    # dns-* options are implemented by the resolvconf package, if installed
    dns-nameservers 172.16.7.250 180.149.63.3
    dns-search server1.uohyd.ernet.in
    bridge_ports eth0
    bridge_fd 9
    bridge_hello 2
    bridge_maxage 12
    bridge_stp off

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    and cat /etc/eucalyptus/eucalyptus.conf output is :

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # /etc/eucalyptus/eucalyptus.conf
    #
    # These are the Ubuntu Enterprise Cloud’s default Eucalyptus parameters.

    # Affects: All
    # See: **NOTE** below
    EUCALYPTUS=”/”
    EUCA_USER=”eucalyptus”

    # Affects: CLC, Walrus, SC
    DISABLE_DNS=”Y”
    CLOUD_OPTS=”-Xmx512m”

    # Affects: SC
    DISABLE_EBS=”N”
    DISABLE_ISCSI=”N”

    # Affects: CC, NC
    # See: **NOTE** below
    ENABLE_WS_SECURITY=”Y”
    LOGLEVEL=”DEBUG”
    VNET_PUBINTERFACE=”br0″
    VNET_PRIVINTERFACE=”br0″
    VNET_MODE=”MANAGED-NOVLAN”
    VNET_BRIDGE=”br0″
    # Affects: CC
    # See: **NOTE** below
    CC_PORT=”8774″
    SCHEDPOLICY=”ROUNDROBIN”
    POWER_IDLETHRESH=”300″
    POWER_WAKETHRESH=”300″
    NC_SERVICE=”axis2/services/EucalyptusNC”
    VNET_DHCPDAEMON=”/usr/sbin/dhcpd3″
    VNET_DHCPUSER=”dhcpd”
    DISABLE_TUNNELLING=”N”
    NODES=””
    VNET_ADDRSPERNET=”10″
    VNET_SUBNET=”172.19.0.0″
    VNET_NETMASK=”255.255.0.0″
    VNET_DNS=”172.16.7.250″
    VNET_PUBLICIPS=”172.16.88.225-172.16.88.245″

    # Affects: NC
    NC_PORT=”8775″
    HYPERVISOR=”kvm”
    MANUAL_INSTANCES_CLEANUP=0
    VNET_BRIDGE=”br0″
    INSTANCE_PATH=”/var/lib/eucalyptus/instances/”
    USE_VIRTIO_NET=”0″
    USE_VIRTIO_DISK=”1″
    USE_VIRTIO_ROOT=”0″
    #MAX_MEM=2048
    #MAX_CORES=”2″
    #MAX_DISK=”100″

    ################################################## ########################
    #
    # Administrative overrides and customizations may go below, in accordance
    # with the manpage for eucalyptus.conf(5).
    #
    # However, to modify Eucalyptus parameters, you are advised to use
    # euca_conf, which will update eucalyptus.local.conf(5) and ensure
    # smooth package upgrades.
    #
    # **NOTE**: To activate changes of these parameters on a CC, you must:
    # sudo restart eucalyptus-cc CLEAN=1
    # HOWEVER, if you do this, all currently running virtual
    # machines in this cluster will lose network connectivity.
    #
    ################################################## ########################

    I tried searching on this issue but no success. I am clueless now. Please help me out.

    Also tell me how 172.19.1.2 coming into picture and how to make instances visible outside LAN.

    Thanks in advance !

    • gokul
      March 10, 2011 at 12:58

      Hello Masne,
      Have u found out the solution, can u share it here..
      And then, are ur network is under any proxy??

  11. Maarten
    April 21, 2011 at 11:55

    Hello,

    thank you for this great post , i work for a belgium ICT company that is doing the ICT for a production plant specialised in “cars” and with this post i just saved the company some big cash on a legal way :-)

    Your the best !

    Regards,

  12. vinicius
    June 8, 2011 at 19:51

    Hi, I’m having a trouble when I try acess the instance with SSH. when I do the following comand:
    ssh -i enduserkey ubuntu@instanceipaddress. the following line appears
    ssh: connect to host xxx.xxx.xxx.xxx port 22: connection timed out.

    I’m doing a work about Cloud computing in my school and I need to acess this Instance.
    Thank you, your post is wonderfull and helped me a lot. you’re the best. :)

  13. Steven
    July 6, 2011 at 05:17

    Hi, I used 11.04, 2 machines, one for CLC/CC/WC/SC and the other for NC.

    After setup and download the image emi-DFE71077, I issued the
    euca-run-instances -k mykey emi-DFE71077 -t c1.medium,

    I got:
    FinishedVerify: Not enough reources (0<1: vm instances. …

    What did I do wrong?

    • Thierry Carrez
      July 6, 2011 at 09:47

      Like explained at the disclaimer at the top of this article, I stopped workign on Eucalyptus so I’m not very well placed to provide support on it. I’d advise that you ask your questions on the Eucalyptus forums…

  14. July 31, 2011 at 14:28

    Hi, Anyone help me Step by Step to configure UEC… I struggling lot. I can’t know what is the password for admin.

    Thanks in advance

  15. jitendra
    September 5, 2011 at 17:08

    hi,
    i am trying to build my private cloud using UEC on ubuntu 10.04 LTS 32-bit but for UEC node vt-x is needed but my system does not support vt-x, can i use xen as an alternative of kvm
    or should i try to install eucalyptus packages seperate on ubuntu(linux) 10.04
    please give ur suggestion it is extremely importatant.

    thanx

    regards
    jitendra

  16. Keith
    September 30, 2011 at 09:28

    When I run
    keith@ubuntuCloudControler:~$ euca-describe-availability-zones verbose
    AVAILABILITYZONE cluster1local 192.168.0.50
    AVAILABILITYZONE |- vm types free / max cpu ram disk
    AVAILABILITYZONE |- m1.small 0000 / 0000 0 192 10
    AVAILABILITYZONE |- c1.medium 0000 / 0000 1 256 10
    AVAILABILITYZONE |- m1.large 0000 / 0000 1 512 10
    AVAILABILITYZONE |- m1.xlarge 0000 / 0000 1 1024 10
    AVAILABILITYZONE |- c1.xlarge 0000 / 0000 2 2048 10
    AVAILABILITYZONE cluster2local 192.168.0.51
    AVAILABILITYZONE |- vm types free / max cpu ram disk
    AVAILABILITYZONE |- m1.small 0000 / 0000 0 192 10
    AVAILABILITYZONE |- c1.medium 0000 / 0000 1 256 10
    AVAILABILITYZONE |- m1.large 0000 / 0000 1 512 10
    AVAILABILITYZONE |- m1.xlarge 0000 / 0000 1 1024 10
    AVAILABILITYZONE |- c1.xlarge 0000 / 0000 2 2048 10

    I get all 0000 for my free and max.
    When I run
    keith@ubuntuCloudControler:~$ euca-run-instances -k enduserkey emi-2CDF0D1F -t m1.xlarge

    I get this:
    FinishedVerify: Not enough resources (0 < 1: vm instances.Not enough resources (0 < 1: vm instances.

    When I run sudo parted -l i get the following:

    keith@ubuntuCloudControler:~$ sudo parted -l
    Model: Linux device-mapper (linear) (dm)
    Disk /dev/mapper/ubuntuCloudControler-swap_1: 1070MB
    Sector size (logical/physical): 512B/512B
    Partition Table: loop

    Number Start End Size File system Flags
    1 0.00B 1070MB 1070MB linux-swap(v1)

    Model: Linux device-mapper (linear) (dm)
    Disk /dev/mapper/ubuntuCloudControler-root: 35.0GB
    Sector size (logical/physical): 512B/512B
    Partition Table: loop

    Number Start End Size File system Flags
    1 0.00B 35.0GB 35.0GB ext4

    Model: Compaq Smart Array (cpqarray)
    Disk /dev/ida/c0d0: 36.4GB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos

    Number Start End Size Type File system Flags
    1 1049kB 256MB 255MB primary ext2 boot
    2 257MB 36.4GB 36.1GB extended
    5 257MB 36.4GB 36.1GB logical lvm

    There should also be a 1TB drive listed also but I will deal with that. I do use the available drive space from this system?

    My node has the following drive info using fdisk -l

    keith@ubuntuLocalNode1:~$ sudo parted -l
    Model: ATA ST340016A (scsi)
    Disk /dev/sda: 40.0GB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos

    Number Start End Size Type File system Flags
    1 1049kB 256MB 255MB primary ext2 boot
    2 257MB 40.0GB 39.8GB extended
    5 257MB 40.0GB 39.8GB logical lvm

    Model: ATA MAXTOR 6L040J2 (scsi)
    Disk /dev/sdb: 40.0GB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos

    Number Start End Size Type File system Flags

    Model: ATA WDC WD10EARS-00Y (scsi)
    Disk /dev/sdc: 1000GB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos

    Number Start End Size Type File system Flags
    1 32.3kB 1000GB 1000GB primary ntfs

    Model: Linux device-mapper (linear) (dm)
    Disk /dev/mapper/ubuntuLocalNode1-swap_1: 2147MB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos

    Number Start End Size Type File system Flags

    Model: Linux device-mapper (linear) (dm)
    Disk /dev/mapper/ubuntuLocalNode1-root: 37.6GB
    Sector size (logical/physical): 512B/512B
    Partition Table: loop

    Number Start End Size File system Flags
    1 0.00B 37.6GB 37.6GB ext4

    Both of my nodes are displayed using the euca-describe-availability-zones verbose command but I would like to use the hard drives in the volumes for windows and Linux storage and have the ability to run apps and Linux images this cloud.

    How in the world do I get the drives to be available for the cloud?

  17. Miki
    October 22, 2011 at 04:48

    Hai,
    I installed UEC in a single system. But i could not get the login page. Instead Iam getting as “Requested URL canot be retrieved . Access denied”\
    Why.
    Miki

  18. Duc
    May 3, 2012 at 13:20

    who can help me how to make an application (like opentaps) become an image?

  19. rahul
    October 9, 2012 at 09:27

    hai,
    when i try to run instances it is showing ” not enough resources: vm “

  20. vinay
    December 18, 2013 at 09:41

    Article is helpful and informative i’d love to know is there any way so that we create java image and run it on cloud and there by make end users able to use java on their browsers

    thank you
    vinay kairam

    • Thierry Carrez
      December 18, 2013 at 09:48

      No. Java applets are client-side, there is no convenient way I know of to run applets elsewhere and tunnel their display to the browser window.

  1. October 14, 2009 at 01:25
  2. October 31, 2009 at 22:38
  3. June 21, 2010 at 13:59
  4. June 23, 2010 at 11:49
  5. July 14, 2010 at 04:25

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 33 other followers