Install VMs for MySQL Nodes and Management Server

MySQL Cluster Topology

Virtual Machine

System Details

Prerequisites

Limitations and Expectations

References

Add bridge interface in all the hosts

The following procedure creates Virtual Machines (VM's) for installing MySQL Cluster nodes (Management nodes, Data nodes and SQL nodes) and creating Bastion Host VM on the each Storage Host, install Oracle Linux 7.5 on each VM. This procedure requires all the network information for creating the VM's in different host servers like k8 Master Nodes, Storage Hosts. Here VM's are created using the virt-install CLI tool using the provision docker container and MySQL Cluster is installed using the db-install docker container as outlined in the Database Tier Installer.

After all the hosts are provisioned using the provision container, this procedure is used for creating the VM's in kubernetes Master nodes and Storage Hosts.

MySQL Cluster Manager is a distributed client/server application consisting of two main components.:

  1. The MySQL Cluster Manager agent is a set of one or more agent processes that manage NDB Cluster nodes.
  2. The MySQL Cluster Manager client provides a command-line interface to the agent's management functions.

MySQL Cluster Manager binary distributions that include MySQL NDB Cluster are used for installing MySQL Cluster Manager and MySQL NDB Cluster.

Steps for downloading the MySQL Cluster Manager from Oracle Software Delivery Cloud (OSDC) is found in Installation Preflight Checklist

In OCCNE 1.2, MySQL Cluster is installed as shown below in each cluster.

Figure B-25 MySQL Cluster Topology

MySQL Cluster is installed on Virtual machines, so the number of VM's required in the Storage Hosts and K8 Master Nodes are as shown below. Each k8 master node is used to create 1 VM for installing the MySQL Management node, so there are 3 MySQL management nodes in the MySQL Cluster. In each storage nodes, 4 VM's are created, i.e. 2 VM's for data nodes, 1 VM for SQL nodes and 1 VM for Management node VM.

No Of MySQL Management Nodes: 3

No Of Data Nodes: 4

No of SQL nodes: 2

No Of Bastion Hosts: 2

Below table shows VM's Created in Host servers:

Host Server No Of VM's Node Name
K8 Master node 1 1 MySQL management node 1
K8 Master node 2 1 MySQL management node 2
K8 Master node 3 1 MySQL management node 3
Storage Host 1 4 2 MySQL Data Node, 1 MySQL SQL node, 1 Bastion Host VM
Storage Host 2 4 2 MySQL Data Node,1 MySQL SQL node, 1 Bastion Host VM
VM Profile for Management and MySQL Cluster Nodes:
Node Type RAM HDD vcpus No Of Nodes
MySQL Management Node 8GB 200GB 4 3
MySQL Data Node 50GB 800GB 10 4
MySQL SQL Node 16GB 600GB 10 2
Bastion Host 8GB 300GB 4 2

IP Address, host names for VM's, Network information for creating the VM's are captured in Installation Preflight Checklist. Configuration details of these VM's are in Inventory file: Inventory File Preparation

  1. All the hosts servers where VM's are created are captured in Inventory File Preparation, The kubernetes master nodes are mentioned under [kube-master] and Storage Hosts are mentioned under [data_store].
  2. All Hosts should be provisioned using provision docker container as defined and installed site hosts.ini file.
  3. Host names and IP Address, network information assigned to these VM's should be captured in the Installation Preflight Checklist
  4. Bastion Host should be installed in Storage Host(RMS2) and configured in Storage Host (RMS2).
  5. SSH keys configured in host servers by provision container is stored in Bastion Host (RMS2).
  6. VM's should be created before installing the kubernetes in k8's Master and kube worker nodes.
  1. Both Storage Hosts will have one Management server VM, where Docker is installed, All the host servers are provisioned from this Management server VM.
  2. Once both storage nodes and host servers are provisioned using the provision container, VM's are created on kubernetes master and DB storage nodes.

Create a bridge interface on the Team(team0) interface for creating VM's.

Note:

Below steps should be performed to create the bridge interface (teambr0 and vlan5-br) in each storage hosts and bridge interface(teambr0) in each kubernetes Master nodes one at a time.

Table B-17 Procedure to install VMs for MySQL Nodes and Management Server

Step # Procedure Description
1.

Create VMs
  1. Login to the Bastion Host in RMS2.
    $ sudo su
  2. Configure inventory file with all the VM's details as described in Inventory File Preparation
  3. Update skip_kernel_virtual group in the inventory file with the bastion hosts.
    $ vi /var/occne/<cluster_name>/hosts.ini
    [skip_kernel_virtual]
    bastion-1.delta.lab.us.oracle.com
    bastion-2.delta.lab.us.oracle.com
  4. Create VM's for installing MySQL NDB Cluster.

    Update bastion hosts in the skip_kernel_virtual group in hosts.ini inventory file.

    $ vi /var/occne/<cluster_name>/hosts.ini
    # List of other VM's which are already created.
    [skip_kernel_virtual]
    bastion-1.rainbow.lab.us.oracle.com
    bastion-2.rainbow.lab.us.oracle.com
    Run the docker command below to create a provision container running bash
    $ docker run --rm --network host --cap-add=NET_ADMIN -v /var/occne/<cluster_name>/:/host -v /var/occne/:/var/occne:rw -e "OCCNEARGS=--limit <limit_filter>" <image_name>:<image_tag> /bin/bash
      
    Example:
      
    $ docker run -it --rm --network host --cap-add=NET_ADMIN -v /var/occne/rainbow.lab.us.oracle.com/:/host -v /var/occne/:/var/occne:rw -e "OCCNEARGS=" 10.75.200.217:5000/provision:1.2.0 /bin/bash
    
    Run below command to create VM's
    $ ansible-playbook -i /host/hosts.ini vms_provision.yaml ${OCCNEARGS} --skip-tags "datastore"
  5. Execute security playbook on the VM's
    $ docker run -it --rm --network host --cap-add=NET_ADMIN -v /var/occne/rainbow.lab.us.oracle.com/:/host -v /var/occne/:/var/occne:rw -e "OCCNEARGS=--limit mysqlndb_all_nodes" 10.75.200.217:5000/provision:1.2.0 ./run_security
    
2.

Installing KVM Packages By default KVM packages are installed in the Kubernetes Master nodes and Storage Host, so if KVM packages are not installed, follow below steps to install KVM packages in Master nodes and Storage Hosts.

Execute provision container to install KVM Packages.

$ docker run --rm --network host --cap-add=NET_ADMIN -v /var/occne/<cluster_name>/:/host -v /var/occne/:/var/occne:rw -e 'OCCNEARGS=--limit <limit_filter> --tags datastore' <image_name>:<image_tag>
  
Example:
  
docker run -it --rm --network host --cap-add=NET_ADMIN -v /var/occne/<cluster_name>/:/host -v /var/occne/:/var/occne:rw -e 'OCCNEARGS=--limit host_hp_gen_10:!db-2.delta.lab.us.oracle.com --tags datastore' 10.75.200.217:5000/provision:1.2.0