mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 18:30:45 +00:00
Allow deploy with different version of XDC on devnet (#218)
This commit is contained in:
parent
c4f9a552e5
commit
ff75f0f22e
3 changed files with 19 additions and 12 deletions
|
|
@ -17,7 +17,10 @@ Each PR merged into `dev-upgrade` will trigger below actions:
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"xdc0": {
|
"xdc0": {
|
||||||
"pk": {{PRIVATE KEY}}
|
"pk": {{PRIVATE KEY}},
|
||||||
|
"address": {{XDC wallet address}},
|
||||||
|
"imageTag": {{Optional field to run different version of XDC}},
|
||||||
|
"logLevel": {{Optional field to adjust the log level for the container}}
|
||||||
},
|
},
|
||||||
"xdc1": {...},
|
"xdc1": {...},
|
||||||
"xdc{{NUMBER}}: {...}
|
"xdc{{NUMBER}}: {...}
|
||||||
|
|
@ -35,12 +38,15 @@ Each PR merged into `dev-upgrade` will trigger below actions:
|
||||||
|
|
||||||
You are all set!
|
You are all set!
|
||||||
|
|
||||||
## Testnet
|
## How to run different version of XDC on selected nodes
|
||||||
*** WIP ***
|
1. Create a new image tag:
|
||||||
Testnet release build are triggered by cutting a "pre-release" tag which matches the name of `TESTNET-{{release-version}}` from dev-upgrade or master branch.
|
- Check out the repo
|
||||||
An example can be found here: https://github.com/XinFinOrg/XDPoSChain/releases/tag/Testnet-v2.0.0
|
- Run docker build `docker build -t xdc-devnet -f cicd/devnet/Dockerfile .`
|
||||||
For more information, refer to github documentation on the release: https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases
|
- Run docker tag `docker tag xdc-devnet:latest xinfinorg/devnet:test-{{put your version number here}}`
|
||||||
|
- Run docker push `docker push xinfinorg/devnet:test-{{Version number from step above}}`
|
||||||
## Mainnet
|
2. Adjust node-config.json
|
||||||
*** WIP ***
|
- Download the node-config.json from s3
|
||||||
Mainnet release are triggered by making a normal release tag with name starting with `v` (stands for version) from the master branch.
|
- Add/update the `imageTag` field with value of `test-{{version number you defined in step 1}}` for the selected number of nodes you want to test with
|
||||||
|
- Optional: Adjust the log level by add/updating the field of `logLevel`
|
||||||
|
- Save and upload to s3
|
||||||
|
3. Make a dummy PR and get merged. Wait it to be updated.
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "tfXdcNode",
|
"name": "tfXdcNode",
|
||||||
"image": "xinfinorg/${xdc_environment}:latest",
|
"image": "xinfinorg/${xdc_environment}:${image_tag}",
|
||||||
"environment": [
|
"environment": [
|
||||||
{"name": "PRIVATE_KEYS", "value": "${private_keys}"},
|
{"name": "PRIVATE_KEYS", "value": "${private_keys}"},
|
||||||
{"name": "LOG_LEVEL", "value": "${log_level}"},
|
{"name": "LOG_LEVEL", "value": "${log_level}"},
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,11 @@ data template_file devnet_container_definition {
|
||||||
|
|
||||||
vars = {
|
vars = {
|
||||||
xdc_environment = "devnet"
|
xdc_environment = "devnet"
|
||||||
|
image_tag = "${lookup(each.value, "imageTag", "latest")}"
|
||||||
node_name = "${each.key}"
|
node_name = "${each.key}"
|
||||||
private_keys = "${each.value.pk}"
|
private_keys = "${each.value.pk}"
|
||||||
cloudwatch_group = "tf-${each.key}"
|
cloudwatch_group = "tf-${each.key}"
|
||||||
log_level = "${local.logLevel}"
|
log_level = "${lookup(each.value, "logLevel", "${local.logLevel}")}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue