Step by Step Install of MAAS and JUJU

24,180

Solution 1

From what I understand in the comments, it sounds like you just have one server, which you have installed MaaS on.

Having MaaS installed on a server doesn't just let you run VM's on the server using the MaaS API (interface). What MaaS does is let you manage other physical servers from the MaaS server, using the MaaS API.

You can build a setup where the MaaS server manages virtual machines and you can use those virtual machines using the MaaS API, but this would be used more for testing MaaS out than for production -- there are better systems (that don't involve MaaS) to use for running a bunch of virtual servers on one physical machine (like LibVirt and KVM or even LXC, which I hear Juju has and is continuing to work on their support for).

You might look at How do I configure juju for local usage? if you are wanting to just be able to deploy Juju charms That method would bypass using MaaS, and instead use something called containers (also referred to as LXC) that should let you deploy charms to the local computer but with the charm in it's own sandbox.

Solution 2

Installing Local Cloud Infrastructure using Ubuntu 14.04 LTS MAAS

Share:
24,180

Related videos on Youtube

John75077
Author by

John75077

Updated on September 18, 2022

Comments

  • John75077
    John75077 over 1 year

    I am working on understanding the pieces that I am missing in being able to deploy Juju across the other MAAS nodes. I don't know If I have a step out of place, or missing a few.

    The MaaS server handles the DHCP and DNS. The router (which is at 10.0.0.0) has DHCP turned off. Any assistance is greatly appreciated. When I am at the end I will either get a 409 error, or arbitrary pick tools 1.16.0 error. It is worth mentioning that local, and aws works fine. Hopefully with all of these steps spelled out it will help someone else along the way too.

    Updated Nov 3 2013 In this scenario for the POC, there are three physical servers. One is a HP DL 140 with 2 cpu 8gb ram, the second server is a DELL Power Edge 860 Server 1 cpu w 4 cores and 8 gb ram, and the third is a rackable systems sp5000psl with two cpus and 8gb of ram. They are all able to be on their own seperate network with access to the internet or can be on the first network. (second network is 10.0.0.0, and the first is 192.168.1.0)

    Steps

    Setting Up MAAS and JUJU - 12.04 LTS Clean install SSH only from the package selection during install

    sudo apt-get install software-properties-common python-software-properties
    sudo add-apt-repository ppa:maas-maintainers/stable      
    sudo add-apt-repository ppa:juju/stable   
    sudo apt-get update     
    sudo apt-get dist-upgrade
    sudo reboot     
    sudo apt-get install maas maas-dns maas-dhcp    
    sudo ufw disable    
    sudo reboot
    

    - edit /etc/dhcp/dhcpd.conf

    authoritive
    subnet 10.0.0.0 netmask 255.255.255.0 {
    next-server 10.0.0.2;
    filename "pxelinux.0";
    }
    

    sudo maas createsuperuser
    sudo maas-import-pxe-files
    

    Login to MAAS http://10.x.x.x/MAAS


    • cluster controller configuration for eth0
    • manage dhcp and dns
    • IP 10.0.0.2
    • subnet 255.255.255.0
    • broadcast 10.0.0.0
    • routerip 10.0.0.1
    • ip low 10.0.0.5
    • ip high 10.0.0.180

    Commissioning default and distro is set at 12.04

    default domain is at local

    sudo maas-cli login maas http://10.x.x.x/MAAS/api/1.0 api-key
    ssh-keygen -t rsa -b 2048 - enter - no password  - cat id_rsa.pub and enter key into MAAS ssh 
    sudo maas-cli maas nodes accept-all (interestingly enough I only get back [] when executing this )
    

    PXE one machine, accept and commision, start and deploy.

    sudo apt-get install juju-core juju-local
    

    MAAS config:

    maas:
        type: maas
        maas-server: '://10.x.x.x:80/MAAS'
        maas-oauth: 'MAAS_API_KEY'
        admin-secret: 'nothing'
        default-series: 'precise'
    
    juju switch maas
    sudo juju bootstrap --show-log
    
    • Jorge Castro
      Jorge Castro over 10 years
      Hi John, can you move the content under the question into a new answer? That way we can keep improving it, thanks!
    • John75077
      John75077 over 10 years
      My first attempt to move a question into an answer so it can be improved upon. This is as far as I get in the steps posted. It seems with this configuration that Juju never sees the other machines added to the MAAS cluster.
    • gertvdijk
      gertvdijk over 10 years
      @JorgeCastro As far as I can see this is all information about the question/issue John has here. I am not able to spot an answer/solution in the question body...
    • John75077
      John75077 over 10 years
      The problem is that juju wont bootstrap with a maas configuration. Correct me if I'm wrong, the way I understand this is that i can have as many nodes as I like. With the nodes configured with MAAS and JUJU then the controller would help utilize resources. (whether by deploy to a physical machine by name or dynamic allocation)
    • Dan Hibbert
      Dan Hibbert over 10 years
      Do you just have the one server that you installed MaaS on? You said "The server owns the router". I don't get if you mean that the server you installed MaaS on needs to do DNS and DHCP? What hardware do you have plugged into this server (switch, router, other computers?)
    • Nate Finch
      Nate Finch over 10 years
      If my answer below doesn't work (don't use sudo), could you post your juju logs at pastebin.ubuntu.com?
    • John75077
      John75077 over 10 years
      @Azendale - Yes, the router is on 10.0.0.0 and DHCP is disabled. The controller handles all DHCP and DNS traffic. The router doesnt have DHCP enabled, and provides the gateway out to the internet. (hence the section where /etc/dhcp/dhcpd.conf is talked about)
    • John75077
      John75077 over 10 years
      @All - I believe what I will do is host a session for all to participate with. Perhaps this will be a great learning experience for all. I will host it sometime this weekend CST most likely saturday. If anyone has a suggestion for a time let me know.
    • Dan Hibbert
      Dan Hibbert over 10 years
      @JohnS Do you have any other computers networked to this MaaS server to be nodes for the MaaS server? Or do you just have the one server to try MaaS on? Also, I believe you shouldn't have to modify /etc/dhcp/dhcpd.conf, I believe the MaaS setup would do that for you if you have installed the maas-dhcp I believe it should already be set up. I wonder if you could have two instances of the DHCP server running and conflicting? I don't know if that is possible, but you might try running sudo ps aux | grep dhcp and show us what that says.
  • John75077
    John75077 over 10 years
    Lets say I spin up 3 servers. I use MAAS and JUJU in conjuction. Server 1 is a i386 server and handles MAAS requests, DHCP requests, etc. Server 2 and 3 are 64bit servers. Maybe I have this all wrong in my little brain, I should have a server become the conductor of these other servers and how resources are allocated using the MAAS API. I have the conductor spin up the juju-gui, I should be able to deploy various charms to server 2 and 3?
  • Dan Hibbert
    Dan Hibbert over 10 years
    @JohnS One server would be your MaaS server, and then servers 2 and 3 would boot from that. Then when you use juju, juju needs a bootstrap node. So that would take up another server, say server2. Then if you deployed the juju-gui, that would take a third machine, say server3. If you tried to deploy anything more, you would get the 409 Conflict error because there are no more servers to allocate. Basically, MaaS, the Juju bootstrap, and the juju-gui would each take up their own machine. If you had more than 3 machines though, you could deploy charms to servers 4, 5, 6, (etc..)
  • John75077
    John75077 over 10 years
    it sounds like then I will NOT be able to make my POC due to limited funding, and we did try to solve this whole process. I want to thank you and everyone else's inputs to this question. Hopefully everyone gets a little recognition.
  • guntbert
    guntbert over 8 years
    Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.