Difference between revisions of "Bright:Use-CaaS"

From Define Wiki
Jump to navigation Jump to search
(Created page with "== Prerequisites == * Install and configure CaaS (refer to Bright:CaaS Installation * Create an Openstack user (Refer to "Openstack User Creation" section in the Bright...")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== Prerequisites ==
 
== Prerequisites ==
  
* Install and configure CaaS (refer to [[Bright:CaaS Installation]]
+
* Install and configure CaaS (refer to [[Bright:CaaS]])
* Create an Openstack user (Refer to "Openstack User Creation" section in the [[Bright:Openstack 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
 
* 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:
 
* Create the flavor used as a default for nodes creation if not specified:
Line 39: Line 39:
 
[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 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 create <CLUSTER_NAME> --username root -p <root_pw_on_virtual_head> -r node0[01-10] #create nodes using a "range" syntax
 +
</syntaxhighlight>
 +
 +
<syntaxhighlight>
 +
[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
 
</syntaxhighlight>
 
</syntaxhighlight>

Latest revision as of 16:34, 24 November 2015

Prerequisites

  • Install and configure CaaS (refer to Bright:CaaS)
  • 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.xsmall

Using 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