#AzureIoT – ☁ Azure IoT Edge 1.1.0 release is now GA, experiences upgrading #Ubuntu

Buy Me A Coffee

Hi !

There is a new version of the Azure IoT Edge module: 1.1.0 (see references). So, I decided to upgrade my 2 test devices and maybe share some lessons learned in the process.

Upgrade on Ubuntu 18.04 on a Raspberry Pi 4

As usual I’ll start with a full update

# Update
sudo -- sh -c 'apt-get update; apt-get upgrade -y; apt-get dist-upgrade -y; apt-get autoremove -y; apt-get autoclean -y'

Similar to the Raspberry Pi OS upgrade process, I found a nice surprise on the update log.

Setting up iotedge (1.1.0-1) ...
===============================================================================

                              Azure IoT Edge

  IMPORTANT: Please update the configuration file located at:

    /etc/iotedge/config.yaml

  with your device's provisioning information. You will need to restart the
  'iotedge' service for these changes to take effect.

  To restart the 'iotedge' service, use:

    'systemctl restart iotedge'

    - OR -

    /etc/init.d/iotedge restart

  These commands may need to be run with sudo depending on your environment.

===============================================================================
Setting up friendly-recovery (0.2.38ubuntu1.2) ...
Setting up moby-engine (20.10.3+azure-1) ...
Processing triggers for systemd (237-3ubuntu10.44) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
ureadahead will be reprofiled on next reboot
Processing triggers for libc-bin (2.27-3ubuntu1.4) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  u-boot-tools
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 139 kB of archives.
After this operation, 7168 B of additional disk space will be used.
Get:1 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 u-boot-tools arm64 2020.10+dfsg-1ubuntu0~18.04.2 [139 kB]

So, the module is updated. However I need to setup the device provisioning information again and restart the service. In the references section I shared the officials docs for these steps.

Let’s edit the provisioning information

# Update provisioning information (if necessary)
sudo nano /etc/iotedge/config.yaml

My file still have all the valid information (again, like the Raspberry Pi upgrade process)

No changes here, let’s restart IoT Edge

# restart iotedge service
systemctl restart iotedge

Important, authentication is required in this step:

So, I may missed something here. I run the update command for the module, and it’s already on the 1.1 version. However the iotedge list of modules is still using the 1.0

Update runtime settings on Azure IoT Portal

I now I can fix this in the Azure IoT Portal. In the device definition, I need to update the Runtime settings to use the version 1.1. (image is just for reference)

A couple of seconds later, everything works as expected !

iotedge module updated to v1.1.0

Recap

So, the steps to update were these commands

# Update
sudo -- sh -c 'apt-get update; apt-get upgrade -y; apt-get dist-upgrade -y; apt-get autoremove -y; apt-get autoclean -y'

# Update provisioning information (if necessary)
sudo nano /etc/iotedge/config.yaml

# restart iotedge service
systemctl restart iotedge

Then update the Runtime Settings on the Azure IoT Portal.

And restart iotedge one more time !

Happy coding!

Greetings

El Bruno


References

My posts on Raspberry Pi ⚡🐲⚡

Dev posts for Raspberry Pi
Tools and Apps for Raspberry Pi
Setup the device
Hardware


¿Con ganas de ponerte al día?

En Lemoncode te ofrecemos formación online impartida por profesionales que se baten el cobre en consultoría:

#RaspberryPi – Update or setup Wifi configuration in Ubuntu

Buy Me A Coffee

Hi !

This is not a Raspberry Pi specific post, however I always forget how to this in Ubuntu, and I’m so used to raspi-config in Raspberry OS, that I may write this down.

Ok, so let’s setup the Wifi in Ubuntu. 1st let’s change the 50-cloud-init.yaml file.

 sudo nano /etc/netplan/50-cloud-init.yaml

Let’s edit the file and add the Wifi information.

 network:
     version: 2
     wifis:
         wlan0:
             dhcp4: true
             dhcp6: true
             optional: true
             access-points:
                 "<Wifi name>":
                     password: "<Wifi password>"

Important: use spaces, not tabs. That’s it!

Close, save and reboot !

Happy coding!

Greetings

El Bruno


My posts on Raspberry Pi ⚡🐲⚡

Dev posts for Raspberry Pi
Tools and Apps for Raspberry Pi
Setup the device
Hardware


¿Con ganas de ponerte al día?

En Lemoncode te ofrecemos formación online impartida por profesionales que se baten el cobre en consultoría:

#RaspberryPi – Install ☁ Azure IoT Edge in a Raspberry Pi with Ubuntu 18.04, lessons learned and some tips

Buy Me A Coffee

Hi !

With the new Raspberry Pi Imager, the installation of an OS for a Raspberry Pi is much more easier than earlier days. We even have the chance to install several different Ubuntu versions, Desktop, Server and Core.

raspberry pi imager with ubuntu versions

This is cool, however it does not fit with the Azure IoT Edge prerequisites for an Ubuntu/Linux installation. I make some tests with Ubuntu Server 20.10 and Azure IoT, and they didn’t work. The current supported version is Ubuntu Server 18.04.

Install Ubuntu 18.04.5

After a quick search I found a working version in the Ubuntu repository:

Ubuntu 18.04.5 LTS (Bionic Beaver) (see references)

