Browse Source

Store Sonobuoy results in Ceph

This enables persistently storing Sonobuoy tests results tarball
in Ceph (authed with Keystone).

1. Adds job-ks-user and secrety-keystone to create Sonobuoy user in
Keystone
2. Sonobuoy pod has a results-publisher container that waits for
Sonobuoy container to populate test results directory with the tarball
3. results-publisher container creates Swift container for Sonobuoy
results
4. results-publisher adds Sonobuoy test results to Swift container
5. results-publisher sets expiry date on the object to be deleted
after 30 days

Change-Id: Ic2d9fb345dce1101040e60113564e7ecdb2c51ea
Dustin Specker 5 months ago
parent
commit
5559878087

+ 2
- 0
.zuul.yaml View File

@@ -61,12 +61,14 @@
61 61
     name: openstack-helm-addons-sonobuoy
62 62
     required-projects:
63 63
       - openstack/openstack-helm-infra
64
+      - openstack/openstack-helm
64 65
     roles:
65 66
       - zuul: openstack/openstack-helm-infra
66 67
     timeout: 7200
67 68
     vars:
68 69
       osh_openstack_release: newton
69 70
       zuul_osh_infra_relative_path: ../openstack-helm-infra/
71
+      zuul_osh_relative_path: ../openstack-helm/
70 72
     nodeset: openstack-helm-ubuntu
71 73
     pre-run:
72 74
       - tools/gate/playbooks/osh-infra-upgrade-host.yaml

+ 34
- 0
sonobuoy/templates/bin/_publish_results.sh.tpl View File

@@ -0,0 +1,34 @@
1
+#!/bin/bash
2
+
3
+{{/*
4
+Copyright 2017 The Openstack-Helm Authors.
5
+
6
+Licensed under the Apache License, Version 2.0 (the "License");
7
+you may not use this file except in compliance with the License.
8
+You may obtain a copy of the License at
9
+
10
+   http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+Unless required by applicable law or agreed to in writing, software
13
+distributed under the License is distributed on an "AS IS" BASIS,
14
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+See the License for the specific language governing permissions and
16
+limitations under the License.
17
+*/}}
18
+
19
+set -xe
20
+
21
+while [ "$(ls -l $RESULTS_DIR/*.tar.gz | wc -l)" -eq 0 ]; do
22
+  sleep 5
23
+done
24
+
25
+file_name=$(ls $RESULTS_DIR/*.tar.gz | xargs -n1 basename)
26
+prefixed_file_name={{ .Values.conf.swift.object_name_prefix }}$file_name
27
+
28
+openstack container create {{ .Values.conf.swift.container_name }}
29
+openstack container show {{ .Values.conf.swift.container_name }}
30
+
31
+openstack object create --name $prefixed_file_name {{ .Values.conf.swift.container_name }} $RESULTS_DIR/$file_name
32
+openstack object show {{ .Values.conf.swift.container_name }} $prefixed_file_name
33
+
34
+swift post {{ .Values.conf.swift.container_name }} $prefixed_file_name -H \"X-Delete-After:{{ .Values.conf.swift.delete_objects_after_seconds }}\"

+ 4
- 0
sonobuoy/templates/configmap-bin.yaml View File

@@ -22,6 +22,10 @@ kind: ConfigMap
22 22
 metadata:
23 23
   name: sonobuoy-bin
24 24
 data:
25
+  ks-user.sh: |
26
+{{- include "helm-toolkit.scripts.keystone_user" $envAll | indent 4 }}
27
+  publish_results.sh: |
28
+{{ tuple "bin/_publish_results.sh.tpl" $envAll | include "helm-toolkit.utils.template" | indent 4 }}
25 29
   run_master.sh: |
26 30
 {{ tuple "bin/_run_master.sh.tpl" $envAll | include "helm-toolkit.utils.template" | indent 4 }}
27 31
 {{- end }}

+ 20
- 0
sonobuoy/templates/job-ks-user.yaml View File

@@ -0,0 +1,20 @@
1
+{{/*
2
+Copyright 2017 The Openstack-Helm Authors.
3
+
4
+Licensed under the Apache License, Version 2.0 (the "License");
5
+you may not use this file except in compliance with the License.
6
+You may obtain a copy of the License at
7
+
8
+   http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+Unless required by applicable law or agreed to in writing, software
11
+distributed under the License is distributed on an "AS IS" BASIS,
12
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+See the License for the specific language governing permissions and
14
+limitations under the License.
15
+*/}}
16
+
17
+{{- if .Values.manifests.job_ks_user }}
18
+{{- $ksUserJob := dict "envAll" . "serviceName" "sonobuoy" -}}
19
+{{ $ksUserJob | include "helm-toolkit.manifests.job_ks_user" }}
20
+{{- end }}

