summaryrefslogtreecommitdiffstats
path: root/clover/spinnaker/install/quick-install-spinnaker.yml
blob: c9354535ce9ee2228cb5dd152881740b1ed7fdbc (plain)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
apiVersion: v1
kind: Namespace
metadata:
  name: spinnaker

---

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: spinnaker-admin
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
- kind: ServiceAccount
  name: default
  namespace: spinnaker

---

apiVersion: v1
kind: Pod
metadata:
  name: spin-halyard
  namespace: spinnaker
  labels:
    app: spin
    stack: halyard
spec:
  containers:
  - name: halyard-daemon
    # todo - make :stable or digest of :stable
    image: gcr.io/spinnaker-marketplace/halyard:stable
    imagePullPolicy: Always
    command:
    - /bin/sh
    args:
    - -c
    # when the configmap is mounted directly at /home/spinnaker/.hal the halyard daemon
    # isn't able to replace the contents of the mount with user modifications.
    # so instead we mount the configmap elsewhere and copy the files into
    # place when the container starts.
    - "cp -R /home/spinnaker/staging/.hal /home/spinnaker/.hal && /opt/halyard/bin/halyard"
    readinessProbe:
      exec:
        command:
        - wget
        - -q
        - --spider
        - http://localhost:8064/health
    ports:
    - containerPort: 8064
    volumeMounts:
    - name: halconfig
      mountPath: /home/spinnaker/staging/.hal/config
      subPath: config
    - name: halconfig
      mountPath: /home/spinnaker/staging/.hal/default/service-settings/deck.yml
      subPath: deck.yml
    - name: halconfig
      mountPath: /home/spinnaker/staging/.hal/default/service-settings/gate.yml
      subPath: gate.yml
    - name: halconfig
      mountPath: /home/spinnaker/staging/.hal/default/service-settings/igor.yml
      subPath: igor.yml
    - name: halconfig
      mountPath: /home/spinnaker/staging/.hal/default/service-settings/fiat.yml
      subPath: fiat.yml
    - name: halconfig
      mountPath: /home/spinnaker/staging/.hal/default/profiles/front50-local.yml
      subPath: front50-local.yml
  volumes:
  - name: halconfig
    configMap:
      name: halconfig
---

apiVersion: v1
kind: Service
metadata:
  name: spin-halyard
  namespace: spinnaker
spec:
  ports:
    - port: 8064
      targetPort: 8064
      protocol: TCP
  selector:
    app: spin
    stack: halyard

---

apiVersion: v1
kind: ConfigMap
metadata:
  name: halconfig
  namespace: spinnaker
