feat: deploy cities labeler
This commit is contained in:
1 parent
98121c0195
commit
f998954be9
7 files changed
+124
-1
No files matched your search
+48
-1
@@ -192,6 +192,41 @@
|
||||
when: pds_operator_enabled is defined and pds_operator_enabled | bool
|
||||
notify: restart operator
|
||||
|
||||
- name: Clone cities labeler repo
|
||||
git:
|
||||
repo: "{{ pds_cities_repo }}"
|
||||
dest: "{{ pds_data_dir }}/cities"
|
||||
version: "{{ pds_cities_version | default('main') }}"
|
||||
update: yes
|
||||
force: no
|
||||
when: pds_cities_enabled is defined and pds_cities_enabled | bool
|
||||
notify: restart cities
|
||||
|
||||
- name: Create cities labeler data directory
|
||||
file:
|
||||
path: "{{ pds_data_dir }}/cities/data"
|
||||
state: directory
|
||||
owner: "1000"
|
||||
group: "1000"
|
||||
mode: "0755"
|
||||
when: pds_cities_enabled is defined and pds_cities_enabled | bool
|
||||
|
||||
- name: Deploy cities labeler .env
|
||||
template:
|
||||
src: templates/cities-labeler.env.j2
|
||||
dest: "{{ pds_data_dir }}/cities/.env"
|
||||
mode: "0600"
|
||||
when: pds_cities_enabled is defined and pds_cities_enabled | bool
|
||||
notify: restart cities
|
||||
|
||||
- name: Deploy cities labeler compose
|
||||
template:
|
||||
src: templates/cities-labeler-compose.yaml.j2
|
||||
dest: "{{ pds_data_dir }}/cities/compose.yaml"
|
||||
mode: "0644"
|
||||
when: pds_cities_enabled is defined and pds_cities_enabled | bool
|
||||
notify: restart cities
|
||||
|
||||
- name: Create monitoring directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
@@ -248,7 +283,7 @@
|
||||
shell: cd {{ pds_data_dir }}/monitoring && docker compose up -d
|
||||
when: pds_telemetry_enabled is defined and pds_telemetry_enabled | bool
|
||||
|
||||
- name: Flush handlers (operator + monitoring)
|
||||
- name: Flush handlers (operator + cities + monitoring)
|
||||
meta: flush_handlers
|
||||
|
||||
- name: Operator health check
|
||||
@@ -260,6 +295,15 @@
|
||||
delay: 10
|
||||
when: pds_operator_enabled is defined and pds_operator_enabled | bool
|
||||
|
||||
- name: Cities labeler health check
|
||||
uri:
|
||||
url: "https://{{ pds_cities_hostname }}/xrpc/_health"
|
||||
method: GET
|
||||
status_code: 200
|
||||
retries: 5
|
||||
delay: 10
|
||||
when: pds_cities_enabled is defined and pds_cities_enabled | bool
|
||||
|
||||
handlers:
|
||||
- name: apply changes
|
||||
shell: cd {{ pds_data_dir }} && docker compose up -d && docker restart caddy
|
||||
@@ -269,3 +313,6 @@
|
||||
|
||||
- name: restart operator
|
||||
shell: cd {{ pds_data_dir }}/operator && docker compose up -d --build
|
||||
|
||||
- name: restart cities
|
||||
shell: cd {{ pds_data_dir }}/cities && docker compose up -d --build
|
||||
Reference in new issue
Block a user