From e3088a36e14cbb2f070ad2caefc4c0a69327c8b2 Mon Sep 17 00:00:00 2001 From: Akilan Selvacoumar Date: Fri, 13 Aug 2021 23:14:00 +0400 Subject: [PATCH] added docs for grouping containers --- Docs/ClientImplementation.md | 21 +++++++++++++++++++++ Docs/Installation.md | 27 +++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/Docs/ClientImplementation.md b/Docs/ClientImplementation.md index 8b371f7..695d975 100644 --- a/Docs/ClientImplementation.md +++ b/Docs/ClientImplementation.md @@ -5,6 +5,7 @@ 2. [Reading server specifications](#reading-server-specifications) 3. [Client creating and removing container](#Client-creating-and-removing-container) 4. [Tracking Containers](#Tracking-Containers) +5. [Grouping Containers](#Grouping-Containers) This section focuses in depth on how the client module works. The client module is incharge of communicating with different servers based on the IP addresses provided to the user. The IP addresses are derived @@ -57,3 +58,23 @@ show a sample structure of file ```trackcontainer.json```. ``` The default path to the container tracker is ```client/trackcontainers/trackcontainers.json```. +### Grouping Containers +When starting a set container possibility to be able to group them. +The benefit this would be that when executing plugins the group ID would be enough to execute +plugin in a set of containers. This provides the possibility to execute repetitive tasks in containers in +a single cli command. To store groups there is a file called ```grouptrackcontainer.json``` which tracks all +the groups currently present set by the client. The snippet below +show a sample structure of file ```grouptrackcontainer.json```. + +``` +{ + "Groups": [ + { + "ID": "grp", + "TrackContainer": [{client.TrackContainers struct}] + } + ] +} +``` +The default path to the container tracker is ```client/trackcontainers/grouptrackcontainer.json```. + diff --git a/Docs/Installation.md b/Docs/Installation.md index 772121d..928b04d 100644 --- a/Docs/Installation.md +++ b/Docs/Installation.md @@ -147,6 +147,33 @@ p2prc --tc p2prc --plugin --id ``` +### Create group +``` +p2prc --cgroup +``` +### Add container to group +``` +p2prc --group --id +``` +### View groups +``` +p2prc --groups +``` +### View specific group +``` +p2prc --group +``` +### Delete container from group +``` +p2prc --rmcgroup --group --id +``` +### Delete entire group +``` +p2prc --rmgroup +``` + +[read more on grouping containers](ClientImplementation.md#Grouping-Containers) +
--------------