From 754a937eb8e33b3caf28a4c3dc5ef06d2668938f Mon Sep 17 00:00:00 2001 From: yo Date: Sun, 19 Dec 2021 17:04:27 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'README.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 126 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 73 insertions(+), 53 deletions(-) diff --git a/README.md b/README.md index 15fe0ab..66c29b2 100644 --- a/README.md +++ b/README.md @@ -1,66 +1,86 @@ -# gocage +GoCage +======= Jail management tool for FreeBSD, written in Go. Support iocage jails, so they can coexist. -Gocage is meant to be a complete jail management tool with network, snapshots, jail cloning support and a web interface. +Gocage is meant to be a complete jail management tool with network, snapshots, jail cloning support and a web interface. This is the hypothetic future. -# List jails -Nothing fancy, use - `gocage list` +At present time, it list and stops jails. + +List jails +---------- +Nothing fancy, just use +`gocage list` + +### Specify fields to display -## Specify fields to display Use -o to specify which fields you want to display: - `gocage list -o JID,Name,Running,Config.Boot,Config.Comment - +=====+==========+=========+=============+================+ - | JID | Name | Running | Config.Boot | Config.Comment | - +=====+==========+=========+=============+================+ - | 183 | test | true | 1 | none | - +-----+----------+---------+-------------+----------------+ - | 29 | srv-irc | true | 1 | | - +-----+----------+---------+-------------+----------------+ - | | srv-web | false | 0 | | - +-----+----------+---------+-------------+----------------+ - | 22 | srv-dns1 | true | 1 | | - +-----+----------+---------+-------------+----------------+ -` +

+gocage list -o JID,Name,Running,Config.Boot,Config.Comment  
++=====+==========+=========+=============+================+  
+| JID | Name     | Running | Config.Boot | Config.Comment |  
++=====+==========+=========+=============+================+  
+| 183 | test     | true    | 1           | none           |  
++-----+----------+---------+-------------+----------------+  
+| 29  | srv-irc  | true    | 1           |                |  
++-----+----------+---------+-------------+----------------+  
+|     | srv-web  | false   | 0           |                |  
++-----+----------+---------+-------------+----------------+  
+| 22  | srv-dns1 | true    | 1           |                |  
++-----+----------+---------+-------------+----------------+  
+
+ + + + +Filter jails +---------- -## Filter jails ### By name Just add name on gocage list command : - gocage list srv-bdd srv-web - +=====+=========+=================+=======================+=========+ - | JID | Name | Config.Release | Config.Ip4_addr | Running | - +=====+=========+=================+=======================+=========+ - | 98 | srv-db | 13.0-RELEASE-p5 | vnet0|192.168.1.56/24 | true | - +-----+---------+-----------------+-----------------------+---------+ - | 41 | srv-web | 13.0-RELEASE-p4 | vnet0|192.168.1.26/24 | true | - +-----+---------+-----------------+-----------------------+---------+ +

+gocage list srv-bdd srv-web
++=====+=========+=================+=======================+=========+
+| JID | Name    | Config.Release  | Config.Ip4_addr       | Running |
++=====+=========+=================+=======================+=========+
+| 98  | srv-db  | 13.0-RELEASE-p5 | vnet0|192.168.1.56/24 | true    |
++-----+---------+-----------------+-----------------------+---------+
+| 41  | srv-web | 13.0-RELEASE-p4 | vnet0|192.168.1.26/24 | true    |
++-----+---------+-----------------+-----------------------+---------+
+
### By field value You can filter jails with -f option, followed by key=value. Suppose you want to see only active at boot jails: - gocage list -f Config.Boot=1 -o JID,Name,Running,Config.Boot,Config.Comment - +=====+==========+=========+=============+================+ - | JID | Name | Running | Config.Boot | Config.Comment | - +=====+==========+=========+=============+================+ - | 183 | test | true | 1 | none | - +-----+----------+---------+-------------+----------------+ - | 29 | srv-irc | true | 1 | | - +-----+----------+---------+-------------+----------------+ - | | srv-db | false | 1 | none | - +-----+----------+---------+-------------+----------------+ - | 22 | srv-dns1 | true | 1 | | - +-----+----------+---------+-------------+----------------+ - -Now, only active at boot and running : - gocage list -f Config.Boot=1,Running=true -o JID,Name,Running,Config.Boot - +=====+==========+=========+=============+ - | JID | Name | Running | Config.Boot | - +=====+==========+=========+=============+ - | 183 | test | true | 1 | - +-----+----------+---------+-------------+ - | 29 | srv-irc | true | 1 | - +-----+----------+---------+-------------+ - | 22 | srv-dns1 | true | 1 | - +-----+----------+---------+-------------+ - +

+gocage list -f Config.Boot=1 -o JID,Name,Running,Config.Boot,Config.Comment
++=====+==========+=========+=============+================+
+| JID | Name     | Running | Config.Boot | Config.Comment |
++=====+==========+=========+=============+================+
+| 183 | test     | true    | 1           | none           |
++-----+----------+---------+-------------+----------------+
+| 29  | srv-irc  | true    | 1           |                |
++-----+----------+---------+-------------+----------------+
+|     | srv-db   | false   | 1           | none           |
++-----+----------+---------+-------------+----------------+
+| 22  | srv-dns1 | true    | 1           |                |
++-----+----------+---------+-------------+----------------+
+
+ +Now, only active at boot and running : +

+gocage list -f Config.Boot=1,Running=true -o JID,Name,Running,Config.Boot
++=====+==========+=========+=============+
+| JID | Name     | Running | Config.Boot |
++=====+==========+=========+=============+
+| 183 | test     | true    | 1           |
++-----+----------+---------+-------------+
+| 29  | srv-irc  | true    | 1           |
++-----+----------+---------+-------------+
+| 22  | srv-dns1 | true    | 1           |
++-----+----------+---------+-------------+
+
+ +Stop jails +---------- +`gocage stop test`