-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add ansible playbook to install agent on multiple nodes at once
- Loading branch information
Showing
4 changed files
with
40 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
# apm-agent | ||
## Platforms tested | ||
- ubuntu 18 lts | ||
- ubuntu 16 lts | ||
- centos 7 | ||
|
||
## apm-agent installer | ||
|
||
1) download install.sh | ||
2) execute **chmod +x install.sh** to give executable permision | ||
3) run install.sh as root to install td-agent-bit and sfagent | ||
|
||
## Platforms tested | ||
- ubuntu 18 lts | ||
- ubuntu 16 lts | ||
- centos 7 | ||
## using ansible playbook | ||
1) make sure targets nodes have python installed on them. | ||
2) ansible playbook uses install.sh internally | ||
3) install ansible using **pip install -r requirements.txt** | ||
4) update hosts file, sample can be found in hosts.sample | ||
5) execute command **ansible-playbook -vv -b -i hosts --key-file=ssh-key.pem playbook.yaml** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[all] | ||
centos ansible_host=10.81.1.220 ansible_ssh_user=centos | ||
ubuntu ansible_host=10.81.1.143 ansible_ssh_user=ubuntu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
- name: install sfagent | ||
become: yes | ||
hosts: all | ||
tasks: | ||
- name: Transfer install.sh script | ||
copy: src=install.sh dest=/tmp/install.sh mode=0777 | ||
|
||
- name: Execute install.sh | ||
command: /tmp/install.sh | ||
|
||
# by default install.sh donot start sfagent uncomment below lines to start agent | ||
# - name: start sfagent | ||
# service: | ||
# name: sfagent | ||
# state: started | ||
# enabled: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
ansible==2.9.5 | ||
cffi==1.14.0 | ||
cryptography==2.8 | ||
Jinja2==2.11.1 | ||
MarkupSafe==1.1.1 | ||
pycparser==2.19 | ||
PyYAML==5.3 | ||
six==1.14.0 |