+ 19
- 0
sonobuoy/templates/pod-api.yaml View File

@@ -58,6 +58,8 @@ metadata:
58 58
 spec:
59 59
   nodeSelector:
60 60
     {{ .Values.labels.api.node_selector_key }}: {{ .Values.labels.api.node_selector_value}}
61
+  initContainers:
62
+{{ tuple $envAll "sonobuoy" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }}
61 63
   containers:
62 64
   - name: kube-sonobuoy
63 65
     env:
@@ -79,6 +81,23 @@ spec:
79 81
       mountPath: /run_master.sh
80 82
       subPath: run_master.sh
81 83
       readOnly: true
84
+  - name: results-publisher
85
+{{ tuple $envAll "results_publisher" | include "helm-toolkit.snippets.image" | indent 4 }}
86
+    env:
87
+{{- with $env := dict "ksUserSecret" $envAll.Values.secrets.identity.sonobuoy }}
88
+{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 4 }}
89
+{{- end }}
90
+    - name: RESULTS_DIR
91
+      value: {{ .Values.conf.sonobuoy.ResultsDir }}
92
+    command:
93
+    - /publish_results.sh
94
+    volumeMounts:
95
+    - name: sonobuoy-bin
96
+      mountPath: /publish_results.sh
97
+      subPath: publish_results.sh
98
+      readOnly: true
99
+    - mountPath: {{ .Values.conf.sonobuoy.ResultsDir }}
100
+      name: sonobuoy-output
82 101
   restartPolicy: Never
83 102
   serviceAccountName: {{ $serviceAccountName }}
84 103
   volumes:

+ 30
- 0
sonobuoy/templates/secret-keystone.yaml View File

@@ -0,0 +1,30 @@
1
+{{/*
2
+Copyright 2017 The Openstack-Helm Authors.
3
+
4
+Licensed under the Apache License, Version 2.0 (the "License");
5
+you may not use this file except in compliance with the License.
6
+You may obtain a copy of the License at
7
+
8
+   http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+Unless required by applicable law or agreed to in writing, software
11
+distributed under the License is distributed on an "AS IS" BASIS,
12
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+See the License for the specific language governing permissions and
14
+limitations under the License.
15
+*/}}
16
+
17
+{{- if .Values.manifests.secret_keystone }}
18
+{{- $envAll := . }}
19
+{{- range $key1, $userClass := tuple "admin" "sonobuoy" }}
20
+{{- $secretName := index $envAll.Values.secrets.identity $userClass }}
21
+---
22
+apiVersion: v1
23
+kind: Secret
24
+metadata:
25
+  name: {{ $secretName }}
26
+type: Opaque
27
+data:
28
+{{- tuple $userClass "internal" $envAll | include "helm-toolkit.snippets.keystone_secret_openrc" | indent 2 -}}
29
+{{- end }}
30
+{{- end }}

+ 68
- 1
sonobuoy/values.yaml View File

@@ -14,6 +14,9 @@
14 14
 
15 15
 images:
16 16
   tags:
17
+    dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.3.1
18
+    ks_user: docker.io/openstackhelm/heat:ocata
19
+    results_publisher: docker.io/openstackhelm/heat:ocata
17 20
     sonobuoy_api: gcr.io/heptio-images/sonobuoy:v0.11.4
18 21
     systemd_logs: gcr.io/heptio-images/sonobuoy-plugin-systemd-logs:v0.1
19 22
   pull_policy: "IfNotPresent"
