Skip to content

Commit

Permalink
Merge pull request planetarium#65 from planetarium/rc-v100320
Browse files Browse the repository at this point in the history
Rc v100320
  • Loading branch information
Atralupus authored Nov 7, 2022
2 parents 70b3029 + 5b6187b commit 01d7160
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/setup-dotnet@v2
with:
python-version: 3.9
dotnet-version: "3.1.x"
dotnet-version: "6.0.x"
- run: dotnet tool install -g Libplanet.Tools
- run: |
python -m pip install -r requirements-dev.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- uses: actions/setup-dotnet@v2
with:
python-version: 3.9
dotnet-version: "3.1.x"
dotnet-version: "6.0.x"
- run: dotnet tool install -g Libplanet.Tools
- run: |
echo ${{ needs.extract-tag.outputs.network }}
Expand Down
2 changes: 1 addition & 1 deletion 9c-internal/configmap-versions.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
data:
APP_PROTOCOL_VERSION: 1118/54684Ac4ee5B933e72144C4968BEa26056880d71/MEQCICDxd1O2aFSOExeg096Q9ZUCGvpourUgC.fLrwExA.PVAiA4skPsARy0ocHUhSNOLDBuuutxzDnlpFXDCwnVmNBUeA==/ZHU4OmxhdW5jaGVydTQyOjEvNGQwNTNjYWIzODdhNmQ4NWQ3MGFkYmRmMTcwYjEwOTI3ZTE1MDcxOHU2OnBsYXllcnU0MjoxLzcyMDNlOTAyZWE4NWYwYTg3ZDg3YThiMWMxYzUwNjhkODFjNjdmZjN1OTp0aW1lc3RhbXB1MTA6MjAyMi0xMC0xOWU=
APP_PROTOCOL_VERSION: 1123/54684Ac4ee5B933e72144C4968BEa26056880d71/MEQCIFQK..wfJvt9q3RsKerxX7dCprzDcJAGGFCoVjK+ZB2xAiBdI5pUw+LqsenTlCDOjHYt4.cUO697psXTZvXz.0Om4g==/ZHU4OmxhdW5jaGVydTQyOjEvMTMyMWI2YTYwZjU1MTExMjdiNDY1ZWE4YTM1MDRkN2I0MmVkYWJjNXU2OnBsYXllcnU0MjoxL2NkMjE5NjdiOGIxNWQ1NWNmOWUwMjZlMjg5MTUyYzg1ODdjMmY2YjV1OTp0aW1lc3RhbXB1MTA6MjAyMi0xMS0wNGU=
kind: ConfigMap
metadata:
name: version-config
8 changes: 4 additions & 4 deletions 9c-internal/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
images:
- name: kustomization-libplanet-seed
newName: planetariumhq/libplanet-seed
newTag: git-31b93a8f133f0fcef7cdce525400c35259dba4a4
newTag: git-5fdbdf26412f61052daeaa2b54116391f93b58ef
- name: kustomization-ninechronicles-headless
newName: planetariumhq/ninechronicles-headless
newTag: git-b5b23b956bba06e9407f7a20d7068a59245192cd
newTag: git-20524d152c5ecf2a887e1b7cc456ac4763f2c4ae
- name: kustomization-ninechronicles-snapshot
newName: planetariumhq/ninechronicles-snapshot
newTag: git-6cda9bb938c4c294df6bbc8ee04530dc8805d397
newTag: git-4f703fcd89e40e8b5b5a59be8060e0524a18e17e
- name: kustomization-ninechronicles-dataprovider
newName: planetariumhq/ninechronicles-dataprovider
newTag: git-8d2bb2702d585129f63bd488b71b72de5d6ccea6
newTag: git-315d24736cf945079349f2a7369357a7d19a2a60
- name: kustomization-ninechronicles-onboarding
newName: planetariumhq/9c-onboarding
newTag: git-36b2b5ca12e6bd059a81c17f92cb2803b38425bc
Expand Down
20 changes: 14 additions & 6 deletions 9c-main/configmap-probe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,24 @@ data:
echo $preloaded
if [[ "$preloaded" = "true" ]]; then
echo "Preload finished. Check chain tip."
last_block="$(
local_tip="$(
curl \
-H 'Content-Type: application/json' \
--data '{"query":"query{chainQuery{blockQuery{blocks(desc:true,limit:1){timestamp}}}}"}' \
--data '{"query":"query{chainQuery{blockQuery{blocks(desc:true,limit:1){index}}}}"}' \
http://localhost:80/graphql \
| jq -r '.data.chainQuery.blockQuery.blocks[0].timestamp'
| jq -r '.data.chainQuery.blockQuery.blocks[0].index'
)"
last_timestamp="$(date +%s -u --date="$last_block")"
now="$(date +%s -u)"
[[ $(( now - last_timestamp )) -lt 300 ]]
echo $local_tip
miner_tip="$(
curl \
-H 'Content-Type: application/json' \
--data '{"query":"query{chainQuery{blockQuery{blocks(desc:true,limit:1){index}}}}"}' \
http://9c-miner.planetarium.dev/graphql \
| jq -r '.data.chainQuery.blockQuery.blocks[0].index'
)"
echo $miner_tip
echo [[ $(( miner_tip - local_tip)) -lt 20 ]]
[[ $(( miner_tip - local_tip)) -lt 20 ]]
fi
readiness_probe.sh: |-
#!/usr/bin/env bash
Expand Down
8 changes: 4 additions & 4 deletions 9c-main/deploy-main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ checkout_main_cluster() {
}

