From 6d529c9c05c48da15ce00561efcd08e26bcb1ac9 Mon Sep 17 00:00:00 2001 From: Adw8 Date: Tue, 22 Oct 2024 17:17:53 +0530 Subject: [PATCH] Remove unneeded variables --- service-provider-setup/README.md | 41 +++++++++---------- service-provider-setup/setup-k8s.yml | 4 +- service-provider-setup/templates/k8s.yml.j2 | 2 +- .../vars/dns-vars.example.yml | 2 +- .../vars/k8s-vars.example.yml | 1 - .../vars/webapp-vars.example.yml | 8 ++-- 6 files changed, 27 insertions(+), 31 deletions(-) diff --git a/service-provider-setup/README.md b/service-provider-setup/README.md index 95b6a70..4ba9d89 100644 --- a/service-provider-setup/README.md +++ b/service-provider-setup/README.md @@ -33,39 +33,36 @@ ```bash # vars/dns-vars.yml - full_domain: "" # eg: laconic.com - subdomain_prefix: "" # eg: lcn-cad - service_provider_ip: "" # eg: 23.111.78.179 - do_api_token: "" # DigitalOcean access token that you generated, eg: dop_v1... + full_domain: "" # eg: laconic.com + service_provider_ip: "" # eg: 23.111.78.179 + do_api_token: "" # DigitalOcean access token that you generated, eg: dop_v1... # vars/gpg-vars.yml - gpg_user_name: "" # full name of the user for the GPG key - gpg_user_email: "" # email address associated with the GPG key - gpg_passphrase: "" # passphrase for securing the GPG key + gpg_user_name: "" # full name of the user for the GPG key + gpg_user_email: "" # email address associated with the GPG key + gpg_passphrase: "" # passphrase for securing the GPG key # vars/k8s-vars.yml - target_host: "deployment_host" - org_id: "" # eg: lcn - location_id: "" # eg: cad - base_domain: "" # eg: laconic - support_email: "" # eg: support@laconic.com + org_id: "" # eg: lcn + location_id: "" # eg: cad + support_email: "" # eg: support@laconic.com # vars/container-vars.yml - container_registry_username: "" # username to login to the container registry - container_registry_password: "" # password to login to the container registry + container_registry_username: "" # username to login to the container registry + container_registry_password: "" # password to login to the container registry # vars/laconicd-vars.yml chain_id: "" # chain id to use for the Laconic chain # vars/webapp-vars.yml - authority_name: "" # eg: my-org-name - cpu_reservation: "" # minimum number of cpu cores to be used, eg: 2 - memory_reservation: "" # minimum amount of memory in GB to be used, eg: 4G - cpu_limit: "" # maximum number of cpu cores to be used, eg: 6 - memory_limit: "" # maximum amount of memory in GB to be used, eg: 8G - deployer_gpg_passphrase: "" # passphrase for creating GPG key used by webapp-deployer, eg: SECRET - handle_auction_requests: "" # whether the webapp deployer should handle deployment auction requests, eg: true - auction_bid_amount: "" # bid amount for deployment auctions in alnt, eg: 500000 + authority_name: "" # eg: laconic-authority + cpu_reservation: "1" # minimum number of cpu cores to be used, eg: 2 + memory_reservation: "2G" # minimum amount of memory in GB to be used, eg: 4G + cpu_limit: "6" # maximum number of cpu cores to be used, eg: 6 + memory_limit: "8G" # maximum amount of memory in GB to be used, eg: 8G + deployer_gpg_passphrase: "" # passphrase for creating GPG key used by webapp-deployer, eg: SECRET + handle_auction_requests: "true" # whether the webapp deployer should handle deployment auction requests, eg: true + auction_bid_amount: "100000" # bid amount for deployment auctions in alnt, eg: 500000 ``` - Update the [`hosts.ini`](./hosts.ini) file: diff --git a/service-provider-setup/setup-k8s.yml b/service-provider-setup/setup-k8s.yml index bb46a95..bc77ea2 100644 --- a/service-provider-setup/setup-k8s.yml +++ b/service-provider-setup/setup-k8s.yml @@ -124,10 +124,10 @@ src: ./templates/k8s.yml.j2 dest: "{{ ansible_env.HOME }}/service-provider-template/group_vars/{{ org_id }}_{{ location_id }}/k8s.yml" - - name: Copy wildcard-pwa-{{ base_domain }}.yaml to the remote VM + - name: Copy wildcard template to the remote VM template: src: ./templates/wildcard-pwa-example.yml.j2 - dest: "{{ ansible_env.HOME }}/service-provider-template/files/manifests/wildcard-pwa-{{ base_domain }}.yaml" + dest: "{{ ansible_env.HOME }}/service-provider-template/files/manifests/wildcard-pwa-{{ full_domain | replace('.', '-') }}.yaml" - name: Delete old wildcard-pwa file file: diff --git a/service-provider-setup/templates/k8s.yml.j2 b/service-provider-setup/templates/k8s.yml.j2 index e6c35f7..33c4688 100644 --- a/service-provider-setup/templates/k8s.yml.j2 +++ b/service-provider-setup/templates/k8s.yml.j2 @@ -52,4 +52,4 @@ k8s_manifests: # initiate wildcard cert - name: pwa.{{ full_domain }} type: file - source: wildcard-pwa-{{ base_domain }}.yaml + source: wildcard-pwa-{{ full_domain | replace('.', '-') }}.yaml diff --git a/service-provider-setup/vars/dns-vars.example.yml b/service-provider-setup/vars/dns-vars.example.yml index 3d2e67f..03639e6 100644 --- a/service-provider-setup/vars/dns-vars.example.yml +++ b/service-provider-setup/vars/dns-vars.example.yml @@ -1,5 +1,5 @@ full_domain: "" -subdomain_prefix: "" +subdomain_prefix: "{{ org_id }}-{{ location_id }}" subdomain_cluster_control: "{{ subdomain_prefix }}-cluster-control" service_provider_ip: "" do_api_token: "" diff --git a/service-provider-setup/vars/k8s-vars.example.yml b/service-provider-setup/vars/k8s-vars.example.yml index 78e06d6..54e3a0a 100644 --- a/service-provider-setup/vars/k8s-vars.example.yml +++ b/service-provider-setup/vars/k8s-vars.example.yml @@ -2,6 +2,5 @@ gpg_key_id: "{{ sec_key_id }}" vault_passphrase: "{{ gpg_passphrase }}" org_id: "" location_id: "" -base_domain: "" support_email: "" ansible_ssh_extra_args: '-o StrictHostKeyChecking=no' diff --git a/service-provider-setup/vars/webapp-vars.example.yml b/service-provider-setup/vars/webapp-vars.example.yml index cf050d3..45e856d 100644 --- a/service-provider-setup/vars/webapp-vars.example.yml +++ b/service-provider-setup/vars/webapp-vars.example.yml @@ -1,10 +1,10 @@ ALICE_PK: "{{ ALICE_PK }}" BOND_ID: "{{ BOND_ID }}" authority_name: "" -cpu_reservation: "" -memory_reservation: "" +cpu_reservation: "1" +memory_reservation: "2G" cpu_limit: "6" memory_limit: "8G" deployer_gpg_passphrase: "" -handle_auction_requests: "false" -auction_bid_amount: "0" +handle_auction_requests: "true" +auction_bid_amount: "100000"