Cumulocity-IoT / cumulocity-devicemanagement-agent

Cumulocity Reference Agent written in Python to demonstrate most of the Device Management Capabilities of Cumulocity IoT
Apache License 2.0
26 stars 20 forks source link

Create Dockerfile to mass scale Agent #16

Closed switschel closed 2 years ago

mbay-ODW commented 2 years ago

You could basically do this by providing an docker-compose file

version: "3.0" services: agent: build: .

and the following mass_start.sh script:

docker-compose up --build -d --scale agent=$1 echo "You can copy everything below this line and save as CSV file to use bulk registration!" echo "ID;PATH" docker stats --no-stream --format "{{.Container}};"

by calling . mass_start.sh $NUMBEROFCONTAINERS it will scale agents and print the ID to the prompt which directly could be used for bulk registration within c8y as csv.

mbay-ODW commented 2 years ago

Added the script and the docker-compose file, feel free to comment and merge.