Skip to content

Commit b43ce42

Browse files
committed
updated install instructions
1 parent 083d9a3 commit b43ce42

File tree

1 file changed

+100
-1
lines changed

1 file changed

+100
-1
lines changed

README.md

Lines changed: 100 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,104 @@ This is used by the [Introduction to GitOps](https://cloudacademy.com/course/int
33

44
![GitOps Demo](./docs/GitOps1.png)
55

6+
**Updates**
7+
- Fri 4 Dec 2020: Updated and validate install instructions to work with latest versions of tools and Flux chart
8+
69
## Fork Repo
7-
If you intend to watch the course and repeat the same instructions in your own environment, then you *must* fork this repository into your own GitHub account. The reason for this, is that you need to be the *owner* of the repo to be able to upload and configure a new *Deploy Key* within the *Settings* area of the repo. The new *Deploy Key* will contain the Flux operators SSH public key.
10+
If you intend to watch the course and repeat the same instructions in your own environment, then you *must* fork this repository into your own GitHub account. The reason for this, is that you need to be the *owner* of the repo to be able to upload and configure a new *Deploy Key* within the *Settings* area of the repo. The new *Deploy Key* will contain the Flux operators SSH public key.
11+
12+
## GitOps - Flux Install Instructions
13+
14+
### TOOLS (versions)
15+
16+
- helm (v3.4.0)
17+
- kubectl (1.19.3)
18+
- minikube (1.15.1)
19+
- k8s (v1.19.4)
20+
21+
**NOTE**: Helm3 is easier and more secure - doesn't require the Tiller component/service to be installed in the K8s cluster (Helm2 did)
22+
23+
### Step 1.
24+
25+
Start a K8s cluster locally - only do this if you need a cluster
26+
27+
```
28+
minikube start --memory=4g --kubernetes-version=v1.19.4
29+
```
30+
31+
### Step 2.
32+
33+
Use browser and open https://artifacthub.io/
34+
35+
Search for "Flux" - click on the "flux" chart result - here you can review the install instructions, which follow.
36+
37+
Run the following commands to install the "flux" chart
38+
39+
```
40+
helm repo add flux https://charts.fluxcd.io
41+
helm repo update
42+
```
43+
44+
```
45+
kubectl create ns flux
46+
kubectl create ns cloudacademy
47+
```
48+
49+
```
50+
helm search repo flux
51+
```
52+
53+
**NOTE**: replace the git.url parameter with YOUR FORKed copy - so that you can later set the SSH public key as a DeployKey within your own Github FORKed repo
54+
55+
```
56+
helm install flux --set [email protected]:cloudacademy/gitops-demo --namespace flux flux/flux --version 1.6.0
57+
```
58+
59+
**NOTE**: if needed you can perform a "helm upgrade" to change the Flux deployed chart's git.url like this:
60+
61+
```
62+
helm upgrade -i flux fluxcd/flux --set [email protected]:myaccount/gitops-demo --namespace flux
63+
```
64+
65+
Examine the rollout of Flux...
66+
67+
```
68+
kubectl rollout status deployment flux -n flux
69+
```
70+
71+
```
72+
kubectl get pods -n flux
73+
```
74+
75+
```
76+
kubectl -n flux logs deployment/flux --follow
77+
```
78+
79+
CTRL-C to exit previous command
80+
81+
### Step 3.
82+
83+
Retrieve SSH public key and then add as a DeployKey within your own Github FORKed repo:
84+
85+
```
86+
kubectl -n flux logs deployment/flux | grep identity.pub | cut -d '"' -f2
87+
```
88+
89+
### Step 4.
90+
91+
Check to see that the gitops-demo resources have been automatically deployed by Flux into the cloudacademy namespace within the K8s cluster
92+
93+
```
94+
kubectl get pods -n cloudacademy
95+
kubectl describe pod -n cloudacademy
96+
```
97+
98+
```
99+
kubectl get pods -n cloudacademy --watch
100+
```
101+
102+
CTRL-C to exit previous command
103+
104+
```
105+
kubectl rollout status deployment frontend -n cloudacademy
106+
```

0 commit comments

Comments
 (0)