%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}
%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}
%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}/
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}/
%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}/
%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
%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}
+++ /dev/null
----
-# 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 )
# 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
+++ /dev/null
----
-# 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