Attention

You are viewing an older version of the documentation. The latest version is v3.3.

Host Private ECI Repository

This section will help you privately host the ECI repository on your own local network with packages you built or packages from the ECI release archive.

Attention

The private ECI repository only supports Debian and Canonical® Ubuntu®. There is no available private ECI Repository for Red Hat® Enterprise Linux®.

logo_debian logo_ubuntu

This section explains the procedure to use the Linux build system to privately host the ECI APT repository on the local network and configure the APT package manager to use the privately hosted ECI APT repository.

Before setting up the Linux build system, make sure that:

Note: If you are behind a proxy, make sure that you set the following environment variables: HTTP_PROXY, HTTPS_PROXY, and NO_PROXY.

The section is applicable to:

../_images/linux3.png

Do the following to set up a Linux build system:

  1. Download the ECI release archive, if not done already.

  2. Copy the eci-release.tar.gz archive from the ECI release archive (release-eci_#.#.zip) to the Linux build system. Make sure that there are no spaces in the directory path. For example, copy the archive to ~/Desktop. The eci-release.tar.gz archive is located in the ECI release archive within the Edge-Controls-for-Industrial directory as follows:

    └── Edge-Controls-for-Industrial
        ├── Codesys_Example_Applications.zip
        ├── Dockerfiles.tar.gz
        └── eci-release.tar.gz
    
  3. Extract the archive. In Canonical® Ubuntu®, right-click the archive and select Extract Here.

    ../_images/0113.png

    The directory contents should be similar to the following:

    ../_images/026.png
  4. On the Linux build system, open a terminal to the eci-release directory. In Canonical® Ubuntu®, right-click anywhere in the directory explorer and select Open in Terminal.

    ../_images/C1.png
  5. At the terminal prompt, run the host_apt_repo.sh script without any parameters:

    $ ./host_apt_repo.sh
    
    ../_images/0118.png
  6. A menu will be displayed based on either of the following scenarios:

    • You are installing ECI Deb packages provided with the ECI release

    • You are installing ECI Deb packages from a local build

    Click the corresponding tab to continue.

    The menu will display APT repository options for both Debian and Canonical® Ubuntu®:

    • ECI packages for bookworm: ECI Deb packages provided with the ECI release for Debian 12 (Bookworm)

    • ECI packages for jammy: ECI Deb packages provided with the ECI release for Canonical® Ubuntu® 22.04 (Jammy Jellyfish)

    Select an option corresponding to the OS installed on the target system (Bookworm or Jammy Jellyfish).

    ../_images/0211.png
  7. A Docker container with the Apache HTTP web server will open port 8080 and host the ECI APT repository on the network. If port 8080 is in use or restricted, edit the script and change the port assigned to the HTTPD_PORT variable (available at the beginning of the script). If any errors regarding Docker occur, refer to Setup Notifications for common resolutions.

    Attention

    Hosting APT repositories using this method is not inherently secure! Production deployments should use security measures according to the environment and exposure.

    ../_images/0310.png
  8. When the APT repository server is ready, the script will display a few commands. In a later step, these commands will be executed on a target system.

    Note: The target system must be connected to the same network used by the APT repository server and be able to connect to the port in use (default 8080).

    ../_images/046.png

    The APT repository server will continue to run until you stop it. When stopped, target systems will not be able to download ECI Deb packages from this APT repository server. To stop the APT repository server, press Ctrl + C on the keyboard.

    The section is applicable to:

    ../_images/target_generic9.png
  9. If not already completed, prepare the target to install ECI Deb packages.

  10. Copy the GPG key GPG-PUB-KEY-INTEL-ECI.gpg from the eci-release directory to the target system. This enables the ECI APT repository to be integrity-verified, enhancing security.

    $ sudo cp  GPG-PUB-KEY-INTEL-ECI.gpg /etc/apt/trusted.gpg.d/
    

    Note: It is not mandatory to add the GPG key. However, without the key, the APT package manager will display a warning that it could not verify signatures:

    W: GPG error: http://10.0.2.15:8080/ isar Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6350B922F48AD0FC
    
  11. Run the commands, displayed by the host_apt_repo.sh script on the target system.

    In this example, the following commands were executed:

    sudo bash -c 'echo "deb [trusted=yes] http://10.0.2.15:8080/ isar main" > /etc/apt/sources.list.d/eci.list'
    sudo bash -c 'echo "deb-src [trusted=yes] http://10.0.2.15:8080/ isar main" >> /etc/apt/sources.list.d/eci.list'
    sudo bash -c 'echo -e "Package: *\nPin: origin 10.0.2.15\nPin-Priority: 1000" > /etc/apt/preferences.d/isar'
    sudo bash -c 'echo "Acquire::http::Proxy::10.0.2.15 DIRECT;" >> /etc/apt/apt.conf.d/proxy.conf'
    
    ../_images/054.png

What Next after Hosting Private ECI Repository

After hosting the private ECI repository, proceed to install ECI packages.