mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
feat: add web installer in artifact export func
Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: add web installer in artifact export func Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: add web installer in artifact export func Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: add web installer in artifact export func Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: add web installer in artifact export func Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: add web installer in artifact export func Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: add web installer in artifact export func Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: add web installer in artifact export func Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> feat: add web installer in artifact export func Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com>
This commit is contained in:
parent
782575f49c
commit
736c63bcf5
|
|
@ -16,4 +16,26 @@
|
|||
roles:
|
||||
- download
|
||||
- copy
|
||||
|
||||
- role: download/web-installer
|
||||
when:
|
||||
- .download.web_installer.download_web_installer
|
||||
pre_tasks:
|
||||
- name: Artifact | Set artifact file dir
|
||||
when:
|
||||
- .artifact_file | empty | not
|
||||
set_fact:
|
||||
artifact_file_dir: >-
|
||||
{{ .artifact_file | dir }}/artifact
|
||||
- name: Artifact | Create artifact dir
|
||||
when:
|
||||
- .artifact_file_dir | empty | not
|
||||
command: >-
|
||||
mkdir -p {{ .artifact_file_dir }}/kubekey/kubekey/
|
||||
post_tasks:
|
||||
- name: Artifact | Export artifact
|
||||
when:
|
||||
- .pack_artifact
|
||||
- .artifact_file_dir | empty | not
|
||||
command: |
|
||||
cp kk {{ .artifact_file_dir }}/
|
||||
cd {{ .artifact_file_dir }} && tar -czvf {{ .artifact_file }} *
|
||||
|
|
|
|||
|
|
@ -1,15 +1,4 @@
|
|||
---
|
||||
- name: Copy | Set artifact file dir
|
||||
when:
|
||||
- .artifact_file | empty | not
|
||||
set_fact:
|
||||
artifact_file_dir: >-
|
||||
{{ .artifact_file | dir }}/artifact
|
||||
|
||||
- name: Copy | Create artifact file dir
|
||||
command: >-
|
||||
mkdir -p {{ .artifact_file_dir }}/kubekey/kubekey/
|
||||
|
||||
- name: Artifact | Copy required binaries and images
|
||||
when: .artifact_file_dir | empty | not
|
||||
block:
|
||||
|
|
@ -23,6 +12,3 @@
|
|||
tags: ["kubernetes", "image_registry"]
|
||||
- include_tasks: iso.yaml
|
||||
|
||||
- name: Export artifact
|
||||
command: |
|
||||
cd {{ .artifact_file_dir }} && tar -czvf {{ .artifact_file }} *
|
||||
|
|
|
|||
|
|
@ -217,6 +217,10 @@ download:
|
|||
nfs_provisioner: https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner/releases/download/nfs-subdir-external-provisioner-4.0.18/nfs-subdir-external-provisioner-{{ .storage_class.nfs_provisioner_version }}.tgz
|
||||
download_image: false
|
||||
download_iso: false
|
||||
web_installer:
|
||||
download_web_installer: false
|
||||
url: >-
|
||||
https://kubekey.pek3b.qingstor.com/github.com/kubesphere/web-installer/releases/latest/download/web-installer.tgz
|
||||
iso_url:
|
||||
base_path: >-
|
||||
{{- if .download.zone | eq "cn" -}}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
- name: WebInstaller | Download web installer
|
||||
when:
|
||||
- .download.web_installer.download_web_installer
|
||||
- .download.web_installer.url | empty | not
|
||||
- .artifact_file_dir | empty | not
|
||||
command: |
|
||||
curl -L -o {{ .artifact_file_dir }}/web-installer.tgz {{ .download.web_installer.url }}
|
||||
tar -xzf "{{ .artifact_file_dir }}/web-installer.tgz" --no-same-owner -C {{ .artifact_file_dir }}
|
||||
|
||||
- name: WebInstaller | Init config json
|
||||
when:
|
||||
- .artifact_file_dir | empty | not
|
||||
template:
|
||||
src: config.json
|
||||
dest: "{{ .artifact_file_dir }}/schema/config.json"
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"kubernetes.json": {
|
||||
"kubernetes": {
|
||||
"kube_version": "{{ .kubernetes.kube_version }}"
|
||||
},
|
||||
"cri": {
|
||||
{{- if .cri.container_manager | empty | not }}
|
||||
"container_manager": "{{ .cri.container_manager }}"
|
||||
{{- end }}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue