oeDeploy Use Cases
Use Case 1: One-Click Kubernetes Deployment
Prepare three virtual machines with 2 cores and 4 GB memory (with Layer-3 network connectivity), using any version of openEuler 24.03 or 22.03. The goal is to deploy a Kubernetes cluster consisting of 1 master and 2 worker nodes.
On any node, install the oeDeploy CLI tool
oedp(default integrated in openEuler software sources released in 2025 and later).bashyum install -y oedpExecute the following commands to obtain the plugin package, ensuring the directory
kubernetes-1.31.1appears in the current directory.shelloedp repo update oedp init kubernetes-1.31.1Execute the
infocommand to view plugin details.shelloedp info -p kubernetes-1.31.1Modify the project configuration file with actual node information.
shellvim kubernetes-1.31.1/config.yamlyamlall: children: masters: hosts: # The number of master nodes must be odd 172.27.76.114: # master node IP ansible_host: 172.27.76.114 # master node IP ansible_port: 22 ansible_user: root ansible_password: "" architecture: amd64 # [ amd64, arm64 ] oeversion: 24.03-LTS # [ 22.03-LTS, 24.03-LTS ] runtime: docker # [ docker, containerd ] workers: hosts: 172.27.70.60: # worker node IP ansible_host: 172.27.70.60 # worker node IP ansible_port: 22 ansible_user: root ansible_password: "" architecture: amd64 oeversion: 24.03-LTS runtime: docker 172.27.72.90: ansible_host: 172.27.72.90 ansible_port: 22 ansible_user: root ansible_password: "" architecture: amd64 oeversion: 24.03-LTS runtime: docker new-workers: # The new-workers field cannot be deleted hosts: vars: ansible_ssh_common_args: '-o StrictHostKeyChecking=no' init_cluster_force: "true" # e.g. [ "true", "false" ] Force cluster initialization remove_master_no_schedule_taints: "true" service_cidr: 10.96.0.0/16 # Service CIDR pod_cidr: 10.244.0.0/16 # Pod IP CIDR certs_expired: 3650 # Certificate expiration days # lb_kube_apiserver_ip: lb_kube_apiserver_port: 8443 has_deployed_containerd: "false" # e.g. [ "true", "false" ] Whether containerd is already deployed # The following parameters must match those in host.ini during the build process; ignore if not involved kubernetes_version: 1.31.1 calico_version: 3.28.2 pause_image: "registry.k8s.io/pause:3.10"Note: Ensure SSH connectivity between nodes, supporting both password and key-based authentication. If using key-based authentication, password configuration is not required.
Execute the following command to start automated deployment.
shelloedp run install -p kubernetes-1.31.1Execute the following command to uninstall Kubernetes.
shelloedp run uninstall -p kubernetes-1.31.1The
-pparameter indicates the extracted plugin directory. If you enter the kubernetes-1.31.1 plugin root directory, the-pparameter is not required when executing oedp commands.
Use Case 2: One-Click AnythingLLM Deployment
Install the oeDeploy CLI tool
oedp(default integrated in openEuler software sources released in 2025 and later).bashyum install -y oedpObtain and initialize the
AnythingLLMplugin.shelloedp repo update oedp init anythingLLMModify
config.yamlaccording to your actual situation. Ensure the deployment node has normal network connectivity.One-click deployment:
bashoedp run install -p anythingLLM # -p <plugin directory>One-click uninstallation:
bashoedp run uninstall -p anythingLLM # -p <plugin directory>
Demo: Deploy and Print AnythingLLM Information
Edit the
config.yamlfile.yamlall: hosts: host1: ansible_host: 192.168.124.17 # Remote IP ansible_port: 22 # Port number ansible_user: root # Username ansible_password: "" # Password vars: docker_download_url: x86_64: https://download.docker.com/linux/static/stable/x86_64/docker-26.1.4.tgz aarch64: https://download.docker.com/linux/static/stable/aarch64/docker-26.1.4.tgz docker_download_path: /tmp docker_image_urls: https://docker.m.daocloud.io container_name: "anythinglLLM-container" docker_image: "mintplexlabs/anythingllm" storage_location: "{{ lookup('env', 'HOME') }}/anythingllm" host_port: 3001Enter the container and test the AnythingLLM service.
- Enter the container:
bashdocker exec -it anythinglLLM-container /bin/bash- Test the AnythingLLM service:
bashcurl localhost:3001Test the AnythingLLM service in the deployment environment.
bash-curl 192.168.124.17:3001/ curl localhost:3001Normal response is as follows:
html<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link type="image/svg+xml" href="/favicon.png" > <title >AnythingLLM | Your personal LLM trained on anything</title> <meta name="title" content="AnythingLLM | Your personal LLM trained on anything" > <meta description="title" content="AnythingLLM | Your personal LLM trained on anything" > <meta property="og:type" content="website" > <meta property="og:url" content="https://anythingllm.com" > <meta property="og:title" content="AnythingLLM | Your personal LLM trained on anything" > <meta property="og:description" content="AnythingLLM | Your personal LLM trained on anything" > <meta property="og:image" content="https://raw.githubusercontent.com/Mintplex-Labs/anything-llm/master/images/promo.png" > <meta property="twitter:card" content="summary_large_image" > <meta property="twitter:url" content="https://anythingllm.com" > <meta property="twitter:title" content="AnythingLLM | Your personal LLM trained on anything" > <meta property="twitter:description" content="AnythingLLM | Your personal LLM trained on anything" > <meta property="twitter:image" content="https://raw.githubusercontent.com/Mintplex-Labs/anything-llm/master/images/promo.png" > <link rel="icon" href="/favicon.png" > <link rel="apple-touch-icon" href="/favicon.png" > <script type="module" crossorigin src="/index.js"></script> <link rel="stylesheet" href="/index.css"> </head> <body> <div id="root" class="h-screen"></div> </body> </html>
Use Case 3: One-Click DeepSeek-R1 Deployment
Prepare an openEuler environment (22.03-LTS-SPX, 24.03-LTS-SPX). The recommended specification for the 8B model is greater than 8U16G.
Install the oeDeploy CLI tool
oedp(default integrated in openEuler software sources released in 2025 and later).bashyum install -y oedpObtain and initialize the
DeepSeek-R1plugin.bashoedp repo update oedp init deepseek-r1Modify
deepseek-r1/config.yamlaccording to your actual situation. Users can directly use the example here without any modifications.yamlall: hosts: # Choose either local deployment or remote deployment # ================ Local Deployment ===================== localhost: ansible_connection: local # ================ Remote Deployment ===================== # host1: # ansible_host: 127.0.0.1 # Remote IP # ansible_port: 22 # Port number # ansible_user: root # Username # ansible_password: "" # Password vars: deepseek_version: 8b # Official ollama download URL: https://ollama.com/download/ollama-linux-amd64.tgz, note the distinction between amd64 and arm64 # To improve download speed, it has been temporarily stored on the OEPKGS server ollama_download: https://repo.oepkgs.net/openEuler/rpm/openEuler-24.03-LTS/contrib/oedp/2025.0330/ollama-linux-amd64.tgz ollama_download_path: /tmp # Target download path # Model file download URL: https://www.modelscope.cn/models/unsloth/DeepSeek-R1-Distill-Llama-8B-GGUF/resolve/master/DeepSeek-R1-Distill-Llama-8B-Q4_K_M.gguf # To improve download speed, it has been temporarily stored on the OEPKGS server modelfile_download: https://repo.oepkgs.net/openEuler/rpm/openEuler-24.03-LTS/contrib/oedp/2025.0330/DeepSeek-R1-Distill-Llama-8B-Q4_K_M.gguf modelfile_download_path: /tmp # Target download path # Model parameters parameter: temperature: 0.7 top_p: 0.7 top_k: 30 num_ctx: 4096 num_thread: 8 # Number of threads, recommended not to exceed CPU cores num_gpu: 0 # Number of GPUs: 0 for none, -1 for all. ansible_ssh_common_args: '-o StrictHostKeyChecking=no'Trigger one-click automated DeepSeek-R1 deployment. The oeDeploy tool will download the required files, automatically install and deploy, and complete the configuration for DeepSeek-R1.
bashoedp run install -p deepseek-r1 # -p <path after extracting tar.gz>On the node after deployment is complete, open the DeepSeek-R1 interactive terminal to start a conversation.
bashollama run deepseek-r1:8b
Use Case 4: One-Click KubeRay Deployment
Environment Preparation
Deploy a Kubernetes cluster:
Deploy Kubernetes 1.31.1 on the target cluster machines. Here we take a standard K8S cluster with 1 master + 2 workers as an example, where the master node IP is 192.168.1.101. You can use the
kubernetes-1.31.1plugin for automated deployment.Install Helm:
Install Helm on the master node. You can use the
helm-3.9.0plugin for automated installation.
Deploy KubeRay
Obtain the
kuberayplugin:Use the following commands to obtain and initialize the
kuberayplugin.shelloedp repo update oedp init kuberayModify
config.yaml:The following is an example of
kuberay/config.yaml. Modify this file according to your actual situation.yamlall: hosts: host1: ansible_host: 192.168.1.101 # Master node IP ansible_port: 22 # SSH port ansible_user: root # SSH user, non-root users require sudo privileges ansible_password: "" # Password of the above user vars: temp_path: /tmp namespace: kuberay # Namespace version: 1.2.2 # KubeRay chart version helm_repo_name: "kuberay" # Local Helm repository alias helm_repo_url: "https://repo.oepkgs.net/openEuler/rpm/openEuler-24.03-LTS/contrib/oedp/2025.0330/kuberay-helm" kuberay_operator_values_file: "" # The above configuration item kuberay_operator_values_file is an advanced configuration: specify a values file for customizing # the installation of the KubeRay operator component. Provide an absolute path; if left empty, the following configuration will be used: kuberay_operator_values: repository: "hub.oepkgs.net/oedeploy/quay.io/kuberay/operator" # KubeRay operator docker image URL tag: v1.2.2 # KubeRay operator docker repository tag ray_cluster_values_file: "" # The above configuration item ray_cluster_values_file is an advanced configuration: specify a values file for customizing # the installation of the Ray component. Provide an absolute path; if left empty, the following configuration will be used: ray_cluster_values: repository: "hub.oepkgs.net/oedeploy/rayproject/ray-with-pytorch" # Ray docker image URL tag: 2.9.0 # Ray docker repository tag; when using the default docker source, x86 is 2.9.0, arm is 2.9.0-aarch64; please verify the specific tag in the configured repository. head: # Head node resources cpu: "1" memory: "2G" worker: # Worker node resources num: 1 cpu: "1" memory: "1G" training: # Model training parameters pip: "https://pypi.tuna.tsinghua.edu.cn/simple" batch_size: 1024 epoch: 5Execute automated deployment:
Execute
oedp run installin the plugin directory, or executeoedp run install -p [plugin directory]anywhere to complete the automated deployment of KubeRay.
View Dashboard
Query the corresponding port:
On the master node, use the
kubectl get svc -Acommand to view port mappings:bashNAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE default kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 24h kube-system kube-dns ClusterIP 10.96.0.10 <none> 53/UDP,53/TCP,9153/TCP 24h kuberay kuberay-operator ClusterIP 10.96.175.101 <none> 8080/TCP 9h kuberay ray-cluster-kuberay-head-svc NodePort 10.96.168.232 <none> 10001:32414/TCP,8265:31457/TCP,8080:31582/TCP,6379:31938/TCP,8000:32102/TCP 9hThe port corresponding to 8265 is the Dashboard port.
Open the Dashboard page: Use the
http://ip:port/link to open the Dashboard page, where you can view Ray Job / Serve / Cluster, resources, logs, and other information. The IP is the master node IP, and the port is the port corresponding to 8265 in step 3.1.
Demo 1: MLP Model Training and Inference Based on Dataset
KubeRay deployment is already completed. Pod resources require at least 4U.
On the master node, execute the following command to automatically complete model training and inference with one click.
bashoedp run train -p kuberay
Demo 2: Time Comparison of Running the Same Training Model with Single Pod vs Multiple Pods
Before deploying KubeRay, configure Pod resources by modifying config.yaml.
Set the resources for a single Pod as:
bashhead: cpu: "7" memory: "14G" worker: num: 0Then execute:
bashoedp run install -p kuberay oedp run train -p kuberaySet the resources for multiple Pods as:
bashhead: cpu: "7" memory: "14G" worker: num: 2 cpu: "5" memory: "10G"Then execute:
bashoedp run install -p kuberay oedp run train -p kuberayCompare the run times:
Under these conditions, the single Pod run time is about 25s, and the multiple Pods run time is about 67s.
Use Case 5: One-Click PyTorch Deployment
Prepare a k8s cluster.
Install the oeDeploy CLI tool
oedp(default integrated in openEuler software sources released in 2025 and later).bashyum install -y oedpObtain and initialize the
pytorchplugin.shelloedp repo update oedp init pytorchModify
config.yamlaccording to your actual situation. Ensure the target node is the k8s master node.kubectl_applymust correspond to the playbook under the workspace.One-click deployment:
bashoedp run install -p pytorch # -p <plugin directory>One-click uninstallation:
bashoedp run uninstall -p pytorch # -p <plugin directory>
Demo 1: Deploy and Print PyTorch Information
Modify
config.yamlaccording to your actual situation. The following is an example:yamlall: hosts: localhost: ansible_connection: local vars: ansible_ssh_common_args: '-o StrictHostKeyChecking=no' # ================ demo 1: pytorch with http.server ===================== kubectl_apply: pytorch-deployment.yaml namespace: pytorch-namespace replicas: 1 containers: http: name: http-container image: hub.oepkgs.net/oedeploy/pytorch/pytorch:latest # amd64 # image: hub.oepkgs.net/oedeploy/pytorch/torchserve:latest-arm64 # arm64 workspace_mount: /tmp service: port: 8080 target_port: 8080 node_port: 30699 training: epoch: 2Execute one-click deployment.
shelloedp run install -p pytorchView pods.
bashkubectl get pods -n pytorch-namespacetextNAME READY STATUS RESTARTS AGE pytorch-deployment-db5d59bcb-ptqnp 1/1 Running 0 15mView port mapping.
bashkubectl get svc -n pytorch-namespacetextNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE pytorch-service NodePort 10.96.50.156 <none> 80:30699/TCP 15mAccess the web page.
texthttp://x.x.x.x:30699/ # master nodeEnter the container.
bashkubectl exec -n pytorch-namespace -it pytorch-deployment-db5d59bcb-ptqnp -- /bin/bashPrint PyTorch information.
bashpython -c "import torch; print(torch.__version__); print(torch.tensor([1.0, 2.0, 3.0]) + torch.tensor([4.0, 5.0, 6.0]))"
Demo 2: Lightweight CNN Model Training Based on Dataset
Based on demo 1, PyTorch deployment is already completed.
Automatically complete model training with one click.
bashoedp run train -p pytorch # -p <plugin directory>The output resembles:
bash...... TASK [Display training output] ***************************************************************************************************************************************************************************************************************** ok: [localhost] => { "msg": [ "Train Epoch: 0 [0/60000]\tLoss: 2.3114", "Train Epoch: 0 [6400/60000]\tLoss: 0.3884", "Train Epoch: 0 [12800/60000]\tLoss: 0.1483", "Train Epoch: 0 [19200/60000]\tLoss: 0.0510", "Train Epoch: 0 [25600/60000]\tLoss: 0.1151", "Train Epoch: 0 [32000/60000]\tLoss: 0.0191", "Train Epoch: 0 [38400/60000]\tLoss: 0.0690", "Train Epoch: 0 [44800/60000]\tLoss: 0.1995", "Train Epoch: 0 [51200/60000]\tLoss: 0.0417", "Train Epoch: 0 [57600/60000]\tLoss: 0.1821", "Test Accuracy: 9862/10000 (98.62%)", "Train Epoch: 1 [0/60000]\tLoss: 0.0052", ...... "Train Epoch: 1 [57600/60000]\tLoss: 0.0115", "Test Accuracy: 9877/10000 (98.77%)" ] }
Use Case 6: One-Click TensorFlow Deployment
Prepare a k8s cluster.
Install the oeDeploy CLI tool
oedp(default integrated in openEuler software sources released in 2025 and later).bashyum install -y oedpObtain and initialize the
tensorflowplugin.shelloedp repo update oedp init tensorflowModify
config.yamlaccording to your actual situation. Ensure the target node is the k8s master node.kubectl_applymust correspond to the playbook under the workspace.One-click deployment:
bashoedp run install -p tensorflow # -p <plugin directory>One-click uninstallation:
bashoedp run uninstall -p tensorflow # -p <plugin directory>
Demo 1: TensorFlow with Jupyter
Edit the
config.yamlfile.yamlall: hosts: localhost: ansible_connection: local vars: ansible_ssh_common_args: '-o StrictHostKeyChecking=no' kubectl_apply: tensorflow-deployment.yaml namespace: tensorflow-namespace replicas: 1 containers: name: tensorflow-jupyter image: hub.oepkgs.net/oedeploy/tensorflow/tensorflow:latest-jupyter # amd64 only command: ["jupyter", "notebook", "--ip=0.0.0.0", "--allow-root", "--no-browser"] service: name: tensorflow-service port: 80 target_port: 8888 node_port: 30088View pod status.
bashkubectl get pods -n tensorflow-namespacetextNAME READY STATUS RESTARTS AGE tensorflow-deployment-75b85948d8-w2n7b 1/1 Running 0 4m1sEnter the pod container; there will be a prominent TensorFlow banner.
bashkubectl exec -n tensorflow-namespace -it tensorflow-deployment-75b85948d8-w2n7b -- /bin/bashPrint TensorFlow information.
bashpython -c "import tensorflow as tf; print(tf.__version__)"Open the Jupyter interface.
bashhttp://x.x.x.x:30088/ # master node
Demo 2: Distributed Deployment Training Cluster
Edit the
config.yamlfile.yamlall: hosts: localhost: ansible_connection: local vars: ansible_ssh_common_args: '-o StrictHostKeyChecking=no' kubectl_apply: tensorflow-distributed.yaml namespace: tensorflow-namespace ps: replicas: 2 containers: name: tensorflow-ps image: hub.oepkgs.net/oedeploy/tensorflow/tensorflow:latest # amd64 only service: name: tensorflow-ps-service port: 2222 target_port: 2222 worker: replicas: 2 containers: name: tensorflow-worker image: hub.oepkgs.net/oedeploy/tensorflow/tensorflow:latest # amd64 only service: name: tensorflow-worker-service port: 2222 target_port: 2222View pod status.
bashkubectl get pods -n tensorflow-namespacetextNAME READY STATUS RESTARTS AGE tensorflow-ps-fdddfdb5f-8fc98 1/1 Running 0 2m59s tensorflow-ps-fdddfdb5f-dgqm9 1/1 Running 0 2m59s tensorflow-worker-6cd8947b75-gxcnq 1/1 Running 0 2m59s tensorflow-worker-6cd8947b75-wbt57 1/1 Running 0 2m59sbashkubectl logs tensorflow-ps-fdddfdb5f-8fc98 -n tensorflow-namespacetext2025-02-07 09:25:24.882206: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`. 2025-02-07 09:25:24.915813: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. TensorFlow version: 2.18.0 Environment variables: environ({'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'HOSTNAME': 'tensorflow-ps-fdddfdb5f-8fc98', 'DEBIAN_FRONTEND': 'noninteractive', 'LANG': 'C.UTF-8', 'TF_CONFIG': '{\n "cluster": {\n "ps": ["tensorflow-ps:2222"],\n "worker": ["tensorflow-worker-0:2222", "tensorflow-worker-1:2222"]\n },\n "task": {"type": "ps", "index": 0}\n}\n', 'KUBERNETES_PORT_443_TCP_PROTO': 'tcp', 'TENSORFLOW_PS_PORT_2222_TCP_PROTO': 'tcp', 'TENSORFLOW_WORKER_SERVICE_PORT': '2222', 'TENSORFLOW_WORKER_PORT': 'tcp://10.96.56.106:2222', 'KUBERNETES_SERVICE_HOST': '10.96.0.1', 'KUBERNETES_PORT_443_TCP_PORT': '443', 'TENSORFLOW_PS_PORT_2222_TCP_PORT': '2222', 'TENSORFLOW_WORKER_PORT_2222_TCP_ADDR': '10.96.56.106', 'TENSORFLOW_WORKER_SERVICE_HOST': '10.96.56.106', 'TENSORFLOW_WORKER_PORT_2222_TCP_PROTO': 'tcp', 'KUBERNETES_SERVICE_PORT': '443', 'KUBERNETES_SERVICE_PORT_HTTPS': '443', 'KUBERNETES_PORT': 'tcp://10.96.0.1:443', 'KUBERNETES_PORT_443_TCP': 'tcp://10.96.0.1:443', 'TENSORFLOW_PS_PORT_2222_TCP': 'tcp://10.96.88.2:2222', 'TENSORFLOW_PS_PORT_2222_TCP_ADDR': '10.96.88.2', 'TENSORFLOW_WORKER_PORT_2222_TCP_PORT': '2222', 'KUBERNETES_PORT_443_TCP_ADDR': '10.96.0.1', 'TENSORFLOW_PS_SERVICE_HOST': '10.96.88.2', 'TENSORFLOW_PS_SERVICE_PORT': '2222', 'TENSORFLOW_PS_PORT': 'tcp://10.96.88.2:2222', 'TENSORFLOW_WORKER_PORT_2222_TCP': 'tcp://10.96.56.106:2222', 'HOME': '/root', 'ENABLE_RUNTIME_UPTIME_TELEMETRY': '1', 'TF2_BEHAVIOR': '1', 'TPU_ML_PLATFORM': 'Tensorflow', 'TPU_ML_PLATFORM_VERSION': '2.18.0'}) This is the parameter server. [2025-02-07 09:25:26.288107] Parameter server is running... [2025-02-07 09:26:26.288219] Parameter server is running... [2025-02-07 09:27:26.288358] Parameter server is running... [2025-02-07 09:28:26.288519] Parameter server is running...Uninstall pods.
bashkubectl delete -f tensorflow-distributed.yaml