Creating a Container Update Packet - icom OS Routers

Prev Next

Containers including the associated configuration can be installed on the router using an update packet. Containers permit to execute own applications on the router in a separated Linux environment.

Containers with the developed application must be tied to an update packet that they can be uploaded to the router. Container update packets must contain at least the following files:

  • Container file (root directory of the container packed tar archive)

  • ASCII configuration file (for the installation and configuration of the container on the router)

  • Manifest (file with the definition of the update packet content)

Situation

You have developed an application for your routers. Update packets are used to install them on several routers.

There are two ways to pack the container and the ASCII configuration file to an update packet:

  • Using the icom Router Management

  • Manual creation

Both options are described in the following.

Solution

The container of the icom Data Suite is used as an example container. The ASCII file for installing and configuring the container on the router will be created manually. Moreover, the Manifest file for the manual creation of the update packet (without icom Router Management) will be generated. The update packet will be generated from these files.

Preparing the container file

How to download the update packet of the icom Data Suite and unpack it to get a container file for this example.

  1. Download the icom Data Suite.

  2. Open the Download directory of a file manager and unpack the update packet into a directory.

  3. Change to this directory. The file icom_data_suite.tar.xz is the container of the icom Data Suite.

  4. Copy the file to your work directory.

You have the container file now that will be packed into the update packet.

Creating the ASCII configuration file

How to create an ASCII file for configuring the container on the router.

  1. Open the work directory in a file manager.

  2. Create a text file with a proper name, such as ascii_config.txt and open it in a text editor.

  3. Copy the content of the template below into the text file.

  4. Adjust the parameters to your requirements, e.g. the IP address, if required.

  5. Save the configuration file.

Template for ASCII configuration file

administration.container.container.delete=all 

administration.container.container.add=1 

administration.container.sms_forward=1 
administration.container.input_forward=1 
administration.container.sms_oid=3 
administration.container.input_oid=4 

administration.container.container[1].name=container1 
administration.container.container[1].active=1 
administration.container.container[1].designator=icom_data_suite 
administration.container.container[1].ip_net=net1 
administration.container.container[1].mac= 
administration.container.container[1].ipv4_address=192.168.1.13 
administration.container.container[1].netmask=24 
administration.container.container[1].ipv6_address= 
administration.container.container[1].prefix= 
administration.container.container[1].config_in_profile=0 
administration.container.container[1].log_console=0 
administration.container.container[1].cli_group=readwrite 

administration.container.container[1].licence=-

administration.container.container[1].ipv4_gateway= 
administration.container.container[1].ipv6_gateway= 

administration.profiles.activate 

Command explanation:

delete=all and add=1 delete all possibly existing containers from the router and add a new container

sms_forward=1 and sms_oid=3 activate the forwarding of incoming SMS to the containers and define the MCIP-OD provided for this

input_forward=1 and input_oid=4 activate the forwarding of events at the inputs to the containers and define the MCIP-OD provided for this

name=container1 assigns a name to the new container

active=1 activates the container so that this will be started like a real computer with each system start

designator=icom_data_suite assigns an designator to the new container that maps it positively to the container configuration

ip_net=net1 assigns the container to the IP net specified here

mac= assigns a fix MAC address to the container (a random MAC will be assigned to the container otherwise)

ipv4_address=192.168.1.13, netmask=24, ipv6_address= and prefix= assign this static IP address to the container, under which the container is accessible from outside in above connected network

config_in_profile=0 assigns the directory /data/etc of the container to this when downloading the binary profile

log_console=0 displays all console outputs of the container in a log

cli_group=readwrite defines the user group of the container for the access to the command line (CLI) of the router without authentication

licence= permits permits to pass a licence file to the container

ipv4_gateway= and ipv6_gateway= define a default gateway for forwarding all requests that are not directed to this subnet

activate activates the changes by the ASCII configuration file directly upon uploading

You have the ASCII configuration file now that will be packed into the update packet.

Creating the update packet

There are two ways to create the update packet:

  • Automatically in the icom Router Management

  • Manually on the computer

Creating the update package in the icom Router Management

