From 8037bf4ca9decf03fd8196e5f1d0f02852d4a5ca Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Mon, 27 Aug 2018 15:42:33 -0500 Subject: [PATCH] Add Ceph to osh-infra gates This adds a ceph developer gate to openstack-helm-infra, which depends on ceph moving to openstack-helm-infra. This also replaces the NFS backed storage for the multinode gate with ceph instead Change-Id: I11268463aa037a2e037217a2dbc89c7432c0d277 --- .zuul.yaml | 28 ++- .../install/developer/deploy-with-ceph.rst | 198 ++++++++++++++++ .../deploy-with-nfs.rst} | 60 ++--- doc/source/install/developer/index.rst | 10 + doc/source/install/index.rst | 2 +- doc/source/install/multinode.rst | 219 ++++++++++-------- playbooks/osh-infra-dev-deploy-ceph.yaml | 128 ++++++++++ ...loy.yaml => osh-infra-dev-deploy-nfs.yaml} | 36 +-- playbooks/osh-infra-multinode-deploy.yaml | 16 +- tools/deployment/common/040-ldap.sh | 5 +- .../common/125-elasticsearch-ldap.sh | 2 +- tools/deployment/common/140-kibana.sh | 4 +- .../developer/010-deploy-docker-registry.sh | 1 - .../developer/030-lma-nfs-provisioner.sh | 1 - tools/deployment/developer/040-ldap.sh | 1 - .../developer/070-kube-state-metrics.sh | 1 - .../deployment/developer/080-node-exporter.sh | 1 - .../developer/090-openstack-exporter.sh | 1 - .../developer/125-elasticsearch-ldap.sh | 1 - tools/deployment/developer/140-kibana.sh | 1 - .../developer/ceph/000-install-packages.sh | 1 + .../developer/ceph/005-deploy-k8s.sh | 1 + .../ceph/010-deploy-docker-registry.sh | 1 + .../deployment/developer/ceph/020-ingress.sh | 52 +++++ tools/deployment/developer/ceph/030-ceph.sh | 194 ++++++++++++++++ .../developer/ceph/035-ceph-ns-activate.sh | 56 +++++ tools/deployment/developer/ceph/040-ldap.sh | 1 + .../developer/ceph/050-prometheus.sh | 1 + .../developer/ceph/060-alertmanager.sh | 1 + .../developer/ceph/070-kube-state-metrics.sh | 1 + .../developer/ceph/080-node-exporter.sh | 1 + .../developer/ceph/090-openstack-exporter.sh | 1 + .../deployment/developer/ceph/100-grafana.sh | 1 + tools/deployment/developer/ceph/110-nagios.sh | 1 + .../developer/ceph/120-elasticsearch.sh | 1 + .../developer/ceph/125-elasticsearch-ldap.sh | 1 + .../developer/ceph/130-fluent-logging.sh | 1 + tools/deployment/developer/ceph/140-kibana.sh | 1 + .../{ => common}/000-install-packages.sh | 0 .../developer/{ => common}/005-deploy-k8s.sh | 0 .../developer/{ => common}/050-prometheus.sh | 5 +- .../{ => common}/060-alertmanager.sh | 9 +- .../developer/{ => common}/100-grafana.sh | 4 +- .../developer/{ => common}/110-nagios.sh | 4 +- .../{ => common}/120-elasticsearch.sh | 7 +- .../{ => common}/130-fluent-logging.sh | 4 +- .../developer/nfs/000-install-packages.sh | 1 + .../developer/nfs/005-deploy-k8s.sh | 1 + .../nfs/010-deploy-docker-registry.sh | 1 + .../developer/{ => nfs}/020-ingress.sh | 15 +- .../nfs/030-nfs-provisioner.sh} | 14 +- tools/deployment/developer/nfs/040-ldap.sh | 1 + .../developer/nfs/050-prometheus.sh | 1 + .../developer/nfs/060-alertmanager.sh | 1 + .../developer/nfs/070-kube-state-metrics.sh | 1 + .../developer/nfs/080-node-exporter.sh | 1 + .../developer/nfs/090-openstack-exporter.sh | 1 + tools/deployment/developer/nfs/100-grafana.sh | 1 + tools/deployment/developer/nfs/110-nagios.sh | 1 + .../developer/nfs/120-elasticsearch.sh | 1 + .../developer/nfs/125-elasticsearch-ldap.sh | 1 + .../developer/nfs/130-fluent-logging.sh | 1 + tools/deployment/developer/nfs/140-kibana.sh | 1 + tools/deployment/multinode/020-ingress.sh | 28 ++- tools/deployment/multinode/030-ceph.sh | 96 ++++++++ .../multinode/030-lma-nfs-provisioner.sh | 1 - .../multinode/035-ceph-ns-activate.sh | 52 +++++ tools/deployment/multinode/050-prometheus.sh | 5 +- .../deployment/multinode/060-alertmanager.sh | 7 +- tools/deployment/multinode/100-grafana.sh | 4 +- tools/deployment/multinode/110-nagios.sh | 4 +- .../deployment/multinode/120-elasticsearch.sh | 7 +- .../multinode/130-fluent-logging.sh | 4 +- .../deployment/multinode/kube-node-subnet.sh | 35 +++ 74 files changed, 1117 insertions(+), 236 deletions(-) create mode 100644 doc/source/install/developer/deploy-with-ceph.rst rename doc/source/install/{developer.rst => developer/deploy-with-nfs.rst} (56%) create mode 100644 doc/source/install/developer/index.rst create mode 100644 playbooks/osh-infra-dev-deploy-ceph.yaml rename playbooks/{osh-infra-dev-deploy.yaml => osh-infra-dev-deploy-nfs.yaml} (72%) delete mode 120000 tools/deployment/developer/010-deploy-docker-registry.sh delete mode 120000 tools/deployment/developer/030-lma-nfs-provisioner.sh delete mode 120000 tools/deployment/developer/040-ldap.sh delete mode 120000 tools/deployment/developer/070-kube-state-metrics.sh delete mode 120000 tools/deployment/developer/080-node-exporter.sh delete mode 120000 tools/deployment/developer/090-openstack-exporter.sh delete mode 120000 tools/deployment/developer/125-elasticsearch-ldap.sh delete mode 120000 tools/deployment/developer/140-kibana.sh create mode 120000 tools/deployment/developer/ceph/000-install-packages.sh create mode 120000 tools/deployment/developer/ceph/005-deploy-k8s.sh create mode 120000 tools/deployment/developer/ceph/010-deploy-docker-registry.sh create mode 100755 tools/deployment/developer/ceph/020-ingress.sh create mode 100755 tools/deployment/developer/ceph/030-ceph.sh create mode 100755 tools/deployment/developer/ceph/035-ceph-ns-activate.sh create mode 120000 tools/deployment/developer/ceph/040-ldap.sh create mode 120000 tools/deployment/developer/ceph/050-prometheus.sh create mode 120000 tools/deployment/developer/ceph/060-alertmanager.sh create mode 120000 tools/deployment/developer/ceph/070-kube-state-metrics.sh create mode 120000 tools/deployment/developer/ceph/080-node-exporter.sh create mode 120000 tools/deployment/developer/ceph/090-openstack-exporter.sh create mode 120000 tools/deployment/developer/ceph/100-grafana.sh create mode 120000 tools/deployment/developer/ceph/110-nagios.sh create mode 120000 tools/deployment/developer/ceph/120-elasticsearch.sh create mode 120000 tools/deployment/developer/ceph/125-elasticsearch-ldap.sh create mode 120000 tools/deployment/developer/ceph/130-fluent-logging.sh create mode 120000 tools/deployment/developer/ceph/140-kibana.sh rename tools/deployment/developer/{ => common}/000-install-packages.sh (100%) rename tools/deployment/developer/{ => common}/005-deploy-k8s.sh (100%) rename tools/deployment/developer/{ => common}/050-prometheus.sh (86%) rename tools/deployment/developer/{ => common}/060-alertmanager.sh (81%) rename tools/deployment/developer/{ => common}/100-grafana.sh (93%) rename tools/deployment/developer/{ => common}/110-nagios.sh (91%) rename tools/deployment/developer/{ => common}/120-elasticsearch.sh (87%) rename tools/deployment/developer/{ => common}/130-fluent-logging.sh (92%) create mode 120000 tools/deployment/developer/nfs/000-install-packages.sh create mode 120000 tools/deployment/developer/nfs/005-deploy-k8s.sh create mode 120000 tools/deployment/developer/nfs/010-deploy-docker-registry.sh rename tools/deployment/developer/{ => nfs}/020-ingress.sh (77%) rename tools/deployment/{common/030-lma-nfs-provisioner.sh => developer/nfs/030-nfs-provisioner.sh} (75%) create mode 120000 tools/deployment/developer/nfs/040-ldap.sh create mode 120000 tools/deployment/developer/nfs/050-prometheus.sh create mode 120000 tools/deployment/developer/nfs/060-alertmanager.sh create mode 120000 tools/deployment/developer/nfs/070-kube-state-metrics.sh create mode 120000 tools/deployment/developer/nfs/080-node-exporter.sh create mode 120000 tools/deployment/developer/nfs/090-openstack-exporter.sh create mode 120000 tools/deployment/developer/nfs/100-grafana.sh create mode 120000 tools/deployment/developer/nfs/110-nagios.sh create mode 120000 tools/deployment/developer/nfs/120-elasticsearch.sh create mode 120000 tools/deployment/developer/nfs/125-elasticsearch-ldap.sh create mode 120000 tools/deployment/developer/nfs/130-fluent-logging.sh create mode 120000 tools/deployment/developer/nfs/140-kibana.sh create mode 100755 tools/deployment/multinode/030-ceph.sh delete mode 120000 tools/deployment/multinode/030-lma-nfs-provisioner.sh create mode 100755 tools/deployment/multinode/035-ceph-ns-activate.sh create mode 100755 tools/deployment/multinode/kube-node-subnet.sh diff --git a/.zuul.yaml b/.zuul.yaml index 30304a0bc..ef4f73eb6 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -26,7 +26,12 @@ - ^.*\.rst$ - ^doc/.*$ - ^releasenotes/.*$ - - openstack-helm-infra-dev-deploy: + - openstack-helm-infra-dev-deploy-ceph: + irrelevant-files: + - ^.*\.rst$ + - ^doc/.*$ + - ^releasenotes/.*$ + - openstack-helm-infra-dev-deploy-nfs: irrelevant-files: - ^.*\.rst$ - ^doc/.*$ @@ -49,7 +54,12 @@ - ^.*\.rst$ - ^doc/.*$ - ^releasenotes/.*$ - - openstack-helm-infra-dev-deploy: + - openstack-helm-infra-dev-deploy-ceph: + irrelevant-files: + - ^.*\.rst$ + - ^doc/.*$ + - ^releasenotes/.*$ + - openstack-helm-infra-dev-deploy-nfs: irrelevant-files: - ^.*\.rst$ - ^doc/.*$ @@ -212,7 +222,7 @@ - job: name: openstack-helm-infra - timeout: 3600 + timeout: 7200 pre-run: - playbooks/osh-infra-upgrade-host.yaml - playbooks/osh-infra-deploy-docker.yaml @@ -237,10 +247,18 @@ nodeset: openstack-helm-fedora - job: - name: openstack-helm-infra-dev-deploy + name: openstack-helm-infra-dev-deploy-ceph timeout: 7200 pre-run: playbooks/osh-infra-upgrade-host.yaml - run: playbooks/osh-infra-dev-deploy.yaml + run: playbooks/osh-infra-dev-deploy-ceph.yaml + post-run: playbooks/osh-infra-collect-logs.yaml + nodeset: openstack-helm-single-node + +- job: + name: openstack-helm-infra-dev-deploy-nfs + timeout: 7200 + pre-run: playbooks/osh-infra-upgrade-host.yaml + run: playbooks/osh-infra-dev-deploy-nfs.yaml post-run: playbooks/osh-infra-collect-logs.yaml nodeset: openstack-helm-single-node diff --git a/doc/source/install/developer/deploy-with-ceph.rst b/doc/source/install/developer/deploy-with-ceph.rst new file mode 100644 index 000000000..1658ea16f --- /dev/null +++ b/doc/source/install/developer/deploy-with-ceph.rst @@ -0,0 +1,198 @@ +====================== +Development Deployment +====================== + +Deploy Local Docker Registry +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../../tools/deployment/developer/ceph/010-deploy-docker-registry.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/ceph/010-deploy-docker-registry.sh + +Deploy Cluster and Namespace Ingress Controllers +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../../tools/deployment/developer/ceph/020-ingress.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/ceph/020-ingress.sh + + Deploy Ceph + ^^^^^^^^^^^ + + .. literalinclude:: ../../../../tools/deployment/developer/ceph/030-ceph.sh + :language: shell + :lines: 1,17- + + Alternatively, this step can be performed by running the script directly: + + .. code-block:: shell + + ./tools/deployment/developer/ceph/030-ceph.sh + + Activate the OSH-Infra namespace to be able to use Ceph + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + .. literalinclude:: ../../../../tools/deployment/developer/ceph/035-ceph-ns-activate.sh + :language: shell + :lines: 1,17- + + Alternatively, this step can be performed by running the script directly: + + .. code-block:: shell + + ./tools/deployment/developer/ceph/035-ceph-ns-activate.sh + +Deploy LDAP +^^^^^^^^^^^ + +.. literalinclude:: ../../../../tools/deployment/developer/ceph/040-ldap.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/ceph/040-ldap.sh + +Deploy Prometheus +^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../../tools/deployment/developer/ceph/050-prometheus.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/ceph/050-prometheus.sh + +Deploy Alertmanager +^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../../tools/deployment/developer/ceph/060-alertmanager.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/ceph/060-alertmanager.sh + +Deploy Kube-State-Metrics +^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../../tools/deployment/developer/ceph/070-kube-state-metrics.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/ceph/070-kube-state-metrics.sh + +Deploy Node Exporter +^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../../tools/deployment/developer/ceph/080-node-exporter.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/ceph/080-node-exporter.sh + +Deploy OpenStack Exporter +^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../../tools/deployment/developer/ceph/090-openstack-exporter.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/ceph/090-openstack-exporter.sh + +Deploy Grafana +^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../../tools/deployment/developer/ceph/100-grafana.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/ceph/100-grafana.sh + +Deploy Nagios +^^^^^^^^^^^^^ + +.. literalinclude:: ../../../../tools/deployment/developer/ceph/110-nagios.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/ceph/110-nagios.sh + +Deploy Elasticsearch +^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../../tools/deployment/developer/ceph/120-elasticsearch.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/ceph/120-elasticsearch.sh + +Deploy Fluent-Logging +^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../../tools/deployment/developer/ceph/130-fluent-logging.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/ceph/130-fluent-logging.sh + +Deploy Kibana +^^^^^^^^^^^^^ + +.. literalinclude:: ../../../../tools/deployment/developer/ceph/140-kibana.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/developer/ceph/140-kibana.sh diff --git a/doc/source/install/developer.rst b/doc/source/install/developer/deploy-with-nfs.rst similarity index 56% rename from doc/source/install/developer.rst rename to doc/source/install/developer/deploy-with-nfs.rst index f6e650cc2..c6b9bc023 100644 --- a/doc/source/install/developer.rst +++ b/doc/source/install/developer/deploy-with-nfs.rst @@ -5,7 +5,7 @@ Development Deployment Deploy Local Docker Registry ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. literalinclude:: ../../../tools/deployment/developer/010-deploy-docker-registry.sh +.. literalinclude:: ../../../../tools/deployment/developer/nfs/010-deploy-docker-registry.sh :language: shell :lines: 1,17- @@ -13,12 +13,12 @@ Alternatively, this step can be performed by running the script directly: .. code-block:: shell - ./tools/deployment/developer/010-deploy-docker-registry.sh + ./tools/deployment/developer/nfs/010-deploy-docker-registry.sh Deploy Cluster and Namespace Ingress Controllers ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. literalinclude:: ../../../tools/deployment/developer/020-ingress.sh +.. literalinclude:: ../../../../tools/deployment/developer/nfs/020-ingress.sh :language: shell :lines: 1,17- @@ -26,12 +26,12 @@ Alternatively, this step can be performed by running the script directly: .. code-block:: shell - ./tools/deployment/developer/020-ingress.sh + ./tools/deployment/developer/nfs/020-ingress.sh -Deploy NFS Provisioner for LMA Services -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Deploy NFS Provisioner +^^^^^^^^^^^^^^^^^^^^^^ -.. literalinclude:: ../../../tools/deployment/developer/030-lma-nfs-provisioner.sh +.. literalinclude:: ../../../../tools/deployment/developer/nfs/030-nfs-provisioner.sh :language: shell :lines: 1,17- @@ -39,12 +39,12 @@ Alternatively, this step can be performed by running the script directly: .. code-block:: shell - ./tools/deployment/developer/030-lma-nfs-provisioner.sh + ./tools/deployment/developer/nfs/030-nfs-provisioner.sh Deploy LDAP ^^^^^^^^^^^ -.. literalinclude:: ../../../tools/deployment/developer/040-ldap.sh +.. literalinclude:: ../../../../tools/deployment/developer/nfs/040-ldap.sh :language: shell :lines: 1,17- @@ -52,12 +52,12 @@ Alternatively, this step can be performed by running the script directly: .. code-block:: shell - ./tools/deployment/developer/040-ldap.sh + ./tools/deployment/developer/nfs/040-ldap.sh Deploy Prometheus ^^^^^^^^^^^^^^^^^ -.. literalinclude:: ../../../tools/deployment/developer/050-prometheus.sh +.. literalinclude:: ../../../../tools/deployment/developer/nfs/050-prometheus.sh :language: shell :lines: 1,17- @@ -65,12 +65,12 @@ Alternatively, this step can be performed by running the script directly: .. code-block:: shell - ./tools/deployment/developer/050-prometheus.sh + ./tools/deployment/developer/nfs/050-prometheus.sh Deploy Alertmanager ^^^^^^^^^^^^^^^^^^^ -.. literalinclude:: ../../../tools/deployment/developer/060-alertmanager.sh +.. literalinclude:: ../../../../tools/deployment/developer/nfs/060-alertmanager.sh :language: shell :lines: 1,17- @@ -78,12 +78,12 @@ Alternatively, this step can be performed by running the script directly: .. code-block:: shell - ./tools/deployment/developer/060-alertmanager.sh + ./tools/deployment/developer/nfs/060-alertmanager.sh Deploy Kube-State-Metrics ^^^^^^^^^^^^^^^^^^^^^^^^^ -.. literalinclude:: ../../../tools/deployment/developer/070-kube-state-metrics.sh +.. literalinclude:: ../../../../tools/deployment/developer/nfs/070-kube-state-metrics.sh :language: shell :lines: 1,17- @@ -91,12 +91,12 @@ Alternatively, this step can be performed by running the script directly: .. code-block:: shell - ./tools/deployment/developer/070-kube-state-metrics.sh + ./tools/deployment/developer/nfs/070-kube-state-metrics.sh Deploy Node Exporter ^^^^^^^^^^^^^^^^^^^^ -.. literalinclude:: ../../../tools/deployment/developer/080-node-exporter.sh +.. literalinclude:: ../../../../tools/deployment/developer/nfs/080-node-exporter.sh :language: shell :lines: 1,17- @@ -104,12 +104,12 @@ Alternatively, this step can be performed by running the script directly: .. code-block:: shell - ./tools/deployment/developer/080-node-exporter.sh + ./tools/deployment/developer/nfs/080-node-exporter.sh Deploy OpenStack Exporter ^^^^^^^^^^^^^^^^^^^^^^^^^ -.. literalinclude:: ../../../tools/deployment/developer/090-openstack-exporter.sh +.. literalinclude:: ../../../../tools/deployment/developer/nfs/090-openstack-exporter.sh :language: shell :lines: 1,17- @@ -117,12 +117,12 @@ Alternatively, this step can be performed by running the script directly: .. code-block:: shell - ./tools/deployment/developer/090-openstack-exporter.sh + ./tools/deployment/developer/nfs/090-openstack-exporter.sh Deploy Grafana ^^^^^^^^^^^^^^ -.. literalinclude:: ../../../tools/deployment/developer/100-grafana.sh +.. literalinclude:: ../../../../tools/deployment/developer/nfs/100-grafana.sh :language: shell :lines: 1,17- @@ -130,12 +130,12 @@ Alternatively, this step can be performed by running the script directly: .. code-block:: shell - ./tools/deployment/developer/100-grafana.sh + ./tools/deployment/developer/nfs/100-grafana.sh Deploy Nagios ^^^^^^^^^^^^^ -.. literalinclude:: ../../../tools/deployment/developer/110-nagios.sh +.. literalinclude:: ../../../../tools/deployment/developer/nfs/110-nagios.sh :language: shell :lines: 1,17- @@ -143,12 +143,12 @@ Alternatively, this step can be performed by running the script directly: .. code-block:: shell - ./tools/deployment/developer/110-nagios.sh + ./tools/deployment/developer/nfs/110-nagios.sh Deploy Elasticsearch ^^^^^^^^^^^^^^^^^^^^ -.. literalinclude:: ../../../tools/deployment/developer/120-elasticsearch.sh +.. literalinclude:: ../../../../tools/deployment/developer/nfs/120-elasticsearch.sh :language: shell :lines: 1,17- @@ -156,12 +156,12 @@ Alternatively, this step can be performed by running the script directly: .. code-block:: shell - ./tools/deployment/developer/120-elasticsearch.sh + ./tools/deployment/developer/nfs/120-elasticsearch.sh Deploy Fluent-Logging ^^^^^^^^^^^^^^^^^^^^^ -.. literalinclude:: ../../../tools/deployment/developer/130-fluent-logging.sh +.. literalinclude:: ../../../../tools/deployment/developer/nfs/130-fluent-logging.sh :language: shell :lines: 1,17- @@ -169,12 +169,12 @@ Alternatively, this step can be performed by running the script directly: .. code-block:: shell - ./tools/deployment/developer/130-fluent-logging.sh + ./tools/deployment/developer/nfs/130-fluent-logging.sh Deploy Kibana ^^^^^^^^^^^^^ -.. literalinclude:: ../../../tools/deployment/developer/140-kibana.sh +.. literalinclude:: ../../../../tools/deployment/developer/nfs/140-kibana.sh :language: shell :lines: 1,17- @@ -182,4 +182,4 @@ Alternatively, this step can be performed by running the script directly: .. code-block:: shell - ./tools/deployment/developer/140-kibana.sh + ./tools/deployment/developer/nfs/140-kibana.sh diff --git a/doc/source/install/developer/index.rst b/doc/source/install/developer/index.rst new file mode 100644 index 000000000..033f8c847 --- /dev/null +++ b/doc/source/install/developer/index.rst @@ -0,0 +1,10 @@ +Development +=========== + +Contents: + +.. toctree:: + :maxdepth: 2 + + deploy-with-nfs + deploy-with-ceph diff --git a/doc/source/install/index.rst b/doc/source/install/index.rst index 919fe4aac..e39206809 100644 --- a/doc/source/install/index.rst +++ b/doc/source/install/index.rst @@ -6,5 +6,5 @@ Contents: .. toctree:: :maxdepth: 2 - developer + developer/index multinode diff --git a/doc/source/install/multinode.rst b/doc/source/install/multinode.rst index 704ef4f71..80930f7b3 100644 --- a/doc/source/install/multinode.rst +++ b/doc/source/install/multinode.rst @@ -1,6 +1,6 @@ -==================== -Multinode Deployment -==================== +====================== +Development Deployment +====================== Deploy Local Docker Registry ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -15,36 +15,23 @@ Alternatively, this step can be performed by running the script directly: ./tools/deployment/multinode/010-deploy-docker-registry.sh - Deploy Cluster and Namespace Ingress Controllers - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Deploy Cluster and Namespace Ingress Controllers +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - .. literalinclude:: ../../../tools/deployment/multinode/020-ingress.sh - :language: shell - :lines: 1,17- +.. literalinclude:: ../../../tools/deployment/multinode/020-ingress.sh + :language: shell + :lines: 1,17- - Alternatively, this step can be performed by running the script directly: +Alternatively, this step can be performed by running the script directly: - .. code-block:: shell +.. code-block:: shell - ./tools/deployment/multinode/020-ingress.sh + ./tools/deployment/multinode/020-ingress.sh - Deploy NFS Provisioner for LMA Services - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - .. literalinclude:: ../../../tools/deployment/multinode/030-lma-nfs-provisioner.sh - :language: shell - :lines: 1,17- - - Alternatively, this step can be performed by running the script directly: - - .. code-block:: shell - - ./tools/deployment/multinode/030-lma-nfs-provisioner.sh - - Deploy LDAP + Deploy Ceph ^^^^^^^^^^^ - .. literalinclude:: ../../../tools/deployment/multinode/040-ldap.sh + .. literalinclude:: ../../../../tools/deployment/multinode/030-ceph.sh :language: shell :lines: 1,17- @@ -52,12 +39,12 @@ Alternatively, this step can be performed by running the script directly: .. code-block:: shell - ./tools/deployment/multinode/040-ldap.sh + ./tools/deployment/multinode/030-ceph.sh - Deploy Prometheus - ^^^^^^^^^^^^^^^^^ + Activate the OSH-Infra namespace to be able to use Ceph + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - .. literalinclude:: ../../../tools/deployment/multinode/050-prometheus.sh + .. literalinclude:: ../../../../tools/deployment/multinode/035-ceph-ns-activate.sh :language: shell :lines: 1,17- @@ -65,121 +52,147 @@ Alternatively, this step can be performed by running the script directly: .. code-block:: shell - ./tools/deployment/multinode/050-prometheus.sh + ./tools/deployment/multinode/035-ceph-ns-activate.sh - Deploy Alertmanager - ^^^^^^^^^^^^^^^^^^^ +Deploy LDAP +^^^^^^^^^^^ - .. literalinclude:: ../../../tools/deployment/multinode/060-alertmanager.sh - :language: shell - :lines: 1,17- +.. literalinclude:: ../../../tools/deployment/multinode/040-ldap.sh + :language: shell + :lines: 1,17- - Alternatively, this step can be performed by running the script directly: +Alternatively, this step can be performed by running the script directly: - .. code-block:: shell +.. code-block:: shell - ./tools/deployment/multinode/060-alertmanager.sh + ./tools/deployment/multinode/040-ldap.sh - Deploy Kube-State-Metrics - ^^^^^^^^^^^^^^^^^^^^^^^^^ +Deploy Prometheus +^^^^^^^^^^^^^^^^^ - .. literalinclude:: ../../../tools/deployment/multinode/070-kube-state-metrics.sh - :language: shell - :lines: 1,17- +.. literalinclude:: ../../../tools/deployment/multinode/050-prometheus.sh + :language: shell + :lines: 1,17- - Alternatively, this step can be performed by running the script directly: +Alternatively, this step can be performed by running the script directly: - .. code-block:: shell +.. code-block:: shell - ./tools/deployment/multinode/070-kube-state-metrics.sh + ./tools/deployment/multinode/050-prometheus.sh - Deploy Node Exporter - ^^^^^^^^^^^^^^^^^^^^ +Deploy Alertmanager +^^^^^^^^^^^^^^^^^^^ - .. literalinclude:: ../../../tools/deployment/multinode/080-node-exporter.sh - :language: shell - :lines: 1,17- +.. literalinclude:: ../../../tools/deployment/multinode/060-alertmanager.sh + :language: shell + :lines: 1,17- - Alternatively, this step can be performed by running the script directly: +Alternatively, this step can be performed by running the script directly: - .. code-block:: shell +.. code-block:: shell - ./tools/deployment/multinode/080-node-exporter.sh + ./tools/deployment/multinode/060-alertmanager.sh - Deploy OpenStack Exporter - ^^^^^^^^^^^^^^^^^^^^^^^^^ +Deploy Kube-State-Metrics +^^^^^^^^^^^^^^^^^^^^^^^^^ - .. literalinclude:: ../../../tools/deployment/multinode/090-openstack-exporter.sh - :language: shell - :lines: 1,17- +.. literalinclude:: ../../../tools/deployment/multinode/070-kube-state-metrics.sh + :language: shell + :lines: 1,17- - Alternatively, this step can be performed by running the script directly: +Alternatively, this step can be performed by running the script directly: - .. code-block:: shell +.. code-block:: shell - ./tools/deployment/multinode/090-openstack-exporter.sh + ./tools/deployment/multinode/070-kube-state-metrics.sh - Deploy Grafana - ^^^^^^^^^^^^^^ +Deploy Node Exporter +^^^^^^^^^^^^^^^^^^^^ - .. literalinclude:: ../../../tools/deployment/multinode/100-grafana.sh - :language: shell - :lines: 1,17- +.. literalinclude:: ../../../tools/deployment/multinode/080-node-exporter.sh + :language: shell + :lines: 1,17- - Alternatively, this step can be performed by running the script directly: +Alternatively, this step can be performed by running the script directly: - .. code-block:: shell +.. code-block:: shell - ./tools/deployment/multinode/100-grafana.sh + ./tools/deployment/multinode/080-node-exporter.sh - Deploy Nagios - ^^^^^^^^^^^^^ +Deploy OpenStack Exporter +^^^^^^^^^^^^^^^^^^^^^^^^^ - .. literalinclude:: ../../../tools/deployment/multinode/110-nagios.sh - :language: shell - :lines: 1,17- +.. literalinclude:: ../../../tools/deployment/multinode/090-openstack-exporter.sh + :language: shell + :lines: 1,17- - Alternatively, this step can be performed by running the script directly: +Alternatively, this step can be performed by running the script directly: - .. code-block:: shell +.. code-block:: shell - ./tools/deployment/multinode/110-nagios.sh + ./tools/deployment/multinode/090-openstack-exporter.sh - Deploy Elasticsearch - ^^^^^^^^^^^^^^^^^^^^ +Deploy Grafana +^^^^^^^^^^^^^^ - .. literalinclude:: ../../../tools/deployment/multinode/120-elasticsearch.sh - :language: shell - :lines: 1,17- +.. literalinclude:: ../../../tools/deployment/multinode/100-grafana.sh + :language: shell + :lines: 1,17- - Alternatively, this step can be performed by running the script directly: +Alternatively, this step can be performed by running the script directly: - .. code-block:: shell +.. code-block:: shell - ./tools/deployment/multinode/120-elasticsearch.sh + ./tools/deployment/multinode/100-grafana.sh - Deploy Fluent-Logging - ^^^^^^^^^^^^^^^^^^^^^ +Deploy Nagios +^^^^^^^^^^^^^ - .. literalinclude:: ../../../tools/deployment/multinode/130-fluent-logging.sh - :language: shell - :lines: 1,17- +.. literalinclude:: ../../../tools/deployment/multinode/110-nagios.sh + :language: shell + :lines: 1,17- - Alternatively, this step can be performed by running the script directly: +Alternatively, this step can be performed by running the script directly: - .. code-block:: shell +.. code-block:: shell - ./tools/deployment/multinode/130-fluent-logging.sh + ./tools/deployment/multinode/110-nagios.sh - Deploy Kibana - ^^^^^^^^^^^^^ +Deploy Elasticsearch +^^^^^^^^^^^^^^^^^^^^ - .. literalinclude:: ../../../tools/deployment/multinode/140-kibana.sh - :language: shell - :lines: 1,17- +.. literalinclude:: ../../../tools/deployment/multinode/120-elasticsearch.sh + :language: shell + :lines: 1,17- - Alternatively, this step can be performed by running the script directly: +Alternatively, this step can be performed by running the script directly: - .. code-block:: shell +.. code-block:: shell - ./tools/deployment/multinode/140-kibana.sh + ./tools/deployment/multinode/120-elasticsearch.sh + +Deploy Fluent-Logging +^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/multinode/130-fluent-logging.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/multinode/130-fluent-logging.sh + +Deploy Kibana +^^^^^^^^^^^^^ + +.. literalinclude:: ../../../tools/deployment/multinode/140-kibana.sh + :language: shell + :lines: 1,17- + +Alternatively, this step can be performed by running the script directly: + +.. code-block:: shell + + ./tools/deployment/multinode/140-kibana.sh diff --git a/playbooks/osh-infra-dev-deploy-ceph.yaml b/playbooks/osh-infra-dev-deploy-ceph.yaml new file mode 100644 index 000000000..5f74dc3a5 --- /dev/null +++ b/playbooks/osh-infra-dev-deploy-ceph.yaml @@ -0,0 +1,128 @@ +# 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/ceph/000-install-packages.sh + args: + chdir: "{{ zuul.project.src_dir }}" + environment: + zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}" + - name: Deploy Kubernetes + shell: | + set -xe; + ./tools/deployment/developer/ceph/005-deploy-k8s.sh + args: + chdir: "{{ zuul.project.src_dir }}" + environment: + zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}" + - name: Deploy Registry NFS, Redis, and Docker Registry + shell: | + set -xe; + ./tools/deployment/developer/ceph/010-deploy-docker-registry.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Cluster and Namespace Ingress + shell: | + set -xe; + ./tools/deployment/developer/ceph/020-ingress.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Ceph + shell: | + set -xe; + ./tools/deployment/developer/ceph/030-ceph.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Ceph NS Activate + shell: | + set -xe; + ./tools/deployment/developer/ceph/035-ceph-ns-activate.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy LDAP + shell: | + set -xe; + ./tools/deployment/developer/ceph/040-ldap.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Prometheus + shell: | + set -xe; + ./tools/deployment/developer/ceph/050-prometheus.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Alertmanager + shell: | + set -xe; + ./tools/deployment/developer/ceph/060-alertmanager.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Kube-State-Metrics + shell: | + set -xe; + ./tools/deployment/developer/ceph/070-kube-state-metrics.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Node Exporter + shell: | + set -xe; + ./tools/deployment/developer/ceph/080-node-exporter.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Prometheus OpenStack Exporter + shell: | + set -xe; + ./tools/deployment/developer/ceph/090-openstack-exporter.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Grafana + shell: | + set -xe; + ./tools/deployment/developer/ceph/100-grafana.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Nagios + shell: | + set -xe; + ./tools/deployment/developer/ceph/110-nagios.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Elasticsearch + shell: | + set -xe; + ./tools/deployment/developer/ceph/120-elasticsearch.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Test LDAP Auth for Elasticsearch + shell: | + set -xe; + ./tools/deployment/developer/ceph/125-elasticsearch-ldap.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Fluent-Logging + shell: | + set -xe; + ./tools/deployment/developer/ceph/130-fluent-logging.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Kibana + shell: | + set -xe; + ./tools/deployment/developer/ceph/140-kibana.sh + args: + chdir: "{{ zuul.project.src_dir }}" diff --git a/playbooks/osh-infra-dev-deploy.yaml b/playbooks/osh-infra-dev-deploy-nfs.yaml similarity index 72% rename from playbooks/osh-infra-dev-deploy.yaml rename to playbooks/osh-infra-dev-deploy-nfs.yaml index 4bc0d27ab..38542a1a0 100644 --- a/playbooks/osh-infra-dev-deploy.yaml +++ b/playbooks/osh-infra-dev-deploy-nfs.yaml @@ -17,7 +17,7 @@ - name: Deploy Required packages shell: | set -xe; - ./tools/deployment/developer/000-install-packages.sh + ./tools/deployment/developer/nfs/000-install-packages.sh args: chdir: "{{ zuul.project.src_dir }}" environment: @@ -25,7 +25,7 @@ - name: Deploy Kubernetes shell: | set -xe; - ./tools/deployment/developer/005-deploy-k8s.sh + ./tools/deployment/developer/nfs/005-deploy-k8s.sh args: chdir: "{{ zuul.project.src_dir }}" environment: @@ -33,90 +33,90 @@ - name: Deploy Registry NFS, Redis, and Docker Registry shell: | set -xe; - ./tools/deployment/developer/010-deploy-docker-registry.sh + ./tools/deployment/developer/nfs/010-deploy-docker-registry.sh args: chdir: "{{ zuul.project.src_dir }}" - name: Deploy Cluster and Namespace Ingress shell: | set -xe; - ./tools/deployment/developer/020-ingress.sh + ./tools/deployment/developer/nfs/020-ingress.sh args: chdir: "{{ zuul.project.src_dir }}" - - name: Deploy NFS for Logging, Monitoring and Alerting Components + - name: Deploy NFS Provisioner shell: | set -xe; - ./tools/deployment/developer/030-lma-nfs-provisioner.sh + ./tools/deployment/developer/nfs/030-nfs-provisioner.sh args: chdir: "{{ zuul.project.src_dir }}" - name: Deploy LDAP shell: | set -xe; - ./tools/deployment/developer/040-ldap.sh + ./tools/deployment/developer/nfs/040-ldap.sh args: chdir: "{{ zuul.project.src_dir }}" - name: Deploy Prometheus shell: | set -xe; - ./tools/deployment/developer/050-prometheus.sh + ./tools/deployment/developer/nfs/050-prometheus.sh args: chdir: "{{ zuul.project.src_dir }}" - name: Deploy Alertmanager shell: | set -xe; - ./tools/deployment/developer/060-alertmanager.sh + ./tools/deployment/developer/nfs/060-alertmanager.sh args: chdir: "{{ zuul.project.src_dir }}" - name: Deploy Kube-State-Metrics shell: | set -xe; - ./tools/deployment/developer/070-kube-state-metrics.sh + ./tools/deployment/developer/nfs/070-kube-state-metrics.sh args: chdir: "{{ zuul.project.src_dir }}" - name: Deploy Node Exporter shell: | set -xe; - ./tools/deployment/developer/080-node-exporter.sh + ./tools/deployment/developer/nfs/080-node-exporter.sh args: chdir: "{{ zuul.project.src_dir }}" - name: Deploy Prometheus OpenStack Exporter shell: | set -xe; - ./tools/deployment/developer/090-openstack-exporter.sh + ./tools/deployment/developer/nfs/090-openstack-exporter.sh args: chdir: "{{ zuul.project.src_dir }}" - name: Deploy Grafana shell: | set -xe; - ./tools/deployment/developer/100-grafana.sh + ./tools/deployment/developer/nfs/100-grafana.sh args: chdir: "{{ zuul.project.src_dir }}" - name: Deploy Nagios shell: | set -xe; - ./tools/deployment/developer/110-nagios.sh + ./tools/deployment/developer/nfs/110-nagios.sh args: chdir: "{{ zuul.project.src_dir }}" - name: Deploy Elasticsearch shell: | set -xe; - ./tools/deployment/developer/120-elasticsearch.sh + ./tools/deployment/developer/nfs/120-elasticsearch.sh args: chdir: "{{ zuul.project.src_dir }}" - name: Test LDAP Auth for Elasticsearch shell: | set -xe; - ./tools/deployment/developer/125-elasticsearch-ldap.sh + ./tools/deployment/developer/nfs/125-elasticsearch-ldap.sh args: chdir: "{{ zuul.project.src_dir }}" - name: Deploy Fluent-Logging shell: | set -xe; - ./tools/deployment/developer/130-fluent-logging.sh + ./tools/deployment/developer/nfs/130-fluent-logging.sh args: chdir: "{{ zuul.project.src_dir }}" - name: Deploy Kibana shell: | set -xe; - ./tools/deployment/developer/140-kibana.sh + ./tools/deployment/developer/nfs/140-kibana.sh args: chdir: "{{ zuul.project.src_dir }}" diff --git a/playbooks/osh-infra-multinode-deploy.yaml b/playbooks/osh-infra-multinode-deploy.yaml index 22d9dc81d..ad2c820ac 100644 --- a/playbooks/osh-infra-multinode-deploy.yaml +++ b/playbooks/osh-infra-multinode-deploy.yaml @@ -17,19 +17,25 @@ - name: Deploy Registry NFS, Redis, and Docker Registry shell: | set -xe; - ./tools/deployment/developer/010-deploy-docker-registry.sh + ./tools/deployment/multinode/010-deploy-docker-registry.sh args: chdir: "{{ zuul.project.src_dir }}" - - name: Deploy Cluster and Namespace Ingress + - name: Deploy Cluster and Namespace Ingresses shell: | set -xe; - ./tools/deployment/developer/020-ingress.sh + ./tools/deployment/multinode/020-ingress.sh args: chdir: "{{ zuul.project.src_dir }}" - - name: Deploy NFS for Logging, Monitoring and Alerting Components + - name: Deploy Ceph shell: | set -xe; - ./tools/deployment/developer/030-lma-nfs-provisioner.sh + ./tools/deployment/multinode/030-ceph.sh + args: + chdir: "{{ zuul.project.src_dir }}" + - name: Deploy Ceph NS Activate + shell: | + set -xe; + ./tools/deployment/multinode/035-ceph-ns-activate.sh args: chdir: "{{ zuul.project.src_dir }}" - name: Deploy LDAP diff --git a/tools/deployment/common/040-ldap.sh b/tools/deployment/common/040-ldap.sh index 46946ae7b..4f6ab7e1b 100755 --- a/tools/deployment/common/040-ldap.sh +++ b/tools/deployment/common/040-ldap.sh @@ -21,12 +21,11 @@ make ldap #NOTE: Deploy command helm upgrade --install ldap ./ldap \ - --namespace=openstack \ - --set storage.pvc.class_name=openstack-helm-lma-nfs \ + --namespace=osh-infra \ --set bootstrap.enabled=true #NOTE: Wait for deploy -./tools/deployment/common/wait-for-pods.sh openstack +./tools/deployment/common/wait-for-pods.sh osh-infra #NOTE: Validate Deployment info helm status ldap diff --git a/tools/deployment/common/125-elasticsearch-ldap.sh b/tools/deployment/common/125-elasticsearch-ldap.sh index 830a012a4..c7166a9c1 100755 --- a/tools/deployment/common/125-elasticsearch-ldap.sh +++ b/tools/deployment/common/125-elasticsearch-ldap.sh @@ -16,7 +16,7 @@ set -xe -ELASTICSEARCH_ENDPOINT="elasticsearch-logging.openstack" +ELASTICSEARCH_ENDPOINT="elasticsearch-logging.osh-infra" #NOTE: Create index with specified LDAP user function create_index () { diff --git a/tools/deployment/common/140-kibana.sh b/tools/deployment/common/140-kibana.sh index e8f39b1f7..5939b8619 100755 --- a/tools/deployment/common/140-kibana.sh +++ b/tools/deployment/common/140-kibana.sh @@ -21,10 +21,10 @@ make kibana #NOTE: Deploy command helm upgrade --install kibana ./kibana \ - --namespace=openstack + --namespace=osh-infra #NOTE: Wait for deploy -./tools/deployment/common/wait-for-pods.sh openstack +./tools/deployment/common/wait-for-pods.sh osh-infra #NOTE: Validate Deployment info helm status kibana diff --git a/tools/deployment/developer/010-deploy-docker-registry.sh b/tools/deployment/developer/010-deploy-docker-registry.sh deleted file mode 120000 index 7360ae428..000000000 --- a/tools/deployment/developer/010-deploy-docker-registry.sh +++ /dev/null @@ -1 +0,0 @@ -../common/010-deploy-docker-registry.sh \ No newline at end of file diff --git a/tools/deployment/developer/030-lma-nfs-provisioner.sh b/tools/deployment/developer/030-lma-nfs-provisioner.sh deleted file mode 120000 index 508e82dcb..000000000 --- a/tools/deployment/developer/030-lma-nfs-provisioner.sh +++ /dev/null @@ -1 +0,0 @@ -../common/030-lma-nfs-provisioner.sh \ No newline at end of file diff --git a/tools/deployment/developer/040-ldap.sh b/tools/deployment/developer/040-ldap.sh deleted file mode 120000 index 4ed4b9d4b..000000000 --- a/tools/deployment/developer/040-ldap.sh +++ /dev/null @@ -1 +0,0 @@ -../common/040-ldap.sh \ No newline at end of file diff --git a/tools/deployment/developer/070-kube-state-metrics.sh b/tools/deployment/developer/070-kube-state-metrics.sh deleted file mode 120000 index 2a18ebb8b..000000000 --- a/tools/deployment/developer/070-kube-state-metrics.sh +++ /dev/null @@ -1 +0,0 @@ -../common/070-kube-state-metrics.sh \ No newline at end of file diff --git a/tools/deployment/developer/080-node-exporter.sh b/tools/deployment/developer/080-node-exporter.sh deleted file mode 120000 index 412748a74..000000000 --- a/tools/deployment/developer/080-node-exporter.sh +++ /dev/null @@ -1 +0,0 @@ -../common/080-node-exporter.sh \ No newline at end of file diff --git a/tools/deployment/developer/090-openstack-exporter.sh b/tools/deployment/developer/090-openstack-exporter.sh deleted file mode 120000 index 514a6a5c7..000000000 --- a/tools/deployment/developer/090-openstack-exporter.sh +++ /dev/null @@ -1 +0,0 @@ -../common/090-openstack-exporter.sh \ No newline at end of file diff --git a/tools/deployment/developer/125-elasticsearch-ldap.sh b/tools/deployment/developer/125-elasticsearch-ldap.sh deleted file mode 120000 index f49334085..000000000 --- a/tools/deployment/developer/125-elasticsearch-ldap.sh +++ /dev/null @@ -1 +0,0 @@ -../common/125-elasticsearch-ldap.sh \ No newline at end of file diff --git a/tools/deployment/developer/140-kibana.sh b/tools/deployment/developer/140-kibana.sh deleted file mode 120000 index 938b38606..000000000 --- a/tools/deployment/developer/140-kibana.sh +++ /dev/null @@ -1 +0,0 @@ -../common/140-kibana.sh \ No newline at end of file diff --git a/tools/deployment/developer/ceph/000-install-packages.sh b/tools/deployment/developer/ceph/000-install-packages.sh new file mode 120000 index 000000000..d702c4899 --- /dev/null +++ b/tools/deployment/developer/ceph/000-install-packages.sh @@ -0,0 +1 @@ +../common/000-install-packages.sh \ No newline at end of file diff --git a/tools/deployment/developer/ceph/005-deploy-k8s.sh b/tools/deployment/developer/ceph/005-deploy-k8s.sh new file mode 120000 index 000000000..257a39f7a --- /dev/null +++ b/tools/deployment/developer/ceph/005-deploy-k8s.sh @@ -0,0 +1 @@ +../common/005-deploy-k8s.sh \ No newline at end of file diff --git a/tools/deployment/developer/ceph/010-deploy-docker-registry.sh b/tools/deployment/developer/ceph/010-deploy-docker-registry.sh new file mode 120000 index 000000000..b5d3fc3c5 --- /dev/null +++ b/tools/deployment/developer/ceph/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/ceph/020-ingress.sh b/tools/deployment/developer/ceph/020-ingress.sh new file mode 100755 index 000000000..b2c068841 --- /dev/null +++ b/tools/deployment/developer/ceph/020-ingress.sh @@ -0,0 +1,52 @@ +#!/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: Lint and package chart +make ingress + +#NOTE: Deploy global ingress +tee /tmp/ingress-kube-system.yaml << EOF +deployment: + mode: cluster + type: DaemonSet +network: + host_namespace: true +EOF +helm upgrade --install ingress-kube-system ./ingress \ + --namespace=kube-system \ + --values=/tmp/ingress-kube-system.yaml + +#NOTE: Wait for deploy +./tools/deployment/common/wait-for-pods.sh kube-system + +#NOTE: Display info +helm status ingress-kube-system + +#NOTE: Deploy namespace ingress +for NAMESPACE in osh-infra ceph; do + helm upgrade --install ingress-${NAMESPACE} ./ingress \ + --namespace=${NAMESPACE} \ + ${OSH_EXTRA_HELM_ARGS} \ + ${OSH_EXTRA_HELM_ARGS_INGRESS_OPENSTACK} + + #NOTE: Wait for deploy + ./tools/deployment/common/wait-for-pods.sh ${NAMESPACE} + + #NOTE: Display info + helm status ingress-${NAMESPACE} +done diff --git a/tools/deployment/developer/ceph/030-ceph.sh b/tools/deployment/developer/ceph/030-ceph.sh new file mode 100755 index 000000000..69360f461 --- /dev/null +++ b/tools/deployment/developer/ceph/030-ceph.sh @@ -0,0 +1,194 @@ +#!/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: Lint and package chart +for CHART in ceph-mon ceph-osd ceph-client ceph-provisioners; do + make "${CHART}" +done + +#NOTE: Deploy command +: ${OSH_EXTRA_HELM_ARGS:=""} +[ -s /tmp/ceph-fs-uuid.txt ] || uuidgen > /tmp/ceph-fs-uuid.txt +CEPH_FS_ID="$(cat /tmp/ceph-fs-uuid.txt)" +#NOTE(portdirect): to use RBD devices with Ubuntu kernels < 4.5 this +# should be set to 'hammer' +. /etc/os-release +if [ "x${ID}" == "xubuntu" ] && \ + [ "$(uname -r | awk -F "." '{ print $2 }')" -lt "5" ]; then + CRUSH_TUNABLES=hammer +else + CRUSH_TUNABLES=null +fi +tee /tmp/ceph.yaml < /tmp/ceph-fs-uuid.txt +CEPH_PUBLIC_NETWORK="$(./tools/deployment/multinode/kube-node-subnet.sh)" +CEPH_CLUSTER_NETWORK="$(./tools/deployment/multinode/kube-node-subnet.sh)" +CEPH_FS_ID="$(cat /tmp/ceph-fs-uuid.txt)" +#NOTE(portdirect): to use RBD devices with Ubuntu kernels < 4.5 this +# should be set to 'hammer' +. /etc/os-release +if [ "x${ID}" == "xubuntu" ] && \ + [ "$(uname -r | awk -F "." '{ print $2 }')" -lt "5" ]; then + CRUSH_TUNABLES=hammer +else + CRUSH_TUNABLES=null +fi +if [ "x${ID}" == "xcentos" ]; then + CRUSH_TUNABLES=hammer +fi +tee /tmp/ceph.yaml << EOF +endpoints: + identity: + namespace: openstack + object_store: + namespace: ceph + ceph_mon: + namespace: ceph +network: + public: ${CEPH_PUBLIC_NETWORK} + cluster: ${CEPH_CLUSTER_NETWORK} +deployment: + storage_secrets: true + ceph: true + rbd_provisioner: true + cephfs_provisioner: true + client_secrets: false + rgw_keystone_user_and_endpoints: false +bootstrap: + enabled: true +conf: + ceph: + global: + fsid: ${CEPH_FS_ID} + rgw_ks: + enabled: true + pool: + crush: + tunables: ${CRUSH_TUNABLES} + target: + # NOTE(portdirect): 5 nodes, with one osd per node + osd: 5 + pg_per_osd: 100 + storage: + osd: + - data: + type: directory + location: /var/lib/openstack-helm/ceph/osd/osd-one + journal: + type: directory + location: /var/lib/openstack-helm/ceph/osd/journal-one +EOF + +for CHART in ceph-mon ceph-osd ceph-client ceph-provisioners; do + helm upgrade --install ${CHART} ./${CHART} \ + --namespace=ceph \ + --values=/tmp/ceph.yaml \ + ${OSH_INFRA_EXTRA_HELM_ARGS} \ + ${OSH_INFRA_EXTRA_HELM_ARGS_CEPH_DEPLOY} + + #NOTE: Wait for deploy + ./tools/deployment/common/wait-for-pods.sh ceph 1200 + + #NOTE: Validate deploy + MON_POD=$(kubectl get pods \ + --namespace=ceph \ + --selector="application=ceph" \ + --selector="component=mon" \ + --no-headers | awk '{ print $1; exit }') + kubectl exec -n ceph ${MON_POD} -- ceph -s +done diff --git a/tools/deployment/multinode/030-lma-nfs-provisioner.sh b/tools/deployment/multinode/030-lma-nfs-provisioner.sh deleted file mode 120000 index 508e82dcb..000000000 --- a/tools/deployment/multinode/030-lma-nfs-provisioner.sh +++ /dev/null @@ -1 +0,0 @@ -../common/030-lma-nfs-provisioner.sh \ No newline at end of file diff --git a/tools/deployment/multinode/035-ceph-ns-activate.sh b/tools/deployment/multinode/035-ceph-ns-activate.sh new file mode 100755 index 000000000..3e8c0f4d9 --- /dev/null +++ b/tools/deployment/multinode/035-ceph-ns-activate.sh @@ -0,0 +1,52 @@ +#!/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 command +CEPH_PUBLIC_NETWORK="$(./tools/deployment/multinode/kube-node-subnet.sh)" +CEPH_CLUSTER_NETWORK="$(./tools/deployment/multinode/kube-node-subnet.sh)" +tee /tmp/ceph-osh-infra-config.yaml < $NODE_IPS +FIRST_IP_SUBNET=$(sudo docker run --rm ${UTILS_IMAGE} ipcalc "$(head -n 1 ${NODE_IPS})/24" | awk '/^Network/ { print $2 }') +LAST_IP_SUBNET=$(sudo docker run --rm ${UTILS_IMAGE} ipcalc "$(tail -n 1 ${NODE_IPS})/24" | awk '/^Network/ { print $2 }') +rm -f $NODE_IPS +function ip_diff { + echo $(($(echo $LAST_IP_SUBNET | awk -F '.' "{ print \$$1}") - $(echo $FIRST_IP_SUBNET | awk -F '.' "{ print \$$1}"))) +} +for X in {1..4}; do + if ! [ "$(ip_diff ${X})" -eq "0" ]; then + SUBMASK=$((((${X} - 1 )) * 8)) + break + elif [ ${X} -eq "4" ]; then + SUBMASK=24 + fi +done +echo ${FIRST_IP_SUBNET%/*}/${SUBMASK}