Skip to content

Commit

Permalink
⬆️ Update Huly
Browse files Browse the repository at this point in the history
  • Loading branch information
anarion80 committed Nov 14, 2024
1 parent 14e5246 commit 196f9b8
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 8 deletions.
10 changes: 10 additions & 0 deletions roles/huly/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ huly_hostname: "huly"
huly_account_hostname: "huly-account"
huly_collaborator_hostname: "huly-collaborator"
huly_transactor_hostname: "huly-transactor"
huly_rekoni_hostname: "huly-rekoni"
huly_network_name: "huly"

# specs
huly_mongo_memory: 1g
huly_minio_memory: 1g
huly_elastic_memory: 1g
huly_account_memory: 1g
huly_workspace_memory: 1g
huly_front_memory: 1g
huly_collaborator_memory: 1g
huly_transactor_memory: 1g
Expand All @@ -49,6 +51,10 @@ huly_account_container_name: huly-account
huly_account_image_name: "hardcoreeng/account"
huly_account_image_version: "latest"

huly_workspace_container_name: huly-workspace
huly_workspace_image_name: "hardcoreeng/workspace"
huly_workspace_image_version: "latest"

huly_front_container_name: huly-front
huly_front_image_name: "hardcoreeng/front"
huly_front_image_version: "latest"
Expand Down Expand Up @@ -89,6 +95,7 @@ huly_front_url: "https://{{ huly_hostname }}.{{ ansible_nas_domain }}"
huly_init_workspace: "demo-tracker"
huly_model_enabled: "*"
huly_accounts_url: "https://{{ huly_account_hostname }}.{{ ansible_nas_domain }}"
huly_accounts_port: "3000"

huly_front_server_port: "8080"
huly_front_server_secret: secret
Expand All @@ -113,3 +120,6 @@ huly_transactor_metrics_console: "false"
huly_transactor_metrics_file: "metrics.txt"
huly_transactor_server_provider: ws
huly_transactor_elastic_index_name: local_storage_index
huly_storage_config: "minio|{{ huly_minio_endpoint }}?accessKey={{ huly_minio_access_key }}&secretKey={{ huly_minio_secret_key }}"
huly_notify_inbox_only: "true"
huly_fulltext_url: "http://{{ huly_server_address }}:8089" # TODO: to be updated
57 changes: 49 additions & 8 deletions roles/huly/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
MONGO_URL: "{{ huly_mongo_url }}"
DB_URL: "{{ huly_mongo_url }}"
TRANSACTOR_URL: "{{ huly_transactor_url }}"
STORAGE_CONFIG: "{{ huly_storage_config }}"
ENDPOINT_URL: "{{ huly_endpoint_url }}"
MINIO_ENDPOINT: "{{ huly_minio_endpoint }}"
MINIO_ACCESS_KEY: "{{ huly_minio_access_key }}"
Expand All @@ -123,6 +124,7 @@
INIT_WORKSPACE: "{{ huly_init_workspace }}"
MODEL_ENABLED: "{{ huly_model_enabled }}"
ACCOUNTS_URL: "{{ huly_accounts_url }}"
ACCOUNTS_PORT: "{{ huly_accounts_port }}"
labels:
traefik.enable: "{{ huly_available_externally | string }}"
traefik.http.routers.huly-account.rule: "Host(`{{ huly_account_hostname }}.{{ ansible_nas_domain }}`)"
Expand All @@ -133,6 +135,36 @@
restart_policy: always
memory: "{{ huly_account_memory }}"

- name: Create Huly Workspace Container
community.docker.docker_container:
container_default_behavior: no_defaults
name: "{{ huly_workspace_container_name }}"
image: "{{ huly_workspace_image_name }}:{{ huly_workspace_image_version }}"
pull: true
networks:
- name: "{{ huly_network_name }}"
network_mode: "{{ huly_network_name }}"
env:
SERVER_PORT: "{{ huly_account_server_port }}"
SERVER_SECRET: "{{ huly_account_server_secret }}"
MONGO_URL: "{{ huly_mongo_url }}"
DB_URL: "{{ huly_mongo_url }}"
TRANSACTOR_URL: "{{ huly_transactor_url }}"
STORAGE_CONFIG: "{{ huly_storage_config }}"
ENDPOINT_URL: "{{ huly_endpoint_url }}"
MINIO_ENDPOINT: "{{ huly_minio_endpoint }}"
MINIO_ACCESS_KEY: "{{ huly_minio_access_key }}"
MINIO_SECRET_KEY: "{{ huly_minio_secret_key }}"
FRONT_URL: "{{ huly_front_url }}"
INIT_WORKSPACE: "{{ huly_init_workspace }}"
MODEL_ENABLED: "{{ huly_model_enabled }}"
ACCOUNTS_URL: "{{ huly_accounts_url }}"
NOTIFY_INBOX_ONLY: "{{ huly_notify_inbox_only }}"
labels:
traefik.enable: "false"
restart_policy: always
memory: "{{ huly_workspace_memory }}"

