diff options
author | Scott Dodson <sdodson@redhat.com> | 2017-03-09 11:33:44 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-09 11:33:44 -0500 |
commit | 20aa8f8919d335042568cb3e6b75aa8fd7a490bb (patch) | |
tree | 6960956521d059ad1be43e5d962727a0ce0ec85b /roles | |
parent | 39e84a426f511d0f415e9b241de0f97bce4faa46 (diff) | |
parent | b24037e7f761b18a6de4841503732a9372d3900c (diff) | |
download | openshift-20aa8f8919d335042568cb3e6b75aa8fd7a490bb.tar.gz openshift-20aa8f8919d335042568cb3e6b75aa8fd7a490bb.tar.bz2 openshift-20aa8f8919d335042568cb3e6b75aa8fd7a490bb.tar.xz openshift-20aa8f8919d335042568cb3e6b75aa8fd7a490bb.zip |
Merge pull request #3586 from srampal/issue3541
Fix for issue 3541
Diffstat (limited to 'roles')
-rw-r--r-- | roles/contiv/defaults/main.yml | 15 | ||||
-rw-r--r-- | roles/contiv/files/loopback | bin | 3909976 -> 0 bytes | |||
-rw-r--r-- | roles/contiv/tasks/download_bins.yml | 19 | ||||
-rw-r--r-- | roles/contiv/tasks/netplugin.yml | 3 |
4 files changed, 36 insertions, 1 deletions
diff --git a/roles/contiv/defaults/main.yml b/roles/contiv/defaults/main.yml index c2b72339c..1ccae61f2 100644 --- a/roles/contiv/defaults/main.yml +++ b/roles/contiv/defaults/main.yml @@ -2,11 +2,18 @@ # The version of Contiv binaries to use contiv_version: 1.0.0-beta.3-02-21-2017.20-52-42.UTC +# The version of cni binaries +cni_version: v0.4.0 + contiv_default_subnet: "20.1.1.1/24" contiv_default_gw: "20.1.1.254" # TCP port that Netmaster listens for network connections netmaster_port: 9999 +# Default for contiv_role +contiv_role: netmaster + + # TCP port that Netplugin listens for network connections netplugin_port: 6640 contiv_rpc_port1: 9001 @@ -33,6 +40,14 @@ bin_dir: /usr/bin # Path to the contivk8s cni binary cni_bin_dir: /opt/cni/bin +# Path to cni archive download directory +cni_download_dir: /tmp + +# URL for cni binaries +cni_bin_url_base: "https://github.com/containernetworking/cni/releases/download/" +cni_bin_url: "{{ cni_bin_url_base }}/{{ cni_version }}/cni-{{ cni_version }}.tbz2" + + # Contiv config directory contiv_config_dir: /opt/contiv/config diff --git a/roles/contiv/files/loopback b/roles/contiv/files/loopback Binary files differdeleted file mode 100644 index f02b0b1fb..000000000 --- a/roles/contiv/files/loopback +++ /dev/null diff --git a/roles/contiv/tasks/download_bins.yml b/roles/contiv/tasks/download_bins.yml index 28ed50fae..319fce46c 100644 --- a/roles/contiv/tasks/download_bins.yml +++ b/roles/contiv/tasks/download_bins.yml @@ -25,3 +25,22 @@ src: "{{ contiv_current_release_directory }}/netplugin-{{ contiv_version }}.tar.bz2" dest: "{{ contiv_current_release_directory }}" copy: no + +- name: Download Bins | Download cni tar file + get_url: + url: "{{ cni_bin_url }}" + dest: "{{ cni_download_dir }}" + mode: 0755 + validate_certs: False + environment: + http_proxy: "{{ http_proxy|default('') }}" + https_proxy: "{{ https_proxy|default('') }}" + no_proxy: "{{ no_proxy|default('') }}" + register: download_file + +- name: Download Bins | Extract cni tar file + unarchive: + src: "{{ download_file.dest }}" + dest: "{{ cni_download_dir }}" + copy: no + when: download_file.changed diff --git a/roles/contiv/tasks/netplugin.yml b/roles/contiv/tasks/netplugin.yml index ec6c72fe9..97b9762df 100644 --- a/roles/contiv/tasks/netplugin.yml +++ b/roles/contiv/tasks/netplugin.yml @@ -43,8 +43,9 @@ - name: Netplugin | Copy CNI loopback bin copy: - src: loopback + src: "{{ cni_download_dir }}/loopback" dest: "{{ cni_bin_dir }}/loopback" + remote_src: True mode: 0755 - name: Netplugin | Ensure kube_plugin_dir and cni/net.d directories exist |