chilianyi

上面操作结果是这样。
查看内容日志:

_[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match ‘all’
PLAY [localhost] ***************************************************************
TASK [download : Generating images list] ***************************************
skipping: [localhost]
TASK [download : Synchronizing images] *****************************************
TASK [kubesphere-defaults : KubeSphere | Setting images’ namespace override] ***
skipping: [localhost]
TASK [kubesphere-defaults : KubeSphere | Configuring defaults] *****************
ok: [localhost] => {
“msg”: “Check roles/kubesphere-defaults/defaults/main.yml”
}
TASK [ks-devops : Jenkins | Check jenkins status] ******************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: “/usr/local/bin/kubectl get deploy -n kubesphere-devops-system ks-jenkins\n”, “delta”: “0:00:00.571465”, “end”: “2023-09-22 16:03:20.982943”, “msg”: “non-zero return code”, “rc”: 1, “start”: “2023-09-22 16:03:20.411478”, “stderr”: "Error from server (NotFound): deployments.apps \“ks-jenkins\” not found", “stderr_lines”: ["Error from server (NotFound): deployments.apps \“ks-jenkins\” not found"], “stdout”: "", “stdout_lines”: []}
…ignoring
TASK [ks-devops | Getting Jenkins config] **************************************
skipping: [localhost]
TASK [ks-devops | Setting Jenkins configs (EMAIL_SMTP_HOST)] *******************
skipping: [localhost]
TASK [ks-devops | Setting Jenkins configs (EMAIL_FROM_ADDR)] *******************
skipping: [localhost]
TASK [ks-devops | Setting Jenkins configs (EMAIL_FROM_NAME)] *******************
skipping: [localhost]
TASK [ks-devops | Setting Jenkins configs (EMAIL_USE_SSL)] *********************
skipping: [localhost]
TASK [ks-devops | Setting Jenkins configs (EMAIL_SMTP_PORT)] *******************
skipping: [localhost]
TASK [ks-devops | Setting Jenkins configs (EMAIL_FROM_PASS)] *******************
skipping: [localhost]
TASK [ks-devops | Checking Jenkins PersistentVolumeClaim] **********************
skipping: [localhost]
TASK [ks-devops | Setting Jenkins pv size] *************************************
skipping: [localhost]
TASK [ks-devops | Checking Jenkins update center status] ***********************
changed: [localhost]
TASK [ks-devops | Uninstall update center] *************************************
skipping: [localhost]
TASK [ks-devops | Getting sonarqube host] **************************************
changed: [localhost]
TASK [ks-devops | Getting sonarqube token] *************************************
changed: [localhost]
TASK [ks-devops : set_fact] ****************************************************
skipping: [localhost]
TASK [ks-devops : set_fact] ****************************************************
skipping: [localhost]
TASK [ks-devops | Getting KubeSphere JWT secret] *******************************
changed: [localhost]
TASK [ks-devops | Debug KubeSphere JWT secret] *********************************
ok: [localhost] => {
“ks_jwt_secret”: {
“changed”: true,
“cmd”: “/usr/local/bin/kubectl get secret -n kubesphere-system kubesphere-secret -ojsonpath=\”{.data.secret}\“ | base64 -d\n”,
“delta”: “0:00:00.491604”,
“end”: “2023-09-22 16:03:31.884673”,
“failed”: false,
“rc”: 0,
“start”: “2023-09-22 16:03:31.393069”,
“stderr”: "",
“stderr_lines”: [],
“stdout”: “ZNmPX3E27kYjMqFGLA9w1wfCq9o1ffnK”,
“stdout_lines”: [
“ZNmPX3E27kYjMqFGLA9w1wfCq9o1ffnK”
]
}
}
TASK [ks-devops : Get Argo CD installation] ************************************
changed: [localhost]
TASK [ks-devops : Get Argo CD namespace] ***************************************
changed: [localhost]
TASK [ks-devops | Getting devops installation charts] **************************
changed: [localhost] => (item=ks-devops)
TASK [ks-devops | Checking existing PVC named ks-jenkins] **********************
changed: [localhost]
TASK [ks-devops | Debug exisiting PVC named ks-jenkins] ************************
ok: [localhost] => {
“ks_jenkins_pvc”: {
“changed”: true,
“cmd”: “/usr/local/bin/kubectl -n kubesphere-devops-system get pvc ks-jenkins -o jsonpath=‘{.metadata.name}’ –ignore-not-found\n”,
“delta”: “0:00:00.385517”,
“end”: “2023-09-22 16:03:44.883366”,
“failed”: false,
“rc”: 0,
“start”: “2023-09-22 16:03:44.497849”,
“stderr”: "",
“stderr_lines”: [],
“stdout”: "",
“stdout_lines”: []
}
}
TASK [ks-devops | Getting name of existing PVC named ks-jenkins] ***************
ok: [localhost]
TASK [ks-devops | Getting Kubernetes Node info] ********************************
changed: [localhost]
TASK [ks-devops | Setting container runtime of agent builder] ******************
ok: [localhost]
TASK [ks-devops | Creating manifests] ******************************************
changed: [localhost] => (item={‘path’: ‘ks-devops’, ‘file’: ‘ks-devops-values.yaml’})
changed: [localhost] => (item={‘path’: ‘ks-devops’, ‘file’: ‘argo-cd-values.yaml’})
TASK [ks-devops | Checking if ks-devops has installed] *************************
changed: [localhost]
TASK [ks-devops | Deleting service monitor of devops] **************************
changed: [localhost]
TASK [ks-devops | Checking ks-devops Helm Release] *****************************
changed: [localhost]
TASK [ks-devops | Convert ks-devops to helm mananged] **************************
changed: [localhost] => (item={‘ns’: ‘kubesphere-devops-system’, ‘kind’: ‘secrets’, ‘resource’: ‘s2i-webhook-server-cert’, ‘release’: ‘devops’})
changed: [localhost] => (item={‘ns’: ‘kubesphere-devops-system’, ‘kind’: ‘configmap’, ‘resource’: ‘jenkins-casc-config’, ‘release’: ‘devops’})
changed: [localhost] => (item={‘ns’: ‘kubesphere-devops-system’, ‘kind’: ‘configmap’, ‘resource’: ‘ks-devops-agent’, ‘release’: ‘devops’})
changed: [localhost] => (item={‘ns’: ‘kubesphere-devops-system’, ‘kind’: ‘clusterrole’, ‘resource’: ‘manager-role’, ‘release’: ‘devops’})
changed: [localhost] => (item={‘ns’: ‘kubesphere-devops-system’, ‘kind’: ‘clusterrole’, ‘resource’: ‘proxy-role’, ‘release’: ‘devops’})
changed: [localhost] => (item={‘ns’: ‘kubesphere-devops-system’, ‘kind’: ‘ClusterRoleBinding’, ‘resource’: ‘manager-rolebinding’, ‘release’: ‘devops’})
changed: [localhost] => (item={‘ns’: ‘kubesphere-devops-system’, ‘kind’: ‘ClusterRoleBinding’, ‘resource’: ‘proxy-rolebinding’, ‘release’: ‘devops’})
changed: [localhost] => (item={‘ns’: ‘kubesphere-devops-system’, ‘kind’: ‘service’, ‘resource’: ‘s2ioperator-metrics-service’, ‘release’: ‘devops’})
changed: [localhost] => (item={‘ns’: ‘kubesphere-devops-system’, ‘kind’: ‘service’, ‘resource’: ‘s2i-trigger-service’, ‘release’: ‘devops’})
changed: [localhost] => (item={‘ns’: ‘kubesphere-devops-system’, ‘kind’: ‘service’, ‘resource’: ‘webhook-server-service’, ‘release’: ‘devops’})
changed: [localhost] => (item={‘ns’: ‘kubesphere-devops-system’, ‘kind’: ‘service’, ‘resource’: ‘s2ioperator-trigger-service’, ‘release’: ‘devops’})
changed: [localhost] => (item={‘ns’: ‘kubesphere-devops-system’, ‘kind’: ‘StatefulSet’, ‘resource’: ‘s2ioperator’, ‘release’: ‘devops’})
changed: [localhost] => (item={‘ns’: ‘kubesphere-devops-system’, ‘kind’: ‘MutatingWebhookConfiguration’, ‘resource’: ‘mutating-webhook-configuration’, ‘release’: ‘devops’})
changed: [localhost] => (item={‘ns’: ‘kubesphere-devops-system’, ‘kind’: ‘ValidatingWebhookConfiguration’, ‘resource’: ‘validating-webhook-configuration’, ‘release’: ‘devops’})
changed: [localhost] => (item={‘ns’: ‘kubesphere-devops-system’, ‘kind’: ‘S2iBuilderTemplate’, ‘resource’: ‘binary’, ‘release’: ‘devops’})
changed: [localhost] => (item={‘ns’: ‘kubesphere-devops-system’, ‘kind’: ‘S2iBuilderTemplate’, ‘resource’: ‘java’, ‘release’: ‘devops’})
changed: [localhost] => (item={‘ns’: ‘kubesphere-devops-system’, ‘kind’: ‘S2iBuilderTemplate’, ‘resource’: ‘nodejs’, ‘release’: ‘devops’})
changed: [localhost] => (item={‘ns’: ‘kubesphere-devops-system’, ‘kind’: ‘S2iBuilderTemplate’, ‘resource’: ‘tomcat’, ‘release’: ‘devops’})
changed: [localhost] => (item={‘ns’: ‘kubesphere-devops-system’, ‘kind’: ‘S2iBuilderTemplate’, ‘resource’: ‘python’, ‘release’: ‘devops’})
TASK [ks-devops | Stop the existing Jenkins] ***********************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: “/usr/local/bin/kubectl -n kubesphere-devops-system delete service ks-jenkins-agent –ignore-not-found\n/usr/local/bin/kubectl -n kubesphere-devops-system delete service ks-jenkins –ignore-not-found\n/usr/local/bin/kubectl -n kubesphere-devops-system scale deployment ks-jenkins –replicas=0\n”, “delta”: “0:00:00.790432”, “end”: “2023-09-22 16:04:25.283475”, “msg”: “non-zero return code”, “rc”: 1, “start”: “2023-09-22 16:04:24.493043”, “stderr”: "Error from server (NotFound): deployments.apps \“ks-jenkins\” not found", “stderr_lines”: ["Error from server (NotFound): deployments.apps \“ks-jenkins\” not found"], “stdout”: "", “stdout_lines”: []}
…ignoring
TASK [ks-devops | Upgrading or installing Argo CD] *****************************
changed: [localhost]
TASK [ks-devops | Upgrading or installing ks-devops] ***************************
changed: [localhost]
TASK [ks-devops | Labelling devops namespaces as system workspace] *************
failed: [localhost] (item=kubesphere-devops-worker) => {“ansible_loop_var”: “item”, “changed”: true, “cmd”: “/usr/local/bin/kubectl label –overwrite namespaces kubesphere-devops-worker kubesphere.io/workspace=system-workspace\n”, “delta”: “0:00:00.201544”, “end”: “2023-09-22 16:04:48.794894”, “item”: “kubesphere-devops-worker”, “msg”: “non-zero return code”, “rc”: 1, “start”: “2023-09-22 16:04:48.593350”, “stderr”: "Error from server (NotFound): namespaces \“kubesphere-devops-worker\” not found", “stderr_lines”: ["Error from server (NotFound): namespaces \“kubesphere-devops-worker\” not found"], “stdout”: "", “stdout_lines”: []}
changed: [localhost] => (item=argocd)
PLAY RECAP *********************************************************************
localhost : ok=23 changed=18 unreachable=0 failed=1 skipped=15 rescued=0 ignored=2
ks-installer-79545d8896-q8fz2:/kubesphere/results/devops/devops$_