Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/1208784783071537 auto docker deployment #92

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion forked.generated.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ RPC_ENDPOINT=${RPC_ENDPOINT:-"https://rpcpc1-qa.agung.peaq.network"}
DOCKER_COMPOSE_FOLDER=${DOCKER_COMPOSE_FOLDER:-"yoyo"}
FORK_FOLDER=${FORK_FOLDER:="path-not-exist"}
RELAY_CHAIN_CONFIG_FILE=${RELAY_CHAIN_CONFIG_FILE:-"rococo-local.json"}
DISABLE_PARACHAIN_DOWN=${DISABLE_PARACHAIN_DOWN:-"false"}
DISABLE_PARACHAIN_UP=${DISABLE_PARACHAIN_DOWN:-"false"}

extract_parachain_spec() {
local input_file="$1"
Expand Down Expand Up @@ -51,7 +53,9 @@ else
fi

# Stop the docker-compose and regenerate
(cd ${DOCKER_COMPOSE_FOLDER}; ${docker_compose_cmd} down -v) || true
if [ "$DISABLE_PARACHAIN_DOWN" = "false" ]; then
(cd ${DOCKER_COMPOSE_FOLDER}; ${docker_compose_cmd} down -v) || true
fi
rm -rf ${DOCKER_COMPOSE_FOLDER} || true
(./bin/parachain-launch generate --config="${FORKED_CONFIG_FILE}" --output=${DOCKER_COMPOSE_FOLDER})

Expand All @@ -78,6 +82,9 @@ sed -i "0,/\"genesis_head\": \".*\"/s//\"genesis_head\": \"$new_genesis_code\"/"
PWD=`pwd`
docker run --rm -v "${PWD}/${host_relay_chain_config_file}.original.json":/${RELAY_CHAIN_CONFIG_FILE} ${polkadot_image} build-spec --raw --chain=/${RELAY_CHAIN_CONFIG_FILE} --disable-default-bootnode > ${host_relay_chain_config_file}

if [ "$DISABLE_PARACHAIN_UP" = "true" ]; then
exit 0
fi
( \
cd ${DOCKER_COMPOSE_FOLDER}; \
${docker_compose_cmd} up -d --build --remove-orphans; \
Expand Down
37 changes: 21 additions & 16 deletions scripts/config.parachain.peaq-dev.docker.nodes.v0.0.102.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ parachains:
base: dev-local # the chain to use
chainType: Development
collators: # override collators
- alice
- bob
- charlie
- dave
- eve
- ferdie
sudo: alice # override sudo key to //Alice
runtimeGenesisConfig: # additonal genesis override
Expand All @@ -55,6 +50,26 @@ parachains:
- [5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy, 1000000000000000000000]
- [5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw, 1000000000000000000000]
- [5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL, 1000000000000000000000]
### For collators
- [5EDFZ1kVq1Ma3w5UZhg8ccPRzMoKmr29XZ2nDB6RSD4ZGpT1, 60000000000000000000000]
- [5EHzSPk1T8VxUASiG9wEtxSR3ykDhvAEhYseF1ViqkuoBN5y, 60000000000000000000000]
- [5DNr8eH9o2eyNhfZQMgqnEMaR94c1dufQNo3ojhkfWb1k3YJ, 60000000000000000000000]
- [5DCi5nd6UFGDtojFbSbJ4uaCPc3TvikdmYP1LhMARNaf2gSe, 60000000000000000000000]
- [5Df46VdyJuJEXcocAYkfsmukLzKr5F6kcMXuBSnRvwQvZy9A, 60000000000000000000000]
- [5DyRH5xWVPXZWTdPeEr1VEc1MMY1jvg4faNfGPmRm54Qfw1v, 60000000000000000000000]
- [5ELWmrn5Q3UivEqh8jTYgHtdxeyphMT3gReeWBAtv5VMBSwd, 60000000000000000000000]
### For delegators
- [5GjRpM4wEB6KDDzekm6tWEeaAu8HE8ZHT2r586mf2aJorAR1, 60000000000000000000000]
- [5HT1BVyp6Bidt7bNebvEr6h2a3EC5bZFxPnJDnFGNkpNTsWr, 60000000000000000000000]
- [5HWE7FwLjyBHbQcedCvdCYp83FFkX1KvGJrVG9yDwofSf91z, 60000000000000000000000]
- [5D2G1T3T9m6K889CdidHroubmLh8j6PNCDwnNQZPgpRPWmz3, 60000000000000000000000]
- [5EjToxcyVwyPMpYzaMrzfQczr8JBr1BaKkFkLJ1tkFwqT1Eb, 60000000000000000000000]
- [5Dqm7d56CiekJhPTtFPhkvN8gDeU3SqUY6UHwT9fQzAMqXyn, 60000000000000000000000]
- [5H3bFVK1SmKABJka5kUbjv3FNoXYnssN6GCvGWTumkZQcyKR, 60000000000000000000000]
- [5E2LsWXpqabsB8PSgBa8EhWfx5CgxBztp9ofXjqZteABVyHJ, 60000000000000000000000]
### For one delegator to multi collators
- [5H6BC6Qm4yLE3KgPUEEgKtRWjNGEwDMsXAGhaS8ZDta4fgGX, 60000000000000000000000]

id: 2000 # override parachain id
parachain: true # this is parachain, not parathread
flags: # CLI flags for this parachain nodes
Expand All @@ -72,32 +87,22 @@ parachains:
rpcPort: 9933
port: 30336
flags: # additional CLI flags for this node
- --alice
- --ferdie
- wsPort: 9945
rpcPort: 9934
port: 30337
flags:
- --bob
- wsPort: 9946
rpcPort: 9935
port: 30338
flags:
- --charlie
- wsPort: 9947
rpcPort: 9936
port: 30339
flags:
- --dave
- wsPort: 9948
rpcPort: 9937
port: 30340
flags:
- --eve
- wsPort: 9949
rpcPort: 9938
port: 30341
flags:
- --ferdie
- wsPort: 9950
rpcPort: 9939
port: 30342
Expand Down
117 changes: 0 additions & 117 deletions scripts/config.parachain.peaq-dev.docker.v0.0.102.yml

This file was deleted.

44 changes: 24 additions & 20 deletions scripts/config.parachain.peaq.docker.nodes.v0.0.103.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Relaychain Configuration
relaychain:
image: parity/polkadot:v1.8.0 # the docker image to use
chain: rococo-local # the chain to use
image: parity/polkadot:v1.13.0 # the docker image to use
chain: westend-local # the chain to use
runtimeGenesisConfig: # additonal genesis override
configuration:
config:
Expand All @@ -10,14 +10,13 @@ relaychain:
async_backing_params:
max_candidate_depth: 3
allowed_ancestry_len: 2
scheduling_lookahead: 2
env: # environment variables for all relaychain nodes
RUST_LOG: parachain::candidate-backing=trace,xcm=trace
flags: # additional CLI flags for all relaychain nodes
- --rpc-methods=unsafe
- --no-hardware-benchmarks
- --insecure-validator-i-know-what-i-do
# - --unsafe-force-node-key-generation
- --unsafe-force-node-key-generation
nodes: # nodes config
- name: alice # the node name and session key, this imply `--alice`
wsPort: 10044 # default ws port number is `9944 + global_node_index`
Expand All @@ -40,11 +39,6 @@ parachains:
base: peaq-local # the chain to use
chainType: Development
collators: # override collators
- alice
- bob
- charlie
- dave
- eve
- ferdie
sudo: alice # override sudo key to //Alice
runtimeGenesisConfig: # additonal genesis override
Expand All @@ -56,6 +50,26 @@ parachains:
- [5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy, 1000000000000000000000]
- [5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw, 1000000000000000000000]
- [5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL, 1000000000000000000000]
### For collators
- [5EDFZ1kVq1Ma3w5UZhg8ccPRzMoKmr29XZ2nDB6RSD4ZGpT1, 60000000000000000000000]
- [5EHzSPk1T8VxUASiG9wEtxSR3ykDhvAEhYseF1ViqkuoBN5y, 60000000000000000000000]
- [5DNr8eH9o2eyNhfZQMgqnEMaR94c1dufQNo3ojhkfWb1k3YJ, 60000000000000000000000]
- [5DCi5nd6UFGDtojFbSbJ4uaCPc3TvikdmYP1LhMARNaf2gSe, 60000000000000000000000]
- [5Df46VdyJuJEXcocAYkfsmukLzKr5F6kcMXuBSnRvwQvZy9A, 60000000000000000000000]
- [5DyRH5xWVPXZWTdPeEr1VEc1MMY1jvg4faNfGPmRm54Qfw1v, 60000000000000000000000]
- [5ELWmrn5Q3UivEqh8jTYgHtdxeyphMT3gReeWBAtv5VMBSwd, 60000000000000000000000]
### For delegators
- [5GjRpM4wEB6KDDzekm6tWEeaAu8HE8ZHT2r586mf2aJorAR1, 60000000000000000000000]
- [5HT1BVyp6Bidt7bNebvEr6h2a3EC5bZFxPnJDnFGNkpNTsWr, 60000000000000000000000]
- [5HWE7FwLjyBHbQcedCvdCYp83FFkX1KvGJrVG9yDwofSf91z, 60000000000000000000000]
- [5D2G1T3T9m6K889CdidHroubmLh8j6PNCDwnNQZPgpRPWmz3, 60000000000000000000000]
- [5EjToxcyVwyPMpYzaMrzfQczr8JBr1BaKkFkLJ1tkFwqT1Eb, 60000000000000000000000]
- [5Dqm7d56CiekJhPTtFPhkvN8gDeU3SqUY6UHwT9fQzAMqXyn, 60000000000000000000000]
- [5H3bFVK1SmKABJka5kUbjv3FNoXYnssN6GCvGWTumkZQcyKR, 60000000000000000000000]
- [5E2LsWXpqabsB8PSgBa8EhWfx5CgxBztp9ofXjqZteABVyHJ, 60000000000000000000000]
### For one delegator to multi collators
- [5H6BC6Qm4yLE3KgPUEEgKtRWjNGEwDMsXAGhaS8ZDta4fgGX, 60000000000000000000000]

id: 3338 # override parachain id
parachain: true # this is parachain, not parathread
flags: # CLI flags for this parachain nodes
Expand All @@ -73,32 +87,22 @@ parachains:
rpcPort: 9933
port: 30336
flags: # additional CLI flags for this node
- --alice
- --ferdie
- wsPort: 9945
rpcPort: 9934
port: 30337
flags:
- --bob
- wsPort: 9946
rpcPort: 9935
port: 30338
flags:
- --charlie
- wsPort: 9947
rpcPort: 9936
port: 30339
flags:
- --dave
- wsPort: 9948
rpcPort: 9937
port: 30340
flags:
- --eve
- wsPort: 9949
rpcPort: 9938
port: 30341
flags:
- --ferdie
- wsPort: 9950
rpcPort: 9939
port: 30342
Expand Down
Loading
Loading