- name: Create Huly Front Container
community.docker.docker_container:
container_default_behavior: no_defaults
Expand All @@ -158,6 +190,7 @@
TRANSACTOR_URL: "{{ huly_transactor_url }}"
ELASTIC_URL: "{{ huly_elastic_url }}"
MONGO_URL: "{{ huly_mongo_url }}"
STORAGE_CONFIG: "{{ huly_storage_config }}"
COLLABORATOR_URL: "{{ huly_collaborator_url }}"
COLLABORATOR_API_URL: "{{ huly_collaborator_api_url }}"
MINIO_ENDPOINT: "{{ huly_minio_endpoint }}"
Expand Down Expand Up @@ -194,6 +227,7 @@
SECRET: "{{ huly_collaborator_server_secret }}"
ACCOUNTS_URL: "{{ huly_accounts_url }}"
TRANSACTOR_URL: "{{ huly_transactor_url }}"
STORAGE_CONFIG: "{{ huly_storage_config }}"
UPLOAD_URL: "{{ huly_upload_url }}"
MONGO_URL: "{{ huly_mongo_url }}"
MINIO_ENDPOINT: "{{ huly_minio_endpoint }}"
Expand Down Expand Up @@ -227,20 +261,22 @@
SERVER_SECRET: "{{ huly_transactor_server_secret }}"
SERVER_CURSOR_MAXTIMEMS: "{{ huly_transactor_cursor_maxtimesms }}"
ELASTIC_URL: "{{ huly_elastic_url }}"
MONGO_URL: "{{ huly_mongo_url }}"
ELASTIC_INDEX_NAME: "{{ huly_transactor_elastic_index_name }}"
DB_URL: "{{ huly_mongo_url }}"
MONGO_URL: "{{ huly_mongo_url }}"
METRICS_CONSOLE: "{{ huly_transactor_metrics_console }}"
METRICS_FILE: "{{ huly_transactor_metrics_file }}"
MINIO_ENDPOINT: "{{ huly_minio_endpoint }}"
MINIO_ACCESS_KEY: "{{ huly_minio_access_key }}"
MINIO_SECRET_KEY: "{{ huly_minio_secret_key }}"
STORAGE_CONFIG: "{{ huly_storage_config }}"
REKONI_URL: "{{ huly_rekoni_url }}"
FRONT_URL: "{{ huly_front_url }}"
SERVER_PROVIDER: "{{ huly_transactor_server_provider }}"
ACCOUNTS_URL: "{{ huly_accounts_url }}"
LAST_NAME_FIRST: "{{ huly_last_name_first }}"
ELASTIC_INDEX_NAME: "{{ huly_transactor_elastic_index_name }}"
UPLOAD_URL: "{{ huly_upload_url }}"
FULLTEXT_URL: "{{ huly_fulltext_url }}"
# MINIO_ENDPOINT: "{{ huly_minio_endpoint }}"
# MINIO_ACCESS_KEY: "{{ huly_minio_access_key }}"
# MINIO_SECRET_KEY: "{{ huly_minio_secret_key }}"
# SERVER_PROVIDER: "{{ huly_transactor_server_provider }}"
# UPLOAD_URL: "{{ huly_upload_url }}"
labels:
traefik.enable: "{{ huly_available_externally | string }}"
traefik.http.routers.huly-transactor.rule: "Host(`{{ huly_transactor_hostname }}.{{ ansible_nas_domain }}`)"
Expand All @@ -265,7 +301,12 @@
restart_policy: unless-stopped
memory: "{{ huly_rekoni_memory }}"
labels:
traefik.enable: "false"
traefik.enable: "{{ huly_available_externally | string }}"
traefik.http.routers.huly-rekoni.rule: "Host(`{{ huly_rekoni_hostname }}.{{ ansible_nas_domain }}`) && PathPrefix(`/rekoni`)"
traefik.http.routers.huly-rekoni.tls.certresolver: "letsencrypt"
traefik.http.routers.huly-rekoni.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.huly-rekoni.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.huly-rekoni.loadbalancer.server.port: "4004"
when: huly_enabled is true

- name: Stop Huly
Expand Down

0 comments on commit 196f9b8

Please sign in to comment.