When you configure a VMware region, you can connect to
multiple clusters defined in the same vCenter. Each cluster is set
as a new availability zone in the same region.
About this task
Because
an OpenStack Nova Compute service can connect only
to one cluster in OpenStack, you must create a new
OpenStack Nova Compute service to connect to your
new cluster. The new cluster is set as a new host aggregate in a new availability zone. In this
procedure, the following names are used as examples:
new-cluster-availability-zone
- Is the name of the new availability zone.
new-cluster-host-aggregate
- Is the name of the new host aggregate.
nova-vmware.conf
- Is the name of the Nova Compute service
configuration file that is related to VMware, This name was specified when the VMware OpenStack Controller was installed.
openstack-nova-compute-vmware
- Is the name of the Nova Compute service that
is related to VMware. This name was specified when the VMware OpenStack Controller was installed.
Important: You must manually start, stop, or restart the newly created services,
and must not use knife commands from the Deployment Server of IBM Cloud Manager with OpenStack.
Note:
- You might add more
cluster_name parameters in the Nova VMware configuration file instead of creating a new
host aggregate and a new availability zone, but having two or more clusters in the same availability
zone is not a good practice from a virtual machine placement point of view.
- If you want to create several new OpenStack
Nova Compute services to connect to different
clusters, you can install new services on separate OpenStack Controllers to better manage your resource
workload.
Procedure
- Create the host aggregate and associate it with a new availability
zone by running the following command:
nova aggregate-create new-cluster-host-aggregate new-cluster-availability-zone
This
command also creates a new availability zone named
new-cluster-availability-zone.
Now you must create a new
OpenStack
Nova Compute service.
-
Create a copy of the Nova Compute service
configuration file that is related to VMware, for example:
cp /etc/nova/nova-vmware.conf /etc/nova/nova-service-new-cluster.conf
Change
the file ownership by running the following command:
chown nova:nova /etc/nova/nova-service-new-cluster.conf
- Modify the /etc/nova/nova-service-new-cluster.conf file
to set:
[DEFAULT]
default_availability_zone = new-cluster-availability-zone
default_schedule_zone = new-cluster-availability-zone
storage_availability_zone = new-cluster-availability-zone
host = new-cluster
# Use a host name different from the VMware OpenStack Controller to
# avoid conflict with the first cluster configuration.
[vmware]
host_ip = <your vCenter IP address or host name>
cluster_name = <the name of the new cluster in your vCenter>
- Add the host that you specified in step 3 for the
new Compute service to the host aggregate by running the following
command:
nova aggregate-add-host new-cluster-host-aggregate new-cluster
+----+----------------------------+-------------------------------+-------------
| Id | Name | Availability Zone | Hosts
+----+----------------------------+-------------------------------+-------------
| 2 | new-cluster-host-aggregate | new-cluster-availability-zone | new-cluster
+----+----------------------------+-------------------------------+-------------
+---------------------------------------------------+
| Metadata |
+---------------------------------------------------+
| 'availability_zone=new-cluster-availability-zone' |
+---------------------------------------------------+
-
Create copy of service file in /usr/lib/systemd/system.
For example, run the following command in a single line:
cp openstack-nova-compute-vcenter-Cluster1.service
openstack-nova-compute-vcenter-Cluster2.service
-
Update the new service file with relevant values for the following parameters:
--config-file - Points to the new nova cluster configuration file.
--log-file - Points to the new nova log file.
Example:
[Unit]
Description=OpenStack Nova Compute Server for vcenter-Cluster2
After=syslog.target network.target
[Service]
Environment=LIBGUESTFS_ATTACH_METHOD=appliance
Restart=on-failure
User=nova
ExecStart=/usr/bin/nova-compute --config-file /etc/nova/nova-vcenter-Cluster2.conf
--log-file /var/log/nova/nova-compute-vcenter-Cluster2.log
[Install]
WantedBy=multi-user.target
-
Run the following command in a single line to create a link to the new service file.
In -s /usr/lib/systemd/system/openstack-nova-compute-vcenter-Cluster2.service
/etc/systemd/system/multi-user.target.wants/openstack-nova-compute-vcenter-Cluster2.service
-
Change the permission on this file to 755.
chmod 755 openstack-nova-compute-vcenter-Cluster2.service
-
Run the following commands to start the services:
Under
/usr/lib/systemd/system:
chkconfig openstack-nova-compute-vcenter-Cluster2 on
service openstack-nova-compute-vcenter-Cluster2 start
service openstack-nova-compute-vcenter-Cluster2 status
-
Verify that the new service is up and running. Run the following command to check whether the
new availability zone that is named
new-cluster-availability-zone is shown:
nova availability-zone-list
+---------------------------------------------+----------------------------------------+
| Name | Status |
+---------------------------------------------+----------------------------------------+
| internal | available |
| |- <your-local-host-name> | |
| | |- nova-conductor | enabled :-) 2015-05-07T05:15:44.766879 |
| | |- nova-vmware | enabled :-) 2015-05-07T05:15:51.017709 |
| | |- nova-consoleauth | enabled :-) 2015-05-07T05:15:49.413705 |
| | |- nova-cert | enabled :-) 2015-05-07T05:15:47.481551 |
| | |- nova-scheduler | enabled :-) 2015-05-07T05:15:47.736521 |
| nova | available |
| |- <your-local-host-name> | |
| | |- nova-compute | enabled :-) 2015-05-07T05:15:43.274219 |
| new-cluster-availability-zone | available |
| |- new-cluster | |
| | |- nova-compute | enabled :-) 2015-05-07T05:15:44.309888 |
+---------------------------------------------+----------------------------------------+
- For troubleshooting, see the /var/log/nova/compute-new-cluster.log file.
What to do next
After you configured your VMware region to connect to multiple clusters, you must run the
vmware-discovery process as described in Configuring vmware-discovery. In the vmware-discovery configuration
file, specify the name of your clusters, which are separated by a comma, in the
clusters parameter. For
example:clusters = cluster1,cluster2,new-cluster