Updated Wallet Server Snapshot Create Deploy Revert (markdown)
parent
7cf010e08f
commit
0001ba7262
1 changed files with 84 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
# Snapshot Create/Deploy/Revert
|
||||||
|
|
||||||
**To make a new snapshot:**
|
**To make a new snapshot:**
|
||||||
|
|
||||||
1. turn the wallet server being cloned off with `docker-compose down`
|
1. turn the wallet server being cloned off with `docker-compose down`
|
||||||
|
@ -25,4 +27,85 @@
|
||||||
4. move the prepared snapshot into place `sudo mv volume_backup /var/lib/docker/volumes/${USER}_wallet_server/_data`
|
4. move the prepared snapshot into place `sudo mv volume_backup /var/lib/docker/volumes/${USER}_wallet_server/_data`
|
||||||
5. double check the permissions on the resulting voiume: `sudo ls -lah /var/lib/docker/volumes/${USER}_wallet_server/` you should see `_data` owned by `netdata:netdata` like before
|
5. double check the permissions on the resulting voiume: `sudo ls -lah /var/lib/docker/volumes/${USER}_wallet_server/` you should see `_data` owned by `netdata:netdata` like before
|
||||||
6. start the wallet server `docker-compose up -d`
|
6. start the wallet server `docker-compose up -d`
|
||||||
7. watch the log tail until it starts successfully, indicated by ips showing in the logs as users connect `docker-compose logs -f --tail 100`
|
7. watch the log tail until it starts successfully, indicated by ips showing in the logs as users connect `docker-compose logs -f --tail 100`
|
||||||
|
|
||||||
|
# Swap wallet server to use systemd instead of docker for lbrycrd
|
||||||
|
|
||||||
|
1. Stop the containers: `docker-compose down`
|
||||||
|
2. Copy the lbrycrd volume contents out of docker:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo cp -r /var/lib/docker/volumes/lbry_lbrycrd/_data .
|
||||||
|
sudo chown -R lbry _data
|
||||||
|
sudo chgrp -R lbry _data
|
||||||
|
mv _data ~/.lbrycrd
|
||||||
|
docker volume rm lbry_lbrycrd
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Install lbrycrd to the expected location:
|
||||||
|
|
||||||
|
```
|
||||||
|
wget https://github.com/lbryio/lbrycrd/releases/download/v0.17.3.2/lbrycrd-linux-1732.zip
|
||||||
|
unzip -o lbrycrd-linux-1732.zip
|
||||||
|
sudo mkdir -p /opt/lbry
|
||||||
|
sudo mv lbrycrdd /opt/lbry
|
||||||
|
sudo mv lbrycrd-cli /opt/lbry
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Create the lbrycrd config file `nano ~/.lbrycrd/lbrycrd.conf`
|
||||||
|
|
||||||
|
```
|
||||||
|
txindex=1
|
||||||
|
server=1
|
||||||
|
daemon=1
|
||||||
|
rpcuser=lbry
|
||||||
|
rpcpassword=lbry
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Create the service file `sudo nano /etc/systemd/system/lbrycrd.service`
|
||||||
|
|
||||||
|
```
|
||||||
|
[Unit]
|
||||||
|
Description="LBRYcrd daemon"
|
||||||
|
After=network.target
|
||||||
|
[Service]
|
||||||
|
Environment="HOME=/home/lbry"
|
||||||
|
ExecStart=/opt/lbry/lbrycrdd
|
||||||
|
User=lbry
|
||||||
|
Group=lbry
|
||||||
|
Restart=on-failure
|
||||||
|
KillMode=process
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Enable and start the lbrycrd service
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo systemctl enable lbrycrd
|
||||||
|
sudo systemctl start lbrycrd
|
||||||
|
```
|
||||||
|
|
||||||
|
7. Replace `docker-compose.yml` with
|
||||||
|
|
||||||
|
```
|
||||||
|
version: "3"
|
||||||
|
volumes:
|
||||||
|
wallet_server:
|
||||||
|
services:
|
||||||
|
wallet_server:
|
||||||
|
network_mode: host
|
||||||
|
image: lbry/wallet-server:${WALLET_SERVER_TAG:-latest-release}
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "2112:2112" # prometheus
|
||||||
|
- "50001:50001" # rpc port
|
||||||
|
- "50005:50005" # websocket port
|
||||||
|
volumes:
|
||||||
|
- "wallet_server:/database"
|
||||||
|
env_file: [/home/lbry/wallet-server-env]
|
||||||
|
environment:
|
||||||
|
- DAEMON_URL=http://lbry:lbry@127.0.0.1:9245
|
||||||
|
```
|
||||||
|
|
||||||
|
8. Start the wallet server `docker-compose up -d`
|
Loading…
Reference in a new issue