Skip to content

Commit

Permalink
Merge pull request #44 from thin-edge/feat-use-tedge-container-plugin-ng
Browse files Browse the repository at this point in the history
feat: use tedge-container-plugin-ng to manage containers
  • Loading branch information
reubenmiller authored Nov 20, 2024
2 parents 581decb + 437f4e8 commit df17fe4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ RUN wget -O - https://thin-edge.io/install-services.sh | sh -s -- s6_overlay \
# might not have access to it
# Note: Volumes should be configured to persist the docker compose files
docker-cli-compose \
tedge-container-plugin
tedge-container-plugin-ng

# Set permissions of all files under /etc/tedge
# TODO: Can thin-edge.io set permissions during installation?
RUN chown -R tedge:tedge /etc/tedge \
&& echo "tedge ALL = (ALL) NOPASSWD: /usr/bin/tedge, /etc/tedge/sm-plugins/[a-zA-Z0-9]*, /bin/sync, /sbin/init, /usr/bin/tedgectl, /usr/bin/docker" >/etc/sudoers.d/tedge
&& echo "tedge ALL = (ALL) NOPASSWD: /usr/bin/tedge, /etc/tedge/sm-plugins/[a-zA-Z0-9]*, /bin/sync, /sbin/init, /usr/bin/tedgectl, /usr/bin/docker, /usr/bin/tedge-container" >/etc/sudoers.d/tedge
# Custom init. scripts - e.g. write env variables data to files
COPY cont-init.d/* /etc/cont-init.d/

Expand Down Expand Up @@ -100,6 +100,7 @@ ENV SERVICE_TEDGE_MAPPER_COLLECTD=0

ENV SERVICE_TEDGE_AGENT=1
ENV SERVICE_C8Y_FIRMWARE_PLUGIN=0
ENV SERVICE_TEDGE_CONTAINER_PLUGIN=1


# Control thin-edge.io settings via env variables
Expand Down
3 changes: 3 additions & 0 deletions tests/main/operations.robot
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Suite Setup Set Main Device
Grace period to allow container to startup
Sleep 5s reason=Wait for container to startup

tedge-container-plugin service is up
Cumulocity.Should Have Services name=tedge-container-plugin status=up max_count=1

Restart device
Skip
${date_from}= Get Test Start Time
Expand Down

1 comment on commit df17fe4

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
13 0 1 13 100 2m17.830261999s

Passed Tests

Name ⏱️ Duration Suite
Grace period to allow container to startup 5.002 s Operations
tedge-container-plugin service is up 0.106 s Operations
Get Logfile Request 2.337 s Operations
Get Configuration File 4.641 s Operations
Execute Shell Command 2.317 s Operations
Install application using docker compose 15.187 s Operations
Get Container Logs 2.317 s Operations
Trigger self update via local command 11.383 s Self-Update
Self update should only update if there is a new image 4.420 s Self-Update
Self update using software update operation 87.322 s Self-Update
Cloud Connection is Online 0.123 s Telemetry
Service status 0.223 s Telemetry
Sends measurements 2.451 s Telemetry

Please sign in to comment.