Reenable image handling;Configure Longhorn/Harbor
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
51366476cc
commit
368f84769b
@ -7,7 +7,7 @@
|
|||||||
INSTALL_K3S_EXEC: 'server --cluster-init --disable local-storage'
|
INSTALL_K3S_EXEC: 'server --cluster-init --disable local-storage'
|
||||||
|
|
||||||
- name: Install kubectl tab-completion
|
- name: Install kubectl tab-completion
|
||||||
ansible.builtin.command:
|
ansible.builtin.shell:
|
||||||
cmd: kubectl completion bash | tee /etc/bash_completion.d/kubectl
|
cmd: kubectl completion bash | tee /etc/bash_completion.d/kubectl
|
||||||
|
|
||||||
- name: Ensure API availability
|
- name: Ensure API availability
|
||||||
@ -40,25 +40,25 @@
|
|||||||
mode: 0600
|
mode: 0600
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
||||||
#- block:
|
- block:
|
||||||
|
|
||||||
# - name: Extract container images
|
- name: Extract container images
|
||||||
# ansible.builtin.unarchive:
|
ansible.builtin.unarchive:
|
||||||
# src: /opt/metacluster/container-images/image-tarballs.tgz
|
src: /opt/metacluster/container-images/image-tarballs.tgz
|
||||||
# dest: /opt/metacluster/container-images
|
dest: /opt/metacluster/container-images
|
||||||
# list_files: yes
|
list_files: yes
|
||||||
# register: imagetarballs
|
register: imagetarballs
|
||||||
|
|
||||||
# - name: Import container images
|
- name: Import container images
|
||||||
# ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
# cmd: k3s ctr image import {{ item }}
|
cmd: k3s ctr image import {{ item }}
|
||||||
# chdir: /opt/metacluster/container-images
|
chdir: /opt/metacluster/container-images
|
||||||
# loop: "{{ imagetarballs.files }}"
|
loop: "{{ imagetarballs.files }}"
|
||||||
|
|
||||||
# - name: Delete redundant files
|
- name: Delete redundant files
|
||||||
# ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
# path: /opt/metacluster/container-images
|
path: /opt/metacluster/container-images
|
||||||
# state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Install longhorn chart
|
- name: Install longhorn chart
|
||||||
kubernetes.core.helm:
|
kubernetes.core.helm:
|
||||||
@ -66,6 +66,7 @@
|
|||||||
chart_ref: /opt/metacluster/helm-charts/longhorn
|
chart_ref: /opt/metacluster/helm-charts/longhorn
|
||||||
release_namespace: longhorn-system
|
release_namespace: longhorn-system
|
||||||
create_namespace: yes
|
create_namespace: yes
|
||||||
|
wait: yes
|
||||||
kubeconfig: "{{ kubeconfig.path }}"
|
kubeconfig: "{{ kubeconfig.path }}"
|
||||||
values:
|
values:
|
||||||
defaultSettings:
|
defaultSettings:
|
||||||
@ -74,6 +75,8 @@
|
|||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
host: storage.{{ vapp['guestinfo.fqdn'] }}
|
host: storage.{{ vapp['guestinfo.fqdn'] }}
|
||||||
|
persistence:
|
||||||
|
defaultClassReplicaCount: 3
|
||||||
|
|
||||||
- name: Install harbor chart
|
- name: Install harbor chart
|
||||||
kubernetes.core.helm:
|
kubernetes.core.helm:
|
||||||
@ -81,9 +84,15 @@
|
|||||||
chart_ref: /opt/metacluster/helm-charts/harbor
|
chart_ref: /opt/metacluster/helm-charts/harbor
|
||||||
release_namespace: harbor
|
release_namespace: harbor
|
||||||
create_namespace: yes
|
create_namespace: yes
|
||||||
|
wait: yes
|
||||||
kubeconfig: "{{ kubeconfig.path }}"
|
kubeconfig: "{{ kubeconfig.path }}"
|
||||||
values:
|
values:
|
||||||
# foo: bar
|
expose:
|
||||||
|
ingress:
|
||||||
|
hosts:
|
||||||
|
core: registry.{{ vapp['guestinfo.fqdn'] }}
|
||||||
|
notary:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
- name: Cleanup tempfile
|
- name: Cleanup tempfile
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
@ -30,15 +30,15 @@
|
|||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.key }}"
|
label: "{{ item.key }}"
|
||||||
|
|
||||||
#- name: Pull and store containerimages
|
- name: Pull and store containerimages
|
||||||
# ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
# cmd: skopeo copy docker://{{ item }} docker-archive:./{{ ( item | regex_findall('[^/:]+'))[-2] }}.tar:{{ item }}
|
cmd: skopeo copy docker://{{ item }} docker-archive:./{{ ( item | regex_findall('[^/:]+'))[-2] }}.tar:{{ item }}
|
||||||
# chdir: /opt/metacluster/container-images
|
chdir: /opt/metacluster/container-images
|
||||||
# loop: "{{ containerimages.results | map(attribute='stdout_lines') | flatten }}"
|
loop: "{{ containerimages.results | map(attribute='stdout_lines') | flatten }}"
|
||||||
|
|
||||||
#- name: Compress tarballs
|
- name: Compress tarballs
|
||||||
# community.general.archive:
|
community.general.archive:
|
||||||
# dest: /opt/metacluster/container-images/image-tarballs.tgz
|
dest: /opt/metacluster/container-images/image-tarballs.tgz
|
||||||
# path: /opt/metacluster/container-images/*
|
path: /opt/metacluster/container-images/*
|
||||||
# format: gz
|
format: gz
|
||||||
# remove: yes
|
remove: yes
|
||||||
|
Loading…
Reference in New Issue
Block a user