Move LabRing registry script into role
This commit is contained in:
parent
8f8ab7a99a
commit
88d88d647b
@ -20,7 +20,7 @@ can be overridden to any compatible release.
|
||||
The following command is used to create the cluster (example with one master and one worker):
|
||||
|
||||
```bash
|
||||
REGISTRY=$(scripts/get_labring_registry.sh)
|
||||
REGISTRY=$(playbooks/roles/vhosts/gpu-k8s/files/get_labring_registry.sh)
|
||||
sealos run \
|
||||
${REGISTRY}/kubernetes:<kubernetes_version> \
|
||||
${REGISTRY}/cilium:<cilium_version> \
|
||||
|
||||
0
scripts/get_labring_registry.sh → playbooks/roles/vhosts/gpu-k8s/files/get_labring_registry.sh
Executable file → Normal file
0
scripts/get_labring_registry.sh → playbooks/roles/vhosts/gpu-k8s/files/get_labring_registry.sh
Executable file → Normal file
@ -40,11 +40,12 @@
|
||||
when: inventory_hostname == (ops_host | default(master_ips | first))
|
||||
|
||||
- name: Determine LabRing registry prefix
|
||||
shell: "{{ role_path }}/../../../../scripts/get_labring_registry.sh"
|
||||
shell: "{{ role_path }}/files/get_labring_registry.sh"
|
||||
register: labring_registry
|
||||
changed_when: false
|
||||
delegate_to: localhost
|
||||
run_once: true
|
||||
become: false
|
||||
when: inventory_hostname == (ops_host | default(master_ips | first))
|
||||
|
||||
- name: Run sealos to create Kubernetes cluster
|
||||
|
||||
@ -13,7 +13,7 @@ sealos load -i sealos-k8s-1.25.16.tar
|
||||
|
||||
# 单机部署(单机部署无需ssh密码,root用户本机直接执行即可)
|
||||
# 根据节点 IP 所在地区自动选择拉取镜像的仓库
|
||||
REGISTRY_PREFIX=$(dirname "$0")/../get_labring_registry.sh
|
||||
REGISTRY_PREFIX=$(dirname "$0")/../playbooks/roles/vhosts/gpu-k8s/files/get_labring_registry.sh
|
||||
REGISTRY_PREFIX=$("$REGISTRY_PREFIX")
|
||||
sealos run \
|
||||
${REGISTRY_PREFIX}/kubernetes:v1.25.16 \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user