@@ -10,7 +10,7 @@ running on k8s somewhere, but is not covered here.
10
10
11
11
[ Deploy MinIO on Docker Compose] ( https://docs.min.io/docs/deploy-minio-on-docker-compose.html )
12
12
13
- This document is not step by step instruction , but provides the large parts. At the end you will have:
13
+ This document is not step by step instructions , but provides the large parts. At the end you will have:
14
14
15
15
- kind k8s local cluster
16
16
- minio bucket
@@ -44,14 +44,14 @@ usage as required to setup the development environment.
44
44
45
45
Install the minio plugin:
46
46
47
- ```
47
+ ``` shell
48
48
kubectl krew update
49
49
kubectl krew install minio
50
50
```
51
51
52
52
Add required helm chart repositories:
53
53
54
- ```
54
+ ``` shell
55
55
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
56
56
helm repo add filecoin https://filecoin-project.github.io/helm-charts
57
57
helm repo update
@@ -63,8 +63,8 @@ helm repo update
63
63
64
64
Create a cluster with three worker nodes.
65
65
66
- ```
67
- $ cat > cluster.yaml <<EOF
66
+ ``` yaml
67
+ # cluster.yaml
68
68
kind : Cluster
69
69
apiVersion : kind.x-k8s.io/v1alpha4
70
70
nodes :
74
74
- role : worker
75
75
EOF
76
76
```
77
- ```
78
- $ kind create cluster --config cluster.yaml
77
+ ``` shell
78
+ kind create cluster --config cluster.yaml
79
79
```
80
80
81
81
#### Moving Container Images
@@ -84,8 +84,8 @@ $ kind create cluster --config cluster.yaml
84
84
85
85
When building the docker container, you will need to move it into the cluster. Kind provides an easy way to do this.
86
86
87
- ```
88
- $ kind load docker-image filsnap:latest
87
+ ``` shell
88
+ kind load docker-image filsnap:latest
89
89
```
90
90
91
91
### Install Monitoring Stack
@@ -98,8 +98,8 @@ $ kind load docker-image filsnap:latest
98
98
Install the prometheus monitoring stack with grafana enabled and persistence storage. This configuration enables cluster
99
99
wide monitoring with no selectors, and persistence of data.
100
100
101
- ```
102
- $ cat > values-prom-stack.yaml <<EOF
101
+ ``` yaml
102
+ # values-prom-stack.yaml
103
103
prometheus :
104
104
prometheusSpec :
105
105
ruleSelector : {}
@@ -128,25 +128,25 @@ grafana:
128
128
size : 10Gi
129
129
EOF
130
130
```
131
- ```
131
+ ``` shell
132
132
helm install prometheus prometheus-community/kube-prometheus-stack -n monitoring --values values-prom-stack.yaml
133
133
```
134
134
135
135
### Installing MinIO Operator & Creating Tenant
136
136
137
137
[ More Information: Operator] ( https://github.com/minio/operator )
138
138
139
- ```
140
- $ kubectl minio init
139
+ ``` shell
140
+ kubectl minio init
141
141
```
142
142
143
143
#### Creating a Tenant
144
144
145
145
[ More Information: Tenant] ( https://docs.min.io/minio/k8s/tenant-management/deploy-minio-tenant.html )
146
146
147
- ```
148
- $ kubectl create namespace minio
149
- $ kubectl minio proxy -n minio-operator
147
+ ``` shell
148
+ kubectl create namespace minio
149
+ kubectl minio proxy -n minio-operator
150
150
```
151
151
152
152
Follow the instruction provided by ` minio proxy ` and login to the operator console then click the ` New Tenant ` .
@@ -171,8 +171,8 @@ Copy down the Console Credentials, you will also use these for api access to the
171
171
172
172
#### Accessining MinIO Console & Creating Bucket
173
173
174
- ```
175
- $ kubectl port-forward service/minio-console 9090:9090 -n minio
174
+ ``` shell
175
+ kubectl port-forward service/minio-console 9090:9090 -n minio
176
176
```
177
177
178
178
Open the console http://localhost:9090 and login using the Console Credentials.
@@ -183,8 +183,8 @@ Create a bucket called `filsnap` with all options disabled.
183
183
184
184
Create a namespace for the lotus daemons
185
185
186
- ```
187
- $ kubectl create namespace ntwk-butterflynet-filsnap
186
+ ``` shell
187
+ kubectl create namespace ntwk-butterflynet-filsnap
188
188
```
189
189
190
190
Note: This is the same namespace you will develop in, not technically required, but it's easier
@@ -194,34 +194,34 @@ is required, otherwise all operations are `read-only` and wouldn't require a tok
194
194
195
195
#### Creating a shared jwt token
196
196
197
- ```
198
- $ mkdir /tmp/secrets
199
- $ lotus-shed jwt new node
200
- $ lotus-shed base16 -decode < jwt-node.jwts > /tmp/secrets/auth-jwt-private
201
- $ cp jwt-node.token /tmp/secrets/jwt-all-privs-token
202
-
203
- $ lotus-shed jwt token --read --output /tmp/secrets/jwt-ro-privs-token jwt-node.jwts
204
- $ lotus-shed jwt token --read --write --output /tmp/secrets/jwt-rw-privs-token jwt-node.jwts
205
- $ lotus-shed jwt token --sign --output /tmp/secrets/jwt-so-privs-token jwt-node.jwts
206
-
207
- $ kubectl create secret generic lotus-jwt \
208
- --from-file=auth-jwt-private=/tmp/secrets/auth-jwt-private \
209
- --from-file=jwt-all-privs-token=/tmp/secrets/jwt-all-privs-token \
210
- --from-file=jwt-ro-privs-token=/tmp/secrets/jwt-ro-privs-token \
211
- --from-file=jwt-rw-privs-token=/tmp/secrets/jwt-rw-privs-token \
212
- --from-file=jwt-so-privs-token=/tmp/secrets/jwt-so-privs-token \
213
- --output=name --namespace ntwk-butterflynet-filsnap
214
-
215
- $ rm -rf /tmp/secrets
216
- $ rm jwt-node.jwts jwt-node.token
197
+ ``` shell
198
+ mkdir /tmp/secrets
199
+ lotus-shed jwt new node
200
+ lotus-shed base16 -decode < jwt-node.jwts > /tmp/secrets/auth-jwt-private
201
+ cp jwt-node.token /tmp/secrets/jwt-all-privs-token
202
+
203
+ lotus-shed jwt token --read --output /tmp/secrets/jwt-ro-privs-token jwt-node.jwts
204
+ lotus-shed jwt token --read --write --output /tmp/secrets/jwt-rw-privs-token jwt-node.jwts
205
+ lotus-shed jwt token --sign --output /tmp/secrets/jwt-so-privs-token jwt-node.jwts
206
+
207
+ kubectl create secret generic lotus-jwt \
208
+ --from-file=auth-jwt-private=/tmp/secrets/auth-jwt-private \
209
+ --from-file=jwt-all-privs-token=/tmp/secrets/jwt-all-privs-token \
210
+ --from-file=jwt-ro-privs-token=/tmp/secrets/jwt-ro-privs-token \
211
+ --from-file=jwt-rw-privs-token=/tmp/secrets/jwt-rw-privs-token \
212
+ --from-file=jwt-so-privs-token=/tmp/secrets/jwt-so-privs-token \
213
+ --output=name --namespace ntwk-butterflynet-filsnap
214
+
215
+ rm -rf /tmp/secrets
216
+ rm jwt-node.jwts jwt-node.token
217
217
```
218
218
219
219
#### Install Butterfly Lotus Daemons
220
220
221
221
[ Docker Images] ( https://hub.docker.com/r/travisperson/lotus/tags?page=1&name=butterfly )
222
222
223
- ```
224
- $ cat values-lotus.yaml <<EOF
223
+ ``` yaml
224
+ # values-lotus.yaml
225
225
image :
226
226
tag : butterflynet-<version>
227
227
@@ -260,7 +260,7 @@ persistence:
260
260
size : " 1Gi"
261
261
EOF
262
262
```
263
- ```
263
+ ``` shell
264
264
helm install lotus-a filecoin/lotus-fullnode --values values-lotus.yaml --namespace ntwk-butterflynet-filsnap
265
265
helm install lotus-b filecoin/lotus-fullnode --values values-lotus.yaml --namespace ntwk-butterflynet-filsnap
266
266
helm install lotus-c filecoin/lotus-fullnode --values values-lotus.yaml --namespace ntwk-butterflynet-filsnap
0 commit comments