Add Backup

This commit is contained in:
ant31 2015-11-20 11:18:37 +01:00
parent 57e1831f78
commit c352df6fc8
12 changed files with 31 additions and 29 deletions

@ -1 +1 @@
Subproject commit 1b0318421f4f812a4ebec2d4ddbcb2834658acf0 Subproject commit 2ef9669d6d78e81c4e6de75cce239cabc99f00ad

@ -1 +1 @@
Subproject commit 2de264f00738b7518647d8ba5844868d0be5feae Subproject commit 3d74c70a4a2d294ec86528468efa2c10ece7bd7b

@ -1 +1 @@
Subproject commit e550ec4c181abce0e5e58ccab81fb7f2c2756b00 Subproject commit 563b35f3b62274e20add75684ac51ff741050975

View file

@ -1,6 +1,6 @@
--- ---
- name: Write script for calico/docker bridge configuration - name: Write script for calico/docker bridge configuration
template: src=create_cbr.j2 dest=/etc/network/if-up.d/create_cbr mode=u+x template: src=create_cbr.j2 dest=/etc/network/if-up.d/create_cbr mode=u+x backup=yes
when: kube_network_plugin is defined and kube_network_plugin == "calico" when: kube_network_plugin is defined and kube_network_plugin == "calico"
- name: Configure calico/docker bridge - name: Configure calico/docker bridge

View file

@ -6,7 +6,7 @@
- ca-certificates - ca-certificates
- name: Configure docker apt repository - name: Configure docker apt repository
template: src=docker.list.j2 dest=/etc/apt/sources.list.d/docker.list template: src=docker.list.j2 dest=/etc/apt/sources.list.d/docker.list backup=yes
- name: Install docker-engine - name: Install docker-engine
apt: pkg={{ item }} state=present force=yes update_cache=yes apt: pkg={{ item }} state=present force=yes update_cache=yes

View file

@ -1 +1 @@
deb https://apt.dockerproject.org/repo debian-{{ ansible_distribution_release }} main deb https://apt.dockerproject.org/repo {{ansible_distribution|lower}}-{{ ansible_distribution_release}} main

View file

@ -6,7 +6,7 @@
file: path=/etc/systemd/system/etcd2.service.d state=directory file: path=/etc/systemd/system/etcd2.service.d state=directory
- name: Write etcd2 config file - name: Write etcd2 config file
template: src=etcd2.j2 dest=/etc/systemd/system/etcd2.service.d/10-etcd2-cluster.conf template: src=etcd2.j2 dest=/etc/systemd/system/etcd2.service.d/10-etcd2-cluster.conf backup=yes
notify: notify:
- reload systemd - reload systemd
- restart etcd2 - restart etcd2

View file

@ -21,4 +21,5 @@
template: template:
src: systemd-etcd2.service.j2 src: systemd-etcd2.service.j2
dest: /lib/systemd/system/etcd2.service dest: /lib/systemd/system/etcd2.service
backup: yes
notify: restart daemons notify: restart daemons

View file

@ -18,46 +18,47 @@
proxy_token: "{{ tokens.results[3].content|b64decode }}" proxy_token: "{{ tokens.results[3].content|b64decode }}"
- name: write the config files for api server - name: write the config files for api server
template: src=apiserver.j2 dest={{ kube_config_dir }}/apiserver template: src=apiserver.j2 dest={{ kube_config_dir }}/apiserver backup=yes
notify: notify:
- restart daemons - restart daemons
- name: write config file for controller-manager - name: write config file for controller-manager
template: src=controller-manager.j2 dest={{ kube_config_dir }}/controller-manager template: src=controller-manager.j2 dest={{ kube_config_dir }}/controller-manager backup=yes
notify: notify:
- restart controller-manager - restart controller-manager
- name: write the kubecfg (auth) file for controller-manager - name: write the kubecfg (auth) file for controller-manager
template: src=controller-manager.kubeconfig.j2 dest={{ kube_config_dir }}/controller-manager.kubeconfig template: src=controller-manager.kubeconfig.j2 dest={{ kube_config_dir }}/controller-manager.kubeconfig backup=yes
notify: notify:
- restart controller-manager - restart controller-manager
- name: write the config file for scheduler - name: write the config file for scheduler
template: src=scheduler.j2 dest={{ kube_config_dir }}/scheduler template: src=scheduler.j2 dest={{ kube_config_dir }}/scheduler backup=yes
notify: notify:
- restart scheduler - restart scheduler
- name: write the kubecfg (auth) file for scheduler - name: write the kubecfg (auth) file for scheduler
template: src=scheduler.kubeconfig.j2 dest={{ kube_config_dir }}/scheduler.kubeconfig template: src=scheduler.kubeconfig.j2 dest={{ kube_config_dir }}/scheduler.kubeconfig backup=yes
notify: notify:
- restart scheduler - restart scheduler
- name: write the kubecfg (auth) file for kubectl - name: write the kubecfg (auth) file for kubectl
template: src=kubectl.kubeconfig.j2 dest={{ kube_config_dir }}/kubectl.kubeconfig template: src=kubectl.kubeconfig.j2 dest={{ kube_config_dir }}/kubectl.kubeconfig backup=yes
- name: write the config files for proxy - name: write the config files for proxy
template: src=proxy.j2 dest={{ kube_config_dir }}/proxy template: src=proxy.j2 dest={{ kube_config_dir }}/proxy backup=yes
notify: notify:
- restart daemons - restart daemons
- name: write the kubecfg (auth) file for proxy - name: write the kubecfg (auth) file for proxy
template: src=proxy.kubeconfig.j2 dest={{ kube_config_dir }}/proxy.kubeconfig template: src=proxy.kubeconfig.j2 dest={{ kube_config_dir }}/proxy.kubeconfig backup=yes
- name: populate users for basic auth in API - name: populate users for basic auth in API
lineinfile: lineinfile:
dest: "{{ kube_users_dir }}/known_users.csv" dest: "{{ kube_users_dir }}/known_users.csv"
create: yes create: yes
line: '{{ item.value.pass }},{{ item.key }},{{ item.value.role }}' line: '{{ item.value.pass }},{{ item.key }},{{ item.value.role }}'
backup: yes
with_dict: "{{ kube_users }}" with_dict: "{{ kube_users }}"
notify: notify:
- restart apiserver - restart apiserver

