Jump to: navigation, search

Difference between revisions of "Cloudpulse/OperatorTests"

(Created page with "== To Install CloudPulse Server == === Ubuntu OS Packages === The following required packages are to be installed in ubuntu * sudo apt-get update * sudo apt-get install pyth...")
 
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
== To Install CloudPulse Server ==
+
== Operator Tests ==
  
=== Ubuntu OS Packages ===
+
Perform the following steps to use cloudpulse to run operator tests. For Operator tests, only containerized environments are supported.
The following required packages are to be installed in ubuntu
 
  
* sudo apt-get update
+
=== Install RPM Packages ===
* sudo apt-get install python-pip python-dev libmysqlclient-dev
+
The following RPM packages need to be installed.
  
=== PIP required packages ===
+
yum install -y ansible
The required pip modules to be installed
 
  
pip install pbr oslo.config pecan keystonemiddleware wsme oslo.concurrency paramiko eventlet oslo.messaging oslo.versionedobjects oslo.db netifaces MySQL-python
+
=== Setup SSH Keys ===
  
=== Mysql commands ===
+
Operator test runs an ansible playbook on the target nodes and gets the required information.
 +
To enable cloudpulse to do operator tests the ssh keys have to be created and added to the authorized keys in all the target systems from the host running cloudpulse.
  
The Mysql commands required for setting up the database .(To be run in the controller)
+
ssh-keygen
 +
ssh-copy-id -i ~/.ssh/id_rsa.pub "<target_node_ip>"
  
* CREATE DATABASE cloudpulse;
+
=== Create node configuration file ===
* GRANT ALL PRIVILEGES ON cloudpulse.* TO 'cloudpulse'@'localhost' IDENTIFIED BY 'password';
 
* GRANT ALL PRIVILEGES ON cloudpulse.* TO 'cloudpulse'@'%' IDENTIFIED BY 'password';
 
* create table `cpulse` ( id int NOT NULL AUTO_INCREMENT, uuid VARBINARY(128), name VARCHAR(128), state VARCHAR(128), created_at timestamp default current_timestamp, updated_at  timestamp default 0,testtype VARBINARY(128),result TEXT ,primary key (id));>
 
  
=== Openstack commands ===
+
Location of node configuration file needs to be provided to cloudpulse.conf to do operator tests:
  
The following services have to be setup to make cloudpulse as a service.
+
[operator_test]
 +
operator_setup_file = <path_nodes_config.yaml>
  
* openstack user create --password-prompt cloudpulse  [prompt will appear asking for password]
+
The node configuration file contains the information in the following format:
* openstack role add --project  service --user cloudpulse admin
 
*  openstack service create  cloudpulse --description "Openstack Health service" --type health
 
* openstack endpoint create --publicurl http://controller:9999 --internalurl http://controller:9999 --adminurl http://controller:9999 --region RegionOne cloudpulse
 
  
=== Configuration File Changes ===
+
## nodes_config.yaml
[database]
+
## Modify and place this file in any location <path_nodes_config.yaml>.
connection = mysql://cloudpulse:password@controller/cpulse?charset=utf8<br />
+
 
+
# Format
 
+
#<node-name>:
[keystone_authtoken]<br />
+
#    ip: <IP-address>
 
+
#    user: root
...<br />
+
#    role: <compute, control, storage>
 
+
auth_uri = http://controller:5000/v2.0<br />
+
#E.g:
 
+
gg31-1-compute-1:
project_domain_id = default<br />
+
    ip: <compute_node_1_ip>
 
+
    user: root
project_name = service<br />
+
    role: compute
 
+
gg31-1-controller-1:
user_domain_id = default<br />
+
    ip: <controller_node_1_ip>
 
+
    user: root
password = password<br />
+
    role: control compute
 
+
    galerauser: <galera_user_name>
username = cloudpulse<br />
+
    galerapassword: <galera_password>
 
+
gg31-1-controller-2:
auth_url = http://controller:35357<br />
+
    ip: <controller_node_2_ip>
 
+
    user: root
auth_plugin = password</nowiki><br />
+
    role: control
 +
    galerauser: <galera_user_name>
 +
    galerapassword: <galera_password>
 +
gg31-1-controller-3:
 +
    ip: <controller_node_3_ip>
 +
    user: root
 +
    role: control
 +
    galerauser: <galera_user_name>
 +
    galerapassword: <galera_password>
 +
 +
=== Run Operator Tests ===
 +
cloudpulse-server --config-file <path_cloudpulse.conf>

Latest revision as of 15:27, 6 July 2017

Operator Tests

Perform the following steps to use cloudpulse to run operator tests. For Operator tests, only containerized environments are supported.

Install RPM Packages

The following RPM packages need to be installed.

yum install -y ansible

Setup SSH Keys

Operator test runs an ansible playbook on the target nodes and gets the required information. To enable cloudpulse to do operator tests the ssh keys have to be created and added to the authorized keys in all the target systems from the host running cloudpulse.

ssh-keygen
ssh-copy-id -i ~/.ssh/id_rsa.pub "<target_node_ip>"

Create node configuration file

Location of node configuration file needs to be provided to cloudpulse.conf to do operator tests:

[operator_test]
operator_setup_file = <path_nodes_config.yaml>

The node configuration file contains the information in the following format:

## nodes_config.yaml
## Modify and place this file in any location <path_nodes_config.yaml>.

# Format
#<node-name>:
#    ip: <IP-address>
#    user: root
#    role: <compute, control, storage>

#E.g:
gg31-1-compute-1:
    ip: <compute_node_1_ip>
    user: root
    role: compute
gg31-1-controller-1:
    ip: <controller_node_1_ip>
    user: root
    role: control compute
    galerauser: <galera_user_name>
    galerapassword: <galera_password>
gg31-1-controller-2:
    ip: <controller_node_2_ip>
    user: root
    role: control
    galerauser: <galera_user_name>
    galerapassword: <galera_password>
gg31-1-controller-3:
    ip: <controller_node_3_ip>
    user: root
    role: control
    galerauser: <galera_user_name>
    galerapassword: <galera_password>

Run Operator Tests

cloudpulse-server --config-file <path_cloudpulse.conf>