summaryrefslogtreecommitdiffstats
path: root/ci/config_tpl/juju2/bundlek8_tpl
diff options
context:
space:
mode:
authorNarinder Gupta <narinder.gupta@canonical.com>2016-12-21 10:34:14 -0600
committerNarinder Gupta <narinder.gupta@canonical.com>2016-12-21 10:44:28 -0600
commit735846bdb8e4623c24fc045a79ce82389fdff70c (patch)
tree36e96d4ea1fe4676a4031e96ff026c2b6362ea73 /ci/config_tpl/juju2/bundlek8_tpl
parente1a69393af42bbe9faf77e318e3cd6c84b264a1b (diff)
Added kubernetes core bundle support.
Change-Id: Ic2c5c4e1b76ac1caa8a4d2373661ebeb83e8971b Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
Diffstat (limited to 'ci/config_tpl/juju2/bundlek8_tpl')
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml22
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/easyrsa.yaml6
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml6
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/kubernetes.yaml15
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/relations.yaml9
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/subordinate.yaml4
6 files changed, 62 insertions, 0 deletions
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml b/ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml
new file mode 100644
index 00000000..7af74afa
--- /dev/null
+++ b/ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml
@@ -0,0 +1,22 @@
+# vim: set ts=2 et:
+# The machine constraints for each service in this bundle
+# have been commented out so you don't run into quota
+# problems on public clouds. Modify and uncomment the
+# constraints: lines for each service to reflect your
+# deployment before moving to production.
+#
+ series: {{ ubuntu.release }}
+ services:
+ nodes:
+ charm: "cs:{{ ubuntu.release }}/ubuntu"
+ num_units: {{ opnfv.units }}
+ ntp:
+ charm: "./{{ ubuntu.release }}/ntp"
+{% include 'kubernetes.yaml' %}
+{% include 'easyrsa.yaml' %}
+{% include 'etcd.yaml' %}
+{% include 'subordinate.yaml' %}
+
+ relations:
+ - [ 'ntp:juju-info', 'nodes:juju-info' ]
+{% include 'relations.yaml' %}
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/easyrsa.yaml b/ci/config_tpl/juju2/bundlek8_tpl/easyrsa.yaml
new file mode 100644
index 00000000..f5162ad7
--- /dev/null
+++ b/ci/config_tpl/juju2/bundlek8_tpl/easyrsa.yaml
@@ -0,0 +1,6 @@
+ easyrsa:
+ charm: "./{{ ubuntu.release }}/easyrsa"
+ num_units: 1
+ to:
+ - "lxd:nodes/0"
+
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml b/ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml
new file mode 100644
index 00000000..ba99d0e9
--- /dev/null
+++ b/ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml
@@ -0,0 +1,6 @@
+ etcd:
+ charm: "./{{ ubuntu.release }}/etcd"
+ num_units: 1
+ to:
+ - "nodes/0"
+
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/kubernetes.yaml b/ci/config_tpl/juju2/bundlek8_tpl/kubernetes.yaml
new file mode 100644
index 00000000..3953734b
--- /dev/null
+++ b/ci/config_tpl/juju2/bundlek8_tpl/kubernetes.yaml
@@ -0,0 +1,15 @@
+ kubernetes-master:
+ charm: "./{{ ubuntu.release }}/kubernetes-master"
+ num_units: 1
+ expose: true
+ to:
+ - "nodes/0"
+
+ kubernetes-worker:
+ charm: "./{{ ubuntu.release }}/kubernetes-worker"
+ num_units: {{ opnfv.units - 1 }}
+ expose: true
+ to:
+{% for unit_id in range(1, opnfv.units) %}
+ - "nodes/{{ unit_id }}"
+{% endfor %}
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/relations.yaml b/ci/config_tpl/juju2/bundlek8_tpl/relations.yaml
new file mode 100644
index 00000000..fd56090c
--- /dev/null
+++ b/ci/config_tpl/juju2/bundlek8_tpl/relations.yaml
@@ -0,0 +1,9 @@
+ - [ "kubernetes-master:kube-api-endpoint", "kubernetes-worker:kube-api-endpoint" ]
+ - [ "kubernetes-master:cluster-dns", "kubernetes-worker:kube-dns" ]
+ - [ "kubernetes-master:certificates", "easyrsa:client" ]
+ - [ "kubernetes-master:etcd", "etcd:db" ]
+ - [ "kubernetes-worker:certificates", "easyrsa:client" ]
+ - [ "flannel:etcd", "etcd:db" ]
+ - [ "flannel:cni", "kubernetes-master:cni" ]
+ - [ "flannel:cni", "kubernetes-worker:cni" ]
+ - [ "etcd:certificates", "easyrsa:client" ]
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/subordinate.yaml b/ci/config_tpl/juju2/bundlek8_tpl/subordinate.yaml
new file mode 100644
index 00000000..b800d59b
--- /dev/null
+++ b/ci/config_tpl/juju2/bundlek8_tpl/subordinate.yaml
@@ -0,0 +1,4 @@
+
+ flannel:
+ charm: ./{{ ubuntu.release }}/flannel
+