View file

@ -1,18 +1,18 @@
--- ---
- name: Write kube-apiserver systemd init file - name: Write kube-apiserver systemd init file
template: src=systemd-init/kube-apiserver.service.j2 dest=/etc/systemd/system/kube-apiserver.service template: src=systemd-init/kube-apiserver.service.j2 dest=/etc/systemd/system/kube-apiserver.service backup=yes
notify: restart daemons notify: restart daemons
- name: Write kube-controller-manager systemd init file - name: Write kube-controller-manager systemd init file
template: src=systemd-init/kube-controller-manager.service.j2 dest=/etc/systemd/system/kube-controller-manager.service template: src=systemd-init/kube-controller-manager.service.j2 dest=/etc/systemd/system/kube-controller-manager.service backup=yes
notify: restart daemons notify: restart daemons
- name: Write kube-scheduler systemd init file - name: Write kube-scheduler systemd init file
template: src=systemd-init/kube-scheduler.service.j2 dest=/etc/systemd/system/kube-scheduler.service template: src=systemd-init/kube-scheduler.service.j2 dest=/etc/systemd/system/kube-scheduler.service backup=yes
notify: restart daemons notify: restart daemons
- name: Write kube-proxy systemd init file - name: Write kube-proxy systemd init file
template: src=systemd-init/kube-proxy.service.j2 dest=/etc/systemd/system/kube-proxy.service template: src=systemd-init/kube-proxy.service.j2 dest=/etc/systemd/system/kube-proxy.service backup=yes
notify: restart daemons notify: restart daemons
- name: Install kubernetes binaries - name: Install kubernetes binaries

View file

@ -18,13 +18,13 @@
file: path=/etc/systemd/system/kubelet.service.d state=directory file: path=/etc/systemd/system/kubelet.service.d state=directory
- name: Write kubelet config file - name: Write kubelet config file
template: src=kubelet.j2 dest=/etc/systemd/system/kubelet.service.d/10-kubelet.conf template: src=kubelet.j2 dest=/etc/systemd/system/kubelet.service.d/10-kubelet.conf backup=yes
notify: notify:
- reload systemd - reload systemd
- restart kubelet - restart kubelet
- name: write the kubecfg (auth) file for kubelet - name: write the kubecfg (auth) file for kubelet
template: src=kubelet.kubeconfig.j2 dest={{ kube_config_dir }}/kubelet.kubeconfig template: src=kubelet.kubeconfig.j2 dest={{ kube_config_dir }}/kubelet.kubeconfig backup=yes
notify: notify:
- restart kubelet - restart kubelet
@ -32,13 +32,13 @@
file: path=/etc/systemd/system/kube-proxy.service.d state=directory file: path=/etc/systemd/system/kube-proxy.service.d state=directory
- name: Write proxy config file - name: Write proxy config file
template: src=proxy.j2 dest=/etc/systemd/system/kube-proxy.service.d/10-proxy-cluster.conf template: src=proxy.j2 dest=/etc/systemd/system/kube-proxy.service.d/10-proxy-cluster.conf backup=yes
notify: notify:
- reload systemd - reload systemd
- restart proxy - restart proxy
- name: write the kubecfg (auth) file for kube-proxy - name: write the kubecfg (auth) file for kube-proxy
template: src=proxy.kubeconfig.j2 dest={{ kube_config_dir }}/proxy.kubeconfig template: src=proxy.kubeconfig.j2 dest={{ kube_config_dir }}/proxy.kubeconfig backup=yes
notify: notify:
- restart proxy - restart proxy

View file

@ -1,10 +1,10 @@
--- ---
- name: Write kube-proxy systemd init file - name: Write kube-proxy systemd init file
template: src=systemd-init/kube-proxy.service.j2 dest=/etc/systemd/system/kube-proxy.service template: src=systemd-init/kube-proxy.service.j2 dest=/etc/systemd/system/kube-proxy.service backup=yes
notify: restart daemons notify: restart daemons
- name: Write kubelet systemd init file - name: Write kubelet systemd init file
template: src=systemd-init/kubelet.service.j2 dest=/etc/systemd/system/kubelet.service template: src=systemd-init/kubelet.service.j2 dest=/etc/systemd/system/kubelet.service backup=yes
notify: restart daemons notify: restart daemons
- name: Install kubernetes binaries - name: Install kubernetes binaries