Skip to content

Commit 514bdd8

Browse files
committed
DigitalOcean setup instructions
1 parent c06e01c commit 514bdd8

File tree

1 file changed

+22
-64
lines changed

1 file changed

+22
-64
lines changed

README.md

+22-64
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,34 @@
1-
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=web-golang&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=web-golang)
2-
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=web-golang&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=web-golang)
3-
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=web-golang&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=web-golang)
4-
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=web-golang&metric=bugs)](https://sonarcloud.io/summary/new_code?id=web-golang)
5-
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=web-golang&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=web-golang)
61

7-
[![Quality gate](https://sonarcloud.io/api/project_badges/quality_gate?project=web-golang)](https://sonarcloud.io/summary/new_code?id=web-golang)
2+
# DigitalOcean setup instructions
83

9-
# web-golang
10-
web in go language from wiki example
114

12-
- CI deployment to GKE via github actions
135

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
159

16-
![immagine](https://user-images.githubusercontent.com/3272563/157900395-1fe1799a-1628-43c3-925a-863a15d53860.png)
1710

18-
## docker or minikube
11+
- Container Registry =
12+
- Integrating with Kubernetes > Save
1913

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-
![image](https://user-images.githubusercontent.com/3272563/158066376-db8e0e1f-7442-4bda-bc17-cd75b1979529.png)
66-
67-
## lens + minikube + stateful db pod
68-
69-
log from golang console seen inside Lens web frame for cluster observability
70-
71-
![image](https://user-images.githubusercontent.com/3272563/158406574-13008fcd-6c6e-48e4-b81a-25bfd4b72caa.png)
14+
- GitHub
15+
- update action secret CLUSTER_NAME
7216

17+
- Kubernetes > Marketplace
18+
- Install Nginx Ingress Controller
7319

20+
- Networking
21+
- IP from Load Balancer
22+
- create new A record in DNS Domain for http host
23+
- 30 TTL (seconds)
7424

25+
- Kubernetes > Marketplace
26+
- Install Cert-Manager
7527

28+
- Github
29+
- Run Workflow
7630

31+
Optional, for troubleshooting
32+
- Gitpod
33+
- install doctl
34+
- install kubectl

0 commit comments

Comments
 (0)