Industrial manufacturing
Industrial Internet of Things | Industrial materials | Equipment Maintenance and Repair | Industrial programming |
home  MfgRobots >> Industrial manufacturing >  >> Manufacturing Technology >> Industrial Technology

Step-by-Step Guide to Installing Portainer Agent on a PLCnext Control Device

Portainer is a popular OCI container management platform.

For resource limited devices, installing Portainer Agent on the device allows it to be managed from a Portainer server.

The Portainer documentation describes how to install Portainer Agent on Podman. This article extends that example by describing how to install Portainer Agent on a PLCnext Control device using Podman Quadlets.

By using Podman Quadlets, containers and volumes can be managed as systemd services.

Notes and disclaimers:

Procedure

  1. On the PLCnext Control device, create the file /etc/containers/systemd/portainer.volume with the following content:

    [Unit]
    Description=Portainer Agent Container Volume
    [Volume]
    VolumeName=portainer
    
  2. Create the file /etc/containers/systemd/portainer_agent.container with the following content:

    [Unit]
    Description=Portainer Agent Container
    Requires=portainer-volume.service
    [Container]
    ContainerName=portainer_agent
    Image=docker.io/portainer/agent:2.23.0
    Volume=/run/podman/podman.sock:/var/run/docker.sock
    Volume=/var/lib/containers/storage/volumes:/var/lib/docker/volumes
    Volume=/:/host
    PublishPort=9001:9001
    [Install]
    WantedBy=multi-user.target default.target
    
  3. Execute the following commands from the root user account:

    systemctl daemon-reload
    systemctl start portainer_agent.service
    

    Starting the service takes a while the first time, because the complete Portainer Agent image is loaded from docker.io.

  4. Check that the service has started successfully, using the following command:

    systemctl status portainer_agent.service
    

While the container is running, you can connect to the Portainer Agent on the PLCnext Control device from a Portainer Server, as described in the Portainer documentation.

By implementing the container in this way, Portainer Agent will automatically restart every time the PLCnext Control device restarts.

References

  1. Portainer documentation: "Install Portainer Agent on Podman"

  2. Daniel Schier: "Podman - Quadlets"

  3. Podman Quadlets technical reference.

Note:

The Makers Blog shows applications and user stories of community members that are not tested or reviewed by Phoenix Contact. Use them at your own risk.


Industrial Technology

  1. How to Determine the Best Sampling Solution for Your Facility
  2. Mobile Data: 3 Game-Changing Ways It Transforms Construction Management
  3. Driving Digital Transformation in CPG Manufacturing: Strategies, Benefits, and the Path to Sustainable Growth
  4. Unlock Your Business’s True Value: A Guide for Small and Mid‑Sized Manufacturers
  5. Spray Silicone Sealer: The Ideal Choice for Electronics Protection
  6. Industry 4.0 Integration Solutions: A Complete Guide for Manufacturers
  7. The Impact of a Carbon Levy on Shipping Costs: What It Means for the Maritime Industry
  8. Understanding Sand Moulds: Definitions, Types, and Metal Casting Fundamentals
  9. Accurate COGS Calculation for Manufacturers: Boost Pricing and Profitability
  10. The Quadratic Formula: A Reliable Tool for Solving Second‑Degree Equations