mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
* fix: misspelling Signed-off-by: joyceliu <joyceliu@yunify.com> * fix: misspelling Signed-off-by: joyceliu <joyceliu@yunify.com> * fix: misspelling Signed-off-by: joyceliu <joyceliu@yunify.com> * fix: misspelling Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: user go-template instance pongo2-template Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: not set incorrect Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> --------- Signed-off-by: joyceliu <joyceliu@yunify.com> Co-authored-by: joyceliu <joyceliu@yunify.com>
53 lines
1.6 KiB
YAML
53 lines
1.6 KiB
YAML
---
|
|
- name: Sync harbor package to remote
|
|
copy:
|
|
src: |
|
|
{{ .work_dir }}/kubekey/image-registry/harbor/{{ .harbor_version }}/{{ .binary_type.stdout }}/harbor-offline-installer-{{ .harbor_version }}.tgz
|
|
dest: |
|
|
/opt/harbor/{{ .harbor_version }}/harbor-offline-installer-{{ .harbor_version }}.tgz
|
|
|
|
- name: Untar harbor package
|
|
command: |
|
|
cd /opt/harbor/{{ .harbor_version }}/ && tar -zxvf harbor-offline-installer-{{ .harbor_version }}.tgz
|
|
|
|
- name: Sync image registry cert file to remote
|
|
copy:
|
|
src: |
|
|
{{ .work_dir }}/kubekey/pki/image_registry.crt
|
|
dest: |
|
|
/opt/harbor/{{ .harbor_version }}/ssl/server.crt
|
|
|
|
- name: Sync image registry key file to remote
|
|
copy:
|
|
src: |
|
|
{{ .work_dir }}/kubekey/pki/image_registry.key
|
|
dest: |
|
|
/opt/harbor/{{ .harbor_version }}/ssl/server.key
|
|
|
|
- name: Generate harbor config
|
|
template:
|
|
src: harbor.config
|
|
dest: |
|
|
/opt/harbor/{{ .harbor_version }}/harbor/harbor.yml
|
|
|
|
- name: Generate keepalived docker compose
|
|
template:
|
|
src: harbor_keepalived.docker-compose
|
|
dest: |
|
|
/opt/harbor/{{ .harbor_version }}/harbor/docker-compose-keepalived.yml
|
|
when:
|
|
- and .image_registry.ha_vip (ne .image_registry.ha_vip "")
|
|
- .image_registry_service.stderr | ne ""
|
|
|
|
- name: Install harbor
|
|
command: |
|
|
cd /opt/harbor/{{ .harbor_version }}/harbor && /bin/bash install.sh
|
|
|
|
- name: Register harbor service
|
|
template:
|
|
src: harbor.service
|
|
dest: /etc/systemd/system/harbor.service
|
|
|
|
- name: Start harbor service
|
|
command: systemctl daemon-reload && systemctl start harbor.service && systemctl enable harbor.service
|