|
27 | 27 | ignore_errors: true |
28 | 28 |
|
29 | 29 | - name: Prepare Container for External Exporters |
30 | | - shell: > |
31 | | - sudo docker run -d -p 43100:43100 --name={{ external_container }} |
32 | | - phusion/baseimage:jammy-1.0.1 |
| 30 | + shell: | |
| 31 | + docker run -d \ |
| 32 | + -p 43100:43100 \ |
| 33 | + --name={{ external_container }} \ |
| 34 | + --network=pmm-qa \ |
| 35 | + phusion/baseimage:noble-1.0.2 |
33 | 36 |
|
34 | 37 | - name: Copy all required Artifacts to the docker external_container |
35 | 38 | shell: "{{ item }}" |
36 | 39 | with_items: |
37 | 40 | - docker cp ./external_setup.sh {{ external_container }}:/ |
38 | | - - docker cp ./pmm3-client-setup.sh {{ external_container }}:/ |
39 | 41 | - docker exec {{ external_container }} apt-get update |
40 | 42 | - docker exec {{ external_container }} apt-get -y install wget curl git gnupg2 lsb-release |
41 | 43 |
|
42 | 44 | - name: Run Redis Container in Host |
43 | | - shell: "{{ item }}" |
44 | | - with_items: |
45 | | - - docker run --name redis_container -d -p 6379:6379 redis '--requirepass oFukiBRg7GujAJXq3tmd' |
46 | | - - docker network connect pmm-qa redis_container |
| 45 | + shell: | |
| 46 | + docker run -d \ |
| 47 | + --name=redis_container \ |
| 48 | + --network=pmm-qa \ |
| 49 | + -p 6379:6379 \ |
| 50 | + redis '--requirepass oFukiBRg7GujAJXq3tmd' |
47 | 51 |
|
48 | 52 | - name: Setup External Exporters for monitoring |
49 | 53 | shell: "{{ item }}" |
50 | 54 | with_items: |
51 | 55 | - docker exec {{ external_container }} bash -x ./external_setup.sh > setup_external.log |
52 | 56 |
|
53 | | - - name: Install pmm2-client on the external_container |
54 | | - shell: "{{ item }}" |
55 | | - with_items: |
56 | | - - docker network connect pmm-qa {{ external_container }} |
57 | | - - docker exec {{ external_container }} bash -x ./pmm3-client-setup.sh --pmm_server_ip {{ pmm_server_ip }} --client_version {{ client_version }} --admin_password {{ admin_password }} --use_metrics_mode no |
| 57 | + - name: Install PMM Client inside of container |
| 58 | + include_tasks: ./tasks/install_pmm_client.yml |
| 59 | + vars: |
| 60 | + container_name: "{{ external_container }}" |
58 | 61 |
|
59 | 62 | - name: Execute Setup script inside the External container for Redis |
60 | 63 | shell: "{{ item }}" |
|
91 | 94 | - name: Add Redis for Monitoring to PMM via pmm-admin add external command |
92 | 95 | shell: "{{ item }}" |
93 | 96 | with_items: |
94 | | - - docker exec {{ external_container }} bash -c 'source ~/.bash_profile || true; pmm-admin list' |
95 | | - - docker exec {{ external_container }} bash -c 'source ~/.bash_profile || true; pmm-admin add external --listen-port=42200 --group="redis" --service-name=redis_external_service_{{ random_number }}' |
| 97 | + - docker exec {{ external_container }} pmm-admin list |
| 98 | + - docker exec {{ external_container }} pmm-admin add external --listen-port=42200 --group="redis" --service-name=redis_external_service_{{ random_number }} |
96 | 99 |
|
97 | 100 | - name: Add Node Process for Monitoring to PMM via pmm-admin add external command |
98 | 101 | shell: "{{ item }}" |
99 | 102 | with_items: |
100 | | - - docker exec {{ external_container }} bash -c 'source ~/.bash_profile || true; pmm-admin list' |
101 | | - - docker exec {{ external_container }} bash -c 'source ~/.bash_profile || true; pmm-admin add external --group=processes --listen-port=9256 --service-name=nodeprocess_service_{{ random_number }}' |
| 103 | + - docker exec {{ external_container }} pmm-admin list |
| 104 | + - docker exec {{ external_container }} pmm-admin add external --group=processes --listen-port=9256 --service-name=nodeprocess_service_{{ random_number }} |
0 commit comments