-
Notifications
You must be signed in to change notification settings - Fork 4
/
init.sh
executable file
·56 lines (41 loc) · 1.85 KB
/
init.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
GCP_CREDENTIAL_PATH={GCP_CREDENTIAL_PATH}
# Create Namespace
kubectl create ns argo
kubectl create ns argo-events
kubectl create ns argocd
# Install CR For Argo Events
kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/manifests/namespace-install.yaml
# Depoly Event Bus
kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/eventbus/native.yaml
# Install CR For Argo & expose argo-server
kubectl apply -n argo -f https://raw.githubusercontent.com/argoproj/argo/stable/manifests/namespace-install.yaml
kubectl patch svc argo-server -n argo -p '{"spec": {"type": "LoadBalancer"}}'
# Install CR For Argo CD & expose argocd-server
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'
# Set Secret
## Github Access
kubectl apply -f secret/github-access-argo-event.yaml
kubectl apply -f secret/github-access-argo-workflow.yaml
## GCR Credentials
kubectl create secret generic argo-gcp --namespace=argo --from-file=google.json=${GCP_CREDENTIAL_PATH}
# Set Cluster Role & Cluster Role Binding
kubectl apply -f argo-clusterrole.yaml
## Deploy Key For Github Repository
kubectl apply -f secret/source-key-argo.yaml
kubectl apply -f secret/deploy-key-argo.yaml
kubectl apply -f secret/deploy-key-argocd.yaml
# Edit Workflow Controller Artifact to use GCS
kubectl edit configmap workflow-controller-configmap -n argo
# Deploy Event Source
kubectl apply -f event-source.yaml
kubectl apply -f event-source-svc.yaml
# Deploy Event Sensor
kubectl apply -f event-sensor.yaml
# Deploy Workflow template
kubectl apply -f workflow-template.yaml
# Set Repository Information
kubectl apply -f repository.yaml
# Create Application Template
kubectl apply -f application.yaml