Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,6 @@ venv.bak/
**/*.drawio.bkp
**/*.drawio.dtmp


tmp/
.claude-flow
.swarm
tmp
2 changes: 1 addition & 1 deletion ansible/files/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ services:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-airflow}
POSTGRES_DB: ${POSTGRES_DB:-airflow}
volumes:
- /opt/postgresql/data:/var/lib/postgresql/data
- /opt/airflow-postgresql/data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "airflow"]
interval: 10s
Expand Down
73 changes: 41 additions & 32 deletions ansible/playbooks/deploy-airflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,41 +27,50 @@
- name: Apply sysctl settings
command: sysctl --system

- name: Add Docker GPG key
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
#- name: Create keyrings directory
# file:
# path: /etc/apt/keyrings
# state: directory
# mode: '0755'

#- name: Add Docker GPG key
# get_url:
# url: https://download.docker.com/linux/ubuntu/gpg
# dest: /etc/apt/keyrings/docker.asc
# mode: '0644'
# force: true

#- name: Add Docker repository
# apt_repository:
# repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu {{ ansible_facts['distribution_release'] }} stable"
# state: present
# filename: docker

- name: Add Docker repository
apt_repository:
repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
state: present
#- name: Install Docker and Docker Compose
# apt:
# name:
# - docker-ce
# - docker-ce-cli
# - containerd.io
# - docker-buildx-plugin
# - docker-compose-plugin
# state: present
# update_cache: yes

- name: Install Docker and Docker Compose
apt:
name:
- docker-ce
- docker-ce-cli
- containerd.io
- docker-buildx-plugin
- docker-compose-plugin
state: present
update_cache: yes
#- name: Start and enable Docker service
# systemd:
# name: docker
# state: started
# enabled: yes

- name: Start and enable Docker service
systemd:
name: docker
state: started
enabled: yes

- name: Add user to docker group
user:
name: "{{ ansible_user }}"
groups: docker
append: yes
#- name: Add user to docker group
# user:
# name: "{{ ansible_user }}"
# groups: docker
# append: yes

- name: Reset SSH connection to activate docker group
meta: reset_connection
#- name: Reset SSH connection to activate docker group
# meta: reset_connection

- name: Create airflow OS group
ansible.builtin.group:
Expand All @@ -79,7 +88,7 @@

- name: Create PostgreSQL data directory
file:
path: /opt/postgresql/data
path: /opt/airflow-postgresql/data
state: directory
owner: 999
group: 999
Expand Down