This Ansible collection downloads and installs AppDynamics Agent Installer, which:
- Deploys Java and Machine Agents on Linux
- Automatically instruments applications
- Assigns unique names to tiers and nodes
Ansible collection supports the following deployment patterns:
- Download the agent installer directly to target hosts (remote)
- Download the agent installer to Ansible controller and distribute it across target hosts (local)
- AppDynamics SaaS controller only. For more details please refer to agent installer docs
- Ansible 2.9 and above
unzip
andcurl
must be installed on target hosts
- In order to download agent installer using Agent installer API, it is required to use API client on SaaS controller.
When creating API client:
- Keep
Roles
tab empty, as it is not required to assign any Roles for Agent installer API access - Keep token expiration short, default (5m) is good enough.
- Install collection
from ansible-galaxy:
ansible-galaxy collection install appdynamics.agent_installer
or from source:
git clone https://github.com/CiscoDevNet/appdynamics-ansible-agent-installer.git
./install_collection.sh
- Create sample playbook
- name: Appdynamics agent installer
hosts: all
vars_files:
- agent_installer_vars.yaml
roles:
- name: appdynamics.agent_installer.agent_installer
and sample vars file agent_installer_vars.yaml (it's to user to choose how to load variables of course)
agent_installer_download_mode: local
agent_installer_client_id: api_user@mycompany
agent_installer_client_secret: <secret>
agent_installer_controller_url: https://mycompany.saas.appdynamics.com
agent_installer_access_key: <your controller access key>
agent_installer_account_name: mycompany
agent_installer_application_name: zfi-ansible-sample-app
Now you are ready to deploy AppDynamics agent intaller!
Here is the list of variables you can define to adjust agent installer deployment:
Variables related to agents download:
Variable | Description | Default |
---|---|---|
agent_installer_client_id |
(required) Client ID | |
agent_installer_client_secret |
(required) Client secret | |
agent_installer_controller_url |
(required) Controller URL, i.e. https://mycompany.saas.appdynamics.com | |
agent_installer_download_mode |
Set to 'local' to download archives via Ansible controller host and 'remote' for direct download by target hosts | local |
agent_installer_temp_local_dir |
Temporary directory to store agents archives on Ansible controller (only for agent_installer_download_mode=local) | /tmp/appdynamics-agent-installer |
agent_installer_stage_dir_prefix |
Temporary directory to store agents archives on target hosts | /tmp/appdynamics-agent-installer-stage |
agent_installer_api_prefix |
API prefix | /zero |
agent_installer_java_version |
Java agent version to download | latest |
agent_installer_machine_version |
Machine agent version to download | latest |
agent_installer_infra_version |
Infra agent version to download | latest |
agent_installer_zero_version |
Agent installer version to download | latest |
agent_installer_install_java |
Set to 'false' to skip java agent installation | true |
agent_installer_install_machine |
Set to 'false' to skip machine agent installation | true |
agent_installer_install_infra |
Set to 'false' to skip infra agent installation. Defaults to false | false |
agent_installer_force |
Set to true to force download even if archives with the same download command are present | false |
Variables related to agents installation:
For human readable outputs, running this role with stdout callback = yaml is recommended in favor of default json:
export ANSIBLE_STDOUT_CALLBACK=yaml
or permanently by setting stdout_callback=yaml in the [default] section of ansible.cfg
[default]
stdout_callback = yaml