|
1 |
| -[](https://sonarcloud.io/summary/new_code?id=web-golang) |
2 |
| -[](https://sonarcloud.io/summary/new_code?id=web-golang) |
3 |
| -[](https://sonarcloud.io/summary/new_code?id=web-golang) |
4 |
| -[](https://sonarcloud.io/summary/new_code?id=web-golang) |
5 |
| -[](https://sonarcloud.io/summary/new_code?id=web-golang) |
6 | 1 |
|
7 |
| -[](https://sonarcloud.io/summary/new_code?id=web-golang) |
| 2 | +# DigitalOcean setup instructions |
8 | 3 |
|
9 |
| -# web-golang |
10 |
| -web in go language from wiki example |
11 | 4 |
|
12 |
| -- CI deployment to GKE via github actions |
13 | 5 |
|
14 |
| -- end to end testing with cypress (screenshot of dashboard run below) |
| 6 | + - Create cluster |
| 7 | + - at least 2 nodes x (2GB RAM, 1 vCPU, 50GB storage) |
| 8 | + - 2 x $12/month |
15 | 9 |
|
16 |
| - |
17 | 10 |
|
18 |
| -## docker or minikube |
| 11 | + - Container Registry = |
| 12 | + - Integrating with Kubernetes > Save |
19 | 13 |
|
20 |
| -Without a google cloud subscription, do for example |
21 |
| -``` |
22 |
| -sudo systemctl start docker |
23 |
| -``` |
24 |
| -Either you simply |
25 |
| -``` |
26 |
| -docker run -p 80:8080 giuliohome/web.golang:latest |
27 |
| -``` |
28 |
| -and visit http://localhost/view/a1 |
29 |
| - |
30 |
| -or you can |
31 |
| -``` |
32 |
| -minikube start |
33 |
| -``` |
34 |
| -then deploy the demo to the local node |
35 |
| -``` |
36 |
| -minikube kubectl -- apply -f deployment.yml |
37 |
| -``` |
38 |
| -to get an external ip |
39 |
| -``` |
40 |
| -minikube tunnel -c --log_dir tunnel_log/ |
41 |
| -minikube kubectl -- get all |
42 |
| -``` |
43 |
| -Open the browser and check it out |
44 |
| - |
45 |
| -Finally reclaim all the space |
46 |
| -``` |
47 |
| -minikube stop |
48 |
| -minikube delete --purge --all |
49 |
| -``` |
50 |
| -and eventually |
51 |
| -``` |
52 |
| -docker system prune -a |
53 |
| -``` |
54 |
| - |
55 |
| -## end to end testing |
56 |
| - |
57 |
| -useful commands, especially for local dev |
58 |
| -``` |
59 |
| -npx cypress run --spec cypress\integration\1-getting-started\web-golang.js |
60 |
| -``` |
61 |
| -and |
62 |
| -``` |
63 |
| -npx cypress open |
64 |
| -``` |
65 |
| - |
66 |
| - |
67 |
| -## lens + minikube + stateful db pod |
68 |
| - |
69 |
| -log from golang console seen inside Lens web frame for cluster observability |
70 |
| - |
71 |
| - |
| 14 | + - GitHub |
| 15 | + - update action secret CLUSTER_NAME |
72 | 16 |
|
| 17 | + - Kubernetes > Marketplace |
| 18 | + - Install Nginx Ingress Controller |
73 | 19 |
|
| 20 | + - Networking |
| 21 | + - IP from Load Balancer |
| 22 | + - create new A record in DNS Domain for http host |
| 23 | + - 30 TTL (seconds) |
74 | 24 |
|
| 25 | + - Kubernetes > Marketplace |
| 26 | + - Install Cert-Manager |
75 | 27 |
|
| 28 | + - Github |
| 29 | + - Run Workflow |
76 | 30 |
|
| 31 | +Optional, for troubleshooting |
| 32 | +- Gitpod |
| 33 | + - install doctl |
| 34 | + - install kubectl |
0 commit comments