New install with playbooks#

Important

For instructions to upgrade an existing installation, see Upgrade with playbooks instead.

Requirements#

You must:

  • Have already completed Prepare nodes.

  • Run the playbooks here in sequence.

Tip

A playbook run is successful if has 0 failed tasks.

The following is an example PLAY RECAP from a successful (failed=0) single node playbook run:

PLAY RECAP ******************************************************************************************
application-node           : ok=64   changed=44   unreachable=0    failed=0    skipped=12   rescued=0    ignored=0   
localhost                  : ok=1    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

Run the playbooks#

Caution

You may have used an .envrc file in earlier versions of the installation playbooks. Rename it to .env, or create an .env file using instructions in Set up .env.

On the control node, run playbooks with the ansible-playbook command with these command line options:

ansible-playbook --tags=all,logstash -i inventories/<inventory_file.yml> <pb-playbook.yml>

Option

Description

--tags=all,logstash

(Optional) Use --tags=all,logstash to include Logstash. You can omit this option entirely to install EclecticIQ Intelligence Center without Logstash.

-i inventories/<inventory_file.yml>

Specify the path to an inventory file configured for your deployment.

Inventory files are described in Prepare nodes.

<pb-playbook.yml>

This is the playbook to run.

Run the playbooks in this sequence:

  1. Load .env. Run:

    source .env
    
  2. Prepare nodes: pb-pre_requisites.yml

    ansible-playbook --tags=all,logstash -i inventories/<inventory_file.yml> pb-pre_requisites.yml
    
  3. Install components: pb-install_intelligence_center.yml

    ansible-playbook --tags=all,logstash -i inventories/<inventory_file.yml> pb-install_intelligence_center.yml
    
  4. Make sure services have started: pb-start_services.yml

    ansible-playbook --tags=all,logstash -i inventories/<inventory_file.yml> pb-start_services.yml
    
  5. Run database migrations: pb-migrate_databases.yml

    ansible-playbook --tags=all,logstash -i inventories/<inventory_file.yml> pb-migrate_databases.yml
    
  6. Start services: pb-start_services.yml

    ansible-playbook --tags=all,logstash -i inventories/<inventory_file.yml> pb-start_services.yml
    
  7. Run the post-installation playbook: pb-post.yml

    ansible-playbook --tags=all,logstash -i inventories/<inventory_file.yml> pb-post.yml
    
  8. Reboot your managed node(s) after pb-post.yml completes.

  1. (Only deployments with more than one Elasticsearch node) Bootstrap Elasticsearch cluster. This allows the IC to address more than one Elasticsearch nodes as data nodes.

    Warning

    This purges data from all Elasticsearch nodes.

    1. Set Elasticsearch multi-node configuration: pb-elasticsearch_fix_ic_config_multinode.yml

      ansible-playbook --tags=all,logstash -i inventories/<inventory_file.yml> pb-elasticsearch_fix_ic_config_multinode.yml
      
    2. Remove the data directory on Elasticsearch nodes: pb-elasticsearch_destroy_cluster.yml

      ansible-playbook --tags=all,logstash -i inventories/<inventory_file.yml> pb-elasticsearch_destroy_cluster.yml
      
    3. Run database migrations: pb-migrate_databases.yml

      ansible-playbook --tags=all,logstash -i inventories/<inventory_file.yml> pb-migrate_databases.yml
      
    4. Start services: pb-start_services.yml

      ansible-playbook --tags=all,logstash -i inventories/<inventory_file.yml> pb-start_services.yml
      
  2. (Only for deployments with more than one PostgreSQL nodes)

    To initialize replicas in a PostgreSQL cluster, run the PostgreSQL replication playbook:

    Danger

    This purges data from all PostgreSQL nodes set in your inventory file with the property: eiq_ic_pg_replication__node_role: replica

    1. Initialize replication: pb-pg_start_replication.yml

      ansible-playbook --tags=all,logstash -i inventories/<inventory_file.yml> pb-pg_start_replication.yml
      
    2. Then make sure all services are running: pb-start_services.yml

      ansible-playbook --tags=all,logstash -i inventories/<inventory_file.yml> pb-start_services.yml