@@ -25,18 +28,82 @@ labels:
25 28
   api:
26 29
     node_selector_key: openstack-control-plane
27 30
     node_selector_value: enabled
31
+  job:
32
+    node_selector_key: openstack-control-plane
33
+    node_selector_value: enabled
28 34
 
29 35
 dependencies:
30 36
   dynamic: {}
31
-  static: {}
37
+  static:
38
+    sonobuoy:
39
+      jobs:
40
+      - sonobuoy-ks-user
41
+
42
+pod:
43
+  resources:
44
+    enabled: false
45
+    jobs:
46
+      ks_user:
47
+        requests:
48
+          memory: "128Mi"
49
+          cpu: "100m"
50
+        limits:
51
+          memory: "128Mi"
52
+          cpu: "2000m"
53
+
54
+secrets:
55
+  identity:
56
+    admin: sonobuoy-keystone-admin
57
+    sonobuoy: sonobuoy-keystone-user
58
+
59
+endpoints:
60
+  cluster_domain_suffix: cluster.local
61
+  identity:
62
+    name: keystone
63
+    auth:
64
+      admin:
65
+        region_name: RegionOne
66
+        username: admin
67
+        password: password
68
+        project_name: admin
69
+        user_domain_name: default
70
+        project_domain_name: default
71
+      sonobuoy:
72
+        role: admin
73
+        region_name: RegionOne
74
+        username: sonobuoy
75
+        password: password
76
+        project_name: sonobuoy
77
+        user_domain_name: sonobuoy
78
+        project_domain_name: sonobuoy
79
+    hosts:
80
+      default: keystone
81
+      internal: keystone-api
82
+    host_fqdn_override:
83
+      default: null
84
+    path:
85
+      default: /v3
86
+    scheme:
87
+      default: http
88
+    port:
89
+      api:
90
+        default: 80
91
+        internal: 5000
32 92
 
33 93
 manifests:
34 94
   configmap_bin: true
35 95
   configmap_plugins: true
96
+  job_ks_user: true
36 97
   pod_api: true
37 98
   secret_etc: true
99
+  secret_keystone: true
38 100
 
39 101
 conf:
102
+  swift:
103
+    container_name: sonobuoy
104
+    # delete objects after 1 month (60 * 60 * 24 * 30 seconds)
105
+    delete_objects_after_seconds: "2592000"
106
+    object_name_prefix: ""
40 107
   sonobuoy:
41 108
     Description: "sonobuoy run for scanner.heptio.com"
42 109
     Version: v0.11.4

+ 86
- 0
tools/gate/playbooks/osh-addons-sonobuoy.yaml View File

@@ -1,5 +1,91 @@
1 1
 - hosts: primary
2 2
   tasks:
