From 8e034485cbe9b8d396e0ab990f464d66985ae36f Mon Sep 17 00:00:00 2001 From: zZ~ <47417254+YAYAHEIYOU@users.noreply.github.com> Date: Thu, 9 May 2024 17:04:43 +0800 Subject: [PATCH] delete blog (#301) --- blog-cases/2022-06-24-equiptalk.md | 68 ---- blog-cases/2022-07-14-amazon-casebook.md | 47 --- blog-tech/2022-10-20-k3s.md | 417 ----------------------- docusaurus.config.js | 10 +- src/components/footer/index.js | 8 +- src/components/home/News/index.js | 16 +- 6 files changed, 17 insertions(+), 549 deletions(-) delete mode 100644 blog-cases/2022-06-24-equiptalk.md delete mode 100644 blog-cases/2022-07-14-amazon-casebook.md delete mode 100644 blog-tech/2022-10-20-k3s.md diff --git a/blog-cases/2022-06-24-equiptalk.md b/blog-cases/2022-06-24-equiptalk.md deleted file mode 100644 index 8736ef66..00000000 --- a/blog-cases/2022-06-24-equiptalk.md +++ /dev/null @@ -1,68 +0,0 @@ -# How EquipTalk Empowers Rockets with Shifu - -EquipTalk Ltd. is dedicated to develop software-defined high-end equipments. Leveraging the aerospace measurement technology as the next-generation digital foundation for high-end equipments, EquipTalk strives to empower high-end equipment in all aspects. - -As EquipTalk's data base, ***Shifu*** spares EquipTalk developers the need to develop the underlying infrastructure and device abstraction layer, transforming traditional IoT application development into simple web development, greatly improving the efficiency, quality and reusability of IoT application development. - -## User Profile - -The core team of [EquipTalk](http://www.equiptalk.cn) comes from universities both at home and abroad, with many famous professors and experts in the field of national defense, and has been deeply engaged in the field of rocket testing for more than 20 years, and has developed rocket testing systems deployed in China's four major launch sites and industrial sectors, as four series of China (Long March 5, Long March 3, As the core equipment of four series of rockets (Long March 5, Long March 3, Long March 2 and upper stage series), it has guaranteed hundreds of major space engineering tasks such as China's Beidou system network, space station, lunar exploration and fire exploration. - -EquipTalk mainly serves the manufacturers and users of high-end complex equipment in the field of aerospace, rail transportation, ships and marine engineering, energy, etc. to ensure the reliable and safe production and use of high-end equipment. - -## Objectives - -1. achieve the integration of measurement, control and management of high-end equipment -2. improve system availability to 99.9999% -3. decouple hardware and software, significantly increase the software iteration speed -4. ensure full-link network security - -## Required Equipment - -Generalized and modularized rocket rapid test equipment (four models) - -## Product interface and architecture - -**EquipTalk data control platform** - -![](/blog-cases-equiptalk/1.png) - -![](/blog-cases-equiptalk/2.png) - -![](/blog-cases-equiptalk/3.png) - -**EquipTalk's overall architecture diagram** - -![](/blog-cases-equiptalk/4.png) - -## What is ***Shifu*** - -***Shifu*** is the next generation of open source industrial IoT development framework, making developing an industrial scenario as simple as developing a Web app. Shifu's high scalability allows it to access almost any device and protocol. Once integrating a device, ***Shifu*** generates a digital twin of the connected device in the form of a microservice in the system and opens up the device data and capabilities in the form of APIs. In this way, traditional IoT application development is reduced to simple web development, which greatly improves the efficiency, quality and reusability of IoT application development. - -***Shifu*** acts as EquipTalk's data base, sparing EquipTalk developers the need to develop the underlying infrastructure and device abstraction layer. As a result, EquipTalk is able to focus on developing business logic, abstracting the expertise of several well-known professors and experts in the defense field into the EquipTalk software platform, and creating a one-stop solution for high-end equipment testing. - -## The new architecture of EquipTalk after integrating ***Shifu*** - -**Overall architecture diagram** - -![](/blog-cases-equiptalk/5.png) - -If we take out only the architecture related to the D91DY power supply, we have **the following schematic** - -![](/blog-cases-equiptalk/6.png) - -The following diagram shows the interaction between **EquipTalk and Shifu** - -![](/blog-cases-equiptalk/7.png) - -## Outcome - -1. 85% reduction in device integration cost with ***Shifu***'s device access module -2. 200% increase in application development efficiency with ***Shifu***'s application development module -3. Increase overall system availability to 99.9999% with ***Shifu***'s system operation and maintenance module - -![](/blog-cases-equiptalk/8.png) - -## Summary - -This paper introduces the joint solution of EquipTalk and ***Shifu***. The solution has successfully empowered high-end equipment, including Long March rockets, created customized measurement and control equipment for customers. The solution bears the characteristics of rapid deployment and flexible configuration, helping enterprises to reduce costs and increase efficiency. The solution uses distributed wireless communication to shed off the shackles of cables, using central measurement and control that is more efficient and stable. The solution uses massive data to extend digital applications including life-cycle health management and digital twin. The joint solution significantly improves the efficiency of development, production and operation and maintenance. diff --git a/blog-cases/2022-07-14-amazon-casebook.md b/blog-cases/2022-07-14-amazon-casebook.md deleted file mode 100644 index 4c961b9b..00000000 --- a/blog-cases/2022-07-14-amazon-casebook.md +++ /dev/null @@ -1,47 +0,0 @@ -# AWS Innovation Casebook - -Accelerating IoT application development by ten times, ***Shifu*** has been selected for 2022 Amazon IoT Innovation Case Study. - -[Click here to view full PDF of the casebook (Chinese)](https://d1.awsstatic.com/whitepapers/amazon-iot-innovation-case.pdf) - -[Click here to view pages concerning ***Shifu*** (Chinese)](/blog-cases-amazon-casebook/amazon-iot-innovation-case-shifu-related.pdf) - -***Shifu*** + Amazon Elastic Kubernetes Service (EKS) full-stack IoT solution makes developing an industrial scenario as easy as developing an app. It greatly reduces the comprehensive O&M costs. IoT development and device hosting framework ***Shifu*** easily completes Kubernetes deployment with the help of Amazon Elastic Kubernetes Service (EKS), it has achieved efficient cloud-edge collaboration, this can help its customers to integrate massive IoT devices at low cost. - -## Edgenesis Provides Full-scene Device Hosting - -Edgenesis has developed ***Shifu***, an IoT open source development framework based on K8s, which provides a transparent framework for customers' full-scene device hosting and integrated software development. By using ***Shifu***, developers can connect, monitor and control any IoT devices more simply. - -## Shifu Nails Kubernetes With The Help Of Amazon EKS - -Since Kubernetes is the underlying structure of ***Shifu***, it needs to be deployed in the cloud for efficient cloud-edge collaboration. While working for a Industry 4.0 factory, ***Shifu*** has used AWS's EKS service. The architecture diagram is as follows. - - - -## Building a Full-stack IoT Solution Architecture - -### Application Scenario - -An Industry 4.0 factory - -### Objective - -Integrate all production and experimental equipment into ***Shifu*** to achieve 24x7 fully automated production with very low development cost. - -### Implementation - -The AWS-hosted Kubernetes allows Edgenesis to focus on the development of ***Shifu*** and create clusters with a single click. EKS also supports automatic elastic scaling for high-speed iterations of products, which greatly reduces expenses. AKS-hosted services have grealy reduced our comprehensive O&M costs。 Developers can integrate their devices into ***Shifu***, and then develop automated process on the automatically generated digital twins to manage their applications. - -***Shifu*** makes developing an industrial scenario as easy as developing an app. - -## Cost Reduction & Efficiency Improvement - -The original initial development cycle was two years and requires twelve engineers, but now it only takes two engineers two months to complete the task. The follow-up iteration cycle has been shortened from once every six months to once every two weeks, which greatly improves the customer's production and research efficiency. - -## One-stop Solution for Device Integration, Application Ddevelopment and System O&M Problems - -Customer testimonial: - -***Shifu*** not only helps us integrate a large number of IoT devices at a very low cost, but also allows us to completely decouple the applications development from the hardware, which greatly improves the reusability of applications and development and iteration efficiency, making us to achieve the highest production and research efficiency in the industry, which significantly improves the competitiveness of the company. - -With the support of Amazon EKS, ***Shifu*** can help IoT developers with their problems of device integration, application development and system O&M. ***Shifu*** is a one-stop solution for IoT application development, making the development of an industrial scenario all as easy as developing an APP! diff --git a/blog-tech/2022-10-20-k3s.md b/blog-tech/2022-10-20-k3s.md deleted file mode 100644 index 381e7c74..00000000 --- a/blog-tech/2022-10-20-k3s.md +++ /dev/null @@ -1,417 +0,0 @@ -# How to deploy Shifu on K3s to complete the cloud-edge-device cycle - -## Background -[K3s](https://k3s.io/) is the open source, lightweight version of Kubernetes developed by SUSE. It can run on the edge where computing power is limited, which makes it ideal for scenarios with IoT devices. - -As a Kubernetes native open-source IoT development framework, ***Shifu*** abstracts each IoT device into K8s pods, and expose their capabilities to applications as APIs. - -## Overall Architecture - - -## How-to Guide - -### Prerequisites - -#### Software - -| name | version | -| ----|----| -| K3s | v1.24.4+k3s1 | -| Wireguard | v1.0.200513 | - -#### Hardware - -| name | architecture | cpu | RAM | HDD | network | -| ----|----|----|--|----|----| -| master node | amd64/arm/arm64 | at least 2 | at least 2GB | 32GB | networkable, with public IP/accessible to worker nodes | -| worker node | amd64/arm/arm64 | at least 1 | at least 2GB | 16GB | networkable, with access to master node | - -### Steps - -1. Deploy the wireguard server on the server side - - a. Install - - https://github.com/angristan/wireguard-install - - b. Run the following command: - ``` - curl -O https://raw.githubusercontent.com/angristan/wireguard-install/master/wireguard-install.sh - chmod +x wireguard-install.sh - . /wireguard-install.sh - ``` - c. Enter the public IP of the server and add users on demand. The following is the actual output, please make changes accordingly. - ``` - root@localhost:~# . /wireguard-install.sh - Welcome to the WireGuard installer! - The git repository is available at: https://github.com/angristan/wireguard-install - - I need to ask you a few questions before starting the setup. - You can leave the default options and just press enter if you are ok with them. - - IPv4 or IPv6 public address: 192.168.0.1 # Change this to your public IP, you can get it by "curl ip.sb" - Public interface: ens5 - WireGuard interface name: wg0 - Server's WireGuard IPv4: 10.66.66.1 # IPv4 address of wireguard server interface, use the default value if there is no special requirement - Server's WireGuard IPv6: fd42:42:42::1 # IPv6 address of the wireguard server interface, use the default value if there is no special requirement - Server's WireGuard port [1-65535]: 64191 # Change this to your port, you need to allow UDP in the host's firewall after opening the port - First DNS resolver to use for the clients: 114.114.114.114 - Second DNS resolver to use for the clients (optional): 119.29.29.29 - - Okay, that was all I needed. we are ready to setup your WireGuard server now. - ................................. - The output here is omitted - ................................. - Tell me a name for the client. - The name must consist of alphanumeric character. It may also include an underscore or a dash and can't exceed 15 chars. - Client name: client1 # After installation prompt for a username, customize it - Client's WireGuard IPv4: 10.66.66.2 # IPv4 address of the wireguard client interface, use the default value if there is no special requirement - Client's WireGuard IPv6: fd42:42:42::2 # The IPv6 address of the wireguard client interface, use the default value if there is no special requirement - ................................. - The output here is omitted - ................................. - It is also available in /home/ubuntu/wg0-client-client1.conf # Generate a configuration file for the worker node - ``` - d. Please save the configuration file `/home/ubuntu/wg0-client-client1.conf` generated by the script, it will be used on the worker node. - e. After you run the script and has successfully added the interface, you can check the status by running `wg show all`. - ``` - root@localhost:~# wg show all - interface: wg0 - public key: adsdadhkaskdhadkjhs12312kl3j1l2o - private key: (hidden) - listening port: 64191 - - peer: adsdadhkaskdhadkjhs12312kl3j1l2odsada2 - preshared key: (hidden) - allowed ips: 10.66.66.2/32, fd42:42:42::2/128 - ``` - f. At this point, the server-side configuration is complete, if you need more clients just execute `. /wireguard-install.sh` - -2. Deploy K3s server on the server side - - a. When you are done with step 1, you can deploy K3s on the server side through the wireguard interface, the command is as follows: - ``` - curl -sfL https://rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn K3S_TOKEN=token INSTALL_K3S_EXEC = "--advertise-address=10.66.66.1 --flannel-iface=wg0" sh - - ``` - - b. Configuration items - - - `K3S_TOKEN=token`, where `token` can be changed accordingly, but worker nodes should be consistent when joining - - - `INSTALL_K3S_EXEC="--advertise-address=10.66.66.1 ---flannel-iface=wg0"`, here we have configured two items - - `--advertise-address=10.66.66.1 `, using the wireguard interface as the IP for connection, instead of the server IP - - `--flannel-iface=wg0`, inform the flannel component of K3s to use wg0 interface - - c. The output should be as follows: - ``` - [INFO] Finding release for channel stable - [INFO] Using v1.24.4+k3s1 as release - [INFO] Downloading hash rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/v1.24.4-k3s1/sha256sum-amd64.txt - [INFO] Downloading binary rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/v1.24.4-k3s1/k3s - [INFO] Verifying binary download - [INFO] Installing k3s to /usr/local/bin/k3s - [INFO] Skipping installation of SELinux RPM - [INFO] Creating /usr/local/bin/kubectl symlink to k3s - [INFO] Creating /usr/local/bin/crictl symlink to k3s - [INFO] Creating /usr/local/bin/ctr symlink to k3s - [INFO] Creating killall script /usr/local/bin/k3s-killall.sh - [INFO] Creating uninstall script /usr/local/bin/k3s-uninstall.sh - [INFO] env: Creating environment file /etc/systemd/system/k3s.service.env - [INFO] systemd: Creating service file /etc/systemd/system/k3s.service - [INFO] systemd: Enabling k3s unit - Created symlink /etc/systemd/system/multi-user.target.wants/k3s.service → /etc/systemd/system/k3s.service. - [INFO] systemd: Starting k3s - root@localhost:~# - ``` - d. Run `kubectl get pods -A ` to ensure all pods are running: - - ``` - ~# kubectl get pods -A - NAMESPACE NAME READY STATUS RESTARTS AGE - kube-system coredns-b96499967-hs6bn 1/1 Running 0 4m14s - kube-system local-path-provisioner-7b7dc8d6f5-8szzd 1/1 Running 0 4m14s - kube-system helm-install-traefik-crd-9bhdp 0/1 Completed 0 4m14s - kube-system helm-install-traefik-h5q4h 0/1 Completed 1 4m14s - kube-system metrics-server-668d979685-tlvzc 1/1 Running 0 4m14s - kube-system svclb-traefik-99c87d41-cqcnb 2/2 Running 0 3m49s - kube-system traefik-7cd4fcff68-b6cjj 1/1 Running 0 3m49s - ``` - - e. Check master node status by running `kubectl get nodes`: - ``` - #kubectl get nodes - NAME STATUS ROLES AGE VERSION - ip-172-31-37-138 Ready control-plane,master 8m35s v1.24.4+k3s1 - ``` - f. At this point, K3s should be successfully deployed on the server-side -3. configure wireguard on worker node - -:::tip - This tutorial uses an `Ubuntu 20.04.5 LTS` server running on ARM64 for demonstration purposes -::: - - a. Update the software list and install `resolvconf` and `wireguard`: - - ``` - apt-get update && apt-get install resolvconf wireguard -y - ``` - b. Fill the following configuration in `/etc/wireguard/wg0.conf`: - -:::note -The last line in the configuration file `AllowedIPs` is ` 0.0.0.0/0,::/0` by default, you need to change it to the wireguard IP address `10.66.66.0/24` -::: - - ``` - [Interface] - PrivateKey = casasdlaijo()(hjdsasdasdihasddad - Address = 10.66.66.2/32,fd42:42:42::2/128 - DNS = 114.114.114.114,119.29.29.29 - - [Peer] - PublicKey = asdasd21edawd3resaedserw3rawd - PresharedKey = dasda23e134e3edwadw3reqwda - Endpoint = 192.168.0.1:64191 # This should be the public IP of the server and the open UDP port - AllowedIPs = 10.66.66.0/24 # Note that the default here is 0.0.0.0/0 and needs to be changed - ``` - c. Run the following command to bring up the wg0 interface: - ``` - wg-quick up /etc/wireguard/wg0.conf - ``` - d. Test the interface by `ping 10.66.66.1`, if the ping is successfull, then it is in effect. - ``` - root@k3s:~# ping 10.66.66.1 - PING 10.66.66.1 (10.66.66.1) 56(84) bytes of data. - 64 bytes from 10.66.66.1: icmp_seq=1 ttl=64 time=12.9 ms - 64 bytes from 10.66.66.1: icmp_seq=2 ttl=64 time=13.1 ms - 64 bytes from 10.66.66.1: icmp_seq=3 ttl=64 time=18.9 ms - 64 bytes from 10.66.66.1: icmp_seq=4 ttl=64 time=8.21 ms - 64 bytes from 10.66.66.1: icmp_seq=5 ttl=64 time=13.3 ms - 64 bytes from 10.66.66.1: icmp_seq=6 ttl=64 time=7.66 ms - ^C - --- 10.66.66.1 ping statistics --- - 6 packets transmitted, 6 received, 0% packet loss, time 5316ms - rtt min/avg/max/mdev = 7.659/12.345/18.863/3.729 ms - ``` - -4. Configure K3s agent on worker nodes - - a. Install K3s and join the cluster: - ``` - curl -sfL https://rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn K3S_TOKEN=token K3S_URL https:// 10.66.66.1:6443 INSTALL_K3S_EXEC="--node-ip=10.66.66.3 --flannel-iface=wg0" sh - - ``` - b. Configuration items: - - - `K3S_TOKEN=token`, where `token` needs to be the same as the server token - - - `INSTALL_K3S_EXEC="--advertise-address=10.66.66.3 --flannel-iface=wg0"`, where we have configured three items. - - - `-K3S_URL=https://10.66.66.1:6443`, the IP of the master node, here it is 10.66.66.1 - - - `--advertise-address=10.66.66.3`, the interface of the wireguard is used as the IP for connection, instead of the worker IP - - `--flannel-iface=wg0`, inform the flannel component of K3s to use wg0 interface -c. The output should be as follows: - ``` - [INFO] Finding a stable channel version - [INFO] Use v1.24.4+k3s1 as release version. - [INFO] Download hash rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/v1.24.4-k3s1/sha256sum-arm64.txt - [INFO] Download the binary rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/v1.24.4-k3s1/k3s-arm64 - [INFO] Verify the binary download - [INFO] Install k3s to /usr/local/bin/k3s. - [INFO] Skip the SELinux RPM installation. - [INFO] Create /usr/local/bin/kubectl symbolic link to k3s - [INFO] Create /usr/local/bin/crictl symbolic link to k3s. - [INFO] Create /usr/local/bin/ctr symbolic link to k3s - [INFO] Create killall script /usr/local/bin/k3s-killall.sh - [INFO] create uninstall script /usr/local/bin/k3s-agent-uninstall.sh - [INFO] env: Create environment file /etc/systemd/system/k3s-agent.service.env - [INFO] systemd. create service file /etc/systemd/system/k3s-agent.service - [INFO] systemd: Enabling the k3s-agent unit - Create symbolic link /etc/systemd/system/multi-user.target.wants/k3s-agent.service → /etc/systemd/system/k3s-agent.service. - [INFO] systemd. start k3s-agent - root@k3s:~# - ``` - d. On the server side, you can check whether the node has been added by `kubectl get nodes`: - ``` - #kubectl get nodes - Name Status Role Age Version - ip-172-31-37-138 Ready control-plane,master 24m v1.24.4+k3s1 - k3s Ready 2m52s v1.24.4+k3s1 - ```` - - - -5. Deploy ***Shifu*** by cloud-edge collaboration - - a. Clone ***Shifu***: - ``` - git clone https://github.com/Edgenesis/shifu.git - ``` - Modify the image inside the controller (may not be pulled down in China): - - `vim shifu/pkg/k8s/crd/install/shifu_install.yml` - - Replace line 428 with - - `image: bitnami/kube-rbac-proxy:latest` - - b. Install ***Shifu***: - - ` kubectl apply -f shifu/pkg/k8s/crd/install/shifu_install.yml ` - - c. Lable the worker node of K3s: - - `kubectl label nodes k3s type=worker` - - d. Try to run the Pod on the specified node, e.g. an `nginx` Pod: - - ``` - kubectl run nginx --image=nginx -n deviceshifu --overrides='{"spec": { "nodeSelector": { "type": "worker"}}}' - ``` - e. Run `kubectl get pods -n deviceshifu -owide`, we can see that we have successfully run the pod on the edge node `k3s` - ``` - #kubectl get pods -n deviceshifu -owide - NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE - nginx 1/1 Running 0 42s 10.42.1.3 k3s - ```` - - -6. deploy a digital twin of the Hikvision camera - - a. Login to [***shifu.cloud***](https://shifu.cloud) - - ***Shifu Cloud*** is a PaaS based on the open source IoT development framework ***Shifu*** developed by Edgenesis, which provides convenient tools for developers to integrate IoT devices by simply filling in basic information. Without ***Shifu Cloud***, developers need to manually fill in the YAML configuration files and then deploy the virtual devices. - - - - b. Add device - - - - c. Select Private Protocol --> Select Hikvision in the drop-down menu, then click Next - - - - - d. Add basic information about the device, such as device name, manufacturer and model:\ - - - - e. Fill in the IP address, RTSP username and password - - - - f. Click Access and go to Add Interface - - - - - g. Finally click Upload and ***Shifu Cloud*** will automatically generate the YAML file for ***deviceShifu*** (the digital twin) - - - - h. Copy the command and run it on the master node of K3s - - - i. The output should be as follows: - ``` - root@localhost:~# kubectl apply -f https://******.com/*****/******.yaml - configmap/deviceshifu-devicehikvision-configmap created - service/deviceshifu-devicehikvision-service created - deployment.apps/deviceshifu-devicehikvision-deployment created - edgedevice.shifu.edgenesis.io/edgedevice-devicehikvision created - root@localhost:~# - ``` - - - What happens behind the scene - ***Shifu Cloud*** automatically generates the digital twin's YAML files (Edge Device, ConfigMap, Deployment and Service) with some basic information filled in by the user, if you want to go deeper, go to [github](https://github.com/Edgenesis/shifu/tree/main/examples/rtspDeviceShifu) to see the deployment specific files - - j. ***Shifu Cloud*** does not support adding nodeSelector for now (stay tuned), the device twin will be deployed on the master node by default, we need to update the `spec` in the deployment file to deploy the Pod in the worker node: - - - We get the name of the current deployment file with the command - ``` - root@localhost:~# kubectl get deployment -n deviceshifu - NAME READY UP-TO-DATE AVAILABLE AGE - deviceshifu-devicehikvision-deployment 0/1 1 0 16m - ``` - - - Then edit the deployment with the ``kubectl edit deployment -n deviceshifu deviceshifu-devicehikvision-deployment`` command, add the following two lines and save it: - ``` - ...... - nodeSelector: - type: worker - ...... - ``` - - - k. At this point we look again and see that the digital twin has been deployed to the edge node `k3s`: - ``` - root@localhost:~# kubectl get pods -n deviceshifu -owide - NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES - nginx 1/1 Running 0 165m 10.42.1.4 k3s - deviceshifu-devicehikvision-deployment-5f56fb56d9-2ph5s 2/2 Running 0 21s 10.42.1.6 k3s - ``` - -### Outcome - - 1. Now we can try to interact with the camera. Let's run an nginx container on the master node to simulate the interaction between the application and ***devicesShifu*** by running `kubectl run nginx-master -n deviceshifu --image=nginx` and we can see that ` nginx-master` is indeed running on the master node: - ``` - root@localhost:~# kubectl get po -n deviceshifu -owide - NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES - nginx 1/1 Running 0 169m 10.42.1.4 k3s - deviceshifu-devicehikvision-deployment-5f56fb56d9-2ph5s 2/2 Running 0 3m53s 10.42.1.6 k3s - nginx-master 1/1 Running 0 32s 10.42.0.11 localhost - ``` - 2. We can use `kubectl exec -it -n deviceshifu nginx -- bash `to get to `nginx-master`, so that we can interact directly with the digital twin and obtain the meta information: - ``` - root@localhost:~# kubectl exec -it -n deviceshifu nginx -- bash - root@nginx:/# curl deviceshifu-devicehikvision-service/info - - - IP CAMERA - ***** - IPCamera - hangzhou - Hikvision.China - DS-2DE3Q140CN-WDS-***** - c8:02:8f:c8:86:11V5.5.800 - build 210816 - V7.3build 200601 - V1.3.4100316 - 0x0IPCamera - 88 - truefalseB-R-E7-0 - - ``` -The camera can be controlled directly by the following command: - ``` - curl deviceshifu-devicehikvision-service/move/{up/down/left/right} - ``` - - - If we want to see what the camera is currently shooting and the current video stream, we need forward the local port to a pod by using `kubectl port-forward -n deviceshifu service/deviceshifu-devicehikvision-service 30080:80 -- address 0.0.0.0` -The image/video stream can be viewed directly by entering the server's IP and port number in the browser: - ``` - :30080/capture - ``` - - ``` - :30080/stream - ``` - - - - -## Summary -In this article, we shared how to run ***Shifu*** in a K3s cluster, and achieve cloud-edge collaborative device control and data collection. - -In the future, ***Shifu Cloud*** will continue to integrate with Kubernetes, add deployment control for edge nodes and automatically deploy device twins to the cluster without manual replication. - -Thank you very much for reading, we look forward to your feedback, don't hesitate to leave comments if you like this article or have any suggestions. - diff --git a/docusaurus.config.js b/docusaurus.config.js index 56399893..008bd9fe 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -137,11 +137,11 @@ const config = { label: 'Docs', }, - { - to: '/case-studies', - position: 'left', - label: 'Case Studies', - }, + // { + // to: '/case-studies', + // position: 'left', + // label: 'Case Studies', + // }, // { // to: '/news', diff --git a/src/components/footer/index.js b/src/components/footer/index.js index 54969b7a..5d34172e 100644 --- a/src/components/footer/index.js +++ b/src/components/footer/index.js @@ -92,13 +92,13 @@ export function Link(props) { - + {/* Case Studies - - + */} + {/* Company - + */}
{list}
diff --git a/src/components/home/News/index.js b/src/components/home/News/index.js index 3c55fc7a..ec6750ca 100644 --- a/src/components/home/News/index.js +++ b/src/components/home/News/index.js @@ -5,14 +5,14 @@ import Translate, { translate } from '@docusaurus/Translate' import { Divider } from 'antd' import { ArrowRightOutlined } from '@ant-design/icons' let Lists = [ - { - id: 0, - img: 'blog.svg', - title: translate({ message: 'Tech Blogs' }), - message: translate({ message: 'How to deploy Shifu on K3s to complete the cloud-edge-device cycle' }), - messageLink: 'technical-blogs/2022/10/20/k3s', - link: 'technical-blogs' - }, + // { + // id: 0, + // img: 'blog.svg', + // title: translate({ message: 'Tech Blogs' }), + // message: translate({ message: 'How to deploy Shifu on K3s to complete the cloud-edge-device cycle' }), + // messageLink: 'technical-blogs/2022/10/20/k3s', + // link: 'technical-blogs' + // }, { id: 1, img: 'news.svg',