diff --git a/bootstrap/cycle-jetson.sh b/bootstrap/cycle-jetson.sh new file mode 100755 index 0000000..d1029c6 --- /dev/null +++ b/bootstrap/cycle-jetson.sh @@ -0,0 +1,4 @@ +. ./init.sh && \ +ansible-playbook -i inventory/prod/inventory.ini mitogen.yml && \ +ansible-playbook -i inventory/prod/inventory.ini -e node=jetson1.dyndns.moritzgraf.de remove-node.yml && \ +ansible-playbook -i inventory/prod/inventory.ini -e upgrade_cluster_setup=true cluster.yml \ No newline at end of file diff --git a/bootstrap/init.sh b/bootstrap/init.sh index 1110230..13829bf 100755 --- a/bootstrap/init.sh +++ b/bootstrap/init.sh @@ -47,6 +47,7 @@ rsync -a ./inventory/ ./kubespray/inventory/ echo "## * changing into kubespray dir" cd kubespray echo "## * execute the following command to force new settings" +echo "ansible-playbook -i inventory/prod/inventory.ini mitogen.yml &&" echo "ansible-playbook -i inventory/prod/inventory.ini -e upgrade_cluster_setup=true cluster.yml" # cp -r kubespray/inventory/sample kubespray/inventory/prod diff --git a/bootstrap/inventory/prod/group_vars/k8s-cluster/k8s-cluster.yml b/bootstrap/inventory/prod/group_vars/k8s-cluster/k8s-cluster.yml index 789ab42..716060b 100644 --- a/bootstrap/inventory/prod/group_vars/k8s-cluster/k8s-cluster.yml +++ b/bootstrap/inventory/prod/group_vars/k8s-cluster/k8s-cluster.yml @@ -27,7 +27,7 @@ kube_users_dir: "{{ kube_config_dir }}/users" kube_api_anonymous_auth: true ## Change this to use another Kubernetes version, e.g. a current beta release -kube_version: v1.19.2 +kube_version: v1.19.10 # kubernetes image repo define kube_image_repo: "k8s.gcr.io" @@ -277,7 +277,8 @@ podsecuritypolicy_enabled: false ## Supplementary addresses that can be added in kubernetes ssl keys. ## That can be useful for example to setup a keepalived virtual IP -# supplementary_addresses_in_ssl_keys: [10.0.0.1, 10.0.0.2, 10.0.0.3] +# Moritz public ip +supplementary_addresses_in_ssl_keys: [80.209.218.138] ## Running on top of openstack vms with cinder enabled may lead to unschedulable pods due to NoVolumeZoneConflict restriction in kube-scheduler. ## See https://github.com/kubernetes-sigs/kubespray/issues/2141 @@ -289,13 +290,13 @@ persistent_volumes_enabled: false ## Container Engine Acceleration ## Enable container acceleration feature, for example use gpu acceleration in containers -# nvidia_accelerator_enabled: true +nvidia_accelerator_enabled: true ## Nvidia GPU driver install. Install will by done by a (init) pod running as a daemonset. ## Important: if you use Ubuntu then you should set in all.yml 'docker_storage_options: -s overlay2' ## Array with nvida_gpu_nodes, leave empty or comment if you don't want to install drivers. ## Labels and taints won't be set to nodes if they are not in the array. -# nvidia_gpu_nodes: -# - kube-gpu-001 +nvidia_gpu_nodes: +- jetson1.dyndns.moritzgraf.de # nvidia_driver_version: "384.111" ## flavor can be tesla or gtx # nvidia_gpu_flavor: gtx diff --git a/bootstrap/inventory/prod/host_vars/jetson1.dyndns.moritzgraf.de.yml b/bootstrap/inventory/prod/host_vars/jetson1.dyndns.moritzgraf.de.yml new file mode 100644 index 0000000..31dba39 --- /dev/null +++ b/bootstrap/inventory/prod/host_vars/jetson1.dyndns.moritzgraf.de.yml @@ -0,0 +1,27 @@ +--- +ansible_become: yes +ansible_become_method: sudo +ansible_python_interpreter: /usr/bin/python3 +metrics_server_enabled: false + +kubelet_preferred_address_types: 'Hostname,ExternalDNS,ExternalIP,InternalDNS,InternalIP' + +access_ip: 80.209.218.138 +ansible_host: 80.209.218.138 +#flannel_public_ip: 80.209.218.138 +#kubelet_address: 80.209.218.138 +ip: 192.168.11.60 + +# kubelet_node_custom_flags: +# "" + +# setting of annotations not possible in kubespray, +# this has to be done manually +# node_labels: +# flannel.alpha.coreos.com/public-ip: 80.209.218.138 +# flannel.alpha.coreos.com/public-ip-overwrite: 80.209.218.138 +# alpha.kubernetes.io/provided-node-ip: 80.209.218.138 + +# node_taints: +# - "jetson=true:NoSchedule" +# - "jetson2=true:NoSchedule" \ No newline at end of file diff --git a/bootstrap/inventory/prod/host_vars/jetson1.dyndns.moritzgraf.de/all.yml b/bootstrap/inventory/prod/host_vars/jetson1.dyndns.moritzgraf.de/all.yml deleted file mode 100644 index 3e0a177..0000000 --- a/bootstrap/inventory/prod/host_vars/jetson1.dyndns.moritzgraf.de/all.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -ansible_become: yes -ansible_become_method: sudo -ansible_python_interpreter: /usr/bin/python3 -metrics_server_enabled: false - -access_ip: 80.209.218.138 - -node_taints: -- "jetson=true:NoSchedule" \ No newline at end of file