Skip to content

Commit

Permalink
prepare 9c-internal migration from eks to gke
Browse files Browse the repository at this point in the history
  • Loading branch information
eseiker committed Feb 19, 2025
1 parent ad9cc89 commit bafef37
Show file tree
Hide file tree
Showing 10 changed files with 425 additions and 158 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/apv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ on:
default: '9c-main'
type: choice
options:
- 9c-internal
- 9c-main
- 9c-internal
- gke-ninechronicles-internal
file-name:
required: true
description: 'Network environment'
Expand Down
42 changes: 7 additions & 35 deletions .github/workflows/reset-bridge-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@ on:
- thor-internal
- heimdall-preview
- thor-preview
dir-name:
type: string
default: 9c-internal
workflow_call:
inputs:
network:
required: true
type: string
dir-name:
type: string
default: 9c-internal

jobs:
reset-bridge-service:
Expand All @@ -27,45 +33,11 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up kubectl
uses: azure/setup-kubectl@v1
with:
version: 'v1.29.0'

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y jq
- name: Set namespace based on input
run: |
NETWORK="${{ inputs.network }}"
echo "NAMESPACE=${NETWORK%"-internal"}" >> $GITHUB_ENV
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2

- name: Generate kubeconfig for the cluster
run: |
aws eks update-kubeconfig --name 9c-internal-v2 --region us-east-2
- name: Check pods
run: |
kubectl get pods --all-namespaces
- name: Scale down bridge-service
run: kubectl scale --replicas=0 statefulset/bridge-service -n ${{ env.NAMESPACE }}

- name: Scale down bridge-service-db
run: kubectl scale --replicas=0 statefulset/bridge-service-db -n ${{ env.NAMESPACE }}

- name: Delete PVC
run: kubectl delete pvc/bridge-service-db-data-bridge-service-db-0 --namespace=${{ env.NAMESPACE }}

- uses: actions/setup-python@v2.2.2
with:
python-version: 3.10.13
Expand All @@ -78,7 +50,7 @@ jobs:
- name: Update 'bridgeService.rdb.defaultStartBlockIndex'
run: |
python cli.py update-bridge-service 9c-internal ${{ env.NAMESPACE }}
python cli.py update-bridge-service ${{ inputs.dir-name }} ${{ env.NAMESPACE }}
working-directory: ./scripts
env:
GITHUB_TOKEN: ${{ secrets.P_GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/update-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
options:
- 9c-main
- 9c-internal
- gke-ninechronicles-internal
file-name:
required: true
description: 'FileName'
Expand Down
9 changes: 3 additions & 6 deletions gke-ninechronicles-internal/bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ spec:
path: charts/multiplanetary
targetRevision: main
helm:
values: |-
clusterName: nine-chronicles-internal
targetRevision: main
path: gke-ninechronicles-internal
network:
- thor
valueFiles:
- /gke-ninechronicles-internal/values.yaml
- /gke-ninechronicles-internal/multiplanetary/values.yaml
86 changes: 86 additions & 0 deletions gke-ninechronicles-internal/multiplanetary/network/general.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
clusterName: nine-chronicles-internal
provider: GCP
GCP:
projectID: nine-chronicles-449809

gateway:
certificate:
name: certificate-secret
namespace: traefik

remoteHeadless:
ingress:
enabled: true

global:
image:
repository: planetariumhq/ninechronicles-headless
tag: "git-bac999c23ff23888bc5aa6b18ddbe4350c872c5a"

seed:
image:
repository: planetariumhq/libplanet-seed
pullPolicy: Always
tag: "git-67d0ef91c52a71a9772cd7fdb241c9fc37b165b8"

bridgeService:
image:
repository: planetariumhq/9c-bridge
pullPolicy: Always
tag: "git-b2ce3e2fd93d4728123d20ee4bd16caf09c83b9c"

bridgeServiceApi:
image:
repository: planetariumhq/9c-bridge-api
pullPolicy: Always
tag: "git-c3bb6dc8357fc1e86e46ed788ff851d1239d756e"

dataProvider:
image:
repository: planetariumhq/ninechronicles-dataprovider
pullPolicy: Always
tag: "git-da9d9ed12fe4c7d0733ceb0694a32b637a7c743a"

worldBoss:
image:
repository: planetariumhq/world-boss-service
pullPolicy: Always
tag: "git-5582d71c3463de763d2776b1de486f1ee7a2e5dc"

marketService:
image:
repository: planetariumhq/market-service
pullPolicy: Always
tag: "git-6d0ca852b9e79d484f652fd03ddcfc9ddc0d0b7d"

rudolfService:
image:
tag: "git-278252e48d7d13306dcb1820bd9524ee6a27203c"

acc:
image:
repository: planetariumhq/access-control-center
pullPolicy: Always
tag: "git-d1d2ccbb9fb8f6ffd5e7a6109363471c8f8fa480"

stateMigrationService:
db:
local: false
size: 1Gi

image:
repository: planetariumhq/state-migration-service
pullPolicy: Always
tag: "git-ad7daecb45aeb81bf62e57474f72c6692d96466e"

arenaService:
image:
repository: planetariumhq/arena-service
pullPolicy: Always
tag: "git-9db6af2a1986b94ff49066eb5870a230d3ac2238"

seasonpass:
image:
repository: planetariumhq/season-pass
pullPolicy: Always
tag: "git-478b5d3e8d84c1d0397d9f92f1d89c55a3263ee3"
Loading

0 comments on commit bafef37

Please sign in to comment.