- Update parameter files
- Temp: Update JWT secret
- Do deployment:
az deployment group create -g rg-dfx-api-{env} -f infrastructure/bicep/dfx-api.bicep -p infrastructure/bicep/parameters/{env}.json
- Loc: remove unused resources (API app service + plan, app insights)
- Connect to VM:
ssh {user}@vm-{user}-{type}-{env}.westeurope.cloudapp.azure.com
- Copy script
infrastructure/scripts/setupDocker.sh
to virtual machine~/setupDocker.sh
- Execute script:
sudo ./setupDocker.sh
- Copy script
infrastructure/scripts/setupEnv.sh
to virtual machine~/setupEnv.sh
- Execute script:
./setupEnv.sh
- Copy script
infrastructure/config/docker/docker-compose.sh
to virtual machine~/docker-compose.sh
- Copy file
infrastructure/config/docker/docker-compose-bitcoin.yml
to virtual machine~/docker-compose-bitcoin.yml
- Copy file
infrastructure/config/docker/docker-compose-monero.yml
to virtual machine~/docker-compose-monero.yml
- Copy file
infrastructure/config/docker/docker-compose-frankencoin.yml
to virtual machine~/docker-compose-frankencoin.yml
- Execute Docker Compose (see below) after all other setup steps are done:
- Copy content of config file
infrastructure/config/btc/bitcoin.conf
to virtual machine~/volumes/bitcoin/bitcoin.conf
bitcoin.conf
: Replace[RPC_AUTH]
and[WALLET]
- Actions after first startup via Docker Compose (see below)
- Copy content of config file
infrastructure/config/lightning/lnd/lnd.conf
to virtual machine~/volumes/lightning/lnd.conf
lnd.conf
: Replace[PRIVATE_IP]
,[ENVIRONMENT]
,[ALIAS]
,[PEER]
,[RPC_USER]
and[RPC_PASSWORD]
- Adapt
addpeer
values for the current environment (peer info can be found here: https://mempool.space/de/lightning) - Copy content of config file
infrastructure/config/lightning/lnd/pwd.txt
to virtual machine~/volumes/lightning/pwd.txt
pwd.txt
: Replace[PASSWORD]
with empty text for the very first startup- Actions after first startup via Docker Compose (see below)
- Copy content of config file
infrastructure/config/lightning/lnbits/lnbits.env
to virtual machine~/volumes/lnbits/.env
.env
: Replace[ADMIN_USERS]
with empty text for the very first startup- Actions after first startup via Docker Compose (see below)
- Copy content of config file
infrastructure/config/lightning/thunderhub/thunderhub.env
to virtual machine~/volumes/thunderhub/.env
- Copy content of config file
infrastructure/config/lightning/thunderhub/accounts.yml
to virtual machine~/volumes/thunderhub/accounts.yml
accounts.yml
: Replace[NAME]
and[PASSWORD]
- Copy content of config file
infrastructure/config/nginx/default.conf
to virtual machine~/volumes/nginx/default.conf
The complete Bitcoin Blockchain data is loaded after the very first startup of the bitcoin node. Therefore it is recommended to copy already available blockchain data to the ~/volumes/bitcoin/...
directory.
The complete Lightning data is synchonized after the very first startup of the lightning node. This may take some time.
After Docker Compose is successfully executed for the very first time, the following actions must be performed manually:
- Create a Bitcoin Wallet (if needed)
- Create a Bitcoin Address (if needed)
- Send funds to the Bitcoin Address (if needed)
- Create a Lightning Wallet with a secure password
- Set the password in the
~/volumes/lightning/pwd.txt
file - Create a Bitcoin Address (needed to open a channel)
- Send funds to the Bitcoin Address (needed to open a channel)
- Open the channels
- Open a Browser and connect to LNbits at: https://vm-{user}-{type}-{env}.westeurope.cloudapp.azure.com
- Find the User Id in the URL
- Set the value of the
LNBITS_ADMIN_USERS
in the config file~/volumes/lnbits/.env
to the User Id
- Run Script
runBackup.sh
before the update. This will backup all dynamic Bitcoin, Lightning, LNbits, ThunderHub, Monero and Frankencoin data created from the different docker images - except the large blockchain data.
Detailed Update Information can be found at: https://docs.google.com/document/d/1WtpatYIxTcd-9E029Zu_4gLhd3H5MAfhytX3x-kUkwM
- Copy script
infrastructure/scripts/setupDocker.sh
to virtual machine~/setupDocker.sh
- Execute script:
sudo ./setupDocker.sh
- Copy script
infrastructure/scripts/setupEnv.sh
to virtual machine~/setupEnv.sh
- Execute script:
./setupEnv.sh
-
Login to VM
-
Modify docker compose file section
monero-rpc command
- '--wallet-dir=/home/monero/.bitmonero/wallet'
- '--rpc-bind-port=18082'
- '--untrusted-daemon'
- '--disable-rpc-login'
-
Run docker compose
docker compose -f docker-compose-monero.yml up -d
-
After first startup create a new wallet:
curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"create_wallet","params":{"filename":"[WALLET_NAME]","password":"[WALLET_PASSWORD]","language":"English"}}' -H 'Content-Type: application/json'
-
Stop docker image
-
Copy content of config file (
infrastructure/config/openssl/openssl.conf
) to virtual machine (volumes/bitmonero
) and replace the missing settings (in square brackets) -
Go to directory
volumes/bitmonero
-
Create certificate
openssl req -config openssl.conf -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
-
Modify docker compose file section
monero-rpc command
- '--wallet-file=/home/monero/.bitmonero/wallet/[WALLET_NAME]'
- '--password=[WALLET_PASSWORD]'
- '--rpc-bind-port=18082'
- '--untrusted-daemon'
- '--disable-rpc-login'
- '--rpc-ssl=enabled'
- '--rpc-ssl-private-key=/home/monero/.bitmonero/key.pem'
- '--rpc-ssl-certificate=/home/monero/.bitmonero/cert.pem'
-
Run docker compose
docker compose -f docker-compose-monero.yml up -d
- Login to VM
- Run docker compose
docker compose -f docker-compose-frankencoin.yml up -d
-
Execute script:
sudo ./docker-compose.sh
- allbitcoin/lightning
,monero
andfrankencoin
containers are started- bitcoin-lightning-bitcoind-1
- bitcoin-lightning-lnd-1
- bitcoin-lightning-lnbits-1
- bitcoin-lightning-thunderhub-1
- bitcoin-lightning-nginx-1
- monero-monerod-1
- monero-monero-rpc-1
- frankencoin-mainnet-ponder-1
- Execute command
docker compose stop