From db643c1cdd1d8aef0e04c27a94a072ba1cd25408 Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Tue, 20 Feb 2018 21:18:07 -0600 Subject: [PATCH] Single node dev deploy gate for osh-infra This adds a gate for a single node development deployment for all charts in openstack-helm-infra Change-Id: I42e8daf41a7eec428ec3d269adbb5c416d092818 --- .zuul.yaml | 10 ++ playbooks/osh-infra-dev-deploy.yaml | 100 ++++++++++++++++++ .../common/010-deploy-docker-registry.sh | 60 +++++++++++ .../common/020-lma-nfs-provisioner.sh | 35 ++++++ .../common/050-kube-state-metrics.sh | 30 ++++++ tools/deployment/common/060-node-exporter.sh | 30 ++++++ .../common/070-openstack-exporter.sh | 41 +++++++ tools/deployment/common/120-kibana.sh | 32 ++++++ tools/deployment/common/wait-for-pods.sh | 43 ++++++++ .../developer/000-install-packages.sh | 25 +++++ tools/deployment/developer/005-deploy-k8s.sh | 20 ++++ .../developer/010-deploy-docker-registry.sh | 1 + .../developer/020-lma-nfs-provisioner.sh | 1 + tools/deployment/developer/030-prometheus.sh | 41 +++++++ .../deployment/developer/040-alertmanager.sh | 44 ++++++++ .../developer/050-kube-state-metrics.sh | 1 + .../deployment/developer/060-node-exporter.sh | 1 + .../developer/070-openstack-exporter.sh | 1 + tools/deployment/developer/080-grafana.sh | 59 +++++++++++ tools/deployment/developer/090-nagios.sh | 32 ++++++ .../deployment/developer/100-elasticsearch.sh | 42 ++++++++ .../developer/110-fluent-logging.sh | 32 ++++++ tools/deployment/developer/120-kibana.sh | 1 + 23 files changed, 682 insertions(+) create mode 100644 playbooks/osh-infra-dev-deploy.yaml create mode 100755 tools/deployment/common/010-deploy-docker-registry.sh create mode 100755 tools/deployment/common/020-lma-nfs-provisioner.sh create mode 100755 tools/deployment/common/050-kube-state-metrics.sh create mode 100755 tools/deployment/common/060-node-exporter.sh create mode 100755 tools/deployment/common/070-openstack-exporter.sh create mode 100755 tools/deployment/common/120-kibana.sh create mode 100755 tools/deployment/common/wait-for-pods.sh create mode 100755 tools/deployment/developer/000-install-packages.sh create mode 100755 tools/deployment/developer/005-deploy-k8s.sh create mode 120000 tools/deployment/developer/010-deploy-docker-registry.sh create mode 120000 tools/deployment/developer/020-lma-nfs-provisioner.sh create mode 100755 tools/deployment/developer/030-prometheus.sh create mode 100755 tools/deployment/developer/040-alertmanager.sh create mode 120000 tools/deployment/developer/050-kube-state-metrics.sh create mode 120000 tools/deployment/developer/060-node-exporter.sh create mode 120000 tools/deployment/developer/070-openstack-exporter.sh create mode 100755 tools/deployment/developer/080-grafana.sh create mode 100755 tools/deployment/developer/090-nagios.sh create mode 100755 tools/deployment/developer/100-elasticsearch.sh create mode 100755 tools/deployment/developer/110-fluent-logging.sh create mode 120000 tools/deployment/developer/120-kibana.sh diff --git a/.zuul.yaml b/.zuul.yaml index 41615578d..d78167283 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -23,6 +23,8 @@ voting: true - openstack-helm-infra-fedora: voting: false + - openstack-helm-infra-dev-deploy: + voting: false gate: jobs: - openstack-helm-infra-linter @@ -194,6 +196,14 @@ parent: openstack-helm-infra nodeset: openstack-helm-fedora +- job: + name: openstack-helm-infra-dev-deploy + timeout: 7200 + pre-run: playbooks/osh-infra-upgrade-host.yaml + run: playbooks/osh-infra-dev-deploy.yaml + post-run: playbooks/osh-infra-collect-logs.yaml + nodeset: openstack-helm-single-node + - job: name: openstack-helm-infra-five-ubuntu parent: openstack-helm-infra diff --git a/playbooks/osh-infra-dev-deploy.yaml b/playbooks/osh-infra-dev-deploy.yaml new file mode 100644 index 000000000..2b65302fa --- /dev/null +++ b/playbooks/osh-infra-dev-deploy.yaml @@ -0,0 +1,100 @@ +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +- hosts: primary + tasks: + - name: Deploy Required packages + shell: | + set -xe; + ./tools/deployment/developer/000-install-packages.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Kubernetes + shell: | + set -xe; + ./tools/deployment/developer/005-deploy-k8s.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Registry NFS, Redis, and Docker Registry + shell: | + set -xe; + ./tools/deployment/developer/010-deploy-docker-registry.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy NFS for Logging, Monitoring and Alerting Components + shell: | + set -xe; + ./tools/deployment/developer/020-lma-nfs-provisioner.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Prometheus + shell: | + set -xe; + ./tools/deployment/developer/030-prometheus.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Alertmanager + shell: | + set -xe; + ./tools/deployment/developer/040-alertmanager.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Kube-State-Metrics + shell: | + set -xe; + ./tools/deployment/developer/050-kube-state-metrics.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Node Exporter + shell: | + set -xe; + ./tools/deployment/developer/060-node-exporter.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Prometheus OpenStack Exporter + shell: | + set -xe; + ./tools/deployment/developer/070-openstack-exporter.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Grafana + shell: | + set -xe; + ./tools/deployment/developer/080-grafana.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Nagios + shell: | + set -xe; + ./tools/deployment/developer/090-nagios.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Elasticsearch + shell: | + set -xe; + ./tools/deployment/developer/100-elasticsearch.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Fluent-Logging + shell: | + set -xe; + ./tools/deployment/developer/110-fluent-logging.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Kibana + shell: | + set -xe; + ./tools/deployment/developer/120-kibana.sh + args: + chdir: "{{ zuul.project.src_dir }}" diff --git a/tools/deployment/common/010-deploy-docker-registry.sh b/tools/deployment/common/010-deploy-docker-registry.sh new file mode 100755 index 000000000..c6fbfa0a3 --- /dev/null +++ b/tools/deployment/common/010-deploy-docker-registry.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +set -xe + +#NOTE: Pull images and lint charts for deploying the docker registry +make pull-images nfs-provisioner +make pull-images redis +make pull-images registry + +#NOTE: Deploy nfs for the docker registry +tee /tmp/docker-registry-nfs-provisioner.yaml << EOF +labels: + node_selector_key: openstack-helm-node-class + node_selector_value: primary +storageclass: + name: openstack-helm-bootstrap +EOF +helm upgrade --install docker-registry-nfs-provisioner \ + ./nfs-provisioner --namespace=docker-registry \ + --values=/tmp/docker-registry-nfs-provisioner.yaml + +#NOTE: Deploy redis for the docker registry +helm upgrade --install docker-registry-redis ./redis \ + --namespace=docker-registry \ + --set labels.node_selector_key=openstack-helm-node-class \ + --set labels.node_selector_value=primary + +#NOTE: Deploy the docker registry +tee /tmp/docker-registry.yaml << EOF +labels: + node_selector_key: openstack-helm-node-class + node_selector_value: primary +volume: + class_name: openstack-helm-bootstrap +EOF +helm upgrade --install docker-registry ./registry \ + --namespace=docker-registry \ + --values=/tmp/docker-registry.yaml + +#NOTE: Wait for deployments +./tools/deployment/common/wait-for-pods.sh docker-registry + +#NOTE: Validate Deployment info +helm status docker-registry-nfs-provisioner +helm status docker-registry-redis +helm status docker-registry diff --git a/tools/deployment/common/020-lma-nfs-provisioner.sh b/tools/deployment/common/020-lma-nfs-provisioner.sh new file mode 100755 index 000000000..55be5f35f --- /dev/null +++ b/tools/deployment/common/020-lma-nfs-provisioner.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +set -xe + +#NOTE: Deploy nfs instance for logging, monitoring and alerting components +tee /tmp/lma-nfs-provisioner.yaml << EOF +labels: + node_selector_key: openstack-control-plane + node_selector_value: enabled +storageclass: + name: openstack-helm-lma-nfs +EOF +helm upgrade --install lma-nfs-provisioner \ + ./nfs-provisioner --namespace=openstack \ + --values=/tmp/lma-nfs-provisioner.yaml + +#NOTE: Wait for deployment +./tools/deployment/common/wait-for-pods.sh openstack + +#NOTE: Validate Deployment info +helm status lma-nfs-provisioner diff --git a/tools/deployment/common/050-kube-state-metrics.sh b/tools/deployment/common/050-kube-state-metrics.sh new file mode 100755 index 000000000..e75dcaa1a --- /dev/null +++ b/tools/deployment/common/050-kube-state-metrics.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +set -xe + +#NOTE: Pull images and lint chart +make pull-images prometheus-kube-state-metrics + +#NOTE: Deploy command +helm upgrade --install prometheus-kube-state-metrics \ + ./prometheus-kube-state-metrics --namespace=kube-system + +#NOTE: Wait for deploy +./tools/deployment/common/wait-for-pods.sh kube-system + +#NOTE: Validate Deployment info +helm status prometheus-kube-state-metrics diff --git a/tools/deployment/common/060-node-exporter.sh b/tools/deployment/common/060-node-exporter.sh new file mode 100755 index 000000000..5e03c835f --- /dev/null +++ b/tools/deployment/common/060-node-exporter.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +set -xe + +#NOTE: Pull images and lint chart +make pull-images prometheus-node-exporter + +#NOTE: Deploy command +helm upgrade --install prometheus-node-exporter \ + ./prometheus-node-exporter --namespace=kube-system + +#NOTE: Wait for deploy +./tools/deployment/common/wait-for-pods.sh kube-system + +#NOTE: Validate Deployment info +helm status prometheus-node-exporter diff --git a/tools/deployment/common/070-openstack-exporter.sh b/tools/deployment/common/070-openstack-exporter.sh new file mode 100755 index 000000000..b107e9fe6 --- /dev/null +++ b/tools/deployment/common/070-openstack-exporter.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +set -xe + +#NOTE: Pull images and lint chart +make pull-images prometheus-openstack-exporter + +#NOTE: Deploy command +tee /tmp/prometheus-openstack-exporter.yaml << EOF +manifests: + job_ks_user: false +dependencies: + static: + prometheus_openstack_exporter: + jobs: null + services: null +EOF +helm upgrade --install prometheus-openstack-exporter \ + ./prometheus-openstack-exporter \ + --namespace=openstack \ + --values=/tmp/prometheus-openstack-exporter.yaml + +#NOTE: Wait for deploy +./tools/deployment/common/wait-for-pods.sh openstack + +#NOTE: Validate Deployment info +helm status prometheus-openstack-exporter diff --git a/tools/deployment/common/120-kibana.sh b/tools/deployment/common/120-kibana.sh new file mode 100755 index 000000000..c440011bc --- /dev/null +++ b/tools/deployment/common/120-kibana.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +set -xe + +#NOTE: Pull images and lint chart +make pull-images kibana + +#NOTE: Deploy command +helm upgrade --install kibana ./kibana \ + --namespace=openstack \ + --set network.kibana.node_port.enabled=true \ + --set network.kibana.ingress.public=false + +#NOTE: Wait for deploy +./tools/deployment/common/wait-for-pods.sh openstack + +#NOTE: Validate Deployment info +helm status kibana diff --git a/tools/deployment/common/wait-for-pods.sh b/tools/deployment/common/wait-for-pods.sh new file mode 100755 index 000000000..f6ea65769 --- /dev/null +++ b/tools/deployment/common/wait-for-pods.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +set -e + +# From Kolla-Kubernetes, orginal authors Kevin Fox & Serguei Bezverkhi +# Default wait timeout is 600 seconds +end=$(date +%s) +if ! [ -z $2 ]; then + end=$((end + $2)) +else + end=$((end + 900)) +fi +while true; do + kubectl get pods --namespace=$1 -o json | jq -r \ + '.items[].status.phase' | grep Pending > /dev/null && \ + PENDING=True || PENDING=False + query='.items[]|select(.status.phase=="Running")' + query="$query|.status.containerStatuses[].ready" + kubectl get pods --namespace=$1 -o json | jq -r "$query" | \ + grep false > /dev/null && READY="False" || READY="True" + kubectl get jobs -o json --namespace=$1 | jq -r \ + '.items[] | .spec.completions == .status.succeeded' | \ + grep false > /dev/null && JOBR="False" || JOBR="True" + [ $PENDING == "False" -a $READY == "True" -a $JOBR == "True" ] && \ + break || true + sleep 5 + now=$(date +%s) + [ $now -gt $end ] && echo containers failed to start. && \ + kubectl get pods --namespace $1 -o wide && exit -1 +done diff --git a/tools/deployment/developer/000-install-packages.sh b/tools/deployment/developer/000-install-packages.sh new file mode 100755 index 000000000..4b3129b07 --- /dev/null +++ b/tools/deployment/developer/000-install-packages.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +set -xe + +sudo apt-get update +sudo apt-get install --no-install-recommends -y \ + ca-certificates \ + git \ + make \ + nmap \ + curl diff --git a/tools/deployment/developer/005-deploy-k8s.sh b/tools/deployment/developer/005-deploy-k8s.sh new file mode 100755 index 000000000..b0a3e8cc8 --- /dev/null +++ b/tools/deployment/developer/005-deploy-k8s.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +set -xe + +make dev-deploy setup-host +make dev-deploy k8s diff --git a/tools/deployment/developer/010-deploy-docker-registry.sh b/tools/deployment/developer/010-deploy-docker-registry.sh new file mode 120000 index 000000000..7360ae428 --- /dev/null +++ b/tools/deployment/developer/010-deploy-docker-registry.sh @@ -0,0 +1 @@ +../common/010-deploy-docker-registry.sh \ No newline at end of file diff --git a/tools/deployment/developer/020-lma-nfs-provisioner.sh b/tools/deployment/developer/020-lma-nfs-provisioner.sh new file mode 120000 index 000000000..afcbfbe42 --- /dev/null +++ b/tools/deployment/developer/020-lma-nfs-provisioner.sh @@ -0,0 +1 @@ +../common/020-lma-nfs-provisioner.sh \ No newline at end of file diff --git a/tools/deployment/developer/030-prometheus.sh b/tools/deployment/developer/030-prometheus.sh new file mode 100755 index 000000000..e4acd671c --- /dev/null +++ b/tools/deployment/developer/030-prometheus.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +set -xe + +#NOTE: Pull images and lint chart +make pull-images prometheus + +#NOTE: Deploy command +tee /tmp/prometheus.yaml << EOF +storage: + storage_class: openstack-helm-lma-nfs +network: + prometheus: + ingress: + public: false + node_port: + enabled: true +EOF +helm upgrade --install prometheus ./prometheus \ + --namespace=openstack \ + --values=/tmp/prometheus.yaml + +#NOTE: Wait for deploy +./tools/deployment/common/wait-for-pods.sh openstack + +#NOTE: Validate Deployment info +helm status prometheus diff --git a/tools/deployment/developer/040-alertmanager.sh b/tools/deployment/developer/040-alertmanager.sh new file mode 100755 index 000000000..a57e21f5f --- /dev/null +++ b/tools/deployment/developer/040-alertmanager.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +set -xe + +#NOTE: Pull images and lint chart +make pull-images alertmanager + +#NOTE: Deploy command +tee /tmp/prometheus-alertmanager.yaml << EOF +pod: + replicas: + alertmanager: 1 +storage: + storage_class: openstack-helm-lma-nfs +network: + alertmanager: + ingress: + public: false + node_port: + enabled: true +EOF +helm upgrade --install prometheus-alertmanager ./prometheus-alertmanager \ + --namespace=openstack \ + --values=/tmp/prometheus-alertmanager.yaml + +#NOTE: Wait for deploy +./tools/deployment/common/wait-for-pods.sh openstack + +#NOTE: Validate Deployment info +helm status prometheus-alertmanager diff --git a/tools/deployment/developer/050-kube-state-metrics.sh b/tools/deployment/developer/050-kube-state-metrics.sh new file mode 120000 index 000000000..c1537e38c --- /dev/null +++ b/tools/deployment/developer/050-kube-state-metrics.sh @@ -0,0 +1 @@ +../common/050-kube-state-metrics.sh \ No newline at end of file diff --git a/tools/deployment/developer/060-node-exporter.sh b/tools/deployment/developer/060-node-exporter.sh new file mode 120000 index 000000000..5c4daa1b9 --- /dev/null +++ b/tools/deployment/developer/060-node-exporter.sh @@ -0,0 +1 @@ +../common/060-node-exporter.sh \ No newline at end of file diff --git a/tools/deployment/developer/070-openstack-exporter.sh b/tools/deployment/developer/070-openstack-exporter.sh new file mode 120000 index 000000000..cb0b54753 --- /dev/null +++ b/tools/deployment/developer/070-openstack-exporter.sh @@ -0,0 +1 @@ +../common/070-openstack-exporter.sh \ No newline at end of file diff --git a/tools/deployment/developer/080-grafana.sh b/tools/deployment/developer/080-grafana.sh new file mode 100755 index 000000000..357cded16 --- /dev/null +++ b/tools/deployment/developer/080-grafana.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +set -xe + +#NOTE: Pull images and lint chart +make pull-images grafana + +#NOTE: Deploy command +tee /tmp/grafana.yaml << EOF +dependencies: + static: + grafana: + jobs: null + services: null +manifests: + ingress: false + job_db_init: false + job_db_init_session: false + job_db_session_sync: false + secret_db: false + secret_db_session: false + service_ingress: false +conf: + grafana: + database: + type: sqlite3 + session: + provider: file + provider_config: sessions +network: + grafana: + ingress: + public: false + node_port: + enabled: true +EOF +helm upgrade --install grafana ./grafana \ + --namespace=openstack \ + --values=/tmp/grafana.yaml + +#NOTE: Wait for deploy +./tools/deployment/common/wait-for-pods.sh openstack + +#NOTE: Validate Deployment info +helm status grafana diff --git a/tools/deployment/developer/090-nagios.sh b/tools/deployment/developer/090-nagios.sh new file mode 100755 index 000000000..d41099edc --- /dev/null +++ b/tools/deployment/developer/090-nagios.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +set -xe + +#NOTE: Pull images and lint chart +make pull-images nagios + +#NOTE: Deploy command +helm upgrade --install nagios ./nagios \ + --namespace=openstack \ + --set network.nagios.ingress.public=false \ + --set network.nagios.node_port.enabled=true + +#NOTE: Wait for deploy +./tools/deployment/common/wait-for-pods.sh openstack + +#NOTE: Validate Deployment info +helm status nagios diff --git a/tools/deployment/developer/100-elasticsearch.sh b/tools/deployment/developer/100-elasticsearch.sh new file mode 100755 index 000000000..6f41737eb --- /dev/null +++ b/tools/deployment/developer/100-elasticsearch.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +set -xe + +#NOTE: Pull images and lint chart +make pull-images elasticsearch + +#NOTE: Deploy command +tee /tmp/elasticsearch.yaml << EOF +storage: + elasticsearch: + storage_class: openstack-helm-lma-nfs +monitoring: + prometheus: + enabled: true +pod: + replicas: + data: 1 +EOF +helm upgrade --install elasticsearch ./elasticsearch \ + --namespace=openstack \ + --values=/tmp/elasticsearch.yaml + +#NOTE: Wait for deploy +./tools/deployment/common/wait-for-pods.sh openstack + +#NOTE: Validate Deployment info +helm status elasticsearch diff --git a/tools/deployment/developer/110-fluent-logging.sh b/tools/deployment/developer/110-fluent-logging.sh new file mode 100755 index 000000000..fd15b3038 --- /dev/null +++ b/tools/deployment/developer/110-fluent-logging.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +set -xe + +#NOTE: Pull images and lint chart +make pull-images fluent-logging + +#NOTE: Deploy command +helm upgrade --install fluent-logging ./fluent-logging \ + --namespace=openstack \ + --set monitoring.prometheus.enabled=true \ + --set pod.replicas.fluentd=1 + +#NOTE: Wait for deploy +./tools/deployment/common/wait-for-pods.sh openstack + +#NOTE: Validate Deployment info +helm status fluent-logging diff --git a/tools/deployment/developer/120-kibana.sh b/tools/deployment/developer/120-kibana.sh new file mode 120000 index 000000000..8f9030c60 --- /dev/null +++ b/tools/deployment/developer/120-kibana.sh @@ -0,0 +1 @@ +../common/120-kibana.sh \ No newline at end of file