From: Tamas Laczko Date: Tue, 11 Jun 2019 12:33:40 +0000 (+0200) Subject: Remove app_install playbook & related roles X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=33cc8241a663ff7e586ab1004b6c4f3291c3d2b7;p=ta%2Fcaas-install.git Remove app_install playbook & related roles Change-Id: Iea25d8035d93d103e46da3fc7c13315a1f8ab9fd --- diff --git a/SPECS/infra-charts.spec b/SPECS/infra-charts.spec index 8c86ea7..0e697f4 100644 --- a/SPECS/infra-charts.spec +++ b/SPECS/infra-charts.spec @@ -15,7 +15,7 @@ %define COMPONENT infra-charts %define RPM_NAME caas-%{COMPONENT} %define RPM_MAJOR_VERSION 1.0.0 -%define RPM_MINOR_VERSION 2 +%define RPM_MINOR_VERSION 3 Name: %{RPM_NAME} Version: %{RPM_MAJOR_VERSION} diff --git a/SPECS/instantiate.spec b/SPECS/instantiate.spec index 6c3e058..ac23e26 100644 --- a/SPECS/instantiate.spec +++ b/SPECS/instantiate.spec @@ -15,7 +15,7 @@ %define COMPONENT instantiate %define RPM_NAME caas-%{COMPONENT} %define RPM_MAJOR_VERSION 1.0.0 -%define RPM_MINOR_VERSION 2 +%define RPM_MINOR_VERSION 3 Name: %{RPM_NAME} Version: %{RPM_MAJOR_VERSION} @@ -36,7 +36,6 @@ This rpm contains the necessary playbooks to instantiate the caas subsystem. %install mkdir -p %{buildroot}/%{_playbooks_path}/ -rsync -av ansible/playbooks/app_install.yaml %{buildroot}/%{_playbooks_path}/ rsync -av ansible/playbooks/caas_cleanup.yaml %{buildroot}/%{_playbooks_path}/ rsync -av ansible/playbooks/cloud_admin_user.yaml %{buildroot}/%{_playbooks_path}/ rsync -av ansible/playbooks/common.yaml %{buildroot}/%{_playbooks_path}/ @@ -46,7 +45,6 @@ rsync -av ansible/playbooks/openrc_hack.yaml %{buildroot}/%{_playbooks_path}/ rsync -av ansible/playbooks/pre_config_all.yaml %{buildroot}/%{_playbooks_path}/ mkdir -p %{buildroot}/%{_roles_path}/ -rsync -av ansible/roles/app_install %{buildroot}/%{_roles_path}/ rsync -av ansible/roles/caas_cleanup %{buildroot}/%{_roles_path}/ rsync -av ansible/roles/cloud_admin_user %{buildroot}/%{_roles_path}/ rsync -av ansible/roles/common_tasks %{buildroot}/%{_roles_path}/ @@ -94,7 +92,6 @@ sed -ri '/^libexec_dir/{s|:.*|: %{_caas_libexec_path}|}' % %post mkdir -p %{_postconfig_path}/ -ln -sf %{_playbooks_path}/app_install.yaml %{_postconfig_path}/ ln -sf %{_playbooks_path}/cloud_admin_user.yaml %{_postconfig_path}/ ln -sf %{_playbooks_path}/common.yaml %{_postconfig_path}/ ln -sf %{_playbooks_path}/docker.yaml %{_postconfig_path}/ @@ -107,7 +104,6 @@ ln -sf %{_playbooks_path}/caas_cleanup.yaml     %{_finalize_path}/ %postun if [ $1 -eq 0 ]; then - rm -f %{_postconfig_path}/app_install.yaml rm -f %{_postconfig_path}/cloud_admin_user.yaml rm -f %{_postconfig_path}/common.yaml rm -f %{_postconfig_path}/docker.yaml diff --git a/SPECS/utils.spec b/SPECS/utils.spec index 979a690..1e2bc23 100644 --- a/SPECS/utils.spec +++ b/SPECS/utils.spec @@ -15,7 +15,7 @@ %define COMPONENT utils %define RPM_NAME caas-%{COMPONENT} %define RPM_MAJOR_VERSION 1.0.0 -%define RPM_MINOR_VERSION 2 +%define RPM_MINOR_VERSION 3 %define KUBELET_PLUGINS_LOGDIR /var/log/kubelet-plugins/ Name: %{RPM_NAME} diff --git a/ansible/playbooks/app_install.yaml b/ansible/playbooks/app_install.yaml deleted file mode 100644 index 4f6e0d5..0000000 --- a/ansible/playbooks/app_install.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Copyright 2019 Nokia -# -# 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. - -# cmframework.requires: fluentd.yaml -- hosts: installation_controller:&caas_master - strategy: linear - become: true - become_user: "{{ users.admin_user_name }}" - roles: - - role: app_install - when: ( caas.chart_name is defined ) and ( caas.chart_name != "" ) and ( caas.chart_name is not none ) diff --git a/ansible/playbooks/openrc_hack.yaml b/ansible/playbooks/openrc_hack.yaml index ab22109..213ae21 100644 --- a/ansible/playbooks/openrc_hack.yaml +++ b/ansible/playbooks/openrc_hack.yaml @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# cmframework.requires: app_install.yaml +# cmframework.requires: fluentd.yaml - name: Create mandatory openrc file for finalize plays hosts: installation_controller:&caas_master strategy: free diff --git a/ansible/roles/app_install/tasks/main.yml b/ansible/roles/app_install/tasks/main.yml deleted file mode 100644 index 1d0a3bf..0000000 --- a/ansible/roles/app_install/tasks/main.yml +++ /dev/null @@ -1,58 +0,0 @@ ---- -# Copyright 2019 Nokia -# -# 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. - -- name: Get nodes ip - shell: 'kubectl get no -o jsonpath="[{range .items[*]}{.metadata.name},{end}]"' - register: node_ips - -- name: helm-list - shell: HELM_HOST={{ caas.tiller_ip }}:{{ caas.tiller_port }} helm list --all | grep -c {{ name|lower }} - register: list_result - ignore_errors: yes - when: caas.chart_name is defined and caas.chart_name != "" - -- name: set helm install parameters - set_fact: - helm_install_set: "" - -- name: set helm flags parameter - set_fact: - helm_flags: "" - -- name: set helm flags parameter - set_fact: - helm_flags: "{{ helm_flags }} --version={{ caas.chart_version }}" - when: (caas.chart_version is defined) and (caas.chart_version is not none) and (caas.chart_version != "") - -- name: create values.yaml if needed - copy: - content: | - {{ caas.helm_parameters | to_nice_yaml }} - dest: /tmp/Values.yaml - owner: "{{ users.admin_user_name }}" - group: "{{ users.admin_user_name }}" - mode: 0644 - force: yes - when: (caas.helm_parameters is defined) and (caas.helm_parameters is not none) and (caas.helm_parameters != "") - -- name: set helm flags parameters if needed - set_fact: - helm_flags: "{{ helm_flags }} --values /tmp/Values.yaml" - when: (caas.helm_parameters is defined) and (caas.helm_parameters is not none) and (caas.helm_parameters != "") - -- name: helm-install - shell: | - ansible-playbook -i /opt/openstack-ansible/inventory /opt/nokia/caas_lcm/deploy/playbook_helm_install.yml --become-user={{ users.admin_user_name }} -e "chart_name={{ caas.chart_name }} helm_flags='{{ helm_flags }}' release_name={{ name }} helm_operation_timeout={{ caas.helm_operation_timeout }} cbam=false helm_install_set='{{ helm_install_set }}'" - when: list_result is defined and list_result.rc == 1