Add instructions for deployment ops #19
@ -21,20 +21,20 @@
|
|||||||
|
|
||||||
* Target dir: `/srv/laconicd/stage0-deployment`
|
* Target dir: `/srv/laconicd/stage0-deployment`
|
||||||
|
|
||||||
* Cleanup an existing deployment if required:
|
* Cleanup an existing deployment if required:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /srv/laconicd
|
cd /srv/laconicd
|
||||||
|
|
||||||
# Stop the deployment
|
# Stop the deployment
|
||||||
laconic-so deployment --dir stage0-deployment stop --delete-volumes
|
laconic-so deployment --dir stage0-deployment stop --delete-volumes
|
||||||
|
|
||||||
# Remove the deployment dir
|
# Remove the deployment dir
|
||||||
sudo rm -rf stage0-deployment
|
sudo rm -rf stage0-deployment
|
||||||
|
|
||||||
# Remove the existing spec file
|
# Remove the existing spec file
|
||||||
rm stage0-spec.yml
|
rm stage0-spec.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
|
|
||||||
@ -146,20 +146,20 @@
|
|||||||
|
|
||||||
* Target dir: `/srv/app/onboarding-app-deployment`
|
* Target dir: `/srv/app/onboarding-app-deployment`
|
||||||
|
|
||||||
* Cleanup an existing deployment if required:
|
* Cleanup an existing deployment if required:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /srv/app
|
cd /srv/app
|
||||||
|
|
||||||
# Stop the deployment
|
# Stop the deployment
|
||||||
laconic-so deployment --dir onboarding-app-deployment
|
laconic-so deployment --dir onboarding-app-deployment
|
||||||
|
|
||||||
# Remove the deployment dir
|
# Remove the deployment dir
|
||||||
sudo rm -rf onboarding-app-deployment
|
sudo rm -rf onboarding-app-deployment
|
||||||
|
|
||||||
# Remove the existing spec file
|
# Remove the existing spec file
|
||||||
rm onboarding-app-spec.yml
|
rm onboarding-app-spec.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
|
|
||||||
@ -260,20 +260,20 @@
|
|||||||
|
|
||||||
* Target dir: `/srv/wallet/laconic-wallet-web-deployment`
|
* Target dir: `/srv/wallet/laconic-wallet-web-deployment`
|
||||||
|
|
||||||
* Cleanup an existing deployment if required:
|
* Cleanup an existing deployment if required:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /srv/wallet
|
cd /srv/wallet
|
||||||
|
|
||||||
# Stop the deployment
|
# Stop the deployment
|
||||||
laconic-so deployment --dir laconic-wallet-web-deployment
|
laconic-so deployment --dir laconic-wallet-web-deployment
|
||||||
|
|
||||||
# Remove the deployment dir
|
# Remove the deployment dir
|
||||||
sudo rm -rf laconic-wallet-web-deployment
|
sudo rm -rf laconic-wallet-web-deployment
|
||||||
|
|
||||||
# Remove the existing spec file
|
# Remove the existing spec file
|
||||||
rm laconic-wallet-web-spec.yml
|
rm laconic-wallet-web-spec.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
|
|
||||||
@ -359,20 +359,20 @@
|
|||||||
|
|
||||||
* Target dir: `/srv/laconicd/stage1-deployment`
|
* Target dir: `/srv/laconicd/stage1-deployment`
|
||||||
|
|
||||||
* Cleanup an existing deployment if required:
|
* Cleanup an existing deployment if required:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /srv/laconicd
|
cd /srv/laconicd
|
||||||
|
|
||||||
# Stop the deployment
|
# Stop the deployment
|
||||||
laconic-so deployment --dir stage1-deployment stop --delete-volumes
|
laconic-so deployment --dir stage1-deployment stop --delete-volumes
|
||||||
|
|
||||||
# Remove the deployment dir
|
# Remove the deployment dir
|
||||||
sudo rm -rf stage1-deployment
|
sudo rm -rf stage1-deployment
|
||||||
|
|
||||||
# Remove the existing spec file
|
# Remove the existing spec file
|
||||||
rm stage1-spec.yml
|
rm stage1-spec.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
|
|
||||||
@ -437,20 +437,20 @@
|
|||||||
|
|
||||||
* Target dir: `/srv/faucet/laconic-faucet-deployment`
|
* Target dir: `/srv/faucet/laconic-faucet-deployment`
|
||||||
|
|
||||||
* Cleanup an existing deployment if required:
|
* Cleanup an existing deployment if required:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /srv/faucet
|
cd /srv/faucet
|
||||||
|
|
||||||
# Stop the deployment
|
# Stop the deployment
|
||||||
laconic-so deployment --dir laconic-faucet-deployment stop
|
laconic-so deployment --dir laconic-faucet-deployment stop
|
||||||
|
|
||||||
# Remove the deployment dir
|
# Remove the deployment dir
|
||||||
sudo rm -rf laconic-faucet-deployment
|
sudo rm -rf laconic-faucet-deployment
|
||||||
|
|
||||||
# Remove the existing spec file
|
# Remove the existing spec file
|
||||||
rm laconic-faucet-spec.yml
|
rm laconic-faucet-spec.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
|
|
||||||
@ -561,20 +561,20 @@
|
|||||||
|
|
||||||
* Target dir: `/srv/console/laconic-console-deployment`
|
* Target dir: `/srv/console/laconic-console-deployment`
|
||||||
|
|
||||||
* Cleanup an existing deployment if required:
|
* Cleanup an existing deployment if required:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /srv/console
|
cd /srv/console
|
||||||
|
|
||||||
# Stop the deployment
|
# Stop the deployment
|
||||||
laconic-so deployment --dir laconic-console-deployment stop --delete-volumes
|
laconic-so deployment --dir laconic-console-deployment stop --delete-volumes
|
||||||
|
|
||||||
# Remove the deployment dir
|
# Remove the deployment dir
|
||||||
sudo rm -rf laconic-console-deployment
|
sudo rm -rf laconic-console-deployment
|
||||||
|
|
||||||
# Remove the existing spec file
|
# Remove the existing spec file
|
||||||
rm laconic-console-spec.yml
|
rm laconic-console-spec.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
|
|
||||||
|
72
ops/update-deployments.md
Normal file
72
ops/update-deployments.md
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
# update-deployments
|
||||||
|
|
||||||
|
Instructions to reset / update the deployments
|
||||||
|
|
||||||
|
## Login
|
||||||
|
|
||||||
|
* Log in as `dev` user on the deployments VM
|
||||||
|
|
||||||
|
* All the deployments are placed in the `/srv` directory:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /srv
|
||||||
|
```
|
||||||
|
|
||||||
|
## stage0 laconicd
|
||||||
|
|
||||||
|
* Deployment dir: `/srv/laconicd/stage0-deployment`
|
||||||
|
|
||||||
|
* Fetch and build with updated source code:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# laconicd source
|
||||||
|
cd ~/cerc/laconicd
|
||||||
|
|
||||||
|
# Pull latest changes
|
||||||
|
git pull
|
||||||
|
|
||||||
|
# Confirm the latest commit hash
|
||||||
|
git log
|
||||||
|
|
||||||
|
# Rebuild the containers
|
||||||
|
cd /srv/laconicd
|
||||||
|
|
||||||
|
laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd build-containers --force-rebuild
|
||||||
|
```
|
||||||
|
|
||||||
|
* Reset the data directory:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Stop the deployment
|
||||||
|
laconic-so deployment --dir stage0-deployment stop --delete-volumes
|
||||||
|
|
||||||
|
# Remove and recreate the required data dir
|
||||||
|
sudo rm -rf stage0-deployment/data/laconicd-data
|
||||||
|
mkdir stage0-deployment/data/laconicd-data
|
||||||
|
```
|
||||||
|
|
||||||
|
* Restart the deployment:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
laconic-so deployment --dir stage0-deployment start
|
||||||
|
|
||||||
|
# Follow logs for laconicd container, check that new blocks are getting created
|
||||||
|
laconic-so deployment --dir stage0-deployment logs laconicd -f
|
||||||
|
```
|
||||||
|
|
||||||
|
* Since the stage0 laconicd chain has been reset, reset the faucet deployment with new faucet key:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /srv/faucet
|
||||||
|
|
||||||
|
export FAUCET_ACCOUNT_PK=$(laconic-so deployment --dir /srv/laconicd/stage0-deployment exec laconicd "echo y | laconicd keys export alice --keyring-backend test --unarmored-hex --unsafe")
|
||||||
|
|
||||||
|
cat <<EOF > laconic-faucet-deployment/config.env
|
||||||
|
CERC_FAUCET_KEY=$FAUCET_ACCOUNT_PK
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Restart the deployment
|
||||||
|
laconic-so deployment --dir laconic-faucet-deployment stop
|
||||||
|
|
||||||
|
laconic-so deployment --dir laconic-faucet-deployment start
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user