Part of https://www.notion.so/Create-stacks-for-mainnet-1f2a6b22d4728034be4be2c51decf94e Co-authored-by: Shreerang Kale <shreerangkale@gmail.com> Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com> Reviewed-on: #18 Co-authored-by: shreerang <shreerang@noreply.git.vdb.to> Co-committed-by: shreerang <shreerang@noreply.git.vdb.to>
4.5 KiB
Update Service Provider
Prerequisites
A Laconic mainnet node (see run-validator.md)
Stop services
-
Stop laconic-console deployment:
# In directory where laconic-console deployment was created laconic-so deployment --dir laconic-console-deployment stop
-
Stop webapp deployer:
# 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
-
Update the console config (
laconic-console-deployment/config.env
) if required:# CLI configuration # laconicd RPC endpoint (can be pointed to your node) CERC_LACONICD_RPC_ENDPOINT=https://laconicd-mainnet.laconic.com # laconicd GQL endpoint (can be pointed to your node) CERC_LACONICD_GQL_ENDPOINT=https://laconicd-mainnet.laconic.com/api CERC_LACONICD_CHAIN_ID=laconic-mainnet # Console configuration # Laconicd (hosted) GQL endpoint (can be pointed to your node) LACONIC_HOSTED_ENDPOINT=https://laconicd-mainnet.laconic.com
- Update any other config values as required
-
Start the deployment:
laconic-so deployment --dir laconic-console-deployment start
-
Use the cli service for any registry CLI operations:
# Example laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry status"
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:
# 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:
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: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
andbondId
can be used since they are carried over from SAPO testnet to mainnet -
Update deployer config (
webapp-deployer/config.env
) if required:# 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:
laconic-so deployment --dir webapp-deployer start
-
Get the webapp-deployer pod id:
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:
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:
# 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
):# 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:
laconic-so deployment --dir webapp-ui start
-
Check logs
laconic-so deployment --dir webapp-ui logs webapp