summaryrefslogtreecommitdiffstats
path: root/mcp/patches/reclass-system-salt-model/0002-Use-keystone-v3-endpoints-by-default.patch
diff options
context:
space:
mode:
Diffstat (limited to 'mcp/patches/reclass-system-salt-model/0002-Use-keystone-v3-endpoints-by-default.patch')
-rw-r--r--mcp/patches/reclass-system-salt-model/0002-Use-keystone-v3-endpoints-by-default.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/mcp/patches/reclass-system-salt-model/0002-Use-keystone-v3-endpoints-by-default.patch b/mcp/patches/reclass-system-salt-model/0002-Use-keystone-v3-endpoints-by-default.patch
new file mode 100644
index 000000000..b22951a8f
--- /dev/null
+++ b/mcp/patches/reclass-system-salt-model/0002-Use-keystone-v3-endpoints-by-default.patch
@@ -0,0 +1,34 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: Copyright (c) 2018 Mirantis Inc., Enea AB 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
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+From: Michael Polenchuk <mpolenchuk@mirantis.com>
+Date: Thu, 28 Dec 2017 12:49:33 +0400
+Subject: [PATCH] Use keystone v3 endpoints by default
+
+The v2.0 auth API has been already marked as deprecated in the
+Mitaka release and will be removed in the "T" release.
+The v3 API should be used instead.
+
+Change-Id: I7e9a1b180f4e0ddb24ec72ed9f08c9e2580c7897
+---
+ keystone/client/single.yml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/keystone/client/single.yml b/keystone/client/single.yml
+index a79ed7e..86b4e09 100644
+--- a/keystone/client/single.yml
++++ b/keystone/client/single.yml
+@@ -4,7 +4,7 @@ classes:
+ - system.keystone.client.service.glance
+ - system.keystone.client.service.heat
+ - system.keystone.client.service.heat-cfn
+-- system.keystone.client.service.keystone
++- system.keystone.client.service.keystone3
+ - system.keystone.client.service.neutron
+ parameters:
+ _param:
ont-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
---
# SPDX-license-identifier: Apache-2.0
##############################################################################
# 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
##############################################################################
- hosts: opnfv
  remote_user: root
  vars_files:
    - "{{ xci_path }}/xci/var/opnfv.yml"

  pre_tasks:
    - name: Load distribution variables
      include_vars:
        file: "{{ item }}"
      with_items:
        - "{{ xci_path }}/xci/var/{{ ansible_os_family }}.yml"
    - name: Set facts for remote deployment
      set_fact:
        remote_xci_path: "{{ ansible_env.HOME }}/releng-xci"
        remote_xci_flavor_files: "{{ ansible_env.HOME }}/releng-xci/xci/installer/{{ installer_type }}/files/{{ xci_flavor }}"
        remote_xci_playbooks: "{{ ansible_env.HOME }}/releng-xci/xci/playbooks"

  roles:
    - role: bootstrap-host
      configure_network: xci_flavor != 'aio'

  tasks:
    - name: Create list of files to copy
      shell: |
          git ls-tree -r --name-only HEAD > {{ xci_cache }}/releng-xci.files
          echo ".git/" >> {{ xci_cache }}/releng-xci.files
          echo ".cache/repos/" >> {{ xci_cache }}/releng-xci.files
          echo ".cache/xci.env" >> {{ xci_cache }}/releng-xci.files
      args:
        executable: /bin/bash
        chdir: "{{ xci_path }}"
      changed_when: False
      delegate_to: 127.0.0.1
      tags:
        - skip_ansible_lint

    - name: Copy releng-xci to remote host
      synchronize:
        archive: yes
        src: "{{ xci_path }}/"
        dest: "{{ remote_xci_path }}"
        delete: yes
        rsync_opts:
          - "--recursive"
          - "--files-from={{ xci_cache }}/releng-xci.files"

    - name: delete the opnfv_inventory directory
      file:
        path: "{{ remote_xci_path }}/.cache/repos/kubespray/opnfv_inventory"
        state: absent

    - name: make sure kubespray/opnfv_inventory/group_vars/ exist
      file:
        path: "{{ remote_xci_path }}/.cache/repos/kubespray/opnfv_inventory/group_vars"
        state: directory

    - name: copy kubespray inventory directory
      file:
        src: "{{ remote_xci_playbooks }}/dynamic_inventory.py"
        path: "{{ remote_xci_path }}/.cache/repos/kubespray/opnfv_inventory/dynamic_inventory.py"
        state: link

    - name: Reload XCI deployment host facts
      setup:
        filter: ansible_local
        gather_subset: "!all"
      delegate_to: 127.0.0.1

    - name: Prepare everything to run the {{ deploy_scenario }} role
      include_role:
        name: "{{ hostvars['opnfv'].ansible_local.xci.scenarios.role }}"

    - name: Install required packages
      package:
        name: "{{ (ansible_pkg_mgr == 'zypper') | ternary('dbus-1', 'dbus') }}"
        state: present
        update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}"
      when: xci_flavor == 'aio'

    - name: change dashboard server type to NodePort
      lineinfile:
        path: "{{ remote_xci_path }}/.cache/repos/kubespray/roles/kubernetes-apps/ansible/templates/dashboard.yml.j2"
        insertafter: 'targetPort'
        line: "  type: NodePort"

    - name: pip install required packages
      pip:
        name: "{{ item.name }}"
        version: "{{ item.version | default(omit) }}"
      with_items:
        - { name: 'ansible', version: "{{ xci_kube_ansible_pip_version }}" }
        - { name: 'netaddr' }
        - { name: 'ansible-modules-hashivault' }

    - name: fetch xci environment
      copy:
        src: "{{ xci_path }}/.cache/xci.env"
        dest: /root/xci.env

    - name: Manage SSH keys
      include_tasks: "{{ xci_path }}/xci/playbooks/manage-ssh-keys.yml"