mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-27 08:45:19 +00:00
3033529d9f
even if the nodes are not in standby, target them for the start job in the internal testnet deployment CI
78 lines
2.6 KiB
YAML
78 lines
2.6 KiB
YAML
name: Start Chain
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
chain-id:
|
|
required: true
|
|
type: string
|
|
aws-region:
|
|
required: true
|
|
type: string
|
|
ssm-document-name:
|
|
required: true
|
|
type: string
|
|
playbook-name:
|
|
required: true
|
|
type: string
|
|
playbook-infrastructure-branch:
|
|
required: true
|
|
type: string
|
|
secrets:
|
|
CI_AWS_KEY_ID:
|
|
required: true
|
|
CI_AWS_KEY_SECRET:
|
|
required: true
|
|
KAVA_PRIVATE_GITHUB_ACCESS_TOKEN:
|
|
required: true
|
|
|
|
jobs:
|
|
# start kava, allow nodes to start processing requests from users once they are synced to live
|
|
serve-traffic:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout repo from current commit
|
|
uses: actions/checkout@v4
|
|
- name: take the chain offline
|
|
run: bash ${GITHUB_WORKSPACE}/.github/scripts/put-all-chain-nodes-on-standby.sh
|
|
env:
|
|
CHAIN_ID: ${{ inputs.chain-id }}
|
|
AWS_REGION: ${{ inputs.aws-region }}
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.CI_AWS_KEY_ID }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_AWS_KEY_SECRET }}
|
|
- name: checkout infrastructure repo
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: Kava-Labs/infrastructure
|
|
token: ${{ secrets.KAVA_PRIVATE_GITHUB_ACCESS_TOKEN }}
|
|
path: infrastructure
|
|
ref: master
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version-file: go.mod
|
|
- name: build kava node updater
|
|
run: cd infrastructure/cli/kava-node-updater && make install && cd ../../../
|
|
- name: run start-chain playbook on all chain nodes
|
|
run: |
|
|
kava-node-updater \
|
|
--debug \
|
|
--max-retries=2 \
|
|
--aws-ssm-document-name=$SSM_DOCUMENT_NAME \
|
|
--infrastructure-git-pointer=$PLAYBOOK_INFRASTRUCTURE_BRANCH \
|
|
--update-playbook-filename=$PLAYBOOK_NAME \
|
|
--chain-id=$CHAIN_ID \
|
|
--max-upgrade-batch-size=0 \
|
|
--wait-for-node-sync-after-upgrade=true
|
|
env:
|
|
SSM_DOCUMENT_NAME: ${{ inputs.ssm-document-name }}
|
|
PLAYBOOK_NAME: ${{ inputs.playbook-name }}
|
|
CHAIN_ID: ${{ inputs.chain-id }}
|
|
AWS_REGION: ${{ inputs.aws-region }}
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.CI_AWS_KEY_ID }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_AWS_KEY_SECRET }}
|
|
AWS_SDK_LOAD_CONFIG: 1
|
|
PLAYBOOK_INFRASTRUCTURE_BRANCH: ${{ inputs.playbook-infrastructure-branch }}
|
|
- name: bring the chain online
|
|
run: bash ${GITHUB_WORKSPACE}/.github/scripts/exit-standby-all-chain-nodes.sh
|