segregrate the flannel and ovn whoch is controlled by commad line 79/37179/1
authorAakashKT <aakash.kt@research.iiit.ac.in>
Tue, 11 Jul 2017 13:05:27 +0000 (18:35 +0530)
committerAakashKT <aakash.kt@research.iiit.ac.in>
Tue, 11 Jul 2017 13:16:07 +0000 (18:46 +0530)
parameter

Change-Id: I005827f72631bea8b11e302a84aaf95de8dee1c8
Signed-off-by: Aakash KT <aakash.kt@research.iiit.ac.in>
ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml
ci/config_tpl/juju2/bundlek8_tpl/flannel.yaml [new file with mode: 0644]
ci/config_tpl/juju2/bundlek8_tpl/kubernetes.yaml
ci/config_tpl/juju2/bundlek8_tpl/ovn.yaml [new file with mode: 0644]
ci/config_tpl/juju2/bundlek8_tpl/relations.yaml
ci/config_tpl/juju2/bundlek8_tpl/subordinate.yaml [deleted file]
ci/default_deployment_config.yaml
ci/genK8Bundle.py

index 400dcb4..96a27cf 100644 (file)
 {% include 'kubernetes.yaml' %}
 {% include 'easyrsa.yaml' %}
 {% include 'etcd.yaml' %}
-{% include 'subordinate.yaml' %}
 {% if k8.feature.loadbalancer %}
 {% include 'kubeapi-load-balancer.yaml' %}
 {% endif %}
 
+{% if k8.network.controller == 'ovn' %}
+{% include 'ovn.yaml' %}
+{% else %}
+{% include 'flannel.yaml' %}
+{% endif %}
+
 
   relations:
     - [ 'ntp:juju-info', 'nodes:juju-info' ]
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/flannel.yaml b/ci/config_tpl/juju2/bundlek8_tpl/flannel.yaml
new file mode 100644 (file)
index 0000000..561e088
--- /dev/null
@@ -0,0 +1,7 @@
+
+    flannel:
+      charm: cs:~containers/flannel
+{% if os.service.bindings %}
+      bindings:
+        "": internal-api
+{% endif %}
\ No newline at end of file
index 93f8890..4589203 100644 (file)
@@ -2,13 +2,32 @@
       charm: "cs:~containers/kubernetes-master"
       num_units: 1
       expose: true
+{% if os.service.bindings %}
+      bindings:
+        "": internal-api
+{% endif %}
+{% if k8.network.controller == 'ovn' %}
+      options:
+        channel: 1.5/stable
+{% endif %}
       to:
         - "nodes/0"
 
+
+
+
     kubernetes-worker:
       charm: "cs:~containers/kubernetes-worker"
       num_units: {{ opnfv.units - 1 }}
       expose: true
+{% if os.service.bindings %}
+      bindings:
+        "": internal-api
+{% endif %}
+{% if k8.network.controller == 'ovn' %}
+      options:
+        channel: 1.5/stable
+{% endif %}
       to:
 {% for unit_id in range(1, opnfv.units) %}
         - "nodes/{{ unit_id }}"
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/ovn.yaml b/ci/config_tpl/juju2/bundlek8_tpl/ovn.yaml
new file mode 100644 (file)
index 0000000..ac6e1cf
--- /dev/null
@@ -0,0 +1,9 @@
+
+    ovn:
+      charm: "cs:~aakashkt/ovn-2"
+{% if os.service.bindings %}
+      bindings:
+        "": internal-api
+{% endif %}
+      options:
+        gateway-physical-interface: "intf100"
\ No newline at end of file
index 3a34aa1..4401820 100644 (file)
@@ -7,9 +7,14 @@
     - [ 'kubernetes-master:etcd', 'etcd:db' ]
     - [ 'kubernetes-master:kube-control', 'kubernetes-worker:kube-control' ]
     - [ 'kubernetes-worker:certificates', 'easyrsa:client' ]
+{% if k8.network.controller == 'ovn' %}
+    - [ 'ovn:cni', 'kubernetes-master:cni' ]
+    - [ 'ovn:cni', 'kubernetes-worker:cni' ]
+{% else %}
     - [ 'flannel:etcd', 'etcd:db' ]
     - [ 'flannel:cni', 'kubernetes-master:cni' ]
     - [ 'flannel:cni', 'kubernetes-worker:cni' ]
+{% endif %}
     - [ 'etcd:certificates', 'easyrsa:client' ]
 {% if k8.feature.loadbalancer %}
     - [ 'kubernetes-master:loadbalancer', 'kubeapi-load-balancer:loadbalancer' ]
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/subordinate.yaml b/ci/config_tpl/juju2/bundlek8_tpl/subordinate.yaml
deleted file mode 100644 (file)
index 30832c5..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-
-    flannel:
-      charm: cs:~containers/flannel
-
index 0285ebc..9a06817 100644 (file)
@@ -40,3 +40,5 @@ os:
 k8:
     feature:
         loadbalancer: False
+    network:
+        controller: nosdn
index 81deb5c..2f0b63d 100644 (file)
@@ -165,6 +165,9 @@ if 'dpdk' in features:
 if 'lb' in features:
     config['k8']['feature']['loadbalancer'] = True
 
+# change ha mode
+config['k8']['network']['controller'] = sdn
+
 # Set beta option from extra
 if 'hugepages' in extra:
     config['os']['beta']['huge_pages'] = True