ansible: Add admin addons options to DigitalOcean (#529)

- if 'enable_admin_addons' is enabled, init admin logging addon and add admin node pool
This commit is contained in:
D. Lee 2023-02-02 23:00:03 -08:00 committed by GitHub
parent 10c96ed2ae
commit ba60f4e310
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 3 deletions

View File

@ -72,4 +72,22 @@ email:
password: {{ sender_password }}
reply_to_email: {{ reply_to_email }}
# Admin Addons
{% if enable_admin_addons %}
addons:
admin:
logging: true
btrix-admin-logging:
logging:
enabled: true
dedicatedNode:
enabled: true
ingress:
tls: true
host: "{{ full_domain }}"
elasticsearch:
local: false
kibana:
local: false
{% endif %}

View File

@ -3,11 +3,14 @@ project_name: "default"
main_node_size: "s-1vcpu-2gb"
crawl_node_size: "c-4"
admin_node_size: "s-4vcpu-8gb"
droplet_region: "sfo3"
enable_admin_addons: true
node_pools:
- name=main-app;size={{ main_node_size }};label=nodeType=main;count=2
- name=crawling;size={{ crawl_node_size }};label=nodeType=crawling;taint=nodeType=crawling:NoSchedule;auto-scale=true;min-nodes=1;max-nodes=3;count=1
- "{% if enable_admin_addons %}name=admin-app;size={{ admin_node_size }};label=nodeType=admin;count=1{% endif %}"
db_name: "{{ project_name }}"
k8s_name: "{{ project_name }}"
@ -38,5 +41,3 @@ smtp_host: ""
sender_email: ""
reply_to_email: ""
sender_password: ""

View File

@ -98,7 +98,7 @@
# skip_ansible_lint
ansible.builtin.command: >-
doctl kubernetes cluster create {{ k8s_name }} --1-clicks ingress-nginx,cert-manager --node-pool
"{{ node_pools|join(',') }}"
"{{ node_pools | select('match','name=*') | list |join(',') }}"
--region={{ droplet_region }}
async: 1800
@ -191,6 +191,13 @@
ansible.builtin.shell: set -o pipefail && doctl registry kubernetes-manifest | kubectl apply -f -
when: use_do_registry
# Addons
# ===========================================
- name: d_ocean | addons | run all admin bookstrap scripts
ansible.builtin.command: >-
../../chart/admin/logging/scripts/eck_install.sh
register: addons_init
when: enable_admin_addons
# Helm Output + Deploy
# ===========================================