Skip to content

Commit

Permalink
add config-storage.properties and replicators.json
Browse files Browse the repository at this point in the history
  • Loading branch information
jcn01 committed Oct 4, 2024
1 parent 0823983 commit d52ee66
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docker-api/resources/config-storage.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[replicator]

key = REPLICATOR_PRIVATE_KEY
host = 0.0.0.0
port = 7904
transactionTimeout = 1h
storageDirectory = /data/drives
sandboxDirectory = /data/drives/drive-sandboxes
useTcpSocket = true
useRpcReplicator = true
rpcHost = 127.0.0.1
rpcPort = 7905
rpcHandleLostConnection = false
rpcDbgChildCrash = true
16 changes: 16 additions & 0 deletions docker-api/resources/replicators.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"_info": "this file contains a list of bootstrap replicators",
"knownPeers": [
{
"publicKey": "",
"endpoint": {
"host": "",
"port": 7904
},
"metadata": {
"name": "",
"roles": "Api"
}
}
]
}
14 changes: 14 additions & 0 deletions docker-method/resources/config-storage.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[replicator]

key = REPLICATOR_PRIVATE_KEY
host = 0.0.0.0
port = 7904
transactionTimeout = 1h
storageDirectory = /data/drives
sandboxDirectory = /data/drives/drive-sandboxes
useTcpSocket = true
useRpcReplicator = true
rpcHost = 127.0.0.1
rpcPort = 7905
rpcHandleLostConnection = false
rpcDbgChildCrash = true
16 changes: 16 additions & 0 deletions docker-method/resources/replicators.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"_info": "this file contains a list of bootstrap replicators",
"knownPeers": [
{
"publicKey": "",
"endpoint": {
"host": "",
"port": 7904
},
"metadata": {
"name": "",
"roles": "Api"
}
}
]
}
4 changes: 4 additions & 0 deletions scripts/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ node_host=$(sed -n '/^host\s*=\s*/{s/^host\s*=\s*//;p}' config-node.properties)
friendly_name=$(sed -n '/^friendlyName\s*=\s*/{s/^friendlyName\s*=\s*//;p}' config-node.properties)
boot_key=$(sed -n '/^bootKey\s*=\s*/{s/^bootKey\s*=\s*//;p}' config-user.properties)
harvest_key=$(sed -n '/^harvestKey\s*=\s*/{s/^harvestKey\s*=\s*//;p}' config-harvesting.properties)
replicator_key=$(sed -n '/^key\s*=\s*/{s/^key\s*=\s*//;p}' config-storage.properties)
node_role=$(sed -n -e '/roles/ s/.*= *//p' config-node.properties)
is_harvest_enabled=$(sed -n '/^isAutoHarvestingEnabled\s*=\s*/{s/^isAutoHarvestingEnabled\s*=\s*//;p}' config-harvesting.properties)
is_dbrb_process=$(sed -n '/^isDbrbProcess\s*=\s*/{s/^isDbrbProcess\s*=\s*//;p}' config-dbrb.properties)
Expand All @@ -64,6 +65,7 @@ echo "Host is $node_host"
echo "Node is: " $node_role
printf "BootKey is "; mask $boot_key
printf "HarvestKey is "; mask $harvest_key
printf "ReplicatorKey is "; mask $replicator_key

if [ $boot_key == $harvest_key ]; then
while true; do
Expand Down Expand Up @@ -146,6 +148,7 @@ curl -O --silent https://raw.githubusercontent.com/proximax-storage/xpx-mainnet-
curl -O --silent https://raw.githubusercontent.com/proximax-storage/xpx-mainnet-chain-onboarding/$SIRIUS_CHAIN_VERSION/$DOCKERFOLDER/resources/config-networkheight.properties
curl -O --silent https://raw.githubusercontent.com/proximax-storage/xpx-mainnet-chain-onboarding/$SIRIUS_CHAIN_VERSION/$DOCKERFOLDER/resources/config-node.properties
curl -O --silent https://raw.githubusercontent.com/proximax-storage/xpx-mainnet-chain-onboarding/$SIRIUS_CHAIN_VERSION/$DOCKERFOLDER/resources/config-pt.properties
curl -O --silent https://raw.githubusercontent.com/proximax-storage/xpx-mainnet-chain-onboarding/$SIRIUS_CHAIN_VERSION/$DOCKERFOLDER/resources/config-storage.properties
curl -O --silent https://raw.githubusercontent.com/proximax-storage/xpx-mainnet-chain-onboarding/$SIRIUS_CHAIN_VERSION/$DOCKERFOLDER/resources/config-task.properties
curl -O --silent https://raw.githubusercontent.com/proximax-storage/xpx-mainnet-chain-onboarding/$SIRIUS_CHAIN_VERSION/$DOCKERFOLDER/resources/config-timesync.properties
curl -O --silent https://raw.githubusercontent.com/proximax-storage/xpx-mainnet-chain-onboarding/$SIRIUS_CHAIN_VERSION/$DOCKERFOLDER/resources/config-user.properties
Expand All @@ -157,6 +160,7 @@ echo "Updating config files"
sed -i "s/^\(host\s*=\s*\).*\$/\1$node_host/" config-node.properties
sed -i "s/^\(friendlyName\s*=\s*\).*\$/friendlyName = $friendly_name/" config-node.properties
sed -i "s/BOOTKEY_PRIVATE_KEY/$boot_key/" config-user.properties
sed -i "s/REPLICATOR_PRIVATE_KEY/$replicator_key/" config-storage.properties
sed -i "s/^\(isDbrbProcess\s*=\s*\).*\$/isDbrbProcess = $is_dbrb_process/" config-dbrb.properties
cd $base_dir
# instructions
Expand Down

0 comments on commit d52ee66

Please sign in to comment.