Update steps to update webapp deployer

This commit is contained in:
Prathamesh Musale 2025-06-14 17:30:06 +05:30
parent e4e5c6acae
commit 03df263190
2 changed files with 22 additions and 41 deletions

View File

@ -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

View File

@ -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=
```