...
...
Table of Contents |
---|
Implementation of LB Cluster solution deployment is based on ansible playbooks. Parameters that are important for deployment are defined in configuration files, playbook commands are set in makefile. To start deployment user runs command "make deploy" (see user rights requirements), "make" is a command which executes command from makefile, "deploy" is the main deployment command. "Make" utility finds "deploy" label in makefile and runs script for ansible playbook.
Distribution Package
files included in distribution package
...
files not included in distribution package - license files, TLS certificates, Consul distribution packages
Playbook
Playbook and all deployment-dependent files are saved on deployment workstation - Linux-based machine that may be a separate machine or one of the hosts configured for cluster components.
...
Code Block | ||
---|---|---|
| ||
APB=ansible-playbook INVENTORY=hosts.yml PB=deploy.yml SSH_ARGS=-o StrictHostKeyChecking=no # Default target all: deploy # Target to deploy the services to the configured machines deploy: ${INVENTORY} ${PB} ${APB} -i ${INVENTORY} ${PB} --ssh-common-args="${SSH_ARGS}" -vv |
User rights
Deployment process require superuser rights on all hosts for user that will run playbook.
Parameters Configuration
Directory structure
Name | Description |
---|---|
PLAYBOOK_ROOT_DIR | root directory for deployment files Contains: ansible.cfg - ansible configuration file deploy.yml - steps of deployment hosts.yml - file for hardware units configuration makefile - file for "make" command arguments Readme.MD - root readme document |
PLAYBOOK_ROOT_DIR/doc PLAYBOOK_ROOT_DIR/doc/quickstart | directories for documentation files Contains: readme files |
PLAYBOOK_ROOT_DIR/files | directory for distribution packages, license, key files |
PLAYBOOK_ROOT_DIR/group_vars | directory for files containing global variables |
PLAYBOOK_ROOT_DIR/roles | directory for deployment-related files for roles |
Roles
For convenience all deployment jobs are divided into parts according to functionality that is deployed. These parts are called "roles". Parameters for roles are defined in PLAYBOOK_ROOT_DIR/roles/<role_name>/defaults/main.yml. These parameters can be overrided by global parameters with the same name. For example user can define "fe_destdir" parameter in all.yml file and it will be taken by ansible playbook instead of parameter defined in PLAYBOOK_ROOT_DIR/roles/fixedge/defaults/main.yml
Hosts
Hardware unit parameters are stored in hosts.yml
...
Code Block | ||||
---|---|---|---|---|
| ||||
--- all: children: # Host names or IP addresses where FIXEdge daemon with Consul Agent # will be deployed. fixedge: hosts: fixedge_1: ansible_host: 10.6.223.22 ansible_port: 22 ansible_user: user ansible_ssh_pass: epm-bfix fixedge_2: ansible_host: 10.6.220.172 ansible_port: 22 ansible_user: user ansible_ssh_pass: epm-bfix # Host names or IP addresses where Configuration Service daemon with # Consul Agent will be deployed. confservice: hosts: cs_1: ansible_host: 10.6.221.249 ansible_port: 22 ansible_user: user ansible_ssh_pass: epm-bfix # Host names or IP addresses where HAProxy with Consul Agent and # Consul Template will be deployed/configured. proxy: hosts: haproxy: ansible_host: 10.6.223.32 ansible_port: 22 ansible_user: user ansible_ssh_pass: epm-bfix # Host name or IP address of the Oracle Database database: hosts: oracle: ansible_host: user_oracle-database_1 ansible_connection: docker ansible_connection_args: '-H=tcp://10.6.221.187:2375' # Host name or IP address of the Oracle Database consul_cluster: hosts: consul_server_1: ansible_host: 10.6.221.187 ansible_port: 22 ansible_user: user ansible_ssh_pass: epm-bfix splunk: hosts: splunk_1: ansible_host: 10.6.221.187 ansible_port: 22 ansible_user: user ansible_ssh_pass: epm-bfix |
Global variables
variable | component | description |
---|---|---|
dba_user | Oracle DB | DB Administrator login. Database user with administrator rights is needed for adding user, create and configure database for the solution needs. |
dba_password | Oracle DB | DB Administrator password |
db_user | Oracle DB | DB user login |
db_password | Oracle DB | DB user password |
db_address | Oracle DB | IP address for connection to DB |
db_port | Oracle DB | IP port for connection to DB |
db_sid | Oracle DB | DB SID |
fe_cluster_id | Cluster | unique identity of LB Cluster |
fe_lic_dnl | FIXEdge nodes | path to license file |
fe_archive_dest | FIXEdge nodes | path to FIXEdge distribution archive |
file_cs | Configuration Service | path to Configuration Service distribution archive |
file_consul | Consul | path to Consul Agent distribution archive |
file_ctemplate | Consul | path to Consul template software package (ZIP archive). |
fe_rapi_key | FIXEdge nodes | path to REST-API key file |
fe_rapi.crt | FIXEdge nodes | path to REST-API certificate file |
fe_rapi_port | FIXEdge nodes | IP port for REST-API |
fe_splunk_host | Splunk | IP address for connection to Splunk system |
fe_splunk_port | Splunk | IP port for connection to Splunk system |
consul_deploy_dir | Consul | path for Consul deployment |
...
Code Block | ||||
---|---|---|---|---|
| ||||
# Oracle dba_user: system dba_password: oracle db_user: fix db_password: fix db_addr: '10.6.221.187' db_port: 1521 db_sid: XE # FIXEdge cluster identifier fe_cluster_id: 'FIXEdge-Cluster' fe_lic_dnl: '{{ playbook_dir }}/files/engine225.license' fe_archive_dest: '{{ playbook_dir }}/files/FIXEdge-6.6.1-lb-cluster.138-FA-2.25.0.138-Linux-3.10.0-gcc-4.8.5-x86_64.tar.gz' file_cs: '{{ playbook_dir }}/files/configuration-service-1.0.0-SNAPSHOT.tar' file_consul: '{{ playbook_dir }}/files/consul_1.4.0_linux_amd64.zip' file_ctemplate: '{{ playbook_dir }}/files/consul-template_0.19.5_linux_amd64.zip' fe_rapi_key: '{{ playbook_dir }}/files/rapi.key' fe_rapi_crt: '{{ playbook_dir }}/files/rapi.crt' fe_rapi_port: '8903' fe_splunk_host: '10.6.221.187' fe_splunk_port: '1514' consul_deploy_dir: '/srv/consul-agent' consul_server_addresses: | {%- set addresses = [] -%} {%- for item in groups['consul_cluster'] -%} {%- if addresses.append(hostvars[item]['ansible_default_ipv4']['address']) -%} {%- endif -%} {%- endfor -%} {{ addresses }} |
Troubleshooting
Deployment process will display messages on the terminal output indicating results for every step. When all the steps finished successfully user will get the output similar to:
...
Incorrect deployment process ending will be similar to:
Host is unreachable
Problem: user gets error message similar to:
...
- check network connectivity to troubled host (ip address is present in error message). Restore network connectivity if it was lost.
Role not found
Problem: user gets error message similar to:
...
Solution:
- change role name
Wrong oracle access parameters
Problem: user gets error message similar to:
...
- correct database access parameters in PLAYBOOK_ROOT_DIR/group_vars/all.yml
- check that access to database works using database client software
Database (oracle) unavailable
Problem: user gets error message similar to:
...
- check network connectivity. Restore it if needed.
- try to access database with database client using credentials configured in deploy config files.
- check database health.
Lack of user rights
Problem: user gets error message similar to:
...
- Configure passwordless sudo on host (ip address is present in the error message)
File is not found
Problem: user gets error message similar to:
...