3
+    - name: Build Charts
4
+      shell: |
5
+        set -xe;
6
+        ./tools/gate/scripts/010-setup-client.sh
7
+      args:
8
+        chdir: "{{ zuul_osh_addons_relative_path | default(zuul.project.src_dir) }}"
9
+    - name: Deploy MariaDB
10
+      environment:
11
+        OSH_EXTRA_HELM_ARGS: "{{ zuul_osh_extra_helm_args_relative_path | default('') }}"
12
+        OSH_INFRA_PATH: "{{ zuul_osh_infra_relative_path | default('') }}"
13
+        zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}"
14
+      shell: |
15
+        set -xe;
16
+        ./tools/gate/scripts/020-deploy-mariadb.sh
17
+      args:
18
+        chdir: "{{ zuul_osh_addons_relative_path | default(zuul.project.src_dir) }}"
19
+    - name: Deploy RabbitMQ
20
+      environment:
21
+        OSH_EXTRA_HELM_ARGS: "{{ zuul_osh_extra_helm_args_relative_path | default('') }}"
22
+        OSH_INFRA_PATH: "{{ zuul_osh_infra_relative_path | default('') }}"
23
+        zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}"
24
+      shell: |
25
+        set -xe;
26
+        ./tools/gate/scripts/030-deploy-rabbitmq.sh
27
+      args:
28
+        chdir: "{{ zuul_osh_addons_relative_path | default(zuul.project.src_dir) }}"
29
+    - name: Deploy Memcached
30
+      environment:
31
+        OSH_EXTRA_HELM_ARGS: "{{ zuul_osh_extra_helm_args_relative_path | default('') }}"
32
+        OSH_INFRA_PATH: "{{ zuul_osh_infra_relative_path | default('') }}"
33
+        zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}"
34
+      shell: |
35
+        set -xe;
36
+        ./tools/gate/scripts/040-deploy-memcached.sh
37
+      args:
38
+        chdir: "{{ zuul_osh_addons_relative_path | default(zuul.project.src_dir) }}"
39
+    - name: Deploy Keystone
40
+      environment:
41
+        OSH_EXTRA_HELM_ARGS: "{{ zuul_osh_extra_helm_args_relative_path | default('') }}"
42
+        OSH_PATH: "{{ zuul_osh_relative_path | default('') }}"
43
+        zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}"
44
+      shell: |
45
+        set -xe;
46
+        ./tools/gate/scripts/050-deploy-keystone.sh
47
+      args:
48
+        chdir: "{{ zuul_osh_addons_relative_path | default(zuul.project.src_dir) }}"
49
+    - name: Deploy Ceph
50
+      environment:
51
+        OSH_EXTRA_HELM_ARGS: "{{ zuul_osh_extra_helm_args_relative_path | default('') }}"
52
+        OSH_INFRA_PATH: "{{ zuul_osh_infra_relative_path | default('') }}"
53
+        zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}"
54
+      shell: |
55
+        set -xe;
56
+        ./tools/gate/scripts/080-deploy-ceph.sh
57
+      args:
58
+        chdir: "{{ zuul_osh_addons_relative_path | default(zuul.project.src_dir) }}"
59
+    - name: Activate Ceph Namespace
60
+      environment:
61
+        OSH_EXTRA_HELM_ARGS: "{{ zuul_osh_extra_helm_args_relative_path | default('') }}"
62
+        OSH_INFRA_PATH: "{{ zuul_osh_infra_relative_path | default('') }}"
63
+        zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}"
64
+      shell: |
65
+        set -xe;
66
+        ./tools/gate/scripts/085-ceph-ns-activate.sh
67
+      args:
68
+        chdir: "{{ zuul_osh_addons_relative_path | default(zuul.project.src_dir) }}"
69
+    - name: Deploy RadosGW
70
+      environment:
71
+        OSH_EXTRA_HELM_ARGS: "{{ zuul_osh_extra_helm_args_relative_path | default('') }}"
72
+        OSH_INFRA_PATH: "{{ zuul_osh_infra_relative_path | default('') }}"
73
+        zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}"
74
+      shell: |
75
+        set -xe;
76
+        ./tools/gate/scripts/090-radosgw-openstack.sh
77
+      args:
78
+        chdir: "{{ zuul_osh_addons_relative_path | default(zuul.project.src_dir) }}"
79
+    - name: Deploy Ingress
80
+      environment:
81
+        OSH_EXTRA_HELM_ARGS: "{{ zuul_osh_extra_helm_args_relative_path | default('') }}"
82
+        OSH_INFRA_PATH: "{{ zuul_osh_infra_relative_path | default('') }}"
83
+        zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}"
84
+      shell: |
85
+        set -xe;
86
+        ./tools/gate/scripts/100-ingress.sh
87
+      args:
88
+        chdir: "{{ zuul_osh_addons_relative_path | default(zuul.project.src_dir) }}"
3 89
     - name: Install and Test Sonobuoy Chart
4 90
       shell: |
5 91
         set -xe;

+ 101
- 0
tools/gate/scripts/080-deploy-ceph.sh View File

