Bright:Use-CaaS
Prerequisites
- Install and configure CaaS (refer to Bright:CaaS Installation
- Create an Openstack user (Refer to "Openstack User Creation" section in the Bright:Openstack-install)
- Enable jumbo frame on the internal and vxlan networks and on the switch
- Create the flavor used as a default for nodes creation if not specified:
[root@shadow-head ~] openstack flavor create --vcpus 1 --ram 1024 --disk 10 --ephemeral 10 --public m1.xsmallUsing CaaS
Create a cluster
A cluster can be created using the “os_cluster” command. In the following example:
- The values "CENTOS7u1" and "7.1-stable" are used because in buildmatic the "7.1-stable" version of Bright and the "CENTOS7u1" distribution were uploaded.
- The <CLUSTER_NAME> should be changed to a useful name, and
- The number of compute nodes to be deployed should be set for <NUMBER_OF_NODE>
[root@shadow-head ~] os_cluster create <CLUSTER_NAME> CENTOS7u1 7.1-stable -n <NUMBER_OF_NODE>List the existing clusters
To list all the virtual head nodes, the command "os_cluster list" can be used. Optionally, a list can be filtered with the -e flag, using a regex.
[root@shadow-head ~] os_cluster list
[root@shadow-head ~] os_cluster list -e test*Delete a cluster
[root@shadow-head ~] os_cluster delete <CLUSTER_NAME>Create/Delete nodes
Once the virtual cluster is installed, the "os_node" command can be used to add/remove nodes to/from it.
[root@shadow-head ~] os_node create <CLUSTER_NAME> --username root -p <root_pw_on_virtual_head> -n <NUMBER_OF_NODE>
[root@shadow-head ~] os_node create <CLUSTER_NAME> --username root -p <root_pw_on_virtual_head> -r node001..node003 #create nodes using a "range" syntax
[root@shadow-head ~] os_node create <CLUSTER_NAME> --username root -p <root_pw_on_virtual_head> -r node0[01-10] #create nodes using a "range" syntax[root@shadow-head ~] os_node delete <CLUSTER_NAME> -n <NUMBER_OF_NODE> # start deleting from 1st node
[root@shadow-head ~] os_node delete <CLUSTER_NAME> -r node003..node005 # delete nodes using a "range" syntax
[root@shadow-head ~] os_node delete <CLUSTER_NAME> -r node0[01-10] # delete nodes using a "range" syntax