Jump to: navigation, search

Difference between revisions of "Cloudpulse/DeveloperNotes"

(Configuration File Changes)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== To Install CloudPulse Server ==
+
== Steps to Install CloudPulse Server ==
  
=== Ubuntu OS Packages ===
+
=== Install RPM packages ===
The following required packages are to be installed in ubuntu
+
The following RPM packages need to be installed.
  
* sudo apt-get update
+
yum install -y ansible mariadb-devel hostname gcc openstack-cloudpulse && yum clean all
* sudo apt-get install python-pip python-dev libmysqlclient-dev
 
  
=== PIP required packages ===
+
=== Install Python packages ===
The required pip modules to be installed  
+
The required python packages need to be installed.
  
pip install pbr oslo.config pecan keystonemiddleware wsme oslo.concurrency paramiko eventlet oslo.messaging oslo.versionedobjects oslo.db netifaces MySQL-python
+
yum install -y python-oslo-versionedobjects python-novaclient python-cinderclient python-glanceclient python-neutronclient python-novaclient python-cinderclient python-glanceclient python-neutronclient python-pecan python-wsme python-paramiko python-openstackclient
  
=== Mysql commands ===
+
=== Setup Cloudpulse database ===
  
The Mysql commands required for setting up the database .(To be run in the controller)
+
The MySQL commands need to be run in the MySQL database host <db_host_ip>.
  
* CREATE DATABASE cloudpulse;
+
* Create cloudpulse databse.
* GRANT ALL PRIVILEGES ON cloudpulse.* TO 'cloudpulse'@'localhost' IDENTIFIED BY 'cisco123';
+
CREATE DATABASE IF NOT EXISTS cloudpulse DEFAULT CHARACTER SET utf8;
* GRANT ALL PRIVILEGES ON cloudpulse.* TO 'cloudpulse'@'%' IDENTIFIED BY 'cisco123';
+
* Grant all privileges to cloudpulse user for cloudpulse databse; set a password for cloudpulse user.
* 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));>
+
GRANT ALL PRIVILEGES ON cloudpulse.* TO 'cloudpulse@%' IDENTIFIED BY '<cloudpulse_mysql_user_password>';
 +
* Create cpulse table in cloudpulse databse.
 +
create table IF NOT EXISTS 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));
 +
* Create cpulselock table in cloudpulse databse.
 +
create table IF NOT EXISTS cpulselock ( id int NOT NULL AUTO_INCREMENT, test_name VARBINARY(128), conductor_id VARBINARY(128), created_at timestamp default current_timestamp, updated_at timestamp default 0 , primary key (id));
  
=== Openstack commands ===
+
=== Create keystone user, service and endpoint ===
  
 
The following services have to be setup to make cloudpulse as a service.
 
The following services have to be setup to make cloudpulse as a service.
  
* openstack user create --password-prompt cloudpulse
+
* Create user cloudpulse and set its password.
* openstack role add --project service --user cloudpulse admin
+
openstack user create --project service --password <cloudpulse_openstack_user_password> cloudpulse
* openstack service create --name cloudpulse --description "Openstack Health service" health
+
* Create cloudpulse service.
* openstack endpoint create --publicurl http://controller:9999 --internalurl http://controller:9999 --adminurl http://controller:9999 --region RegionOne health
+
openstack service create --name cloudpulse --description "openstack health service" health
 +
* Add roles to cloudpulse user.
 +
openstack role add --project admin --user cloudpulse admin
 +
openstack role add --project service --user cloudpulse admin
 +
* Create openstack service endpoint.
 +
openstack endpoint create --region RegionOne --adminurl  http://<host_ip>:9999 --internalurl http://<host_ip>:9999 --publicurl http://<host_ip>:9999 cloudpulse
  
=== Configuration File Changes ===
+
=== Create cloudpulse configuration file ===
[database]
 
connection = mysql://cloudpulse:password@controller/cpulse?charset=utf8<br />
 
  
 +
## cloudpulse.conf
 +
## Modify and place this file in any location <path_cloudpulse.conf>.
 +
 +
[DEFAULT]
 +
debug = False
 +
verbose = True
 +
logdir =  <cloudpulse_log_dir>
 +
host =  <host_ip>
 +
port = 9999
 +
 +
[database]
 +
connection = mysql://cloudpulse:<cloudpulse_mysql_user_password>@<db_host_ip>/cloudpulse?charset=utf8
 +
max_retries = -1
 +
 +
[osapi_v3]
 +
enabled = True
 +
 +
[keystone_authtoken]
 +
auth_uri = http://<host_ip>:5000/v2.0
 +
project_domain_name = default
 +
project_name = service
 +
user_domain_name = default
 +
password = <keystone_admin_password>
 +
username = cloudpulse
 +
auth_url = http://<host_ip>:35357
 +
auth_plugin = <cloudpulse_openstack_user_password>
 +
 +
[oslo_concurrency]
 +
lock_path = /opt/stack/data/nova
 +
 +
[oslo_messaging_rabbit]
 +
rabbit_userid = guest
 +
rabbit_password = <rabbitmq_password>
 +
rabbit_hosts = guest:<rabbitmq_password>@<controller_node_1_ip>:5672,guest:<rabbitmq_password>@<controller_node_2_ip>:5672,guest: <rabbitmq_password>@<controller_node_3_ip>:5672
 +
 +
[periodic_tests]
 +
nova_endpoint = 240
 +
neutron_endpoint = 240
 +
cinder_endpoint = 240
 +
glance_endpoint = 240
 +
keystone_endpoint = 240
 +
rabbitmq_check = 240
 +
galera_check = 240
 +
docker_check = 240
 +