After the version is installed, it comes out of the box with SSH enabled. So, once I detected the device IP in my network, I SSHed with this device.

Note: there is no raspi-config here. So simple actions like Wifi configuration are tricky. Lucky us, internet have answers for almost everything.

The command [] also works to display current OS information.

ubuntu@ubuntu:~$ hostnamectl
   Static hostname: ubuntu
         Icon name: computer
        Machine ID: 6fcd625f39104d699f50b8de729f34ba
           Boot ID: 712910e5c2df43969db5384756225408
  Operating System: Ubuntu 18.04.5 LTS
            Kernel: Linux 5.4.0-1028-raspi
      Architecture: arm64

Finally, as a GUI person, a cooler option is to use [neofetch]. You may need to install it with

sudo apt install neofetch

And later, some magic !

Update Ubuntu

Now it was time to update the OS. Standard command

sudo -- sh -c 'apt-get update; apt-get upgrade -y; apt-get dist-upgrade -y; apt-get autoremove -y; apt-get autoclean -y'

and it took a lot !

And now all the steps from the official Install Azure IoT Edge for Linux works!

References

Happy coding!

Greetings

El Bruno


My posts on Raspberry Pi ⚡🐲⚡

Dev posts for Raspberry Pi
Tools and Apps for Raspberry Pi
Setup the device
Hardware


¿Con ganas de ponerte al día?

En Lemoncode te ofrecemos formación online impartida por profesionales que se baten el cobre en consultoría:

#Windows10 – A bit of Windows Subsystem For Linux, and some interesting IP addresses [1e100.net]

Hi!

These days I’ve been working in my home network. Now that we have many devices connected, I begin to see traces that are strange to me. Generally, it is usually something expected, like for example open ports by games of my children friends connected to my home network, however, the following scenario was funny for me.

Well, it all started when I saw in the traces a lot of activity with this data.

Destination URL or IP address: 173.194.193.188

Service or port number: 5228

 

I1.png

Usually, the next step is a command prompt and [nslookup] to view the host for this IP. However, now that Windows 10 allows us to use in Linux almost in native mode, I launched my Ubuntu instance and thanks to [Windows Subsystem For Linux] I was able to use the command [Dig], which is a very cool Linux tool. This is the perfect excuse to learn and use something new 😀

This is what I found: Traffic is performed in the domain 1e100.net

I2

This is at least curious. Like this That the following was to find out if there are any Apps That use that port and that domain. This is as simple as doing a Google search for https://www.google.com/search?q=ip%09173.194.193.188%09%09port+5228

I3

And here begins the interesting results. I leave it in item a item, where he was more and more surprised:

  • First of all, this port seems to be used a lot from Chrome in Apps Like Google Drive, Chrome Remote Desktop and other Google apps
  • Google Apps? It makes sense because the domain 1e100.net is owned by Google !!!

And this is where I dropped my face, after trying to explain why the domain name, I read the following

1e100 means 1 E 100. 1 * 10 ^ 100. The number, which is named Googol, where Google gets the name from !!!

Well, look, you got a new geek data to share with friends this weekend

Happy Coding!

Greetings @ Toronto

El Bruno

References

#Windows10 – Un poco de Windows Subsystem for Linux, y algunas IPs interesantes de conocer! [1e100.net]

Buenas!

Durante estos días he estado poniendo un poco de orden en la red interna de mi casa. Ahora que tenemos muchos Devices conectados, empiezo a ver trazas que me resultan extrañas. Por lo general, suele ser algo esperado, como por ejemplo puertos abiertos por juegos de amigos de mis niños que se conectan a la red, sin embargo, el siguiente escenario me llamo mucho la atención.

Todo comenzó cuando vi en las trazas bastante actividad con estos datos.

Destination URL or IP address: 173.194.193.188

Service or port number: 5228

 

I1

El siguiente paso es utilizar [nslookup] para ver el host de esta IP. Sin embargo, ahora que Windows 10 nos permite utilizar in Linux casi en modo nativo, pues lancé mi instancia de Ubuntu y gracias a [Windows Subsystem for Linux] pude utilizar el comando [dig], que es propio de Linux.

Esto es lo que me encontré: el tráfico se relaciona con el dominio 1e100.net

 

I2

Esto es por lo menos curioso. Así que lo siguiente fue averiguar si hay algunas apps registradas que utilicen ese puerto y ese dominio. Esto es tan simple como realizar una búsqueda en Google por https://www.google.com/search?q=ip%09173.194.193.188%09%09port+5228

I3

Y aquí comienza lo interesante. Lo dejo en Item a Item, donde cada vez estaba más sorprendido:

  • En primer lugar, este puerto parece que se utiliza mucho desde Chrome en apps como Google Drive, Chrome Remote Desktop y otras Apps de Google
  • Google Apps? Tiene sentido ya que el dominio 1e100.net es de Google

Y aquí fue donde se me cayó la cara, después de intentar explicarme el porque del nombre del dominio, leo lo siguiente

1e100 means 1 E 100. 1 * 10 ^ 100. The number, which is named Googol, where Google gets the name from !!!

Pues mira, ya tienes un dato friki para compartir con amigos

Happy Coding!

Saludos @ Toronto

El Bruno

References