Add steps to migrate service provider deployment
This commit is contained in:
parent
164da2a8d2
commit
8cdcf8148d
10
README.md
10
README.md
@ -4,12 +4,18 @@
|
||||
|
||||
- It allows you to export SAPO testnet state and start mainnet nodes
|
||||
|
||||
## Mainnet OPS
|
||||
|
||||
- To launch Laconic mainnet, follow these steps:
|
||||
|
||||
- **Run the First Validator Node:** Begin by setting up and running the initial validator node as detailed in [run-first-validator.md](docs/run-first-validator.md)
|
||||
|
||||
- **Deploy Cosmos Multisig App:** Integrate and run the Cosmos Multisig app using the playbook available at [cosmos-multisig-app playbook](./playbooks/cosmos-multisig-app/README.md)
|
||||
|
||||
- **Run Subsequent Validator Nodes:** Run subsequent validator nodes by following the instructions in [run-validator.md](docs/run-validator.md)
|
||||
|
||||
- To migrate existing deployments from SAPO testnet to mainnet, refer to [update-deployments.md](docs/update-deployments.md)
|
||||
|
||||
## Join Mainnet
|
||||
|
||||
- **Run A Validator Node:** Follow steps in [run-validator.md](docs/run-validator.md) to run a mainnet validator node
|
||||
|
||||
- **Update Service Provider:** Follow steps in [update-service-provider.md](docs/update-service-provider.md) to migrate your service provider from SAPO testnet to mainnet
|
||||
|
||||
184
docs/update-service-provider.md
Normal file
184
docs/update-service-provider.md
Normal file
@ -0,0 +1,184 @@
|
||||
# Update Service Provider
|
||||
|
||||
## Prerequisites
|
||||
|
||||
A Laconic mainnet node (see [run-validator.md](./run-validator.md))
|
||||
|
||||
## Stop services
|
||||
|
||||
* Stop a laconic-console deployment:
|
||||
|
||||
```bash
|
||||
# In directory where laconic-console deployment was created
|
||||
laconic-so deployment --dir laconic-console-deployment stop --delete-volumes
|
||||
```
|
||||
|
||||
* Stop webapp deployer:
|
||||
|
||||
```bash
|
||||
# In directory where webapp-deployer deployment was created
|
||||
laconic-so deployment --dir webapp-deployer stop
|
||||
laconic-so deployment --dir webapp-ui stop
|
||||
```
|
||||
|
||||
## Update laconic console
|
||||
|
||||
* Remove an existing console deployment:
|
||||
|
||||
```bash
|
||||
# In directory where laconic-console deployment was created
|
||||
# Backup the config if required
|
||||
rm -rf laconic-console-deployment
|
||||
```
|
||||
|
||||
* Follow [laconic-console](stack-orchestrator/stacks/laconic-console/README.md) stack instructions to setup a new laconic-console deployment
|
||||
|
||||
* Example configuration:
|
||||
|
||||
```bash
|
||||
# CLI configuration
|
||||
|
||||
# laconicd RPC endpoint (can be pointed to your node)
|
||||
CERC_LACONICD_RPC_ENDPOINT=https://laconicd-sapo.laconic.com
|
||||
|
||||
# laconicd GQL endpoint (can be pointed to your node)
|
||||
CERC_LACONICD_GQL_ENDPOINT=https://laconicd-sapo.laconic.com/api
|
||||
|
||||
CERC_LACONICD_CHAIN_ID=laconic-testnet-2
|
||||
|
||||
# your private key
|
||||
CERC_LACONICD_USER_KEY=
|
||||
|
||||
# your bond id (optional)
|
||||
CERC_LACONICD_BOND_ID=
|
||||
|
||||
# Gas price to use for txs (default: 0.001alnt)
|
||||
# Use for auto fees calculation, gas and fees not required to be set in that case
|
||||
# Reference: https://git.vdb.to/cerc-io/laconic-registry-cli#gas-and-fees
|
||||
CERC_LACONICD_GASPRICE=
|
||||
|
||||
# Console configuration
|
||||
|
||||
# Laconicd (hosted) GQL endpoint (can be pointed to your node)
|
||||
LACONIC_HOSTED_ENDPOINT=https://laconicd-sapo.laconic.com
|
||||
```
|
||||
|
||||
## Check authority and deployer record
|
||||
|
||||
* The state has been carried over from SAPO testnet to the mainnet, if you had authority and records on the SAPO testnet, they should be present on mainnet as well
|
||||
|
||||
* Check authority:
|
||||
|
||||
```bash
|
||||
# In directory where laconic-console deployment was created
|
||||
AUTHORITY=<your-authority>
|
||||
laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry authority whois $AUTHORITY"
|
||||
```
|
||||
|
||||
* Check deployer record:
|
||||
|
||||
```bash
|
||||
PAYMENT_ADDRESS=<your-deployers-payment-address>
|
||||
laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry record list --all --type WebappDeployer --paymentAddress $PAYMENT_ADDRESS"
|
||||
```
|
||||
|
||||
## Update webapp deployer
|
||||
|
||||
* Update deployer laconic registry config (`webapp-deployer/data/config/laconic.yml`) with new endpoints:
|
||||
|
||||
```bash
|
||||
services:
|
||||
registry:
|
||||
rpcEndpoint: "<your-mainnet-rpc-endpoint>" # Eg. https://laconicd-mainnet.laconic.com
|
||||
gqlEndpoint: "<your-mainnet-gql-endpoint>" # Eg. https://laconicd-mainnet.laconic.com/api
|
||||
userKey: "<userKey>"
|
||||
bondId: "<bondId"
|
||||
chainId: laconic-mainnet
|
||||
gasPrice: 0.001alnt
|
||||
```
|
||||
|
||||
Note: Existing `userKey` and `bondId` can be used since they are carried over from SAPO testnet to mainnet
|
||||
|
||||
* Update deployer config (`webapp-deployer/config.env`) if required:
|
||||
|
||||
```bash
|
||||
# Update the deployer LRN if it has changed
|
||||
export LRN=
|
||||
|
||||
# Min payment to require for performing deployments
|
||||
export MIN_REQUIRED_PAYMENT=9500
|
||||
|
||||
# Handle deployment auction requests
|
||||
export HANDLE_AUCTION_REQUESTS=true
|
||||
|
||||
# Amount that the deployer will bid on deployment auctions
|
||||
export AUCTION_BID_AMOUNT=9500
|
||||
```
|
||||
|
||||
* Start the webapp deployer:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir webapp-deployer start
|
||||
```
|
||||
|
||||
* Get the webapp-deployer pod id:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir webapp-deployer ps
|
||||
|
||||
# Expected output
|
||||
# Running containers:
|
||||
# id: default/laconic-096fed46af974a47-deployment-644db859c7-snbq6, name: laconic-096fed46af974a47-deployment-644db859c7-snbq6, ports: 10.42.2.11:9555->9555
|
||||
|
||||
# Set pod id
|
||||
export POD_ID=
|
||||
|
||||
# Example:
|
||||
# export POD_ID=laconic-096fed46af974a47-deployment-644db859c7-snbq6
|
||||
```
|
||||
|
||||
* Copy over GPG keys files to the webapp-deployer container:
|
||||
|
||||
```bash
|
||||
kubie ctx default
|
||||
|
||||
# Copy the GPG key files to the pod
|
||||
kubectl cp <path-to-your-gpg-private-key> $POD_ID:/app
|
||||
kubectl cp <path-to-your-gpg-public-key> $POD_ID:/app
|
||||
|
||||
# Required everytime you stop and start the deployer
|
||||
```
|
||||
|
||||
* Check logs:
|
||||
|
||||
```bash
|
||||
# Deployer
|
||||
kubectl logs -f $POD_ID
|
||||
|
||||
# Deployer auction handler
|
||||
kubectl logs -f $POD_ID -c cerc-webapp-auction-handler
|
||||
```
|
||||
|
||||
* Update deployer UI config (`webapp-ui/config.env`):
|
||||
|
||||
```bash
|
||||
# URL of the webapp deployer backend API
|
||||
# eg: https://webapp-deployer-api.pwa.laconic.com
|
||||
LACONIC_HOSTED_CONFIG_app_api_url=
|
||||
|
||||
# URL of the laconic console
|
||||
# eg: https://console-mainnet.laconic.com
|
||||
LACONIC_HOSTED_CONFIG_app_console_link=
|
||||
```
|
||||
|
||||
* Start the webapp UI:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir webapp-ui start
|
||||
```
|
||||
|
||||
* Check logs
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir webapp-ui logs webapp
|
||||
```
|
||||
Loading…
Reference in New Issue
Block a user