Fetch the repository succeeded.
.. -*- mode: rst -*-Installing MAAS===============There are two main ways to install MAAS:* :ref:`From a package repository. <pkg-install>`* :ref:`As a fresh install from Ubuntu Server installmedia. <disc-install>`* :ref:`Install MAAS in a LXC Container. <container-install>`MAAS Packages and Repositories------------------------------MAAS Packages^^^^^^^^^^^^^Installing MAAS from packages is straightforward. There are actuallyseveral packages that go into making up a working MAAS install, butfor convenience, many of these have been gathered into a virtualpackage called 'maas' which will install the necessary componentsfor a 'seed cloud', that is a single server that will directlycontrol a group of nodes. The main packages are:* ``maas`` - seed cloud setup, which includes both the regioncontroller and the rack controller below.* ``maas-region-controller`` - includes the web UI, API and database.* ``maas-rack-controller`` - controls a group of machines under arack or multiple racks, including DHCP management.* ``maas-dhcp``/``maas-dns`` - required when managing dhcp/dns.* ``maas-proxy`` - required to provide a MAAS proxy.If you need to separate these services or want to deploy an additionalrack controller, you should install the corresponding packagesindividually (see :ref:`the description of a typical setup <setup>`for more background on how a typical hardware setup might bearranged).There are two suggested additional packages 'maas-dhcp' and'maas-dns'. These set up MAAS-controlled DHCP and DNS services whichgreatly simplify deployment if you are running a typical setup wherethe MAAS controller can run the network (Note: These **must** beinstalled if you later set the options in the web interface to haveMAAS manage DHCP/DNS).MAAS Package Repositories^^^^^^^^^^^^^^^^^^^^^^^^^While MAAS is available in the Ubuntu Archives per each release ofUbuntu, the version might not be the latest. However, if you would liketo install a newer version of MAAS (the latest stable release), this isavailable in the following PPA:* `ppa:maas/stable`_.. Note::The MAAS team also releases the latest development release of MAAS.The development release is available in `ppa:maas/next`_. However, thisis meant to be used for testing and at your own risk.Adding MAAS package repository is simple. At the command line, type::$ sudo add-apt-repository ppa:maas/stableYou will be asked to confirm whether you would like to add this repository,and its key. Upon configumation, the following needs to be typed at thecommand line::$ sudo apt-get update.. _ppa:maas/stable:https://launchpad.net/~maas/+archive/ubuntu/stable.. _ppa:maas/next:https://launchpad.net/~maas/+archive/ubuntu/next.. _pkg-install:Installing MAAS from the command line-------------------------------------Installing a Single Node MAAS^^^^^^^^^^^^^^^^^^^^^^^^^^^^^At the command line, type::$ sudo apt-get install maasThis will install both the MAAS Region Controller and the MAAS RackController, and will select sane defaults for the communication betweenthe Rack Controller and the Region Controller. After installation,you can access the Web Interface. Then, there are just a few more setupsteps :ref:`post_install`Reconfiguring a MAAS Installation^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^You will see a list of packages and a confirmation message toproceed. The exact list will obviously depend on what you already haveinstalled on your server, but expect to add about 200MB of files.The configuration for the MAAS controller will automatically run andpop up this config screen:.. image:: media/install_cluster-config.*Here you will need to enter the hostname for where the regioncontroller can be contacted. In many scenarios, you may be running theregion controller (i.e. the web and API interface) from a differentnetwork address, for example where a server has several networkinterfaces.Adding Rack Controllers^^^^^^^^^^^^^^^^^^^^^^^If you would like to add additional MAAS Rack Controllers to yourMAAS setup, you can do so by following the instructions in:doc:`rack-configuration`... _disc-install:Installing MAAS from Ubuntu Server boot media---------------------------------------------If you are installing MAAS as part of a fresh install it is easiest tochoose the "Multiple Server install with MAAS" option from theinstaller and have pretty much everything set up for you. Boot fromthe Ubuntu Server media and you will be greeted with the usuallanguage selection screen:.. image:: media/install_01.*On the next screen, you will see there is an entry in the menu called"Multiple server install with MAAS". Use the cursor keys to selectthis and then press Enter... image:: media/install_02.*The installer then runs through the usual language and keyboardoptions. Make your selections using Tab/Cursor keys/Enter to proceedthrough the install. The installer will then load various drivers,which may take a moment or two... image:: media/install_03.*The next screen asks for the hostname for this server. Choosesomething appropriate for your network... image:: media/install_04.*Finally we get to the MAAS part! Here there are just two options. Wewant to "Create a new MAAS on this server" so go ahead and choose thatone... image:: media/install_05.*The install now continues as usual. Next you will be prompted to entera username. This will be the admin user for the actual server thatMAAS will be running on (not the same as the MAAS admin user!).. image:: media/install_06.*As usual you will have the chance to encrypt your homedirectory. Continue to make selections based on whatever settings suityour usage... image:: media/install_07.*After making selections and partitioning storage, the system softwarewill start to be installed. This part should only take a few minutes... image:: media/install_09.*Various packages will now be configured, including the package managerand update manager. It is important to set these up appropriately soyou will receive timely updates of the MAAS server software, as wellas other essential services that may run on this server... image:: media/install_10.*The configuration for MAAS will ask you to configure the host addressof the server. This should be the IP address you will use to connectto the server (you may have additional interfaces e.g. to run nodesubnets).. image:: media/install_cluster-config.*The next screen will confirm the web address that will be used to theweb interface... image:: media/install_controller-config.*After configuring any other packages the installer will finally cometo and end. At this point you should eject the boot media... image:: media/install_14.*After restarting, you should be able to login to the new server withthe information you supplied during the install. The MAAS softwarewill run automatically... image:: media/install_15.***NOTE:** The maas-dhcp and maas-dns packages should be installed bydefault, but on older releases of MAAS they won't be. If you want tohave MAAS run DHCP and DNS services, you should install these packages.Check whether they are installed with::$ dpkg -l maas-dhcp maas-dnsIf they are missing, then::$ sudo apt-get install maas-dhcp maas-dnsAnd then proceed to the post-install setup... _container-install:Installing MAAS in a LXC container----------------------------------Installing MAAS in a container is a typical setup for those users whowould like to take advantange of their machine for other users at thesame time of using MAAS.In order to setup MAAS, you need some requirements:* Create a bridge (for example, it can be br0).* Install LXD and ZFS.* Create a Container profile for MAASInstall LXD and ZFS^^^^^^^^^^^^^^^^^^^The first thing to do is to install LXD and ZFS::$ sudo apt-get install lxd zfsutils-linux$ sudo modprobe zfs$ sudo lxd initCreate a LXC profile for MAAS^^^^^^^^^^^^^^^^^^^^^^^^^^^^^First, create a container profile for MAAS::$ lxc profile create maasSecond, bind the NIC inside the container (eth0) against the bridge on thephysical host (br0)::$ lxc profile device set maas eth0 parent br0Finally, create a root disk for the container to use::$ lxc profile device add maas root disk path=/ pool=defaultLaunch LXD container^^^^^^^^^^^^^^^^^^^^Once the profile has been created, you can now launch the LXC container::$ lxc launch -p maas ubuntu-daily:18.04 bionic-maasInstall MAAS^^^^^^^^^^^^Once the container is running, you can now install MAAS. First you needto access the container with::$ lxc exec bionic-maas bashAnd you can proceed with the installation as above, :ref:`From a package repository. <pkg-install>`.. _post_install:Post-Install tasks==================Your MAAS is now installed, but there are a few more things to be done.If you now use a web browser to connect to the region controller, youshould see that MAAS is running, but there will also be some errors onthe screen:.. image:: media/install_web-init.*The on screen messages will tell you that there are no boot imagespresent, and that you can't login because there is no admin user.Create a superuser account--------------------------Once MAAS is installed, you'll need to create an administratoraccount::$ sudo maas createadmin --username=root --email=MYEMAIL@EXAMPLE.COMSubstitute your own email address for MYEMAIL@EXAMPLE.COM. You may alsouse a different username for your administrator account, but "root" is acommon convention and easy to remember. The command will prompt for apassword to assign to the new user.You can run this command again for any further administrator accounts youmay wish to create, but you need at least one.Log in on the server--------------------Looking at the region controller's main web page again, you should now seea login screen. Log in using the user name and password which you have justcreated... image:: media/install-login.*Import the boot images----------------------Since version 1.7, MAAS stores the boot images in the region controller'sdatabase, from where the rack controllers will synchronise with the regionand pull images from the region to the rack's local disk. This processis automatic and MAAS will check for and download new Ubuntu images every hour.However, on a new installation you'll need to start the import process manuallyonce you have set up your MAAS region controller. There are two ways to startthe import: through the web user interface, or through the remote API.To do it in the web user interface, go to the Images tab, check the boxes tosay which images you want to import, and click the "Import images" button atthe bottom of the Ubuntu section... image:: media/import-images.*A message will appear to let you know that the import has started, and after awhile, the warnings about the lack of boot images will disappear.It may take a long time, depending on the speed of your Internet connection forimport process to complete, as the images are several hundred megabytes. Theimport process will only download images that have changed since last import.You can check the progress of the import by hovering over the spinner next toeach image.The other way to start the import is through the:ref:`region-controller API <region-controller-api>`, which you can invoke mostconveniently through the :ref:`command-line interface <cli>`.To do this, connect to the MAAS API using the "maas" command-line client.See :ref:`Logging in <api-key>` for how to get set up with this tool. Then,run the command::$ maas my-maas-session boot-resources import(Substitute a different profile name for 'my-maas-session' if you have namedyours something else.) This will initiate the download, just as if you hadclicked "Import images" in the web user interface.By default, the import is configured to download the most recent LTS releaseonly for the amd64 architecture. Although this should suit most needs, you canchange the selections on the Images tab, or over the API. Read:doc:`customise boot sources </bootsources>` to see examples on how to do that.Speeding up repeated image imports by using a local mirror----------------------------------------------------------See :doc:`sstreams-mirror` for information on how to set up a mirror andconfigure MAAS to use it.Configure DHCP--------------To enable MAAS to control DHCP, you can either:#. Follow the instructions at :doc:`rack-configuration` touse the web UI to set up your rack controller.#. Use the command line interface `maas` by first:ref:`logging in to the API <api-key>` and then:ref:`following this procedure <cli-dhcp>`Configure switches on the network---------------------------------Some switches use Spanning-Tree Protocol (STP) to negotiate a loop-free paththrough a root bridge. While scanning, it can make each port wait up to 50seconds before data is allowed to be sent on the port. This delay in turn cancause problems with some applications/protocols such as PXE, DHCP and DNS, ofwhich MAAS makes extensive use.To alleviate this problem, you should enable `Portfast`_ for Cisco switchesor its equivalent on other vendor equipment, which enables the ports to comeup almost immediately... _Portfast:https://www.symantec.com/business/support/index?page=content&id=HOWTO6019Traffic between the region contoller and rack controllers------------------------------------------------------------* Each rack controller must be able to:* Initiate TCP connections (for HTTP) to each region controller onport 80 or port 5240, the choice of which depends on the setting ofthe MAAS URL.* Initiate TCP connections (for RPC) to each region controller betweenport 5250 and 5259 inclusive. This permits up to 10 ``maas-regiond``processes on each region controller host. At present this is notconfigurable.Once everything is set up and running, you are ready to :doc:`startenlisting nodes <nodes>`
：Code submit frequency
：React/respond to issue & PR etc.
：Well-balanced team members and collaboration
：Recent popularity of project
：Star counts, download counts etc.