Switch minikube to cri-o
This results in a much more elegant and flexible solution, and supports our use of quay.io (unlike docker). Change-Id: I00257b175c0445fc770a51bc69d30377c6f57382
This commit is contained in:
parent
e5a1ae603a
commit
bb5c04b369
@ -7,45 +7,15 @@
|
|||||||
- role: ensure-helm
|
- role: ensure-helm
|
||||||
tasks:
|
tasks:
|
||||||
- name: Start minikube
|
- name: Start minikube
|
||||||
command: minikube start --cpus max --memory max
|
command: minikube start --cpus max --memory max --container-runtime cri-o
|
||||||
|
|
||||||
- name: Patch minikube docker daemon config to use the buildset registry
|
- name: Replace minikube registries.conf
|
||||||
block:
|
block:
|
||||||
- name: Load minikube docker daemon config
|
- name: Copy registries.conf from the host to minikube
|
||||||
command: minikube ssh sudo cat /etc/docker/daemon.json
|
command: minikube cp /etc/containers/registries.conf /etc/containers/registries.conf
|
||||||
register: daemon_json
|
|
||||||
|
|
||||||
- name: Parse docker minikube daemon config
|
- name: Restart minikube crio daemon
|
||||||
set_fact:
|
command: minikube ssh sudo systemctl restart crio
|
||||||
daemon_json_parsed: "{{ daemon_json.stdout | from_json }}"
|
|
||||||
|
|
||||||
- name: Add buildset registry to minikube docker daemon config
|
|
||||||
vars:
|
|
||||||
new_entries:
|
|
||||||
registry-mirrors: "['https://{{ buildset_registry_alias }}:{{ buildset_registry.port }}/']"
|
|
||||||
set_fact:
|
|
||||||
new_daemon_json_parsed: "{{ daemon_json_parsed | combine(new_entries) }}"
|
|
||||||
|
|
||||||
- name: Serialise new minikube docker daemon config
|
|
||||||
set_fact:
|
|
||||||
new_daemon_json: "{{ new_daemon_json_parsed | to_json }}"
|
|
||||||
|
|
||||||
- name: Save tmp new minikube docker daemon config
|
|
||||||
copy:
|
|
||||||
content: "{{ new_daemon_json }}"
|
|
||||||
dest: /tmp/minikube_docker_daemon.json
|
|
||||||
mode: 0644
|
|
||||||
|
|
||||||
- name: Copy new minikube docker daemon config
|
|
||||||
command: minikube cp /tmp/minikube_docker_daemon.json /etc/docker/daemon.json
|
|
||||||
|
|
||||||
- name: Clean up tmp new minikube docker daemon config
|
|
||||||
file:
|
|
||||||
path: /tmp/minikube_docker_daemon.json
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Restart minikube docker daemon
|
|
||||||
command: minikube ssh sudo systemctl restart docker
|
|
||||||
|
|
||||||
- name: Wait for minikube k8s API to be back up
|
- name: Wait for minikube k8s API to be back up
|
||||||
command: kubectl get node
|
command: kubectl get node
|
||||||
|
Loading…
x
Reference in New Issue
Block a user