Skip to content

Commit

Permalink
PMM-12692 comment out redundant steps
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff committed Dec 6, 2023
1 parent 754f196 commit 7831a4b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 30 deletions.
2 changes: 1 addition & 1 deletion build/docker/server/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if [ ! -f $DIST_FILE ]; then
echo "Generating self-signed certificates for nginx"
bash /var/lib/cloud/scripts/per-boot/generate-ssl-certificate
echo "Initializing Postgres"
/usr/pgsql-14/bin/initdb -D /srv/postgres14
/usr/pgsql-14/bin/initdb -D /srv/postgres14 --auth=trust --username=postgres --pwfile=<(echo -n)
echo "Enable pg_stat_statements extension"
/usr/pgsql-14/bin/pg_ctl start -D /srv/postgres14 -o "-c logging_collector=off"
/usr/bin/psql postgres postgres -c 'CREATE EXTENSION pg_stat_statements SCHEMA public'
Expand Down
23 changes: 7 additions & 16 deletions update/ansible/playbook/tasks/roles/initialization/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,6 @@
changed_when: True
when: lookup('env','PMM_TEST_HA_BOOTSTRAP') != '' and not pmm_current_version is version(pmm_image_version, '>=')

- name: Create a working directory for Alertmanager
file:
path: /srv/alertmanager/data
state: directory
owner: pmm
group: pmm

- name: Create a working directory for VictoriaMetrics
file:
path: /srv/victoriametrics/data
Expand All @@ -140,15 +133,13 @@
remote_src: yes
when: not pmm_current_version is version(pmm_image_version, '>=')

- name: Finalization
block:
- name: Wait for PMM to be ready
ansible.builtin.uri:
url: "http://127.0.0.1:7772/v1/readyz"
status_code: 200
method: GET
retries: 120
delay: 1
- name: Wait for PMM to be ready
ansible.builtin.uri:
url: "http://127.0.0.1:7772/v1/readyz"
status_code: 200
method: GET
retries: 120
delay: 1
# We use current_version_file['failed'] because we don't want to run this on creating container
when: docker_upgrade

Expand Down
22 changes: 9 additions & 13 deletions update/ansible/playbook/tasks/roles/postgres/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
- name: Create pmm-managed database
postgresql_db:
name: pmm-managed
login_user: pmm
# login_user: pmm
state: present

- name: Create pmm-managed user
Expand All @@ -102,18 +102,14 @@
become_user: pmm
become_method: su

- name: Reread supervisord configuration
command: /usr/local/bin/supervisorctl reread
become: true

- name: Restart Postgres
command: /usr/local/bin/supervisorctl {{ item }} postgresql
changed_when: True
become: true
loop:
- stop
- remove
- add
# - name: Restart Postgres
# command: /usr/local/bin/supervisorctl {{ item }} postgresql
# changed_when: True
# become: true
# loop:
# - stop
# - remove
# - add

# - name: Run pmm-managed again
# supervisorctl:
Expand Down

0 comments on commit 7831a4b

Please sign in to comment.