Skip to content

Commit 173cdc4

Browse files
committed
Documentation on DO setup
1 parent d177c8d commit 173cdc4

File tree

3 files changed

+51
-10
lines changed

3 files changed

+51
-10
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ Welcome to kubernetes MetaCPAN!
55
This documents the kubernetes implementation for MetaCPAN. This is a work in
66
progress document, more details will be added to the document as required.
77

8+
## Docs:
9+
10+
- [QuickStart](./docs/QuickStart.md)
11+
- [Digital Ocean Setup](./docs/DigitalOceanSetup.md)
12+
813
## Cluster deployment
914

1015
- We deploy to DigitalOcean (DO)

docs/DigitalOceanSetup.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
# Digital Ocean Setup
3+
4+
[Best practices](https://docs.digitalocean.com/developer-center/digitalocean-kubernetes-infrastructure-best-practices/)
5+
6+
## Network setup
7+
8+
```mermaid
9+
graph TD
10+
Fastly --> DOCluster
11+
subgraph DOCluster
12+
DO_Loadbalancer --> Nginx_LB
13+
Nginx_LB --> Node1
14+
Nginx_LB --> Node2
15+
Nginx_LB --> Node3
16+
end
17+
subgraph Node1
18+
Node1_Service1[Node 1 Services]
19+
end
20+
subgraph Node2
21+
Node2_Service1[Node 2 Services]
22+
end
23+
subgraph Node3
24+
Node3_Service1[Node 3 Services]
25+
end
26+
```
27+
We run 3 Nginx Ingress Load balancers, and will eventually setup so one per node, but they will load balance across all 3 nodes.
28+
29+
## Database
30+
31+
- [Database Operator docs](https://docs.digitalocean.com/products/kubernetes/how-to/use-operator/)
32+
- [Our deployment manifests](../platform/postgres/)
33+
34+
## Disk volumes
35+
36+
- [Volume Docs](https://docs.digitalocean.com/products/kubernetes/how-to/add-volumes/)
37+
- [Sharing with NFS](
38+
https://github.com/kubernetes-sigs/nfs-ganesha-server-and-external-provisioner)
39+
- [Our deployment manifests](../platform/nfs-provisioner/)

docs/QuickStart.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,24 @@
11
# Quick Start
22

3-
This document gets you up and communicating with the k8s cluster quickly as such
4-
it's light on details.
3+
This document gets you up and communicating with the k8s cluster quickly, as such it's light on details.
54

65
## Access
76

8-
Copy the relevant cluster config e.g [hz-mc.kubeconfig](https://github.com/metacpan/metacpan-credentials/blob/master/k8s/hz-mc.kubeconfig) or [https://github.com/metacpan/metacpan-credentials/blob/master/k8s/hc-mc.kubeconfig](hc-mc.kubeconfig) to `$HOME/.kube/config` (note those are in a private repo for mc admins only).
9-
10-
```sh
11-
mkdir $HOME/.kube
12-
cd $HOME/.kube
13-
cp ~/git/metacpan-credentials/k8s/hz-mc.kubeconfig ./config
14-
```
7+
Download the cluster config file from https://cloud.digitalocean.com/kubernetes/clusters/490ad197-959c-4024-945b-547fc99415ef?i=5289ac to `$HOME/.kube/config`
158

169
## Browsing the cluster, looking at logs, accessing the container
10+
Use: https://argocd.do.metacpan.org/ with your github account
11+
12+
Or:
13+
1714
1. [Install k9s](https://k9scli.io/topics/install/)
1815
2. Run `k9s` from the command line
1916
3. Browse the cluster
2017

2118
## Deploying applications
2219

2320
1. [Install kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)
24-
2. Use the `kubectl apply -k <directory path>` ( e.g. `kubectl apply -k apps/web/hz` ) command to deploy an application
21+
2. Use the `kubectl apply -k <directory path>` ( e.g. `kubectl apply -k apps/web/argo` ) command to deploy an application
2522
to a cluster. Use the appropriate directory structure to deploy the
2623
application to the intended environment.
2724

0 commit comments

Comments
 (0)