Skip to content

Commit 2a0c8da

Browse files
committed
feat: implement GCP deployment documentation and k8s manifests
1 parent 1f07f1b commit 2a0c8da

2 files changed

Lines changed: 70 additions & 0 deletions

File tree

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Sifnode Feature Deployments on GCP
2+
3+
## Push
4+
5+
Each feature branch will deploy a single Sifnode node to a testnet GKE cluster on Google Cloud, with each push.
6+
7+
### Requirements
8+
9+
If you wish to interact with your branch's namespace, you will need to install the following:
10+
11+
* [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl)
12+
* [gcloud SDK](https://cloud.google.com/sdk/docs/install)
13+
14+
### Namespaces
15+
16+
Each feature branch will have its own [namespace](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces).
17+
18+
The namespace is derived from the branch name, however all slashes (`/`) will be converted to hyphens (`-`) and it will be converted to lowercase.
19+
20+
For example: `feature/Some-Branch` will have a namespace of `feature-some-branch`.
21+
22+
### kubectl
23+
24+
In order to interact with the cluster and your namespace, you'll need to ensure that the dependencies above have been installed.
25+
26+
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.
27+
28+
1. Configure gcloud:
29+
30+
```
31+
gcloud init
32+
```
33+
34+
*Follow the on-screen instructions to authenticate and configure the SDK.*
35+
36+
2. Create a new `kubeconfig`:
37+
38+
```
39+
gcloud container clusters get-credentials <cluster-name> --zone <zone> --project <project-id>
40+
```
41+
42+
3. Get your node's IP/s:
43+
44+
```
45+
kubectl get svc -n <namespace>
46+
```
47+
48+
where `<namespace>` is your namespace name, as above.
49+
50+
The command will display those running services in the provided namespace:
51+
52+
```
53+
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
54+
sifnoded LoadBalancer 10.0.0.1 35.232.1.1 1317:30336/TCP 20h
55+
sifnoded LoadBalancer 10.0.0.2 35.232.1.2 26656-26657:30840-30841/TCP 20h
56+
```
57+
58+
You can then use the `EXTERNAL-IP` address to interact with the services, on the standard RPC/P2P (26656/26657) and rest (1317) ports.
59+
60+
#### Troubleshooting
61+
62+
If you're having trouble with your namespace, you can always query all available namespaces on the cluster:
63+
64+
```
65+
kubectl get svc --all-namespaces
66+
```
67+
68+
## Merging into Develop
69+
70+
When your feature branch is merged, the namespace will be destroyed.

gcp/gcp.go

Whitespace-only changes.

0 commit comments

Comments
 (0)