docker: add nilrt-ctr.sh container management CLI#351
Open
Shreejit-03 wants to merge 1 commit into
Open
Conversation
Add a management CLI tool and docker-compose.yml for NILRT containers. The script provides discovery, software installation, feed configuration, and system status commands for nilrt-runmode and nilrt-slim containers on a macvlan network. Features: - Discover and list managed containers with status/IP - Install/remove/update packages via opkg with lock-wait - Set up feed configuration in /etc/opkg/base-feeds.conf - Scale container instances via docker compose - Target resolution by name, ID prefix, or numeric index Requires: setup-nilrt-network.sh to create the nilrt-net macvlan network before starting containers. Signed-off-by: Shreejit C <shreejit.c@emerson.com>
0e4fc58 to
7d82d83
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Add a Docker Compose configuration and
nilrt-ctr.shCLI for managing NILRT containers locally.docker-compose.yml— Defines two services (nilrtrunmode andnilrt-slim) with shared configuration (privileged, healthcheck on niauth_daemon, macvlan networking via the external nilrt-net network). Supports scaling to run multiple container instances.nilrt-ctr.sh— A Bash CLI that wraps Docker and docker-compose to manage NILRT containers:discover/list/find— enumerate managed containers with status and IP.status— detailed system info (OS, network, services, installed NI software).install/remove/update— package management via opkg with lock-wait.set-feed— configure opkg package feeds.scale— scale service instances via docker compose.shell/exec/logs/rename— operational convenience commands.Requires the nilrt-net macvlan network to be created beforehand (via
setup-nilrt-network.sh).Justification
AB#3201995.
Testing
All commands were manually tested against running NILRT containers:
discover | list | findstatus | info <target>set-feed | feed <target|all> <YYYYQN>/etc/opkg/base-feeds.conf; verified withcatinside containerinstall <target> [--feed YYYYQN] <pkg...>opkg; verified withopkg list-installedremove | uninstall <target> <pkg...>update | upgrade [target|all]opkg update && opkg upgradeon target(s)rename | hostname <target> <name>hostnameshell | ssh <target>fw_printenvto confirm identityscale <service> <n>nilrt-slimto 3 instances; new containers joined macvlan network with unique IPslog | logs <target> [lines]exec | run <target> <cmd>cat /etc/natinst/share/lvrt.conf)Additionally verified:
--feedflag oninstallsets feeds before installing