Skip to content

punchplatform-deployer.sh

NAME

punchplatform-deployer.sh - deploy the punch platform for production.

SYNOPSIS

punchplatform-deployer.sh [OPTIONS]

DESCRIPTION

This command deploy a complete PunchPlatform instance. It relies on Ansible.

OPTIONS

The these commands are idempotent ; i.e. using them multiple times generates the same end result.

  • deploy

    • execute Ansible deployment of PunchPlatform distrib and cluster configuration on all vms of cluster. This does not start cluster (use 'start').
  • clean

    • will remove temporary deployed tools such as filebeat. Useful for support and complex investigation.
  • ssh [TARGETS] [ARGUMENTS]

    • execute ssh commands on targeted hosts. TARGETS can be one or more machines or machine groups from the ansible inventory, separated by ':'. The wildcard '*' can be used to be replaced by any string.

    • if a file wildcard or remote '$' variable must be passed to the remote host, protect it with double quotes. For example : punchplatform-deployer.sh ssh sudo rm "/tmp/*.tmp"."

    • if a double quote argument protection must be passed to the remote host, then add an additional single quote protection on the argument. For example :punchplatform-deployer.sh ssh find /tmp -name '"*.log\"'."

  • ansible [TARGETS] [ANSIBLE_MODULE] 'ARGUMENTS'

    • execute an ANSIBLE_MODULE on target hosts. TARGETS can be one or more machines or groups from the Ansible inventory separated by ':'. The wildcard '*' can be used to be replaced by any string.

    • if a file wildcard or remote '$' variable must be passed to the remote host, protect it with double quotes. For example :punchplatform-deployer.sh ansible admin-servers lineinfile 'dest=/etc/hosts regexp=127.1.1.1 state=absent'"

    • if a double quote argument protection must be passed to remote host, then add an additional single quote protection on the argument."

  • -g | generate-ansible-inventory

    • Generate a punch platform ansible inventory from the installed punchplatform.properties file and an additional json settings file punchplatform-deployment.json. If you do not work with an installed punch platform configuration directory, use the -p or -d options to specify your own files.
    • The ansible inventory is generated from a Jinja template. If you do not use other options, the default files will be the following :
      • $PUNCHPLATFORM\_CONF\_DIR/punchplatform.properties
      • $PUNCHPLATFORM\_CONF\_DIR/punchplatform-deployment.settings
      • ../inventory\_templates/punchplatform-deployment-inventory-template.j2

This action is automatically performed when executing the 'ansible' or 'deploy' options.

ENVIRONMENT

This command requires a $PUNCHPLATFORM_CONF_DIR to point to a directory with the punchplatform.properties and punchplatform-deployment.settings file. This directory must be writable.

FILES

The generated ansible inventory is located under $PUNCHPLATFORM_CONF_DIR/generated_inventory.