Play with Mirantis OpenStack

Introduction

MOS is abbreviation of Mirantis OpenStack, Mirantis will eventually drop their support on MOS but move the efforts on the MCP (Mirantis Cloud Platform). There is currently no way for us to get access to the deployment tool for MCP, the deployment of MOS can give a chance to peek Mirantis’ customized OpenStack.

There are two ways to deploy Mirantis OpenStack, if no enough node number available, deploy MOS in virtual machine is possible, Mirantis provides scripts to create VM in virtualbox and spawn the OpenStack services on each of them.
If you have enough physical nodes you might consider to deploy OpenStack on physical nodes instead.

Prerequisites

Mirantis provides a try-run ISO which can be downloaded from here [1], in order to boot from this ISO, you need either attach a media in case your system has such capability and set boot option correctly, or burn a disc image, I’d suggest later since Fuel will try to boot from the image twice and probably unable to find the attached image in the second booting. So the first step should burn a disc based on the ISO downloaded from Mirantis’ website.

Pls NOTE, we missed the step here for the installation of Fuel Master since it is pretty easy to understand or get it down.

Network configuration

Mirantis OpenStack need 5 networks, this is also true for vanilla OpenStack except admin network which is actually for the deployment.

  • Admin network (PXE): The admin network is used for PXE booting, Fuel master will detect other slave nodes based on PXE protocol, and there is a DCHP services on the admin network, all other slave nodes will be assigned a IP from DHCP IP pools. The admin network needs external access in order to download packages needed to build boot image.
  • Public network: The public network allows inbound connections to VMs (Controllers and Tenant VMs) from external networks (e.g., the Internet) as well as outbound connections from VMs to external networks
  • Storage network: The storage network is used to provide storage services such as replication traffic from Ceph. The Management network is used for Ceph Public traffic.
  • Management network: The Management network is primarily used for OpenStack Cloud Management. It is used to access OpenStack services (nova-api, OpenStack dashboard, etc).
  • Private network: The private network facilitates communication between each tenant’s VMs. Private network address spaces are not a part of the public network address space; fixed Ips of virtual instances cannot be accessed directly from the rest of the public network.

From above networks, admin network and public network need to access external network for the packages needed for OpenStack and Operating System. Even there is a local mirror, Fuel still needs to ping the gateway of public network, so we need at least make sure the gateway is real and Fuel slave can ping with.

We’d better have those network ready since bootstrap image will be compiled before the installation of OpenStack and Operating System, If there is no enough physical NICs, you can consider to create several VLAN, the below is the sample configuration, we create a VLAN tag103 on the NIC, VLAN configuration is also needed on the TOR switch, what we have is cumulus switch.

$ cat interfaces   
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto eno3
iface eno3 inet static
address 192.168.130.250
netmask 255.255.255.0
gateway 192.168.130.254
dns-nameservers 10.204.31.11

auto eno1.4094
iface eno1.4094 inet static
address 10.3.0.2
netmask 255.255.252.0
vlan-raw-device eno1

auto eno1
iface eno1 inet static
address 10.20.0.1
netmask 255.255.252.0
dns-nameservers 10.204.31.11

auto eno1.103
iface eno1.103 inet static
address 172.16.0.1
netmask 255.255.255.0
vlan-raw-device eno1

root@psme-cumulus:~# cat /etc/network/interfaces
# The primary network interface
auto eth0
  iface eth0 inet dhcp
auto br0
iface br0
bridge-ports glob swp1-54
bridge-stp on
bridge-vlan-aware yes
bridge-vids  4094 101 102 103

# DSS9000 mc port
auto swp28
iface swp28
    link-speed 1000
    link-autoneg on
    bridge-access 4094 101 102 103
    bridge-pvid   4094 101 102 103

#Switch management port
auto swp29
iface swp29
    link-speed 1000
    link-autoneg on
    bridge-access 4094 101 102 103
    bridge-pvid   4094 101 102 103

Create local mirror

Fuel downloads the OpenStack and operating system packages from the predefined repositories on the Fuel Master node. If your Fuel Master node does not have an Internet connection, you must configure a local repository mirror with the required packages and configure Fuel to use this repository.

Fuel will validate external network availability before the deployment, that is, public network mentioned above needs to access the mirrors of OpenStack and operating system. Consider the limitation of DSC lab where DSS9000 is located, we need to setup local mirror in order to make sure the validation can pass.

这里写图片描述

There are different ways to setup the local mirror, the latest way is the tool named “fuel-mirror” [2], this tool support caching the specific mirror instead of caching all the mirrors defined in Fuel, but the steps that is needed is a little complicated, since we want to download all of the packages for all the mirrors, so we still want to use the deprecated tool “fuel-createmirror” to do that since it is relatively simple.

Customized the mirrors for operating system (couple of packages cannot be downloaded successfully with the official ubuntu16 repo), so we update the mirror here to use domestic ubuntu mirror.

这里写图片描述

Assume Fuel master node has the public network (if not, you need configure your network to make it is accessible), and then just run “fuel-createmirror” command to start, after it is finished, local mirror will be created on master node and the repo configuration will be replaced with the local mirror, you can check it from Fuel’s web GUI.

这里写图片描述

For Fuel master, you need manually intervene for the operation like inserting the boot image, set the boot sequence etc. for the Fuel slaves, alternatively, you can set the boot sequence via BIOS (PXE boot), assume the Fuel master is deployed successfully, Fuel master will detect those nodes, most of the job left could be done Fuel web GUI from this on. Seen from the below, there are 5 nodes detectable from Fuel master, and two of them are free.

这里写图片描述

Fuel configuration

  • Network configuration
    As mentioned earlier, there are totally 4 network needed here for OpenStack installation, but we only two physical NICs for each of logical nodes available, so we need to configure at least three VLAN. In our lab, we configured VLAN 101 ~103 on physical NIC eno1, and the private network on physical NIC eno2.

这里写图片描述

  • Storage configuration
    Different nodes have different storage requirements, for example, compute node needs reserve more space for virtual storage beside operating system, while cinder node needs more space for volume, below is the default configuration of controller node, you can adjust space for each node per specific condition.

这里写图片描述

Installation

Installation includes Fuel master installation and OpenStack installation on Fuel slave nodes, As to the Fuel master installation, you need make sure the admin network have the external network access and configure the DNS correctly, the repository for Ubuntu operating system and MOS must workable, otherwise, please update the link for the mirror.

Installation OpenStack itself should be easy given all the conditions are matched, and the configuration is correct, the process will include two phases,

  • Operating System installation: Make sure boot image can be built successfully,
    For the PXE boot image you can find it here, if the image cannot be built successfully, copy an existing to the location below:

/var/www/nailgun/bootstraps/active_bootstrap/

Ubutnu image for the Operating system should be found here:

/var/www/nailgun/targetimages/

  • OpenStack installation.
    If the installation failed, and no obvious issue found, reset the environment and try it again.

Reference:

  1. ISO: https://www.mirantis.com/software/openstack/download/

  2. Create local repo: https://docs.openstack.org/fuel-docs/latest/userdocs/fuel-install-guide/local-repo.html

猜你喜欢

转载自blog.csdn.net/chenwei8280/article/details/79777489