added docs for grouping containers
This commit is contained in:
@@ -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<Random UUID>",
|
||||
"TrackContainer": [{client.TrackContainers struct}]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
The default path to the container tracker is ```client/trackcontainers/grouptrackcontainer.json```.
|
||||
|
||||
|
||||
@@ -147,6 +147,33 @@ p2prc --tc
|
||||
p2prc --plugin <plugin name> --id <container id>
|
||||
```
|
||||
|
||||
### Create group
|
||||
```
|
||||
p2prc --cgroup
|
||||
```
|
||||
### Add container to group
|
||||
```
|
||||
p2prc --group <group id> --id <container id>
|
||||
```
|
||||
### View groups
|
||||
```
|
||||
p2prc --groups
|
||||
```
|
||||
### View specific group
|
||||
```
|
||||
p2prc --group <group id>
|
||||
```
|
||||
### Delete container from group
|
||||
```
|
||||
p2prc --rmcgroup --group <group id> --id <contianer id>
|
||||
```
|
||||
### Delete entire group
|
||||
```
|
||||
p2prc --rmgroup <group id>
|
||||
```
|
||||
|
||||
[read more on grouping containers](ClientImplementation.md#Grouping-Containers)
|
||||
|
||||
<br>
|
||||
|
||||
--------------
|
||||
|
||||
Reference in New Issue
Block a user