You have configured the IP address and port number of the CCAE in the ms_controller.json configuration file of the Controller. If the log reporting function is required, you also need to configure the certificate information.
You can choose whether to configure a certificate to interconnect the OM Adapter with CCAE. If a certificate is required, perform the following steps to generate a certificate. If no certificate is required, log in to the CCAE by referring to 1, disable the three configuration items starting with MindIE on the certificate authentication configuration page, and connect the OM Adapter to the CCAE by referring to Configuring the Interconnection Between the OM Adapter and CCAE.



Select the certificate to be downloaded and click Download. In the Download Certificate dialog box, enter the following information and click Submit.
cd /usr/local/Ascend/mindie/latest/mindie-service
./bin/seceasy_encrypt --encrypt 1 2
root@mindie-controller-master-0:/usr/local/Ascend/mindie/latest/mindie-service# ./bin/seceasy_encrypt --encrypt 1 2 please input the password to encrypt please input the password to encrypt again encrypted: AAAAAgAAAAAAAAABAAAQAAAl+zJLrsq6Bduk6QPIWUNIsc+DyyOnVmy2xtrh2AAAAAEAAAAEAAAAAAAAAGXqKpZ+ZKbuFdCHBZH9ZYCYOTBTbxyIlRQ=
mkdir /mnt
{
"allow_all_zero_ip_listening": false,
"deploy_mode": "pd_separate",
"initial_dist_server_port": 10000,
"cluster_port":8899,
"process_manager" : {
"to_file": true,
"file_path": "./logs/controller_process_status.json"
},
"ccae": {
"ip": "xxx.xxx.xxx.xxx",
"port": 31948,
"kafka_port" : 26329
},
"cluster_status" : {
"to_file": true,
"file_path": "./logs/cluster_status_output.json"
},
...
}
apiVersion: mindxdl.gitee.com/v1
kind: AscendJob
metadata:
name: mindie-ms-controller # The value varies according to the job. The default value is mindie-ms.
namespace: mindie # MindIE is used as an example. You can change the value as required.
labels:
framework: pytorch
app: mindie-ms-controller # Fixed
jobID: xxxx # Name of the inference job, which is user-defined and appended. The default value is mindie-ms.
ring-controller.atlas: ascend-910b
spec:
schedulerName: volcano # work when enableGangScheduling is true
runPolicy:
schedulingPolicy: # work when enableGangScheduling is true
minAvailable: 1 # The value must be the same as that of replicas.
queue: default
successPolicy: AllWorkers
replicaSpecs:
Master:
replicas: 1 # Number of Controller replicas
restartPolicy: Always
template:
metadata:
labels:
#ring-controller.atlas: ascend-910b
app: mindie-ms-controller
jobID: xxxx # Name of the inference job, which is user-defined and appended. The default value is mindie.
spec: # Retain the default value.
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- mindie-ms-controller
topologyKey: kubernetes.io/hostname
nodeSelector:
# masterselector: dls-master-node
accelerator: huawei-Ascend310P
# machine-id: "7"
terminationGracePeriodSeconds: 0
automountServiceAccountToken: false
securityContext:
fsGroup: 1001
containers:
- image: mindie:dev-2.0.RC1-B087-800I-A2-py311-ubuntu22.04-aarch64
imagePullPolicy: IfNotPresent
name: ascend
securityContext:
# allowPrivilegeEscalation: false
privileged: true
capabilities:
drop: [ "ALL" ]
seccompProfile:
type: "RuntimeDefault"
readinessProbe:
exec:
command:
- bash
- -c
- "$MIES_INSTALL_PATH/scripts/http_client_ctl/probe.sh readiness"
periodSeconds: 5
livenessProbe:
exec:
command:
- bash
- -c
- "$MIES_INSTALL_PATH/scripts/http_client_ctl/probe.sh liveness"
periodSeconds: 5
startupProbe:
exec:
command:
- bash
- -c
- "$MIES_INSTALL_PATH/scripts/http_client_ctl/probe.sh startup"
periodSeconds: 5
failureThreshold: 100
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: GLOBAL_RANK_TABLE_FILE_PATH
value: "/user/serverid/devindex/config/..data/global_ranktable.json"
- name: MIES_INSTALL_PATH
value: $(MINDIE_USER_HOME_PATH)/Ascend/mindie/latest/mindie-service
- name: CONFIG_FROM_CONFIGMAP_PATH
value: /mnt/configmap
- name: CONTROLLER_LOG_CONFIG_PATH
value: /root/mindie
envFrom:
- configMapRef:
name: common-env
command: [ "/bin/bash", "-c", "
/mnt/configmap/boot.sh; \n
" ]
resources:
requests:
memory: "2Gi"
cpu: "4"
limits:
memory: "4Gi"
cpu: "8"
volumeMounts:
- name: global-ranktable
mountPath: /user/serverid/devindex/config
- name: mindie-http-client-ctl-config
mountPath: /mnt/configmap/http_client_ctl.json
subPath: http_client_ctl.json
- name: python-script-get-group-id
mountPath: /mnt/configmap/get_group_id.py
subPath: get_group_id.py
- name: boot-bash-script
mountPath: /mnt/configmap/boot.sh
subPath: boot.sh
- name: mindie-ms-controller-config
mountPath: /mnt/configmap/ms_controller.json
subPath: ms_controller.json
- name: status-data
mountPath: /usr/local/Ascend/mindie/latest/mindie-service/logs
- name: localtime
mountPath: /etc/localtime
- name: mnt
mountPath: /mnt
volumes:
- name: localtime
hostPath:
path: /etc/localtime
- name: global-ranktable
configMap:
name: global-ranktable
defaultMode: 0640
- name: mindie-http-client-ctl-config
configMap:
name: mindie-http-client-ctl-config
defaultMode: 0640
- name: python-script-get-group-id
configMap:
name: python-script-get-group-id
defaultMode: 0640
- name: boot-bash-script
configMap:
name: boot-bash-script
defaultMode: 0550
- name: mindie-ms-controller-config
configMap:
name: mindie-ms-controller-config
defaultMode: 0640
- name: status-data
hostPath:
path: /data/mindie-ms/status
type: Directory
- name: mnt
hostPath:
path: /mnt
When configuring the CCAE certificate, set tls_enable to true or null.
...
"tls_config": {
"tls_enable": true,
"kmc_ksf_master": "./security/master/tools/pmt/master/ksfa",
"kmc_ksf_standby": "./security/standby/tools/pmt/standby/ksfb",
"infer_tls_enable": true,
"infer_tls_items": {
"ca_cert": "./security/infer/security/certs/ca.pem",
"tls_cert": "./security/infer/security/certs/cert.pem",
"tls_key": "./security/infer/security/keys/cert.key.pem",
"tls_passwd": "./security/infer/security/pass/key_pwd.txt",
"tls_crl": "infer"
},
"management_tls_enable": true,
"management_tls_items": {
"ca_cert": "./security/management/security/certs/ca.pem",
"tls_cert": "./security/management/security/certs/cert.pem",
"tls_key": "./security/management/security/keys/cert.key.pem",
"tls_passwd": "./security/management/security/pass/key_pwd.txt",
"tls_crl": "management"
},
"ccae_tls_enable": true,
"ccae_tls_items": {
"ca_cert": "./security/ccae/security/certs/ca.pem",
"tls_cert": "./security/ccae/security/certs/cert.pem",
"tls_key": "./security/ccae/security/keys/cert.key.pem",
"tls_passwd": "./security/ccae/security/pass/key_pwd.txt",
"tls_crl": "ccae"
},
...
}
...
The certificate must be placed on the physical machine node scheduled by the Controller container to ensure that the Controller container can access the certificate path. By default, the Coordinator container is randomly scheduled. You can modify the Coordinator scheduling label or place the certificate on each node to ensure that the Coordinator container can access the certificate path.
export MIES_SERVICE_MONITOR_MODE=1
Before starting the service, ensure that the host time is consistent with the local time. Otherwise, the time corresponding to the performance data observed on the CCAE is inaccurate.
python deploy_ac_job.py