@@ -0,0 +1,101 @@
1
+#!/bin/bash
2
+
3
+# Copyright 2017 The Openstack-Helm Authors.
4
+#
5
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
6
+#    not use this file except in compliance with the License. You may obtain
7
+#    a copy of the License at
8
+#
9
+#         http://www.apache.org/licenses/LICENSE-2.0
10
+#
11
+#    Unless required by applicable law or agreed to in writing, software
12
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+#    License for the specific language governing permissions and limitations
15
+#    under the License.
16
+
17
+set -xe
18
+
19
+#NOTE: Lint and package chart
20
+: ${OSH_INFRA_PATH:="../openstack-helm-infra"}
21
+for CHART in ceph-mon ceph-osd ceph-client ceph-provisioners; do
22
+  make -C ${OSH_INFRA_PATH} "${CHART}"
23
+done
24
+
25
+#NOTE: Deploy command
26
+
27
+: ${OSH_EXTRA_HELM_ARGS:=""}
28
+CEPH_PUBLIC_NETWORK="$($OSH_INFRA_PATH/tools/deployment/multinode/kube-node-subnet.sh)"
29
+CEPH_CLUSTER_NETWORK="$($OSH_INFRA_PATH/tools/deployment/multinode/kube-node-subnet.sh)"
30
+[ -s /tmp/ceph-fs-uuid.txt ] || uuidgen > /tmp/ceph-fs-uuid.txt
31
+CEPH_FS_ID="$(cat /tmp/ceph-fs-uuid.txt)"
32
+#NOTE(portdirect): to use RBD devices with Ubuntu kernels < 4.5 this
33
+# should be set to 'hammer'
34
+. /etc/os-release
35
+if [ "x${ID}" == "xubuntu" ] && \
36
+   [ "$(uname -r | awk -F "." '{ print $2 }')" -lt "5" ]; then
37
+  CRUSH_TUNABLES=hammer
38
+else
39
+  CRUSH_TUNABLES=null
40
+fi
41
+tee /tmp/ceph.yaml <<EOF
42
+endpoints:
43
+  identity:
44
+    namespace: openstack
45
+  object_store:
46
+    namespace: ceph
47
+  ceph_mon:
48
+    namespace: ceph
49
+network:
50
+  public: ${CEPH_PUBLIC_NETWORK}
51
+  cluster: ${CEPH_CLUSTER_NETWORK}
52
+deployment:
53
+  storage_secrets: true
54
+  ceph: true
55
+  rbd_provisioner: true
56
+  cephfs_provisioner: true
57
+  client_secrets: false
58
+  rgw_keystone_user_and_endpoints: false
59
+bootstrap:
60
+  enabled: true
61
+conf:
62
+  ceph:
63
+    global:
64
+      fsid: ${CEPH_FS_ID}
65
+  rgw_ks:
66
+    enabled: true
67
+  pool:
68
+    crush:
69
+      tunables: ${CRUSH_TUNABLES}
70
+    target:
71
+      # NOTE(portdirect): 5 nodes, with one osd per node
72
+      osd: 5
73
+      pg_per_osd: 100
74
+  storage:
75
+    osd:
76
+      - data:
77
+          type: directory
78
+          location: /var/lib/openstack-helm/ceph/osd/osd-one
79
+        journal:
80
+          type: directory
81
+          location: /var/lib/openstack-helm/ceph/osd/journal-one
82
+EOF
83
+
84
+for CHART in ceph-mon ceph-osd ceph-client ceph-provisioners; do
85
+  helm upgrade --install ${CHART} ${OSH_INFRA_PATH}/${CHART} \
86
+    --namespace=ceph \
87
+    --values=/tmp/ceph.yaml \
88
+    ${OSH_EXTRA_HELM_ARGS} \
89
+    ${OSH_EXTRA_HELM_ARGS_CEPH_DEPLOY}
90
+
91
+  #NOTE: Wait for deploy
92
+  ./tools/gate/scripts/wait-for-pods.sh ceph
93
+
94
+  #NOTE: Validate deploy
95
+  MON_POD=$(kubectl get pods \
96
+    --namespace=ceph \
97
+    --selector="application=ceph" \
98
+    --selector="component=mon" \
99
+    --no-headers | awk '{ print $1; exit }')
100
+  kubectl exec -n ceph ${MON_POD} -- ceph -s
101
+done

+ 63
- 0
tools/gate/scripts/085-ceph-ns-activate.sh View File

