Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

Table of Contents
Overview

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
titlemakefile
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

NameDescription
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/filesdirectory for distribution packages, license, key files
PLAYBOOK_ROOT_DIR/group_varsdirectory for files containing global variables
PLAYBOOK_ROOT_DIR/rolesdirectory 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
titleExample for hosts.yml
collapsetrue
---
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

variablecomponentdescription
dba_userOracle DB

DB Administrator login.

Database user with administrator rights is needed for adding user, create and configure database for the solution needs.

dba_passwordOracle DBDB Administrator password
db_userOracle DBDB user login
db_passwordOracle DBDB user password
db_addressOracle DBIP address for connection to DB
db_portOracle DBIP port for connection to  DB
db_sidOracle DBDB SID
fe_cluster_idClusterunique identity of LB Cluster
fe_lic_dnlFIXEdge nodespath to license file
fe_archive_destFIXEdge nodespath to FIXEdge distribution archive
file_csConfiguration Servicepath to Configuration Service distribution archive
file_consulConsulpath to Consul Agent distribution archive
file_ctemplateConsulpath to Consul template software package (ZIP archive).
fe_rapi_keyFIXEdge nodespath to REST-API key file
fe_rapi.crtFIXEdge nodespath to REST-API certificate file
fe_rapi_portFIXEdge nodesIP port for REST-API
fe_splunk_hostSplunkIP address for connection to Splunk system
fe_splunk_portSplunkIP port for connection to Splunk system
consul_deploy_dirConsulpath for Consul deployment

...

Code Block
titleexample for all.yml
collapsetrue
# 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:

...