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