Skip to content

Commit

Permalink
✨ Add Baserow (#164)
Browse files Browse the repository at this point in the history
* ✨ Add Baserow

* 🚨 Fix lint
  • Loading branch information
anarion80 authored Jun 5, 2024
1 parent 84f75b3 commit 5048fe1
Show file tree
Hide file tree
Showing 12 changed files with 842 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ If you have a spare domain name you can configure applications to be accessible
* [Authelia](https://www.authelia.com/) - The Single Sign-On Multi-Factor portal for web apps
* [Authentik](https://goauthentik.io/) - an open-source Identity Provider focused on flexibility and versatility
* [Barcode Buddy](https://github.com/Forceu/barcodebuddy/) - Barcode system for Grocy
* [Baserow](https://gitlab.com/baserow/baserow) - an open source no-code database and Airtable alternative
* [Bazarr](https://github.com/morpheus65535/bazarr) - companion to Radarr and Sonarr for downloading subtitles
* [Beets](https://beets.io/) - media library management system for obsessive music geeks
* [Blaze](https://github.com/blenderskool/blaze) - File sharing progressive web app
Expand Down
4 changes: 4 additions & 0 deletions nas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@
tags:
- barcodebuddy

- role: baserow
tags:
- baserow

- role: bazarr
tags:
- bazarr
Expand Down
368 changes: 368 additions & 0 deletions roles/baserow/defaults/main.yml

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions roles/baserow/docs/baserow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Baserow

Homepage: [https://gitlab.com/baserow/baserow](https://gitlab.com/baserow/baserow)

Baserow is an open source no-code database and Airtable alternative. Create your own database without technical experience. Our user friendly no-code tool gives you the powers of a developer without leaving your browser.

## Usage

Set `baserow_enabled: true` in your `inventories/<your_inventory>/group_vars/nas.yml` file.

Baserow web interface can be found at [http://ansible_nas_host_or_ip:8156](http://ansible_nas_host_or_ip:8156).
16 changes: 16 additions & 0 deletions roles/baserow/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
platforms:
- name: instance
image: geerlingguy/docker-ubuntu2204-ansible:latest
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /var/run/docker.sock:/var/run/docker.sock
- /tmp:/tmp:rw
privileged: true
pre_build_image: true
provisioner:
inventory:
group_vars:
all:
baserow_enabled: true
baserow_data_directory: /tmp
10 changes: 10 additions & 0 deletions roles/baserow/molecule/default/side_effect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
- name: Stop
hosts: all
become: true
tasks:
- name: "Include {{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }} role"
ansible.builtin.include_role:
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
vars:
baserow_enabled: false
68 changes: 68 additions & 0 deletions roles/baserow/molecule/default/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Include vars
ansible.builtin.include_vars:
file: ../../defaults/main.yml

- name: Get baserow caddy container state
community.docker.docker_container:
name: "{{ baserow_caddy_container_name }}"
register: result_caddy

- name: Get baserow db container state
community.docker.docker_container:
name: "{{ baserow_db_container_name }}"
register: result_db

- name: Get baserow redis container state
community.docker.docker_container:
name: "{{ baserow_redis_container_name }}"
register: result_redis

- name: Get baserow backend container state
community.docker.docker_container:
name: "{{ baserow_backend_container_name }}"
register: result_backend

- name: Get baserow frontend container state
community.docker.docker_container:
name: "{{ baserow_frontend_container_name }}"
register: result_frontend

- name: Get baserow celery container state
community.docker.docker_container:
name: "{{ baserow_celery_container_name }}"
register: result_celery

- name: Get baserow celery export container state
community.docker.docker_container:
name: "{{ baserow_celery_export_container_name }}"
register: result_celery_export

- name: Get baserow celery beat container state
community.docker.docker_container:
name: "{{ baserow_celery_beat_container_name }}"
register: result_celery_beat

- name: Check if baserow containers are running
ansible.builtin.assert:
that:
- result_caddy.container['State']['Status'] == "running"
- result_caddy.container['State']['Restarting'] == false
- result_db.container['State']['Status'] == "running"
- result_db.container['State']['Restarting'] == false
- result_redis.container['State']['Status'] == "running"
- result_redis.container['State']['Restarting'] == false
- result_backend.container['State']['Status'] == "running"
- result_backend.container['State']['Restarting'] == false
- result_frontend.container['State']['Status'] == "running"
- result_frontend.container['State']['Restarting'] == false
- result_celery.container['State']['Status'] == "running"
- result_celery.container['State']['Restarting'] == false
- result_celery_export.container['State']['Status'] == "running"
- result_celery_export.container['State']['Restarting'] == false
- result_celery_beat.container['State']['Status'] == "running"
- result_celery_beat.container['State']['Restarting'] == false
68 changes: 68 additions & 0 deletions roles/baserow/molecule/default/verify_stopped.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Include vars
ansible.builtin.include_vars:
file: ../../defaults/main.yml

- name: Try and stop and remove baserow celery beat
community.docker.docker_container:
name: "{{ baserow_celery_beat_container_name }}"
state: absent
register: result_celery_beat

- name: Try and stop and remove baserow celery export
community.docker.docker_container:
name: "{{ baserow_celery_export_container_name }}"
state: absent
register: result_celery_export

- name: Try and stop and remove baserow celery
community.docker.docker_container:
name: "{{ baserow_celery_container_name }}"
state: absent
register: result_celery

- name: Try and stop and remove baserow frontend
community.docker.docker_container:
name: "{{ baserow_frontend_container_name }}"
state: absent
register: result_frontend

- name: Try and stop and remove baserow backend
community.docker.docker_container:
name: "{{ baserow_backend_container_name }}"
state: absent
register: result_backend

- name: Try and stop and remove baserow caddy
community.docker.docker_container:
name: "{{ baserow_caddy_container_name }}"
state: absent
register: result_caddy

- name: Try and stop and remove baserow redis
community.docker.docker_container:
name: "{{ baserow_redis_container_name }}"
state: absent
register: result_redis

- name: Try and stop and remove baserow db
community.docker.docker_container:
name: "{{ baserow_db_container_name }}"
state: absent
register: result_db

- name: Check if baserow is stopped
ansible.builtin.assert:
that:
- not result_celery_beat.changed
- not result_celery_export.changed
- not result_celery.changed
- not result_frontend.changed
- not result_backend.changed
- not result_caddy.changed
- not result_redis.changed
- not result_db.changed
1 change: 1 addition & 0 deletions roles/baserow/requirements.yml
Loading

0 comments on commit 5048fe1

Please sign in to comment.