node_check = 240
 +
ceph_check = 240
 +
 +
## Operator test only supported on containerized environments such as kolla/ansible openstack installer
 +
[operator_test]
 +
containerized = True
 +
rabbit_container = `docker ps | grep rabbitmq | awk '{print $1}'`
 +
galera_container = `docker ps | grep mariadb-app | awk '{print $1}'`
 +
ceph_container = `docker ps | grep ceph-mon | awk '{print $1}'`
 +
 +
[operator_test]
 +
operator_setup_file = <path_nodes_config.yaml>
 +
 +
## Operator scenario is only supported on kolla environment
 +
[scenario]
 +
enabled_scenarios = endpoint_scenario,operator_scenario
 +
  
[keystone_authtoken]<br />
+
=== Start Cloudpulse Server ===
 +
Clone cloudpulse repository and install cloudpulse.
  
...<br />
+
git clone https://github.com/openstack/cloudpulse
 
+
cd cloudpulse
auth_uri = http://controller:5000/v2.0<br />
+
python setup.py install
 
 
project_domain_id = default<br />
 
 
 
project_name = service<br />
 
 
 
user_domain_id = default<br />
 
 
 
password = password<br />
 
 
 
username = cloudpulse<br />
 
 
 
auth_url = http://controller:35357<br />
 
 
 
auth_plugin = password</nowiki><br />
 

Latest revision as of 05:30, 17 May 2018

Steps to Install CloudPulse Server

Install RPM packages

The following RPM packages need to be installed.

yum install -y ansible mariadb-devel hostname gcc openstack-cloudpulse && yum clean all

Install Python packages

The required python packages need to be installed.

yum install -y python-oslo-versionedobjects python-novaclient python-cinderclient python-glanceclient python-neutronclient python-novaclient python-cinderclient python-glanceclient python-neutronclient python-pecan python-wsme python-paramiko python-openstackclient

Setup Cloudpulse database

The MySQL commands need to be run in the MySQL database host <db_host_ip>.

  • Create cloudpulse databse.
CREATE DATABASE IF NOT EXISTS cloudpulse DEFAULT CHARACTER SET utf8;
  • Grant all privileges to cloudpulse user for cloudpulse databse; set a password for cloudpulse user.
GRANT ALL PRIVILEGES ON cloudpulse.* TO 'cloudpulse@%' IDENTIFIED BY '<cloudpulse_mysql_user_password>';
  • Create cpulse table in cloudpulse databse.
create table IF NOT EXISTS 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));
  • Create cpulselock table in cloudpulse databse.
create table IF NOT EXISTS cpulselock ( id int NOT NULL AUTO_INCREMENT, test_name VARBINARY(128), conductor_id VARBINARY(128), created_at timestamp default current_timestamp, updated_at timestamp default 0 , primary key (id));

Create keystone user, service and endpoint

The following services have to be setup to make cloudpulse as a service.

  • Create user cloudpulse and set its password.
openstack user create --project service --password <cloudpulse_openstack_user_password> cloudpulse
  • Create cloudpulse service.
openstack service create --name cloudpulse --description "openstack health service" health
  • Add roles to cloudpulse user.
openstack role add --project admin --user cloudpulse admin
openstack role add --project service --user cloudpulse admin
  • Create openstack service endpoint.
openstack endpoint create --region RegionOne --adminurl  http://<host_ip>:9999 --internalurl http://<host_ip>:9999 --publicurl http://<host_ip>:9999 cloudpulse

Create cloudpulse configuration file

## cloudpulse.conf
## Modify and place this file in any location <path_cloudpulse.conf>.

[DEFAULT]
debug = False
verbose = True
logdir =  <cloudpulse_log_dir>
host =  <host_ip>
port = 9999 

[database]
connection = mysql://cloudpulse:<cloudpulse_mysql_user_password>@<db_host_ip>/cloudpulse?charset=utf8
max_retries = -1

[osapi_v3]
enabled = True

[keystone_authtoken]
auth_uri = http://<host_ip>:5000/v2.0
project_domain_name = default
project_name = service
user_domain_name = default
password = <keystone_admin_password>
username = cloudpulse
auth_url = http://<host_ip>:35357
auth_plugin = <cloudpulse_openstack_user_password>

[oslo_concurrency]
lock_path = /opt/stack/data/nova

[oslo_messaging_rabbit]
rabbit_userid = guest
rabbit_password = <rabbitmq_password>
rabbit_hosts = guest:<rabbitmq_password>@<controller_node_1_ip>:5672,guest:<rabbitmq_password>@<controller_node_2_ip>:5672,guest: <rabbitmq_password>@<controller_node_3_ip>:5672

[periodic_tests]
nova_endpoint = 240
neutron_endpoint = 240
cinder_endpoint = 240
glance_endpoint = 240
keystone_endpoint = 240
rabbitmq_check = 240
galera_check = 240
docker_check = 240
node_check = 240
ceph_check = 240

## Operator test only supported on containerized environments such as kolla/ansible openstack installer
[operator_test]
containerized = True
rabbit_container = `docker ps | grep rabbitmq | awk '{print $1}'`
galera_container = `docker ps | grep mariadb-app | awk '{print $1}'`
ceph_container = `docker ps | grep ceph-mon | awk '{print $1}'`

[operator_test]
operator_setup_file = <path_nodes_config.yaml>

## Operator scenario is only supported on kolla environment
[scenario]
enabled_scenarios = endpoint_scenario,operator_scenario

Start Cloudpulse Server

Clone cloudpulse repository and install cloudpulse.

git clone https://github.com/openstack/cloudpulse
cd cloudpulse
python setup.py install