Multi-node OpenStack Charms Deployment Guide 0.0.1.dev223--2-Install MAAS

Reference documents:

Official original text: install MAAS

<MAAS installation (snap/2.9/UI)>

The first multi-node OpenStack Charms Deployment Guide 0.0.1.dev223-1 - OpenStack Charms Deployment Guide

Overview:

In the previous section, we summarized the OpenStack cloud to be built and described the approach taken for this. This page will introduce the installation of MAAS and point out what tasks need to be completed after the installation of MAAS. Our goal is to achieve a simple, scalable and practical network topology.

注意:出于管理目的,本文引用MAAS web UI,但是所有任务都可以通过CLI或API来完成。

demand:

The entire environment will consist of a MAAS system with five nodes. This MAAS cluster will contain a single area, and the MAAS system (area and rack controller) is connected to the external network and the single area.
The following are the hardware requirements:

1 x MAAS system: 8GiB RAM, 2 cpu, 1 NIC, 1 x 40GiB storage

1 x Juju controller node: 4GiB RAM, 2 cpu, 1 NIC, 1 x 40GiB storage

4 x cloud nodes: 8GiB RAM, 2 cpu, 2 NICs, 3 x 80GiB storage

For more detailed information that may be required for the MAAS system , please refer to the MAAS requirements in the MAAS documentation.

Assume that all six systems are physical in nature. Although not a requirement, the Juju and cloud nodes used here are AMD64 architecture types.

MAAS is also considered to be the only provider of DHCP and DNS for the network hosting the MAAS cluster.

A single network interface of the MAAS system resides on the subnet 10.0.0.0/20, and the assigned IP address of the system itself is 10.0.0.3. (The original text is incorrect and has been corrected.)

Note that the nodes provided by MAAS depend on the focal AMD64 image provided by MAAS.

Install MAAS

The following is a concise summary of how to install and initialize MAAS on the specified system, but please be sure to refer to the official MAAS installation instructions for details:
You can also refer to: "ubuntu18.04 maas" , the detailed configuration has been revised according to the actual domestic network.

In addition, if it is a production environment, postgrasql database needs to be installed, see <MAAS installation (snap/2.9/UI)>

sudo snap install maas-test-db
sudo snap install maas --channel=2.8/stable
sudo maas init region+rack --maas-url http://10.0.0.3:5240/MAAS --database-uri maas-test-db:///
sudo maas createadmin --username admin --password ubuntu --email [email protected] --ssh-import lp:<unsername>
sudo maas apikey --username admin > ~ubuntu/admin-api-key

See details maas init-- help.

Note: The maas init command cannot be called again. MAAS currently does not use the email address provided to the MAAS createadmin command.
The last command puts a copy of the API key of the user "admin" into a file. We need this information on the next page.

Note
Please refer to the concepts and terminology in the MAAS document to clarify the terminology used in MAAS.

Post-installation tasks

Once the MAAS system is installed, there are many tasks to complete.

User interface and online services

Based on the previous command call, the credentials of the newly created MAAS administrator are as follows:

Username: admin
Password: ubuntu

In this example, the address of the MAAS system is 10.0.0.3.

Then, the web UI URL becomes:

http://10.0.0.3:5240/MAAS

When you access the web user interface for the first time, you will quickly go through a login process. Recall that we need a 20.04 LTS AMD64 image.

Enable DHCP

DHCP must be enabled on the VLAN that affects the subnet where the five nodes are located. For guidance, see DHCP Handling in the MAAS documentation .

Verify image

The upload process should have handled the image download. Verify this by visiting the image page in the web UI.

Check MAAS health

Check the health of the MAAS system by visiting the controller page in the web UI. Select the controller name and make sure that the result page shows 9 green check marks, and the remaining item "managed by the region"
Insert picture description here

Add node

Add these five nodes to the MAAS cluster (PXE boot) through "netbooting". MAAS will start to recruit them. Once this process is complete, the node will be listed on the Machines page with the status "New". (When starting the node server, select pxe to start)
Allow a node to appear in the web UI before booting another node, and you can clearly know which hardware node is mapped to which MAAS node. MAC address tracking can eliminate this worry.

IMPORTANT MAAS nodes should always remain configured as netboot. MAAS
will manage the bootstrapping of its cluster members. (The human word is: try not to switch the machine manually, but use the power on and power off
buttons in the machine interface of MAAS to switch the machine on and off )

Configure node power type

MAAS must have the ability to switch each of its nodes. For how to configure the power supply type of the node, please refer to the BMC power supply type in the MAAS documentation .

Commission nodes

Commission these five nodes by selecting these five nodes on the Machines page, using the green Take action button, and then selecting Commission. The successfully delegated node gets the "ready" status. This will take a few minutes.

For a complete list of node status and node operations, see "Concepts" and "Terms" in the MAAS documentation

Rename node

Rename the newly delegated node to a more attractive or meaningful name.
To change the name of a node, select it from the Machines page and use the name field in the upper left corner. Here, we use'node1' to'node4' for the four cloud nodes, and use'controller' for the Juju controller node.

Note that all nodes will automatically be suffixed with the string'. maas'.

Tag nodes

The MAAS label will be used to help organize and manage the five nodes.
Add a mark on the Configuration tab of the same node page used to rename the node. Add the tag'compute' to the four cloud nodes and the tag'Juju' to the Juju controller node.
Please refer to the MAAS label in the MAAS document to fully understand the label.

Node summary

Below is a summary of the 5 MAAS nodes:

Node name label Number of CPUs Number of network cards Number of memory Number of hard drives Hard disk size
node1.maas compute 2 2 8 3 80
node2.maas compute 2 2 8 3 80
node3.maas compute 2 2 8 3 80
node4.maas compute 2 2 8 3 80
controller.maas juju 2 1 4 1 80

Next step

The next step is to create a Juju controller. This will involve deploying Ubuntu and Juju software on designated nodes. Go and install Juju now.

Guess you like

Origin blog.csdn.net/m0_49212388/article/details/109305226