Skip to content

Commit 64c431a

Browse files
committed
syz-cluster: use fake-gcs-server
1 parent 3a52820 commit 64c431a

File tree

7 files changed

+129
-110
lines changed

7 files changed

+129
-110
lines changed

syz-cluster/README.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,37 @@
11
## Local installation steps
22

33
1. Install and start minikube: https://minikube.sigs.k8s.io/docs/start/
4-
2. Add a Spanner Add-on: https://minikube.sigs.k8s.io/docs/handbook/addons/cloud-spanner/
5-
3. Build all docker containers:
64
```
7-
$ make all-containers
5+
$ minikube start
86
```
9-
4. Install Argo Workflows: https://github.com/argoproj/argo-workflows/releases
10-
5. Add a minio bucket (in the local setup it's used by Argo to transfer artifacts):
7+
2. Add a Spanner Add-on: https://minikube.sigs.k8s.io/docs/handbook/addons/cloud-spanner/
118
```
12-
$ argo submit workflows/add-minio-bucket.yaml
9+
$ minikube addons enable cloud-spanner
1310
```
14-
6. Add Argo workflow templates:
11+
3. Build all docker containers (might take a while):
1512
```
16-
$ argo template create workflows/build-step/workflow-template.yaml
17-
$ argo template create workflows/triage-step/workflow-template.yaml
13+
$ make all-containers
1814
```
19-
7. Deploy the cluster:
15+
4. Deploy the cluster:
2016
```
17+
$ kubectl create namespace argo
2118
$ minikube kubectl -- kubectl apply -k ./overlays/dev/
19+
$ argo template create workflow/*/workflow-template.yaml
2220
$ make restart-spanner
2321
```
22+
23+
## Developmental tips
24+
25+
1. Install Argo Workflows client: https://github.com/argoproj/argo-workflows/releases
26+
27+
Then you can use the `argo` tool like this:
28+
29+
```
30+
$ argo list
31+
```
32+
33+
2. Forward the dashboard port:
34+
35+
```
36+
$ kubectl port-forward service/web-dashboard-service --address 0.0.0.0 50123:80
37+
```
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: fake-gcs-server
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app: fake-gcs-server
10+
template:
11+
metadata:
12+
labels:
13+
app: fake-gcs-server
14+
spec:
15+
initContainers:
16+
- name: create-test-bucket
17+
image: busybox
18+
command: ["sh", "-c", "mkdir -p /data/test-bucket"]
19+
volumeMounts:
20+
- name: data-volume
21+
mountPath: /data
22+
containers:
23+
- name: fake-gcs-server
24+
imagePullPolicy: IfNotPresent
25+
image: fsouza/fake-gcs-server
26+
args: ["-scheme", "http", "-public-host", "fake-gcs-server.default.svc.cluster.local"]
27+
ports:
28+
- containerPort: 4443
29+
volumeMounts:
30+
- name: data-volume
31+
mountPath: /data
32+
volumes:
33+
- name: data-volume
34+
emptyDir: {}
35+
---
36+
apiVersion: v1
37+
kind: Service
38+
metadata:
39+
name: fake-gcs-server
40+
spec:
41+
selector:
42+
app: fake-gcs-server
43+
ports:
44+
- protocol: TCP
45+
port: 4443
46+
targetPort: 4443
47+
type: LoadBalancer

syz-cluster/overlays/dev/kustomization.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,31 @@ resources:
77
- ../../series-tracker
88
- ../../kernel-disk
99
- global-config.yaml
10-
- minio.yaml
10+
- https://github.com/argoproj/argo-workflows/releases/download/v3.6.2/install.yaml
1111
- workflow-roles.yaml
12+
- fake-gcs.yaml
13+
- workflow-artifacts.yaml
14+
- blobs-pvc-dev.yaml
1215

1316
patches:
1417
- target:
1518
kind: Deployment
1619
patch: |-
1720
- op: replace
1821
path: /spec/template/spec/containers/0/imagePullPolicy
19-
value: Never
22+
value: IfNotPresent
23+
- target:
24+
kind: ConfigMap
25+
name: workflow-controller-configmap
26+
patch: |-
27+
- op: replace
28+
path: /data
29+
value:
30+
config: |
31+
executor:
32+
env:
33+
- name: STORAGE_EMULATOR_HOST
34+
value: http://fake-gcs-server.default.svc.cluster.local:4443
2035
2136
images:
2237
- name: controller-image

syz-cluster/overlays/dev/minio.yaml

Lines changed: 0 additions & 69 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: artifact-repositories
5+
annotations:
6+
workflows.argoproj.io/default-artifact-repository: gcs-repo
7+
data:
8+
gcs-repo: |
9+
gcs:
10+
bucket: test-bucket

syz-cluster/overlays/dev/workflow-roles.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,34 @@ roleRef:
2626
kind: Role
2727
name: argo-workflow-role
2828
apiGroup: rbac.authorization.k8s.io
29+
30+
---
31+
32+
apiVersion: rbac.authorization.k8s.io/v1
33+
kind: Role
34+
metadata:
35+
namespace: default
36+
name: executor
37+
rules:
38+
- apiGroups: ["argoproj.io"]
39+
resources:
40+
- workflowtaskresults
41+
verbs:
42+
- create
43+
- patch
44+
45+
---
46+
47+
apiVersion: rbac.authorization.k8s.io/v1
48+
kind: RoleBinding
49+
metadata:
50+
name: executor-default
51+
namespace: default
52+
roleRef:
53+
apiGroup: rbac.authorization.k8s.io
54+
kind: Role
55+
name: executor
56+
subjects:
57+
- kind: ServiceAccount
58+
name: default
59+
namespace: default

syz-cluster/workflow/add-minio-bucket.yaml

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)