diff options
Diffstat (limited to 'deploy/adapters')
8 files changed, 117 insertions, 13 deletions
diff --git a/deploy/adapters/ansible/kubernetes/roles/kargo/files/extra-vars-aarch64.yml b/deploy/adapters/ansible/kubernetes/roles/kargo/files/extra-vars-aarch64.yml new file mode 100644 index 00000000..26e3fa75 --- /dev/null +++ b/deploy/adapters/ansible/kubernetes/roles/kargo/files/extra-vars-aarch64.yml @@ -0,0 +1,33 @@ +--- +# Override default kubespray variables + +# roles/download/defaults/main.yml +etcd_version: v3.2.4-arm64 +flannel_version: "v0.8.0-arm64" +flannel_cni_image_repo: "linaro/flannel-cni-arm64" +hyperkube_image_repo: "gcr.io/google-containers/hyperkube-arm64" +hyperkube_image_tag: "{{ kube_version }}" +pod_infra_image_repo: "gcr.io/google_containers/pause-arm64" +nginx_image_tag: 1.13 +kubedns_image_repo: "gcr.io/google_containers/k8s-dns-kube-dns-arm64" +dnsmasq_nanny_image_repo: "gcr.io/google_containers/k8s-dns-dnsmasq-nanny-arm64" +dnsmasq_sidecar_image_repo: "gcr.io/google_containers/k8s-dns-sidecar-arm64" +kubednsautoscaler_image_repo: "gcr.io/google_containers/\ +cluster-proportional-autoscaler-arm64" + +# inventory/group_vars/k8s-cluster.yml +kube_network_plugin: flannel +helm_enabled: false +docker_options: "--insecure-registry={{ kube_service_addresses }} \ +--graph={{ docker_daemon_graph }} {{ docker_log_opts }} \ +--add-runtime docker-runc=/usr/libexec/docker/docker-runc-current \ +--default-runtime=docker-runc \ +--exec-opt native.cgroupdriver=systemd \ +--userland-proxy-path=/usr/libexec/docker/docker-proxy-current \ +--signature-verification=false" + +# roles/docker/vars/redhat.yml +docker_package_info: + pkg_mgr: yum + pkgs: + - name: docker diff --git a/deploy/adapters/ansible/kubernetes/roles/kargo/files/extra-vars.yml b/deploy/adapters/ansible/kubernetes/roles/kargo/files/extra-vars.yml new file mode 100644 index 00000000..e13e33ca --- /dev/null +++ b/deploy/adapters/ansible/kubernetes/roles/kargo/files/extra-vars.yml @@ -0,0 +1,7 @@ +--- +# Override default kubespray variables + +# Just a placeholder to satisfy ansible +dummy_var: 0 + +# helm_enabled: true diff --git a/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml b/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml index 4df8dffa..2763e53e 100644 --- a/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml +++ b/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml @@ -96,9 +96,18 @@ regexp: '^helm_enabled:' line: 'helm_enabled: {{ helm_flag }}' +- name: copy overrided variables + copy: + src: "{{ item }}" + dest: /opt/kargo_k8s/extra-vars.yml + with_first_found: + - extra-vars-{{ ansible_architecture }}.yml + - extra-vars.yml + - name: run kargo playbook shell: | cd /opt/kargo_k8s - ansible-playbook -i inventory/inventory.cfg cluster.yml -b -v 2>&1 | tee kargo.log + ansible-playbook -i inventory/inventory.cfg cluster.yml \ + -e "@extra-vars.yml" -b -v 2>&1 | tee kargo.log tags: - ansible diff --git a/deploy/adapters/ansible/roles/config-osa/tasks/fix_pip_version.yml b/deploy/adapters/ansible/roles/config-osa/tasks/fix_pip_version.yml new file mode 100644 index 00000000..61d263b4 --- /dev/null +++ b/deploy/adapters/ansible/roles/config-osa/tasks/fix_pip_version.yml @@ -0,0 +1,25 @@ +# ############################################################################# +# Copyright (c) 2017 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +# ############################################################################# +--- +- name: copy the repo_fix_andas.yml + template: + src: repo_fix_pandas.yml + dest: /etc/ansible/roles/repo_build/tasks/repo_fix_pandas.yml + +- name: fix the python-ldap version + lineinfile: + dest: /etc/ansible/roles/os_keystone/defaults/main.yml + regexp: '^ - python-ldap' + line: ' - python-ldap==2.5.2' + +- name: add pkgconfig in gnocchi requires pip packages + lineinfile: + dest: /etc/ansible/roles/repo_build/defaults/main.yml + insertafter: "repo_pip_packages:" + line: ' - pkgconfig' diff --git a/deploy/adapters/ansible/roles/config-osa/tasks/main.yml b/deploy/adapters/ansible/roles/config-osa/tasks/main.yml index 9b657fe9..ceceb956 100755 --- a/deploy/adapters/ansible/roles/config-osa/tasks/main.yml +++ b/deploy/adapters/ansible/roles/config-osa/tasks/main.yml @@ -66,6 +66,19 @@ insertafter: '^ - qemu-img-ev' line: ' - libvirt' +- name: fix the problem of nova cell_v2 discovery + blockinfile: + dest: /etc/ansible/roles/os_nova/tasks/nova_db_post_setup.yml + insertafter: 'nova-manage cell_v2 discover_hosts' + block: | + # add retry + register: cell_v2_discovery + until: cell_v2_discovery == 0 + retries: 10 + delay: 5 + ignore_errors: true + when: hostvars[hostvars[inventory_hostname]['groups']['controller'][0]]['local_mirror'] == 'Ubuntu' + - name: remove CentOS-Base.repo after ceph-osd blockinfile: dest: /etc/ansible/roles/ceph-osd/tasks/start_osds.yml @@ -76,6 +89,25 @@ /etc/yum.repos.d/CentOS-Base.repo.bak; when: hostvars[hostvars[inventory_hostname]['groups']['controller'][0]]['local_mirror'] == 'CentOS' +- name: fix the problem in pip_install + blockinfile: + dest: /etc/ansible/roles/pip_install/tasks/pre_install_yum.yml + insertafter: 'pip_install_package_state' + block: | + # add retry + register: repo_result + until: repo_result | success + retries: 5 + delay: 10 + when: hostvars[hostvars[inventory_hostname]['groups']['controller'][0]]['local_mirror'] == 'CentOS' + +- name: update the directory of chrony key + lineinfile: + dest: /etc/ansible/roles/ansible-hardening/templates/chrony.conf.j2 + regexp: '^keyfile' + line: 'keyfile /etc/chrony.keys' + when: hostvars[hostvars[inventory_hostname]['groups']['controller'][0]]['local_mirror'] == 'CentOS' + - name: add mariadb local repository blockinfile: dest: /etc/openstack_deploy/user_variables.yml @@ -295,11 +327,6 @@ when: - "{{ hostvars[inventory_hostname]['groups']['controller'] | length < 2 }}" -- name: copy the repo_fix_andas.yml - template: - src: repo_fix_pandas.yml - dest: /etc/ansible/roles/repo_build/tasks/repo_fix_pandas.yml - # - name: change repore build # lineinfile: # dest: /etc/ansible/roles/repo_build/tasks/main.yml @@ -308,10 +335,6 @@ - include: meters.yml -- name: fix the python-ldap version - lineinfile: - dest: /etc/ansible/roles/os_keystone/defaults/main.yml - regexp: '^ - python-ldap' - line: ' - python-ldap==2.5.2' +- include: fix_pip_version.yml - include: fix_rescue.yml diff --git a/deploy/adapters/ansible/roles/config-osa/templates/user_variables.yml.j2 b/deploy/adapters/ansible/roles/config-osa/templates/user_variables.yml.j2 index 88a3233b..5fa999a5 100644 --- a/deploy/adapters/ansible/roles/config-osa/templates/user_variables.yml.j2 +++ b/deploy/adapters/ansible/roles/config-osa/templates/user_variables.yml.j2 @@ -63,3 +63,6 @@ neutron_provider_networks: {% endif %} security_sshd_permit_root_login: yes + +security_ntp_servers: + - 45.79.111.114 diff --git a/deploy/adapters/ansible/roles/pre-openstack/tasks/RedHat.yml b/deploy/adapters/ansible/roles/pre-openstack/tasks/RedHat.yml index 6ac191a3..d423ed04 100644 --- a/deploy/adapters/ansible/roles/pre-openstack/tasks/RedHat.yml +++ b/deploy/adapters/ansible/roles/pre-openstack/tasks/RedHat.yml @@ -90,7 +90,9 @@ dest: /etc/modules-load.d/openstack-ansible.conf - name: restart ntp service - shell: "systemctl enable ntpd.service && systemctl start ntpd.service" + shell: | + systemctl stop ntpd.service; + systemctl disable ntpd.service; - name: change the MaxSessions lineinfile: diff --git a/deploy/adapters/ansible/roles/pre-openstack/tasks/Ubuntu.yml b/deploy/adapters/ansible/roles/pre-openstack/tasks/Ubuntu.yml index 5bb77485..2433ac17 100644 --- a/deploy/adapters/ansible/roles/pre-openstack/tasks/Ubuntu.yml +++ b/deploy/adapters/ansible/roles/pre-openstack/tasks/Ubuntu.yml @@ -55,7 +55,9 @@ state: absent - name: restart ntp service - shell: "service ntp restart" + shell: | + service ntp stop; + systemctl disable ntp; - name: add the appropriate kernel modules copy: |