Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
# Make sure to change to the "charts" directory
cd ..
pwd
/home/onaplab/iotedge/kubernetes/charts

# zip the "azureiotedge1" directory. Be sure to use "azureiotedge1.zip" file name.
tar -czvf azureiotedge1.tartgz azureiotedge1/
azureiotedge1/
azureiotedge1/.helmignore
azureiotedge1/Chart.yaml
azureiotedge1/templates/
azureiotedge1/templates/NOTES.txt
azureiotedge1/templates/_helpers.tpl
azureiotedge1/templates/edge-rbac.yaml
azureiotedge1/templates/iotedged-config-secret.yaml
azureiotedge1/templates/iotedged-deployment.yaml
azureiotedge1/templates/iotedged-proxy-config.yaml
azureiotedge1/templates/iotedged-pvc.yaml
azureiotedge1/templates/iotedged-service.yaml
azureiotedge1/values.yaml

ls -al
total 12
drwxrwxr-x. 5 onaplab onaplab  102 Dec 24 13:23 .
drwxrwxr-x. 4 onaplab onaplab   31 Dec 24 13:02 ..
drwxrwxr-x. 3 onaplab onaplab   79 Dec 24 13:14 azureiotedge1
-rw-rw-r--. 1 onaplab onaplab 8790 Dec 24 13:23 azureiotedge1.tartgz
drwxrwxr-x. 3 onaplab onaplab   79 Dec 24 13:14 edge-kubernetes
drwxrwxr-x. 3 onaplab onaplab   60 Dec 24 13:02 edge-kubernetes-crd

...

To define Azure IoT Edge Service in PCEI, connect to EMCO UI and select "Projects → Add Project":

Image RemovedImage Added

Select the project you just created (PCEI-AZURE-IOT-1 in the above example), select "Add Service", specify the Name and click on "Add App":

Image Removed

Image Added

Click on Add App tp specify Specify the App Name.

IMPORTANT NOTE: Please ensure that the "App Name" string matches the name of the tar file (without the .tar extension" created earlier with the Helm charts for Azure IoT Edge ("azureiotedge1" in this example".

Click "Create".

Image Removed


You should see the screen below:

Image RemovedImage Added

Click on the "azureiotedge1" Service and attach application definition files:

Deploying Azure IoT Edge PCE App on Edge Cluster

...

. Add App file "azureiotedge.tgz" and profile file "profile.tar.gz". DO NOT CLICK "SUBMIT".

Image Added

Select the "Placement" tab on the left.

Select the "EDGE-K8S-1" cluster that was registered earlier:

Image Added

Click "SUBMIT" in the upper right corner:

Image Added

After clicking "SUBMIT" you should see the screen below:

Image Added

Deploying Azure IoT Edge PCE App on Edge Cluster

To deploy Azure IoT Edge App onto the Edge K8S Cluster (EDGE-K8S-1 in this example), select "Deployment Intent Groups" tab on the left side of the previous screen:

Image Added

Click on the Blue Down Arrow on the right to deploy Azure IoT Edge App:

Image Added

After successful deployment, you should see a message in GREEN stating that the deployment has been successful.

SSH to the EDGE-K8S-1 VM and verify the Azure IoT Edge pods started:

Code Block
languagebash
ssh onaplab@10.121.7.152

# Verify Azure IoT Edge pods are Running in the default namespace
kubectl get pods
NAME                         READY   STATUS    RESTARTS   AGE
edgeagent-59cf45d8b9-tc5g9   2/2     Running   1          2m8s
edgehub-97dc4fdc8-t5qhf      2/2     Running   0          110s
iotedged-6d9dcf4757-h474r    1/1     Running   0          2m17s
loraread-d4d79b867-2ft2v     2/2     Running   0          110s

# Verify services. Note the TCP port for the loraread-xxxxx-yyyy pod (31230 in the example below):
kubectl get svc
NAME             TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)                                       AGE
awsggc-service   NodePort       10.244.1.182    <none>        8883:30883/TCP                                9d
edgehub          LoadBalancer   10.244.12.125   <pending>     5671:30252/TCP,8883:31342/TCP,443:30902/TCP   3m
iotedged         LoadBalancer   10.244.36.143   <pending>     35000:32275/TCP,35001:32560/TCP               32d
kubernetes       ClusterIP      10.244.0.1      <none>        443/TCP                                       32d
loraread         LoadBalancer   10.244.3.167    <pending>     50005:31230/TCP

Verifying Azure IoT Edge End-to-End Operation

To verify Azure IoT Edge end-to-end operation, perform the following tasks:

  • Note the EDGE-K8S-1 Cluster IP and the service port for the loraread service:

On the Host Server list the IP address for the edge_k8s-1 VM:

Code Block
languagebash
sudo virsh domifaddr edge_k8s-1
 Name       MAC address          Protocol     Address
-------------------------------------------------------------------------------
 vnet1      52:54:00:19:96:72    ipv4         10.121.7.152/27

ssh onaplab@10.121.7.152

kubectl get svc loraread
NAME       TYPE           CLUSTER-IP     EXTERNAL-IP   PORT(S)           AGE
loraread   LoadBalancer   10.244.3.167   <pending>     50005:31230/TCP   8m28s
onaplab@localhost:~$ 

onaplab@localhost:~$ logout
Connection to 10.121.7.152 closed.

  • Start the simulated IoT Client. This can be done directly on the Host Server (for convenience) or the python script for the IoT Client -


Deploying AWS GreenGrass Core with PCEI

...