PLCnext Control 장치에 Portainer Agent 설치 단계별 가이드
Portainer는 인기 있는 OCI 컨테이너 관리 플랫폼입니다.
리소스가 제한된 장치의 경우 장치에 Portainer Agent를 설치하면 Portainer 서버에서 관리할 수 있습니다.
Portainer 문서에는 Podman에 Portainer Agent를 설치하는 방법이 설명되어 있습니다. 이 기사는 Podman Quadlets를 사용해 PLCnext Control 장치에 Portainer Agent를 설치하는 방법으로 해당 예시를 확장합니다.
Podman Quadlets를 사용하면 컨테이너와 볼륨을 systemd 서비스로 관리할 수 있습니다.
참고 및 면책 조항:
- 이 절차는 펌웨어 버전 2025.0 이상인 PLCnext Control 장치가 필요합니다.
- PLCnext Control 장치는 Portainer Agent OCI 이미지를 다운로드하기 위해 인터넷에 연결되어 있어야 합니다.
- 작성 시점에 Portainer는 CentOS 9 운영 체제에서 실행되는 Podman만 지원하며, 여기에는 PLCnext Control 장치가 포함되지 않습니다.
- Phoenix Contact는 일반적으로 PLCnext Control 장치의 Podman을 PLCnext Store 앱에서만 사용하도록 권장합니다. 다른 목적으로 Podman을 사용하는 것은 현재 Phoenix Contact에서 지원하지 않습니다.
- Portainer Agent를 실행하는 장치는 별도 장치에 설치된 전체 버전의 Portainer(비즈니스 에디션 또는 커뮤니티 에디션)에서 관리할 수 있습니다. Portainer Agent 장치 관리는 Portainer 문서에서 다루며 이 기사에서는 설명하지 않습니다.
절차
-
PLCnext Control 장치에서 /etc/containers/systemd/portainer.volume 파일을 다음 내용으로 생성합니다:
[Unit] Description=Portainer Agent Container Volume [Volume] VolumeName=portainer
-
/etc/containers/systemd/portainer_agent.container 파일을 다음 내용으로 생성합니다:
[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
-
root 사용자 계정에서 다음 명령을 실행합니다:
systemctl daemon-reload systemctl start portainer_agent.service
서비스 시작은 처음에 시간이 걸립니다. 완전한 Portainer Agent 이미지가 docker.io에서 로드되기 때문입니다.
-
다음 명령으로 서비스가 성공적으로 시작되었는지 확인합니다:
systemctl status portainer_agent.service
컨테이너가 실행되는 동안 Portainer 문서에 설명된 대로 Portainer 서버에서 PLCnext Control 장치의 Portainer Agent에 연결할 수 있습니다.
이 방식으로 컨테이너를 구현하면 Portainer Agent가 PLCnext Control 장치가 재시작될 때마다 자동으로 재시작됩니다.
참조
-
Portainer 문서: "Install Portainer Agent on Podman"
-
Daniel Schier: "Podman - Quadlets"
-
Podman Quadlets 기술 참조.
참고:
Makers Blog는 Phoenix Contact에서 테스트하거나 검토하지 않은 커뮤니티 구성원의 애플리케이션과 사용자 스토리를 보여줍니다. 자신의 책임 하에 사용하세요.