delete_miner() {
kubectl delete sts main-miner-3
kubectl delete sts main-miner-2

# Provide ample time so that the miner stops mining and other nodes catch up to the tip block
echo "Provide ample time so that the miner stops mining and other nodes catch up to the tip block"
Expand All @@ -26,7 +26,7 @@ clear_cluster() {

kubectl delete sts \
main-full-state \
main-miner-2 \
main-miner-3 \
explorer \
main-data-provider \
main-data-provider-db \
Expand Down Expand Up @@ -61,7 +61,7 @@ deploy_cluster() {
-f $BASEDIR/snapshot-partition.yaml \
-f $BASEDIR/snapshot-partition-reset.yaml \
-f $BASEDIR/snapshot-full.yaml \
-f $BASEDIR/miner-3.yaml
-f $BASEDIR/miner-2.yaml

# Wait for seed nodes and miner to be fully deployed
echo "Wait for seed nodes and miner to be fully deployed"
Expand All @@ -71,7 +71,7 @@ deploy_cluster() {
echo "Start remaining services"
kubectl apply \
-f $BASEDIR/full-state.yaml \
-f $BASEDIR/miner-2.yaml \
-f $BASEDIR/miner-3.yaml \
-f $BASEDIR/explorer.yaml \
-f $BASEDIR/data-provider.yaml \
-f $BASEDIR/data-provider-db.yaml \
Expand Down
2 changes: 1 addition & 1 deletion 9c-main/kube-system/coredns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ data:
rewrite name 9c-main-rpc-8.nine-chronicles.com remote-headless-8.default.svc.cluster.local
rewrite name 9c-main-rpc-9.nine-chronicles.com remote-headless-9.default.svc.cluster.local
rewrite name 9c-main-rpc-10.nine-chronicles.com remote-headless-10.default.svc.cluster.local
rewrite name 9c-main-rpc-31.nine-chronicles.com remote-headless-31.default.svc.cluster.local
rewrite name rpc-for-snapshot.nine-chronicles.com remote-headless-31.default.svc.cluster.local
rewrite name 9c-main-rpc-99.nine-chronicles.com remote-headless-99.default.svc.cluster.local
prometheus :9153
forward . /etc/resolv.conf
Expand Down
2 changes: 1 addition & 1 deletion 9c-main/miner-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ spec:
imagePullSecrets:
- name: acr-regcred
nodeSelector:
alpha.eksctl.io/nodegroup-name: 9c-main-m6g-2xl
alpha.eksctl.io/nodegroup-name: 9c-main-c5-4xl
beta.kubernetes.io/os: linux
restartPolicy: Always
schedulerName: default-scheduler
Expand Down
2 changes: 1 addition & 1 deletion 9c-main/remote-headless-31.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
- --no-miner
- --store-type=rocksdb
- --store-path=/data/headless-arm
- --host=9c-main-rpc-31.nine-chronicles.com
- --host=rpc-for-snapshot.nine-chronicles.com
- --peer
- 027bd36895d68681290e570692ad3736750ceaab37be402442ffb203967f98f7b6,9c-main-tcp-seed-1.planetarium.dev,31234
- --peer
Expand Down
6 changes: 3 additions & 3 deletions 9c-onboarding/sts-headless-query.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: default
spec:
podManagementPolicy: OrderedReady
replicas: 4
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
Expand Down Expand Up @@ -70,7 +70,7 @@ spec:
\ \\\n --data '{\"query\":\"query{chainQuery{blockQuery{blocks(desc:true,limit:1){timestamp}}}}\"\
}' \\\n http://localhost:23061/graphql \\\n | jq -r '.data.chainQuery.blockQuery.blocks[0].timestamp'\n\
)\"\nlast_timestamp=\"$(date +%s -u --date=\"$last_block\")\"\nnow=\"\
$(date +%s -u)\"\n[[ $(( now - last_timestamp )) -lt 900 ]]\n"
$(date +%s -u)\"\n[[ $(( now - last_timestamp )) -lt 300 ]]\n"
failureThreshold: 3
initialDelaySeconds: 1800
periodSeconds: 30
Expand Down Expand Up @@ -102,7 +102,7 @@ spec:
subPath: probe_tip.sh
dnsPolicy: ClusterFirst
nodeSelector:
alpha.eksctl.io/nodegroup-name: 9c-onboarding-m5-xl
alpha.eksctl.io/nodegroup-name: 9c-onboarding-c5-4xl
beta.kubernetes.io/os: linux
restartPolicy: Always
schedulerName: default-scheduler
Expand Down
2 changes: 1 addition & 1 deletion 9c-onboarding/sts-headless-transfer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ spec:
\ \\\n --data '{\"query\":\"query{chainQuery{blockQuery{blocks(desc:true,limit:1){timestamp}}}}\"\
}' \\\n http://localhost:23061/graphql \\\n | jq -r '.data.chainQuery.blockQuery.blocks[0].timestamp'\n\
)\"\nlast_timestamp=\"$(date +%s -u --date=\"$last_block\")\"\nnow=\"\
$(date +%s -u)\"\n[[ $(( now - last_timestamp )) -lt 900 ]]\n"
$(date +%s -u)\"\n[[ $(( now - last_timestamp )) -lt 300 ]]\n"
failureThreshold: 3
initialDelaySeconds: 1800
periodSeconds: 30
Expand Down

0 comments on commit 01d7160

Please sign in to comment.