summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Bartos <flamingo@2thebatcave.com>2017-12-19 11:45:23 +1100
committerNick Bartos <flamingo@2thebatcave.com>2018-01-08 07:44:35 +1100
commita6860728cf634fdcba82db9dd5b2a2d82e93eaca (patch)
treebfa095bf7b3da94936d703e3b1091efe986d24b8
parent6daf71565fd69e9ddb2ac20e787d49f74cf7a9d7 (diff)
downloadopenshift-a6860728cf634fdcba82db9dd5b2a2d82e93eaca.tar.gz
openshift-a6860728cf634fdcba82db9dd5b2a2d82e93eaca.tar.bz2
openshift-a6860728cf634fdcba82db9dd5b2a2d82e93eaca.tar.xz
openshift-a6860728cf634fdcba82db9dd5b2a2d82e93eaca.zip
Use Contiv version 1.2.0
-rw-r--r--roles/contiv/defaults/main.yml13
-rw-r--r--roles/contiv/tasks/netmaster.yml2
-rw-r--r--roles/contiv/templates/api-proxy-daemonset.yml.j21
-rw-r--r--roles/contiv/templates/netmaster.env.j21
-rw-r--r--roles/contiv/templates/netmaster.j21
-rw-r--r--roles/contiv/templates/netplugin.j24
6 files changed, 14 insertions, 8 deletions
diff --git a/roles/contiv/defaults/main.yml b/roles/contiv/defaults/main.yml
index c029fee15..4869abc61 100644
--- a/roles/contiv/defaults/main.yml
+++ b/roles/contiv/defaults/main.yml
@@ -1,6 +1,6 @@
---
# The version of Contiv binaries to use
-contiv_version: 1.1.1
+contiv_version: 1.2.0
# The version of cni binaries
contiv_cni_version: v0.4.0
@@ -42,6 +42,10 @@ contiv_netplugin_vtep_ip: "{{ hostvars[inventory_hostname]['ansible_' + contiv_n
# Interface used to bind Netmaster service
contiv_netmaster_interface: "{{ contiv_netplugin_interface }}"
+# IP address of the interface used for control communication within the cluster
+# It needs to be reachable from all nodes in the cluster.
+contiv_netmaster_ctrl_ip: "{{ hostvars[inventory_hostname]['ansible_' + contiv_netmaster_interface].ipv4.address }}"
+
# Path to the contiv binaries
contiv_bin_dir: /usr/bin
@@ -72,7 +76,7 @@ contiv_kube_plugin_dir: /usr/libexec/kubernetes/kubelet-plugins/net/exec
# Specifies routed mode vs bridged mode for networking (bridge | routing)
# if you are using an external router for all routing, you should select bridge here
-contiv_netplugin_fwd_mode: bridge
+contiv_netplugin_fwd_mode: routing
# Contiv fabric mode aci|default
contiv_fabric_mode: default
@@ -81,7 +85,7 @@ contiv_fabric_mode: default
contiv_vlan_range: "2900-3000"
# Encapsulation type vlan|vxlan to use for instantiating container networks
-contiv_encap_mode: vlan
+contiv_encap_mode: vxlan
# Backend used by Netplugin for instantiating container networks
contiv_netplugin_driver: ovs
@@ -128,6 +132,7 @@ contiv_openshift_docker_service_name: "{{ 'container-engine' if (openshift_docke
contiv_api_proxy_port: 10000
contiv_api_proxy_port_proto: tcp
contiv_api_proxy_image_repo: contiv/auth_proxy
+contiv_api_proxy_ip: "{{ hostvars[inventory_hostname]['ansible_' + contiv_netmaster_interface].ipv4.address }}"
contiv_etcd_system_user: contivetcd
contiv_etcd_system_uid: 823
@@ -137,7 +142,7 @@ contiv_etcd_port: 22379
contiv_etcd_port_proto: tcp
contiv_etcd_peer_port: 22380
contiv_etcd_peer_port_proto: tcp
-contiv_etcd_url: "etcd://127.0.0.1:{{ contiv_etcd_port }}"
+contiv_etcd_url: "http://127.0.0.1:{{ contiv_etcd_port }}"
contiv_etcd_init_image_repo: ferest/etcd-initer
contiv_etcd_init_image_tag: latest
contiv_etcd_image_repo: quay.io/coreos/etcd
diff --git a/roles/contiv/tasks/netmaster.yml b/roles/contiv/tasks/netmaster.yml
index 83203bc2e..bb22fb801 100644
--- a/roles/contiv/tasks/netmaster.yml
+++ b/roles/contiv/tasks/netmaster.yml
@@ -18,7 +18,7 @@
- name: Netmaster | Copy environment file for netmaster
template:
- src: netmaster.env.j2
+ src: netmaster.j2
dest: /etc/default/netmaster
mode: 0644
notify: restart netmaster
diff --git a/roles/contiv/templates/api-proxy-daemonset.yml.j2 b/roles/contiv/templates/api-proxy-daemonset.yml.j2
index 4d4388706..a15073580 100644
--- a/roles/contiv/templates/api-proxy-daemonset.yml.j2
+++ b/roles/contiv/templates/api-proxy-daemonset.yml.j2
@@ -42,6 +42,7 @@ spec:
- --tls-key-file=/var/contiv/api_proxy_key.pem
- --tls-certificate=/var/contiv/api_proxy_cert.pem
- "--data-store-address={{ etcd_host }}"
+ - --data-store-driver=etcd
- "--netmaster-address=127.0.0.1:{{ contiv_netmaster_port }}"
ports:
- containerPort: "{{ contiv_api_proxy_port }}"
diff --git a/roles/contiv/templates/netmaster.env.j2 b/roles/contiv/templates/netmaster.env.j2
deleted file mode 100644
index 9a38f32ea..000000000
--- a/roles/contiv/templates/netmaster.env.j2
+++ /dev/null
@@ -1 +0,0 @@
-NETMASTER_ARGS='--cluster-store {{ contiv_etcd_url }} --cluster-mode=kubernetes'
diff --git a/roles/contiv/templates/netmaster.j2 b/roles/contiv/templates/netmaster.j2
new file mode 100644
index 000000000..c9db122b5
--- /dev/null
+++ b/roles/contiv/templates/netmaster.j2
@@ -0,0 +1 @@
+NETMASTER_ARGS='--etcd={{ contiv_etcd_url }} --listen-url=127.0.0.1:{{ contiv_netmaster_port }} --fwdmode={{ contiv_netplugin_fwd_mode }} --infra={{ contiv_fabric_mode }} --control-url={{ contiv_netmaster_ctrl_ip }}:{{ contiv_netmaster_port }} --cluster-mode=kubernetes --netmode={{ contiv_encap_mode }}'
diff --git a/roles/contiv/templates/netplugin.j2 b/roles/contiv/templates/netplugin.j2
index 9ce44e2dc..0fd727401 100644
--- a/roles/contiv/templates/netplugin.j2
+++ b/roles/contiv/templates/netplugin.j2
@@ -1,6 +1,6 @@
{% if contiv_encap_mode == "vlan" %}
-NETPLUGIN_ARGS='-vlan-if {{ contiv_netplugin_interface }} -ctrl-ip {{ contiv_netplugin_ctrl_ip }} -plugin-mode kubernetes -cluster-store {{ contiv_etcd_url }}'
+NETPLUGIN_ARGS='--vlan-if={{ contiv_netplugin_interface }} --ctrl-ip={{ contiv_netplugin_ctrl_ip }} --etcd={{ contiv_etcd_url }} --fwdmode={{ contiv_netplugin_fwd_mode }} --cluster-mode=kubernetes --netmode={{ contiv_encap_mode }}'
{% endif %}
{% if contiv_encap_mode == "vxlan" %}
-NETPLUGIN_ARGS='-vtep-ip {{ contiv_netplugin_ctrl_ip }} -ctrl-ip {{ contiv_netplugin_ctrl_ip }} -plugin-mode kubernetes -cluster-store {{ contiv_etcd_url }}'
+NETPLUGIN_ARGS='--vtep-ip={{ contiv_netplugin_ctrl_ip }} --vxlan-port={{ contiv_vxlan_port }} --ctrl-ip={{ contiv_netplugin_ctrl_ip }} --etcd={{ contiv_etcd_url }} --fwdmode={{ contiv_netplugin_fwd_mode }} --cluster-mode=kubernetes --netmode={{ contiv_encap_mode }}'
{% endif %}