Add steps to setup webapp-ui
This commit is contained in:
parent
4afb79c9ed
commit
ea368e888b
@ -1,12 +1,12 @@
|
|||||||
## Set up a new service provider
|
## Set up a new service provider
|
||||||
|
|
||||||
Follow [these steps](https://git.vdb.to/cerc-io/testnet-ops/src/branch/main/service-provider-setup#service-provider-setup) to setup the following services (your setup will look similar to the example below):
|
Follow steps from <https://git.vdb.to/cerc-io/testnet-ops/src/branch/main/service-provider-setup#service-provider-setup> to setup a service provider. After setup, the following services will be running (your configuration will look similar to the examples listed below):
|
||||||
|
|
||||||
* laconicd chain RPC endpoint: http://lcn-daemon.laconic.com:26657
|
* laconicd chain RPC endpoint: http://lcn-daemon.laconic.com:26657
|
||||||
* laconicd GQL endpoint: http://lcn-daemon.laconic.com:9473/api
|
* laconicd GQL endpoint: http://lcn-daemon.laconic.com:9473/api
|
||||||
* laconic console: http://lcn-console.laconic.com:8080/registry
|
* laconic console: http://lcn-console.laconic.com:8080/registry
|
||||||
* webapp deployer API: https://webapp-deployer-api.pwa.laconic.com
|
* webapp deployer API: https://webapp-deployer-api.pwa.laconic.com
|
||||||
* webapp deployer UI: https://webapp-deployer-ui.pwa.laconic.com
|
* webapp deployer UI: https://webapp-deployer-ui.pwa.laconic.com
|
||||||
|
|
||||||
|
|
||||||
## Update webapp deployer after code changes
|
## Update webapp deployer after code changes
|
||||||
@ -184,10 +184,11 @@ Follow the steps given below to connect the webapp-deployer to testnet2
|
|||||||
|
|
||||||
### Update laconic console config
|
### Update laconic console config
|
||||||
|
|
||||||
* Stop webapp deployer backend
|
* Stop webapp deployer
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
laconic-so deployment --dir webapp-deployer stop
|
laconic-so deployment --dir webapp-deployer stop
|
||||||
|
laconic-so deployment --dir webapp-ui stop
|
||||||
```
|
```
|
||||||
|
|
||||||
* Stop laconic-console and fixturenet-laconicd deployment
|
* Stop laconic-console and fixturenet-laconicd deployment
|
||||||
@ -206,17 +207,20 @@ Follow the steps given below to connect the webapp-deployer to testnet2
|
|||||||
# This will be updated later
|
# This will be updated later
|
||||||
CERC_LACONICD_BOND_ID=
|
CERC_LACONICD_BOND_ID=
|
||||||
|
|
||||||
# RPC endpoint of the chain
|
# RPC endpoint of the chain, can be pointed to your validator node
|
||||||
CERC_LACONICD_RPC_ENDPOINT=https://laconicd-sapo.laconic.com
|
# eg: http://console-testnet2.laconic.com
|
||||||
|
CERC_LACONICD_RPC_ENDPOINT=
|
||||||
|
|
||||||
# GQL endpoint of the chain
|
# GQL endpoint of the chain, can be pointed to your validator node
|
||||||
CERC_LACONICD_GQL_ENDPOINT=https://laconicd-sapo.laconic.com/api
|
# eg: https://laconicd-sapo.laconic.com/api
|
||||||
|
CERC_LACONICD_GQL_ENDPOINT=
|
||||||
|
|
||||||
# laconicd chain id
|
# laconicd chain id
|
||||||
CERC_LACONICD_CHAIN_ID=laconic_9000-2
|
CERC_LACONICD_CHAIN_ID=laconic_9000-2
|
||||||
|
|
||||||
# Endpoint for the console
|
# Endpoint for the console
|
||||||
LACONIC_HOSTED_ENDPOINT=https://console-sapo.laconic.com
|
# eg: https://laconic-console.example.com
|
||||||
|
LACONIC_HOSTED_ENDPOINT=
|
||||||
```
|
```
|
||||||
|
|
||||||
* Start the `laconic-console-deployment`
|
* Start the `laconic-console-deployment`
|
||||||
@ -319,10 +323,10 @@ Follow the steps given below to connect the webapp-deployer to testnet2
|
|||||||
services:
|
services:
|
||||||
registry:
|
registry:
|
||||||
# laconicd RPC endpoint
|
# laconicd RPC endpoint
|
||||||
rpcEndpoint: 'https://laconicd-sapo.laconic.com'
|
rpcEndpoint:
|
||||||
|
|
||||||
# laconicd GQL endpoint
|
# laconicd GQL endpoint
|
||||||
gqlEndpoint: 'https://laconicd-sapo.laconic.com/api'
|
gqlEndpoint:
|
||||||
|
|
||||||
# Key to your funded account
|
# Key to your funded account
|
||||||
userKey:
|
userKey:
|
||||||
@ -336,16 +340,46 @@ Follow the steps given below to connect the webapp-deployer to testnet2
|
|||||||
fees: 500000alnt
|
fees: 500000alnt
|
||||||
```
|
```
|
||||||
|
|
||||||
* Publish the webapp deployer record using the publish-deployer-to-registry command
|
* Publish the webapp deployer record on the chain
|
||||||
|
|
||||||
```bash
|
* Set the following variables
|
||||||
laconic-so publish-deployer-to-registry \
|
|
||||||
--laconic-config webapp-deployer/data/config/laconic.yml \
|
```bash
|
||||||
--api-url <api-url-for-your-deployer>
|
# Path to the webapp-deployer directory, e.g., /home/dev..
|
||||||
--public-key-file <path-to-your-gpg-pub-key> \
|
DEPLOYER_DIR=
|
||||||
--lrn <lrn-for-your-deployer> \
|
# API URL of the webapp-deployer
|
||||||
--min-required-payment 0
|
API_URL=
|
||||||
```
|
# LRN (logical resource name) of the webapp-deployer
|
||||||
|
DEPLOYER_LRN=
|
||||||
|
# Name of the GPG public key file
|
||||||
|
GPG_PUB_KEY_FILE=
|
||||||
|
# Path of the GPG public key file
|
||||||
|
GPG_PUB_KEY_FILE_PATH=
|
||||||
|
```
|
||||||
|
|
||||||
|
* Copy the GPG pub key file used while setting up the webapp-deployer to the `webapp-deployer/data/config` directory. This ensures the Docker container has access to the key during the publish process.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cp $GPG_PUB_KEY_FILE_PATH webapp-deployer/data/config
|
||||||
|
```
|
||||||
|
|
||||||
|
* Publish the deployer record
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -i -t \
|
||||||
|
-v $DEPLOYER_DIR/data/config:/home/root/config \
|
||||||
|
cerc/webapp-deployer-backend:local laconic-so publish-deployer-to-registry \
|
||||||
|
--laconic-config /home/root/config/laconic.yml \
|
||||||
|
--api-url $API_URL \
|
||||||
|
--public-key-file /home/root/config/$GPG_PUB_KEY_FILE \
|
||||||
|
--lrn $DEPLOYER_LRN \
|
||||||
|
--min-required-payment 0
|
||||||
|
```
|
||||||
|
|
||||||
|
<details open>
|
||||||
|
<summary>Update config for webapp deployer</summary>
|
||||||
|
|
||||||
|
### Update config for webapp deployer
|
||||||
|
|
||||||
* Update `webapp-deployer/config.env` with the authority that you reserved
|
* Update `webapp-deployer/config.env` with the authority that you reserved
|
||||||
|
|
||||||
@ -353,6 +387,15 @@ Follow the steps given below to connect the webapp-deployer to testnet2
|
|||||||
# Name of reserved authority
|
# Name of reserved authority
|
||||||
DEPLOYMENT_RECORD_NAMESPACE="<authority_name>"
|
DEPLOYMENT_RECORD_NAMESPACE="<authority_name>"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
* Update `webapp-ui/config.env` with the updated endpoints
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# api url of webapp deployer
|
||||||
|
LACONIC_HOSTED_CONFIG_app_api_url=
|
||||||
|
# url of laconic console
|
||||||
|
LACONIC_HOSTED_CONFIG_app_console_link=http://console-sapo.laconic.com
|
||||||
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details open>
|
<details open>
|
||||||
@ -360,29 +403,47 @@ Follow the steps given below to connect the webapp-deployer to testnet2
|
|||||||
|
|
||||||
### Start the deployer
|
### Start the deployer
|
||||||
|
|
||||||
* Start the webapp deployer
|
* Start the webapp deployer backend
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
laconic-so deployment --dir webapp-deployer start
|
laconic-so deployment --dir webapp-deployer start
|
||||||
```
|
```
|
||||||
|
|
||||||
* Get the most recent pod id
|
* Get the most recent pod id
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubie ctx default
|
||||||
|
kubectl get pods
|
||||||
|
```
|
||||||
|
|
||||||
|
* Copy the GPG key file to the webapp-deployer container
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Get the webapp-deployer pod id
|
||||||
|
kubectl get pods --sort-by=.metadata.creationTimestamp -o jsonpath='{.items[-1].metadata.name}'
|
||||||
|
# laconic-ac473c31db9ac9fd-deployment-674bf7bf9f-529bs
|
||||||
|
|
||||||
|
# Copy the GPG key files to the pod
|
||||||
|
kubectl cp <path-to-your-gpg-private-key> laconic-ac473c31db9ac9fd-deployment-674bf7bf9f-529bs:/app
|
||||||
|
kubectl cp <path-to-your-gpg-public-key> laconic-ac473c31db9ac9fd-deployment-674bf7bf9f-529bs:/app
|
||||||
|
```
|
||||||
|
|
||||||
|
* Check logs
|
||||||
|
|
||||||
|
```bash
|
||||||
|
laconic-so deployment --dir webapp-deployer logs cerc-webapp-deployer
|
||||||
|
```
|
||||||
|
|
||||||
|
* Start the webapp deployer ui
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubie ctx default
|
laconic-so deployment --dir webapp-ui start
|
||||||
kubectl get pods
|
|
||||||
```
|
```
|
||||||
|
|
||||||
* Copy the GPG key file to the webapp-deployer container
|
* Check logs
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Get the webapp-deployer pod id
|
laconic-so deployment --dir webapp-ui logs webapp
|
||||||
kubectl get pods --sort-by=.metadata.creationTimestamp -o jsonpath='{.items[-1].metadata.name}'
|
```
|
||||||
# laconic-ac473c31db9ac9fd-deployment-674bf7bf9f-529bs
|
|
||||||
|
|
||||||
# Copy the GPG key files to the pod
|
|
||||||
kubectl cp <path-to-your-gpg-private-key> laconic-ac473c31db9ac9fd-deployment-674bf7bf9f-529bs:/app
|
|
||||||
kubectl cp <path-to-your-gpg-public-key> laconic-ac473c31db9ac9fd-deployment-674bf7bf9f-529bs:/app
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
Loading…
Reference in New Issue
Block a user