From 7519b2b3c5e5a2a8be61cc38eff07b855abe9db8 Mon Sep 17 00:00:00 2001
From: attardi <giuseppe.attardi@garr.it>
Date: Sat, 30 Jun 2018 18:31:28 +0200
Subject: [PATCH] Upgraded to CDK #211.

---
 bundle.yaml | 53 +++++++++++++++++++++++++++++------------------------
 1 file changed, 29 insertions(+), 24 deletions(-)

diff --git a/bundle.yaml b/bundle.yaml
index 55799fc..6a62fc2 100644
--- a/bundle.yaml
+++ b/bundle.yaml
@@ -1,7 +1,7 @@
 ##
 # The worker nodes to be used should be tagged as 'kubernetes'.
-# One server should be tagged as 'kubernetes-public-ip', to denote a machine configured with
-# a public IP.
+# One server should be tagged as 'kubernetes-public-ip', to denote a machine
+# configured with a public IP.
 # The worker nodes with GPUs should be tagged as 'gpu'.
 ##
 
@@ -12,13 +12,13 @@ description: An eight-machine Kubernetes cluster, appropriate for production. In
 machines:
   "0":
     series: xenial
-    constraints: "tags=kubernetes"
+    constraints: tags=kubernetes #root-disk=8G
   "1":
     series: xenial
-    constraints: "tags=kubernetes"
+    constraints: tags=kubernetes #root-disk=8G
   "2":
     series: xenial
-    constraints: "tags=kubernetes"
+    constraints: tags=kubernetes #root-disk=8G
 
 # ----------------------------------------------------------------------
 services:
@@ -27,25 +27,28 @@ services:
     charm: cs:~csd-garr/defaultgw
     options:
       # ip route | grep default
-      gateway: 90.147.161.1/25
+      gateway: 90.147.161.27/25
 
   easyrsa:
-    charm: cs:~containers/easyrsa-30
+    charm: cs:~containers/easyrsa-45
     bindings:
       "": space-os-mgmt
     num_units: 1
     to:
-      - "lxd:kubernetes-master/0"
+      # an lxd on the unit of kubernetes-master 
+      - "lxd:kubernetes-master"
     annotations:
       gui-x: '450'
       gui-y: '550'
 
   etcd:
-    charm: cs:~containers/etcd-69
+    charm: cs:~containers/etcd-90
     bindings:
       "": space-os-mgmt
     num_units: 3
     # constraints: tags=kubernetes
+    options:
+      channel: 3.2/stable
     to:
       - "lxd:0"
       - "lxd:1"
@@ -55,7 +58,7 @@ services:
       gui-y: '550'
 
   flannel:
-    charm: cs:~containers/flannel-44
+    charm: cs:~containers/flannel-60
     bindings:
       "": space-os-mgmt
     options:
@@ -65,47 +68,48 @@ services:
       gui-y: '750'
 
   kubeapi-load-balancer:
-    charm: cs:~containers/kubeapi-load-balancer-52
+    charm: cs:~containers/kubeapi-load-balancer-64
     bindings:
       "": space-os-mgmt
+      # necessary for getting a floating IP
       apiserver: space-pub
     expose: true
     num_units: 1
     to:
-      - "lxd:0"
+      - "lxd:kubernetes-master"
     annotations:
       gui-x: '450'
       gui-y: '250'
 
   kubernetes-master:
-    charm: cs:~containers/kubernetes-master-102
+    charm: cs:~containers/kubernetes-master-116
     bindings:
       "": space-os-mgmt
-      kube-api-endpoint: space-pub
+      #kube-api-endpoint: space-pub
     num_units: 1
-    constraints: tags=kubernetes-public-ip
+    constraints: tags=kubernetes-public-ip cores=2 mem=4G #root-disk=16G
     options:
       channel: 1.10/stable
-      authorization-mode: Node,RBAC
+      authorization-mode: "Node,RBAC" #,Webhook
       # RBAC to allow access to dashboard to User "system:anonymous"
       # Because of this bug https://github.com/kubernetes/kubernetes/issues/39722
       # the value must be false, rather than what the documentation says.
-      api-extra-args: api-extra-args="anonymous-auth=false"
+      api-extra-args: "anonymous-auth=false" #authentication-token-webhook-config-file=/root/cdk/webhook.kubeconfig"
       enable-dashboard-addons: True
     annotations:
       gui-x: '800'
       gui-y: '850'
 
   kubernetes-worker:
-    charm: cs:~containers/kubernetes-worker-114
+    charm: cs:~containers/kubernetes-worker-131
     bindings:
       "": space-os-mgmt
     num_units: 3
-    constraints: cores=4 mem=4G tags=kubernetes
+    constraints: tags=kubernetes cores=4 mem=4G #root-disk=16G
     expose: true
     options:
       channel: 1.10/stable
-      cuda-version: 9.0.176-1
+      cuda_repo: 9.1.85.1 #9.0.176-1
       # Enable Cloud Controller Manager
       # https://kubernetes.io/docs/tasks/administer-cluster/running-cloud-controller/
       # kubelet-extra-args: --cloud-provider=external
@@ -114,16 +118,16 @@ services:
       gui-y: '850'
 
   kubernetes-worker-gpu: 
-    charm: cs:~containers/kubernetes-worker-114
+    charm: cs:~containers/kubernetes-worker-131
     bindings:
       "": space-os-mgmt
     # charm: ./kubernetes-worker # patched for cuda-9.0
     num_units: 1
-    constraints: cores=4 mem=4G tags=gpu
+    constraints: tags=gpu cores=4 mem=4G #root-disk=16G
     expose: true
     options:
       channel: 1.10/stable
-      cuda-version: 9.0.176-1
+      cuda_repo: 9.1.85.1 #9.0.176-1
       # kubelet-extra-args: --cloud-provider=external
     annotations: 
       gui-x: "520"
@@ -202,6 +206,7 @@ relations:
   - ["kubernetes-master:certificates", "easyrsa:client"]
   - ["kubernetes-master:juju-info", "defaultgw:juju-info"]
   - ["kubernetes-master:etcd", "etcd:db"]
+  # Kube load balancer
   - ["kubeapi-load-balancer:certificates", "easyrsa:client"]
   - ["kubeapi-load-balancer:juju-info", "defaultgw:juju-info"]
   - ["etcd:certificates", "easyrsa:client"]
@@ -226,4 +231,4 @@ relations:
   # - [ manila, keystone ]
   # - [ manila, manila-generic ]
   # - [ neutron-openvswitch, manila ]
-  
\ No newline at end of file
+  
-- 
GitLab