How to create an update package in the icom Router Management service.

  1. Open the icom Router Management and log in.

  2. Select Package management → File Storage in the menu on the left and und click on Upload.

  3. Drag the ASCII configuration file from your work directory to the file field, select ASCII Configuration as file type and click on Upload.

  4. Drag the container file from your work directory to the file field, select Container as file type and click on Upload.

  5. Check both files and click on Create update packet under Select action.

  6. Enter a Name (here cg_ids) and a Description for the packet and change the order of the content using the and buttons such that the packet contains the container first and then the ASCII configuration file.

    Please note!

    This order defines the order of processing when uploading the update packet to the router. The container must be installed first before it can be started by its configuration.

  7. Click on Create.

  8. Select Package management → Update Packages in the menu on the left.

  9. Check the update packet to either download it () or execute it directly in the icom Router Management (). The further proceeding for the Execution in icom Router Management is not part of this Configuration Guide.

You have created the update packet now.

Creating the update package on the computer

How to create an update package on the computer manually.

  1. Open the PowerShell on a Windows computer using the Windows key () and entering powershell or a terminal window on a Linux computer.

  2. Change to you work directory where the ASCII configuration file and the container file are stored.

  3. Compute the MD5 checksum of the ASCII configuration file:
    Under Windows: > certutil -hashfile ascii_config.txt md5
    Under Linux: > md5sum ascii_config.txt
    MD5 hash of ascii_config.txt:
    be6dffbfcc009b719e2639de5066d61d
    CertUtil: -hashfile command has been executed successfully.

  4. Compute the MD5 checksum of the container file:
    Under Windows: > certutil -hashfile icom_data_suite.tar.xz md5
    Under Linux: > md5sum icom_data_suite.tar.xz
    MD5 hash of icom_data_suite.tar.xz:
    f26552ff323eb0d0d0dab964439e6b11
    CertUtil: -hashfile command has been executed successfully.

  5. Create a text file with the name MANIFEST (without file extension) and open it in a text editor.

  6. Copy the content of the template below into the text file.

  7. Save the file.

  8. Pack the MANIFEST file and the ASCII configuration file into the update packet:
    > tar -vcf container_packet.tar MANIFEST icom_data_suite.tar.xz ascii_config.txt

    Please note

    This command packs the specified files (here MANIFEST, icom_data_suite.tar.xz and ascii_config_file.txt) into the specified tar packet (here update_packet.tar).

Template for Manifest file

FILENAME=icom_data_suite.tar.xz
DESCRIPTION=
FILETYPE=Container
MD5SUM=f26552ff323eb0d0d0dab964439e6b11

FILENAME=ascii_config.txt
DESCRIPTION=ASCII config
FILETYPE=ASCII Configuration
MD5SUM=be6dffbfcc009b719e2639de5066d61d

Please note!

The spelling of the file type is important since it defines the usage in the update packet.

Enter the MD5 checksum of the file computed before here.

You have created an update packet now that can be uploaded to the router.

Please note!

There are different file types for different files and purposes. The following table shows these options:

FILETYPE

Purpose

Full Software Update

Major firmware update (1.0, 2.0, 3.0 etc.)

Incremental Software Update

Minor firmware update (2.1, 2.2, 2.3 etc.)

Binary Configuration

Profile in form of a binary file

ASCII Configuration

ASCII configuration that is executed immediately upon upload and not stored

Stored ASCII Configuration

ASCII configuration that is stored upon upload and not executed

Container

Linux container

Container Configuration

The content /data/etc of a container packed as tar archive

Uploading the update packet in the web interface

How to upload the update packet to the router and check, whether the update packet is processed as expected.

  1. Open the user interface of the router: https://insys.icom

  2. Click in the Administration → Upload /Backup menu on Upload and select above generated update packet.

  3. Click on Upload.

The update packet will be uploaded to the router and processed accordingly.
You have created a functional container update packet now.

Troubleshooting

  • The MANIFEST file must not have a file extension, such as .txt for example.

  • If a status failure is indicated for one of the files upon uploading to the router, check their entry in the MANIFEST file. Pay attention to the spelling and that no blank exists at the end of a line for example.

  • If an unexpected token error occurs, it often helps to refresh the browser view ( or Ctrl + F5).