data:
  igor.yml: |
    enabled: true
  fiat.yml: |
    enabled: false
    skipLifeCycleManagement: true
  front50-local.yml: |
    spinnaker.s3.versioning: false
  gate.yml: |
    host: 0.0.0.0
  deck.yml: |
    host: 0.0.0.0
    env:
      API_HOST: http://spin-gate.spinnaker:8084/
  config: |
    currentDeployment: default
    deploymentConfigurations:
    - name: default
      version: 1.7.0
      providers:
        appengine:
          enabled: false
          accounts: []
        aws:
          enabled: false
          accounts: []
          defaultKeyPairTemplate: '{{name}}-keypair'
          defaultRegions:
          - name: us-west-2
          defaults:
            iamRole: BaseIAMRole
        azure:
          enabled: false
          accounts: []
          bakeryDefaults:
            templateFile: azure-linux.json
            baseImages: []
        dcos:
          enabled: false
          accounts: []
          clusters: []
        dockerRegistry:
          enabled: true
          accounts:
            - name: dockerhub
              address: https://index.docker.io
              repositories:
                - opnfv/clover
        google:
          enabled: false
          accounts: []
          bakeryDefaults:
            templateFile: gce.json
            baseImages: []
            zone: us-central1-f
            network: default
            useInternalIp: false
        kubernetes:
          enabled: true
          accounts:
          - name: my-kubernetes-account
            requiredGroupMembership: []
            providerVersion: V2
            dockerRegistries: []
            configureImagePullSecrets: true
            serviceAccount: true
            namespaces: []
            omitNamespaces: []
            kinds: []
            omitKinds: []
            customResources: []
            oauthScopes: []
            oAuthScopes: []
          primaryAccount: my-kubernetes-account
        openstack:
          enabled: false
          accounts: []
          bakeryDefaults:
            baseImages: []
        oraclebmcs:
          enabled: false
          accounts: []
      deploymentEnvironment:
        size: SMALL
        type: Distributed
        accountName: my-kubernetes-account
        updateVersions: true
        consul:
          enabled: false
        vault:
          enabled: false
        customSizing: {}
        gitConfig:
          upstreamUser: spinnaker
      persistentStorage:
        persistentStoreType: s3
        azs: {}
        gcs:
          rootFolder: front50
        redis: {}
        s3:
          bucket: spinnaker-artifacts
          rootFolder: front50
          endpoint: http://minio-service.spinnaker:9000
          accessKeyId: dont-use-this
          secretAccessKey: for-production
        oraclebmcs: {}
      features:
        auth: false
        fiat: false
        chaos: false
        entityTags: false
        jobs: false
      metricStores:
        datadog:
          enabled: false
        prometheus:
          enabled: false
          add_source_metalabels: true
        stackdriver:
          enabled: false
        period: 30
        enabled: false
      notifications:
        slack:
          enabled: false
      timezone: America/Los_Angeles
      ci:
        jenkins:
          enabled: true
          masters: []
        travis:
          enabled: false
          masters: []
      security:
        apiSecurity:
          ssl:
            enabled: false
          overrideBaseUrl: /gate
        uiSecurity:
          ssl:
            enabled: false
        authn:
          oauth2:
            enabled: false
            client: {}
            resource: {}
            userInfoMapping: {}
          saml:
            enabled: false
          ldap:
            enabled: false
          x509:
            enabled: false
          enabled: false
        authz:
          groupMembership:
            service: EXTERNAL
            google:
              roleProviderType: GOOGLE
            github:
              roleProviderType: GITHUB
            file:
              roleProviderType: FILE
          enabled: false
      artifacts:
        gcs:
          enabled: false
          accounts: []
        github:
          enabled: false
          accounts: []
        http:
          enabled: false
          accounts: []
      pubsub:
        google:
          enabled: false
          subscriptions: []

---

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: minio-pv-claim
  namespace: spinnaker
  labels:
    app: minio-storage-claim
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi
  storageClassName: standard

---

apiVersion: apps/v1beta1
kind: Deployment
metadata:
  # This name uniquely identifies the Deployment
  name: minio-deployment
  namespace: spinnaker
spec:
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: minio
    spec:
      volumes:
      - name: storage
        persistentVolumeClaim:
          claimName: minio-pv-claim
      containers:
      - name: minio
        image: minio/minio
        args:
        - server
        - /storage
        env:
        - name: MINIO_ACCESS_KEY
          value: "dont-use-this"
        - name: MINIO_SECRET_KEY
          value: "for-production"
        ports:
        - containerPort: 9000
        volumeMounts:
        - name: storage
          mountPath: /storage

---

apiVersion: v1
kind: Service
metadata:
  name: minio-service
  namespace: spinnaker
spec:
  ports:
    - port: 9000
      targetPort: 9000
      protocol: TCP
  selector:
    app: minio

---

apiVersion: batch/v1
kind: Job
metadata:
  name: hal-deploy-apply
  namespace: spinnaker
  labels:
    app: job
    stack: hal-deploy
spec:
  template:
    metadata:
      labels:
        app: job
        stack: hal-deploy
    spec:
      restartPolicy: OnFailure
      containers:
      - name: hal-deploy-apply
        # todo use a custom image
        image: gcr.io/spinnaker-marketplace/halyard:stable
        command:
        - /bin/sh
        args:
        - -c
        - "hal deploy apply --daemon-endpoint http://spin-halyard.spinnaker:8064"