From 03df263190e1629d3cd87dae372cdf76b1aaef25 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Sat, 14 Jun 2025 17:30:06 +0530 Subject: [PATCH] Update steps to update webapp deployer --- docs/update-deployments.md | 59 +++++++++++---------------------- docs/update-service-provider.md | 4 +-- 2 files changed, 22 insertions(+), 41 deletions(-) diff --git a/docs/update-deployments.md b/docs/update-deployments.md index 4673c4c..b311efe 100644 --- a/docs/update-deployments.md +++ b/docs/update-deployments.md @@ -143,50 +143,27 @@ Instructions to reset / update the deployments ## Webapp Deployer -* Fetch latest stack repos: +* Deployment dir: `/srv/service-provider/webapp-deployer` and `/srv/service-provider/webapp-ui` + +* Set deployment directory in a variable: ```bash - # In directory where webapp-deployer deployment was created - laconic-so --stack webapp-deployer-backend setup-repositories --pull - - # Confirm latest commit hash in the ~/cerc/webapp-deployment-status-api repo + SP_DEPLOYMENT=/srv/service-provider/webapp-deployer + SP_UI_DEPLOYMENT=/srv/service-provider/webapp-ui ``` -* Rebuild container images if there are any changes: +* Stop the deployments: ```bash - laconic-so --stack webapp-deployer-backend build-containers --force-rebuild + laconic-so deployment --dir $SP_DEPLOYMENT stop + laconic-so deployment --dir $SP_UI_DEPLOYMENT stop ``` -* Push stack images to the container registry: +* Update the laconic registry config with new endpoints: - * Login to the container registry: - - ```bash - # Set required variables - CONTAINER_REGISTRY_URL=container-registry.apps.vaasl.io - # For credentials: "cat /srv/service-provider/webapp-deployer/config.env | grep IMAGE_REGISTRY" - CONTAINER_REGISTRY_USERNAME= - CONTAINER_REGISTRY_PASSWORD= - - # login to container registry - docker login $CONTAINER_REGISTRY_URL --username $CONTAINER_REGISTRY_USERNAME --password $CONTAINER_REGISTRY_PASSWORD - - # WARNING! Using --password via the CLI is insecure. Use --password-stdin. - # WARNING! Your password will be stored unencrypted in /home/dev2/.docker/config.json. - # Configure a credential helper to remove this warning. See - # https://docs.docker.com/engine/reference/commandline/login/#credential-stores - - # Login Succeeded - ``` - - * Push images: - - ```bash - laconic-so deployment --dir webapp-deployer push-images - ``` - -* Update deployer laconic registry config (`webapp-deployer/data/config/laconic.yml`) with new endpoints: + ```bash + nano $SP_DEPLOYMENT/data/config/laconic.yml + ``` ```bash services: @@ -206,7 +183,7 @@ Instructions to reset / update the deployments * Start the webapp deployer: ```bash - laconic-so deployment --dir webapp-deployer start + laconic-so deployment --dir $SP_DEPLOYMENT start ``` * Get the webapp-deployer pod id: @@ -247,7 +224,11 @@ Instructions to reset / update the deployments kubectl logs -f $POD_ID -c cerc-webapp-auction-handler ``` -* Update deployer UI config (`webapp-ui/config.env`): +* Update deployer UI config: + + ```bash + nano $SP_UI_DEPLOYMENT/config.env + ``` ```bash # URL of the laconic console @@ -257,13 +238,13 @@ Instructions to reset / update the deployments * Start the webapp UI: ```bash - laconic-so deployment --dir webapp-ui start + laconic-so deployment --dir $SP_UI_DEPLOYMENT start ``` * Check logs ```bash - laconic-so deployment --dir webapp-ui logs webapp + laconic-so deployment --dir $SP_UI_DEPLOYMENT logs webapp ``` ## Deploy Backend diff --git a/docs/update-service-provider.md b/docs/update-service-provider.md index 7edc4da..72bbb23 100644 --- a/docs/update-service-provider.md +++ b/docs/update-service-provider.md @@ -153,7 +153,7 @@ A Laconic mainnet node (see [run-validator.md](./run-validator.md)) kubectl logs -f $POD_ID -c cerc-webapp-auction-handler ``` -* Update deployer UI config (`webapp-ui/config.env`): +* Update deployer UI config (`webapp-ui/config.env`) if required: ```bash # URL of the webapp deployer backend API @@ -161,7 +161,7 @@ A Laconic mainnet node (see [run-validator.md](./run-validator.md)) LACONIC_HOSTED_CONFIG_app_api_url= # URL of the laconic console - # eg: https://console-mainnet.laconic.com + # eg: https://console-mainnet.laconic.com/console?... LACONIC_HOSTED_CONFIG_app_console_link= ```