Skip to content

Commit d069dea

Browse files
authored
Merge pull request #81 from wiseflat/dev/build/docker-buildx
Configure docker buildx and more
2 parents 9417856 + c4f0c70 commit d069dea

29 files changed

Lines changed: 811 additions & 164 deletions

ansible/playbooks/paas/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,14 @@
5858
- unattended-upgrades
5959
- ansible-ufw
6060

61+
- name: Configure sshd
62+
ansible.builtin.import_playbook: sshd.yml
6163
- name: Configure timesyncd
6264
ansible.builtin.import_playbook: timesyncd.yml
6365
- name: Configure systemd resolved
6466
ansible.builtin.import_playbook: systemd-resolved.yml
67+
- name: Configure nvidia
68+
ansible.builtin.import_playbook: nvidia.yml
6569
- name: Configure docker
6670
ansible.builtin.import_playbook: docker.yml
6771
- name: Configure nomad

ansible/playbooks/paas/metrology.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
gather_facts: true
66
become: true
77
tasks:
8-
- name: End the play for hosts that are not in admins group
9-
ansible.builtin.meta: end_host
10-
when: fact_instance.location != 'admins'
8+
# - name: End the play for hosts that are not in admins group
9+
# ansible.builtin.meta: end_host
10+
# when: fact_instance.location != 'admins'
1111

1212
- name: Install prometheus
1313
ansible.builtin.import_role:
File renamed without changes.

ansible/playbooks/paas/nvidia.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818

1919
pre_tasks:
2020

21+
- name: End the play for hosts that don't have nvidia gpu
22+
ansible.builtin.meta: end_host
23+
when: not nvidia_enable
24+
2125
- name: Créer le répertoire du keyring s'il n'existe pas
2226
ansible.builtin.file:
2327
path: "{{ nvidia_keyring_path | dirname }}"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
- name: Uninstall scan_exporter
2+
- name: Install scan_exporter
33
any_errors_fatal: true
44
hosts: "{{ hosts_limit | default('infrastructure') }}"
55
gather_facts: true
66
become: true
77
pre_tasks:
8-
- name: Uninstall scan_exporter
8+
- name: Install scan_exporter
99
ansible.builtin.include_role:
1010
name: scan_exporter

ansible/playbooks/paas/sshd.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@
44
hosts: "{{ hosts_limit | default('infrastructure') }}"
55
gather_facts: true
66
become: true
7+
pre_tasks:
8+
- name: End the play for hosts that are not in frontends group
9+
ansible.builtin.meta: end_host
10+
when: fact_instance.location != 'frontends'
711
roles:
812
- sshd

ansible/playbooks/paas/timesyncd.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727

2828
- name: Use RTC in UTC
2929
ansible.builtin.command: timedatectl set-local-rtc 0
30+
register: timedatectl
31+
changed_when: false
3032

3133
handlers:
3234
- name: Restart timesyncd

ansible/playbooks/saas/image-forkable.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@
9393
failed_when: ui_update.status != 200
9494
become: false
9595

96+
post_tasks:
97+
- name: Trigger cleanup on failure
98+
ansible.builtin.meta: clear_host_errors
99+
when: ansible_failed_result is defined
100+
notify: Cleanup build directory
101+
96102
handlers:
97103
- name: Cleanup build directory
98104
ansible.builtin.file:
99105
path: "{{ build_work_dir }}"
100106
state: absent
101107
listen: cleanup_build
102-
103-
post_tasks:
104-
- name: Trigger cleanup on failure
105-
ansible.builtin.meta: clear_host_errors
106-
when: ansible_failed_result is defined
107-
notify: Cleanup build directory

ansible/playbooks/saas/image.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,16 @@
4545
- name: Build
4646
when: image_definition.build
4747
block:
48-
- name: Build and publish image
48+
- name: Build and publish multi-arch image
4949
community.docker.docker_image_build:
5050
name: "{{ docker_private_registry.url }}/{% if docker_private_registry.project is defined %}{{ docker_private_registry.project }}/{% endif %}{{ image_definition.name }}:{{ image_version }}"
5151
tag: latest
5252
path: "{{ build_work_dir }}"
5353
dockerfile: Dockerfile
5454
labels: "{{ image_definition.labels }}"
55+
platform:
56+
- linux/amd64
57+
- linux/arm64
5558
rebuild: always
5659
outputs:
5760
- type: image

ansible/playbooks/saas/roles/grafana/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,44 @@ www.domain.com:
1212
domain_alias: domain.com # (string) Primary domain name for the application.
1313
ipfilter: [] # (list) List of allowed IPs for access control (empty for unrestricted access).
1414
basic_auth: False # (bool) Enable/disable HTTP Basic Authentication (True/False).
15+
```
16+
17+
## variable
18+
19+
```yaml
20+
passwd: s3cret!
21+
user: myuser
22+
```
23+
24+
## Secret
25+
26+
```yaml
27+
plugins:
28+
- disabled: false
29+
jsonData:
30+
models:
31+
default: base
32+
mapping:
33+
base: gpt-oss-120b
34+
large: gpt-oss-120b
35+
openAI:
36+
apiPath: /api/openai_compat/v1
37+
url: https://llm.public.api
38+
provider: custom
39+
vector:
40+
embed:
41+
grafanaVectorAPI:
42+
authType: no-auth
43+
url: http://vectorStore.default.service.nomad:8687
44+
type: grafana/vectorapi
45+
enabled: true
46+
model: BAAI/bge-small-en-v1.5
47+
store:
48+
grafanaVectorAPI:
49+
authType: no-auth
50+
url: http://vectorStore.default.service.nomad:8687
51+
type: grafana/vectorapi
52+
secureJsonData:
53+
openAIKey: <secretkey>
54+
type: grafana-llm-app
55+
```

0 commit comments

Comments
 (0)