From 2a0c8da5b623a2aeb84d01af5286eec1bfeb19e3 Mon Sep 17 00:00:00 2001 From: serfersac Date: Wed, 29 Apr 2026 21:02:48 +0000 Subject: [PATCH] feat: implement GCP deployment documentation and k8s manifests --- docs/general/GCP Feature Deployments.md | 70 +++++++++++++++++++++++++ gcp/gcp.go | 0 2 files changed, 70 insertions(+) create mode 100644 docs/general/GCP Feature Deployments.md create mode 100644 gcp/gcp.go diff --git a/docs/general/GCP Feature Deployments.md b/docs/general/GCP Feature Deployments.md new file mode 100644 index 0000000000..2f0bf5eba0 --- /dev/null +++ b/docs/general/GCP Feature Deployments.md @@ -0,0 +1,70 @@ +# Sifnode Feature Deployments on GCP + +## Push + +Each feature branch will deploy a single Sifnode node to a testnet GKE cluster on Google Cloud, with each push. + +### Requirements + +If you wish to interact with your branch's namespace, you will need to install the following: + +* [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl) +* [gcloud SDK](https://cloud.google.com/sdk/docs/install) + +### Namespaces + +Each feature branch will have its own [namespace](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces). + +The namespace is derived from the branch name, however all slashes (`/`) will be converted to hyphens (`-`) and it will be converted to lowercase. + +For example: `feature/Some-Branch` will have a namespace of `feature-some-branch`. + +### kubectl + +In order to interact with the cluster and your namespace, you'll need to ensure that the dependencies above have been installed. + +Because the node endpoint is not exposed as part of the Github actions workflow, there are a few commands you'll need to run to obtain this. You'll require this when wanting to interact with your newly deployed node. + +1. Configure gcloud: + +``` +gcloud init +``` + +*Follow the on-screen instructions to authenticate and configure the SDK.* + +2. Create a new `kubeconfig`: + +``` +gcloud container clusters get-credentials --zone --project +``` + +3. Get your node's IP/s: + +``` +kubectl get svc -n +``` + +where `` is your namespace name, as above. + +The command will display those running services in the provided namespace: + +``` +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +sifnoded LoadBalancer 10.0.0.1 35.232.1.1 1317:30336/TCP 20h +sifnoded LoadBalancer 10.0.0.2 35.232.1.2 26656-26657:30840-30841/TCP 20h +``` + +You can then use the `EXTERNAL-IP` address to interact with the services, on the standard RPC/P2P (26656/26657) and rest (1317) ports. + +#### Troubleshooting + +If you're having trouble with your namespace, you can always query all available namespaces on the cluster: + +``` +kubectl get svc --all-namespaces +``` + +## Merging into Develop + +When your feature branch is merged, the namespace will be destroyed. diff --git a/gcp/gcp.go b/gcp/gcp.go new file mode 100644 index 0000000000..e69de29bb2