This commit is contained in:
YundongYe 2020-05-18 11:52:49 +08:00 коммит произвёл GitHub
Родитель d99d979f6e
Коммит fdcc098e8b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
7 изменённых файлов: 108 добавлений и 4 удалений

Просмотреть файл

@ -35,6 +35,8 @@ then
echo "Pass: Cluster meets the requirements"
else
echo "Faild: Please check the output, and modify the cluster setting to meet the requirement"
rm -rf ${HOME}/pai-pre-check/
exit $ret_code_check
fi
rm -rf ${HOME}/pai-pre-check/

Просмотреть файл

@ -37,5 +37,39 @@
when:
- dev_box_docker_version_replace is version('1.10.0', '<=')
- name: "Dev-box 3.1 Check whether the vm can raw.githubusercontent.com"
raw: curl https://raw.githubusercontent.com/microsoft/pai/master/README.md
register: devbox_curl_githubusercontent
failed_when: false
changed_when: false
check_mode: false
environment: {}
- name: "Dev-box 3.2 Check whether the vm can access to raw.githubusercontent.com"
fail:
msg: "Unable to access raw.githubusercontent.com"
changed_when: false
check_mode: false
environment: {}
when:
- devbox_curl_githubusercontent.rc != 0
- name: "Dev-box 4.1 Check whether the vm can access to docker.io"
raw: nslookup index.docker.io
register: devbox_nslookup_docker_io
failed_when: false
changed_when: false
check_mode: false
environment: {}
- name: "Dev-box 4.2 Check whether the vm can access to docker.io"
fail:
msg: "Unable to access docker.io"
changed_when: false
check_mode: false
environment: {}
when:
- devbox_nslookup_docker_io.rc != 0

Просмотреть файл

@ -3,7 +3,7 @@
fail:
msg: "OpenPAI's infra node should have 40 Gi free memory for service "
when:
- ansible_memfree_mb < 40000
- ansible_memory_mb["nocache"]["free"] < 40000
- name: Check cpu resource requirement for openpai service
fail:

Просмотреть файл

@ -47,6 +47,40 @@
when:
- ansible_control_host_address == ansible_default_ipv4.address
- name: "Infra 4.1 Check whether the vm can access to gcr.io"
raw: ping gcr.io -c 3
register: infra_ping_gcr_io
failed_when: false
changed_when: false
check_mode: false
environment: {}
- name: "Infra 4.2 Check whether the vm can access to gcr.io"
fail:
msg: "Unable to access gcr.io"
changed_when: false
check_mode: false
environment: {}
when:
- infra_ping_gcr_io.rc != 0
- name: "Infra 5.1 Check whether the vm can access to quay.io"
raw: nslookup quay.io
register: infra_nslookup_quay_io
failed_when: false
changed_when: false
check_mode: false
environment: {}
- name: "Infra 5.2 Check whether the vm can access to quay.io"
fail:
msg: "Unable to access quay.io"
changed_when: false
check_mode: false
environment: {}
when:
- infra_nslookup_quay_io.rc != 0
- name: check infra machine's resouce requirement
include_tasks: resource.yml
when: resource_check

Просмотреть файл

@ -3,4 +3,4 @@
fail:
msg: "OpenPAI's worker node should have 16 Gi free memory for service "
when:
- ansible_memfree_mb < 16000
- ansible_memory_mb["nocache"]["free"] < 16000

Просмотреть файл

@ -22,6 +22,40 @@
when:
- ansible_control_host_address == ansible_default_ipv4.address
- name: "Worker 3.1 Check whether the vm can access to gcr.io"
raw: ping gcr.io -c 3
register: worker_ping_gcr_io
failed_when: false
changed_when: false
check_mode: false
environment: {}
- name: "Worker 3.2 Check whether the vm can access to gcr.io"
fail:
msg: "Unable to access gcr.io"
changed_when: false
check_mode: false
environment: {}
when:
- worker_ping_gcr_io.rc != 0
- name: "Worker 4.1 Check whether the vm can access to quay.io"
raw: nslookup quay.io
register: worker_nslookup_quay_io
failed_when: false
changed_when: false
check_mode: false
environment: {}
- name: "Worker 4.2 Check whether the vm can access to quay.io"
fail:
msg: "Unable to access quay.io"
changed_when: false
check_mode: false
environment: {}
when:
- worker_nslookup_quay_io.rc != 0
- name: check worker machines' NVIDIA gpu card, drivers and runtime
include_tasks: ubuntu-nvidia.yml
when: gpu_type == 'nvidia'

Просмотреть файл

@ -92,7 +92,7 @@ def main():
if 'openpai_kube_network_plugin' not in cluster_config or cluster_config['openpai_kube_network_plugin'] != 'weave':
count_input = 0
while True:
user_input = raw_input("Are your cluster is in Azure cloud or not? (Y/N) (case sensitive)")
user_input = input("Are your cluster is in Azure cloud or not? (Y/N) (case sensitive)")
if user_input == "N":
break
elif user_input == "Y":
@ -103,7 +103,7 @@ def main():
if count_input == 3:
logger.warning("3 Times......... Sorry, we will force stopping your operation.")
sys.exit(1)
if user_input == "Y" and cluster_config['openpai_kube_network_plugin'] == 'calico':
if user_input == "Y" and ('openpai_kube_network_plugin' not in cluster_config or cluster_config['openpai_kube_network_plugin'] == 'calico'):
logger.warning("Azure does not support calico, please change the openpai_kube_network_plugin to weave")
logger.warning("https://docs.projectcalico.org/reference/public-cloud/azure#why-doesnt-azure-support-calico-networking")
sys.exit(1)