@@ -0,0 +1,63 @@
1
+#!/bin/bash
2
+
3
+# Copyright 2017 The Openstack-Helm Authors.
4
+#
5
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
6
+#    not use this file except in compliance with the License. You may obtain
7
+#    a copy of the License at
8
+#
9
+#         http://www.apache.org/licenses/LICENSE-2.0
10
+#
11
+#    Unless required by applicable law or agreed to in writing, software
12
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+#    License for the specific language governing permissions and limitations
15
+#    under the License.
16
+
17
+set -xe
18
+
19
+#NOTE: Lint and package chart
20
+: ${OSH_INFRA_PATH:="../openstack-helm-infra"}
21
+make -C ${OSH_INFRA_PATH} ceph-provisioners
22
+
23
+#NOTE: Deploy command
24
+: ${OSH_EXTRA_HELM_ARGS:=""}
25
+CEPH_PUBLIC_NETWORK="$($OSH_INFRA_PATH/tools/deployment/multinode/kube-node-subnet.sh)"
26
+CEPH_CLUSTER_NETWORK="$($OSH_INFRA_PATH/tools/deployment/multinode/kube-node-subnet.sh)"
27
+tee /tmp/ceph-openstack-config.yaml <<EOF
28
+endpoints:
29
+  identity:
30
+    namespace: openstack
31
+  object_store:
32
+    namespace: ceph
33
+  ceph_mon:
34
+    namespace: ceph
35
+network:
36
+  public: ${CEPH_PUBLIC_NETWORK}
37
+  cluster: ${CEPH_CLUSTER_NETWORK}
38
+deployment:
39
+  storage_secrets: false
40
+  ceph: false
41
+  rbd_provisioner: false
42
+  cephfs_provisioner: false
43
+  client_secrets: true
44
+  rgw_keystone_user_and_endpoints: false
45
+bootstrap:
46
+  enabled: false
47
+conf:
48
+  rgw_ks:
49
+    enabled: true
50
+EOF
51
+helm upgrade --install ceph-openstack-config ${OSH_INFRA_PATH}/ceph-provisioners \
52
+  --namespace=openstack \
53
+  --values=/tmp/ceph-openstack-config.yaml \
54
+  ${OSH_EXTRA_HELM_ARGS} \
55
+  ${OSH_EXTRA_HELM_ARGS_CEPH_NS_ACTIVATE}
56
+
57
+#NOTE: Wait for deploy
58
+./tools/gate/scripts/wait-for-pods.sh openstack
59
+
60
+#NOTE: Validate Deployment info
61
+kubectl get -n openstack jobs --show-all
62
+kubectl get -n openstack secrets
63
+kubectl get -n openstack configmaps

+ 64
- 0
tools/gate/scripts/090-radosgw-openstack.sh View File

@@ -0,0 +1,64 @@
1
+#!/bin/bash
2
+
3
+# Copyright 2017 The Openstack-Helm Authors.
4
+#
5
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
6
+#    not use this file except in compliance with the License. You may obtain
7
+#    a copy of the License at
8
+#
9
+#         http://www.apache.org/licenses/LICENSE-2.0
10
+#
11
+#    Unless required by applicable law or agreed to in writing, software
12
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+#    License for the specific language governing permissions and limitations
15
+#    under the License.
16
+
17
+set -xe
18
+
19
+#NOTE: Lint and package chart
20
+: ${OSH_INFRA_PATH:="../openstack-helm-infra"}
21
+make -C ${OSH_INFRA_PATH} ceph-rgw
22
+
23
+#NOTE: Deploy command
24
+: ${OSH_EXTRA_HELM_ARGS:=""}
25
+CEPH_PUBLIC_NETWORK="$($OSH_INFRA_PATH/tools/deployment/multinode/kube-node-subnet.sh)"
26
+CEPH_CLUSTER_NETWORK="$($OSH_INFRA_PATH/tools/deployment/multinode/kube-node-subnet.sh)"
27
+tee /tmp/radosgw-openstack.yaml <<EOF
28
+endpoints:
29
+  identity:
30
+    namespace: openstack
31
+  object_store:
32
+    namespace: openstack
33
+  ceph_mon:
34
+    namespace: ceph
35
+network:
36
+  public: ${CEPH_PUBLIC_NETWORK}
37
+  cluster: ${CEPH_CLUSTER_NETWORK}
38
+deployment:
39
+  storage_secrets: false
40
+  ceph: true
41
+  rbd_provisioner: false
42
+  cephfs_provisioner: false
43
+  client_secrets: false
44
+  rgw_keystone_user_and_endpoints: true
45
+bootstrap:
46
+  enabled: false
47
+conf:
48
+  rgw_ks:
49
+    enabled: true
50
+pod:
51
+  replicas:
52
+    rgw: 1
53
+EOF
54
+helm upgrade --install radosgw-openstack ${OSH_INFRA_PATH}/ceph-rgw \
55
+  --namespace=openstack \
56
+  --values=/tmp/radosgw-openstack.yaml \
57
+  ${OSH_EXTRA_HELM_ARGS} \
58
+  ${OSH_EXTRA_HELM_ARGS_CEPH_RGW}
59
+
60
+#NOTE: Wait for deploy
61
+./tools/gate/scripts/wait-for-pods.sh openstack
62
+
63
+#NOTE: Validate Deployment info
64
+helm status radosgw-openstack

+ 61
- 0
tools/gate/scripts/100-ingress.sh View File

@@ -0,0 +1,61 @@
1
+#!/bin/bash
2
+
3
+# Copyright 2017 The Openstack-Helm Authors.
4
+#
5
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
6
+#    not use this file except in compliance with the License. You may obtain
7
+#    a copy of the License at
8
+#
9
+#         http://www.apache.org/licenses/LICENSE-2.0
10
+#
11
+#    Unless required by applicable law or agreed to in writing, software
12
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+#    License for the specific language governing permissions and limitations
15
+#    under the License.
16
+
17
+set -xe
18
+
19
+#NOTE: Deploy global ingress
20
+: ${OSH_INFRA_PATH:="../openstack-helm-infra"}
21
+tee /tmp/ingress-kube-system.yaml << EOF
22
+pod:
23
+  replicas:
24
+    error_page: 2
25
+deployment:
26
+  mode: cluster
27
+  type: DaemonSet
28
+network:
29
+  host_namespace: true
30
+EOF
31
+helm upgrade --install ingress-kube-system ${OSH_INFRA_PATH}/ingress \
32
+  --namespace=kube-system \
33
+  --values=/tmp/ingress-kube-system.yaml \
34
+  ${OSH_EXTRA_HELM_ARGS} \
35
+  ${OSH_EXTRA_HELM_ARGS_INGRESS_KUBE_SYSTEM}
36
+
37
+#NOTE: Wait for deploy
38
+./tools/gate/scripts/wait-for-pods.sh kube-system
39
+
40
+#NOTE: Display info
41
+helm status ingress-kube-system
42
+
43
+#NOTE: Deploy namespaced ingress controllers
44
+for NAMESPACE in openstack ceph; do
45
+  #NOTE: Deploy namespace ingress
46
+  tee /tmp/ingress-${NAMESPACE}.yaml << EOF
47
+pod:
48
+  replicas:
49
+    ingress: 2
50
+    error_page: 2
51
+EOF
52
+  helm upgrade --install ingress-${NAMESPACE} ${OSH_INFRA_PATH}/ingress \
53
+    --namespace=${NAMESPACE} \
54
+    --values=/tmp/ingress-${NAMESPACE}.yaml
55
+
56
+  #NOTE: Wait for deploy
57
+  ./tools/gate/scripts/wait-for-pods.sh ${NAMESPACE}
58
+
59
+  #NOTE: Display info
60
+  helm status ingress-${NAMESPACE}
61
+done

+ 3
- 1
tools/gate/scripts/sonobuoy.sh View File

@@ -17,5 +17,7 @@
17 17
 set -xe
18 18
 
19 19
 helm dependency update sonobuoy
20
-helm install sonobuoy --namespace=heptio-sonobuoy --name=sonobuoy
20
+helm upgrade --install sonobuoy sonobuoy \
21
+    --namespace=heptio-sonobuoy \
22
+    --set endpoints.identity.namespace=openstack
21 23
 helm test sonobuoy

Loading…
Cancel
Save