docs: Once over error correction

This commit is contained in:
tschettervictor
2025-04-10 06:53:03 -06:00
parent fbb1c5367f
commit 37be5e52c8
48 changed files with 306 additions and 228 deletions

View File

@@ -11,7 +11,7 @@ than the host system likely will NOT work at all. Bastille tries to filter for
valid release names. If you find it will not bootstrap a valid release, please
let us know.
In this document we will describe using the `bootstrap` sub-command with both
In this document we will describe using the ``bootstrap`` sub-command with both
releases and templates. We begin with releases.
Releases
@@ -20,7 +20,7 @@ Releases
Example
^^^^^^^
To `bootstrap` a FreeBSD release, run the bootstrap sub-command with the
To ``bootstrap`` a FreeBSD release, run the bootstrap sub-command with the
release version as the argument.
.. code-block:: shell
@@ -28,7 +28,7 @@ release version as the argument.
ishmael ~ # bastille bootstrap 14.0-RELEASE [update]
ishmael ~ # bastille bootstrap 13.2-RELEASE [update]
To `bootstrap` a HardenedBSD release, run the bootstrap sub-command with the
To ``bootstrap`` a HardenedBSD release, run the bootstrap sub-command with the
build version as the argument.
.. code-block:: shell
@@ -37,7 +37,7 @@ build version as the argument.
This command will ensure the required directory structures are in place and
download the requested release. For each requested release, `bootstrap` will
download the requested release. For each requested release, ``bootstrap`` will
download the base.txz. These files are verified (sha256 via MANIFEST file)
before they are extracted for use.
@@ -59,8 +59,8 @@ releases from the FTP archive.
Tips
^^^^
The `bootstrap` sub-command can now take (0.5.20191125+) an optional second
argument of "update". If this argument is used, `bastille update` will be run
The ``bootstrap`` sub-command can now take (0.5.20191125+) an optional second
argument of ``update``. If this argument is used, ``bastille update`` will be run
immediately after the bootstrap, effectively bootstrapping and applying
security patches and errata in one motion.
@@ -71,11 +71,11 @@ The bootstrap subcommand is generally only used once to prepare the system. The
only other use case for the bootstrap command is when a new FreeBSD version is
released and you want to start deploying containers on that version.
To update a release as patches are made available, see the `bastille update`
To update a release as patches are made available, see the ``bastille update``
command.
Downloaded artifacts are stored in the `bastille/cache/version` directory.
"bootstrapped" releases are stored in `bastille/releases/version`.
Downloaded artifacts are stored in the ``bastille/cache/version`` directory.
"bootstrapped" releases are stored in ``bastille/releases/version``.
To manually bootstrap a release (aka bring your own archive), place your
archive in bastille/cache/name and extract to bastille/releases/name. Your
@@ -111,7 +111,7 @@ Notes
If you don't want to bother with git to use templates you can create them
manually on the Bastille system and apply them.
Templates are stored in `bastille/templates/namespace/name`. If you'd like to
Templates are stored in ``bastille/templates/namespace/name``. If you'd like to
create a new template on your local system, simply create a new namespace
within the templates directory and then one for the template. This namespacing
allows users and groups to have templates without conflicting template names.
@@ -119,3 +119,11 @@ allows users and groups to have templates without conflicting template names.
Once you've created the directory structure you can begin filling it with
template hooks. Once you have a minimum number of hooks (at least one) you can
begin applying your template.
.. code-block:: shell
ishmael ~ # bastille bootstrap help
Usage: bastille bootstrap [option(s)] [RELEASE|TEMPLATE] [update|arch]
Options:
-x | --debug Enable debug mode.

View File

@@ -1,7 +1,7 @@
clone
=====
To clone a container and make a duplicate, use the `bastille clone`
To clone a container and make a duplicate, use the ``bastille clone``
sub-command..
.. code-block:: shell

View File

@@ -15,8 +15,9 @@ container are limited to the container.
.. code-block:: shell
"Usage: bastille console [option(s)] TARGET [user]"
Options:
ishmael ~ # bastille console help
Usage: bastille console [option(s)] TARGET [user]
Options:
-a | --auto Auto mode. Start/stop jail(s) if required.
-x | --debug Enable debug mode.

View File

@@ -15,8 +15,7 @@ Syntax requires only the target jail to convert.
ishmael ~ # bastille convert help
Usage: bastille convert [option(s)] TARGET
Options:
-a | --auto Auto mode. Start/stop jail(s) if required.
-x | --debug Enable debug mode.

View File

@@ -19,7 +19,7 @@ This command allows copying files from host to jail(s).
[folsom]:
/tmp/resolv.conf-cf -> /usr/local/bastille/jails/folsom/root/etc/resolv.conf
Unless you see errors reported in the output the `cp` was successful.
Unless you see errors reported in the output the ``cp`` was successful.
.. code-block:: shell

View File

@@ -55,9 +55,7 @@ the below help output.
.. code-block:: shell
ishmael ~ # bastille create help
Usage: bastille create [option(s)] NAME RELEASE IP_ADDRESS [interface]"
Options:
-B | --bridge Enables VNET, VNET containers are attached to a specified, already existing external bridge.
@@ -67,8 +65,11 @@ the below help output.
-L | --linux This option is intended for testing with Linux jails, this is considered experimental.
-M | --static-mac Generate a static MAC address for jail (VNET only).
--no-validate Do not validate the release when creating the jail.
--no-boot Create jail with boot=off.
-p | --priority VALUE Set priority value for jail.
-T | --thick Creates a thick container, they consume more space as they are self contained and independent.
-V | --vnet Enables VNET, VNET containers are attached to a virtual bridge interface for connectivity.
-v | --vlan VLANID Creates the jail with specified VLAN ID (VNET only).
-x | --debug Enable debug mode.
-Z | --zfs-opts [zfs,options] Comma separated list of ZFS options to create the jail with. This overrides the defaults.

View File

@@ -3,7 +3,7 @@ destroy
Jails can be destroyed and thrown away just as easily as they were
created. Note: containers must be stopped before destroyed. Using
the `-a|--auto` option will automatically stop the jail before destroying it.
the ``-a|--auto`` option will automatically stop the jail before destroying it.
.. code-block:: shell
@@ -24,6 +24,6 @@ will retain the releas cache directory, if you choose to keep it.
Options:
-a | --auto Auto mode. Start/stop jail(s) if required.
-f | --force Force unmount any mounted datasets when destroying a jail or release (ZFS only).
-c | --no-cache Do no destroy cache when destroying a release.
-f | --force Force unmount any mounted datasets when destroying a jail or release (ZFS only).
-x | --debug Enable debug mode.

View File

@@ -1,19 +1,18 @@
edit
====
To edit a jails configuration, use `bastille edit TARGET`.
To edit a jails configuration, use ``bastille edit TARGET``.
.. code-block:: shell
ishmael ~ # bastille edit azkaban [filename]
Syntax requires a target an optional filename. By default the file edited will
be `jail.conf`. Other common filenames are `fstab` or `rctl.conf`.
be ``jail.conf``. Other common filenames are ``fstab`` or ``rctl.conf``.
.. code-block:: shell
ishmael ~ # bastille edit help
Usage: bastille edit [option(s)] TARGET [filename]
Options:

View File

@@ -1,9 +1,9 @@
etcupdate
=========
This command will update the contents of `/etc` inside a jail. It should be run after a jail upgrade
This command will update the contents of ``/etc`` inside a jail. It should be run after a jail upgrade
First we need to bootstrap a release for `etcupdate` to use.
First we need to bootstrap a release for ``etcupdate`` to use.
.. code-block:: shell
@@ -15,20 +15,20 @@ First we need to bootstrap a release for `etcupdate` to use.
Building tarball, please wait...
Etcupdate bootstrap complete: 14.1-RELEASE
Next we can use the `update` command to apply the update to the jail.
Next we can use the ``update`` command to apply the update to the jail.
.. code-block:: shell
ishmael ~ # bastille etcupdate ishmael update 14.1-RELEASE
The output will show you which files were added, updated, changed, deleted, or have conflicts.
To automatically resolve the conflicts, run the `resolve` command.
To automatically resolve the conflicts, run the ``resolve`` command.
.. code-block:: shell
ishmael ~ # bastille etcupdate ishmael resolve
To show only the differences between the releases, use the `diff` command.
To show only the differences between the releases, use the ``diff`` command.
.. code-block:: shell

View File

@@ -10,7 +10,7 @@ container backups.
ishmael ~ # bastille export azkaban
The export sub-command supports both UFS and ZFS storage. ZFS based containers
will use ZFS snapshots. UFS based containers will use `txz` archives and they
will use ZFS snapshots. UFS based containers will use ``txz`` archives and they
can be exported only when the jail is not running.
.. code-block:: shell
@@ -21,6 +21,10 @@ Available options are:
.. code-block:: shell
ishmael ~ # bastille export help
Usage: bastille export [option(s)] TARGET PATH
Options:
--gz Export a ZFS jail using GZIP(.gz) compressed image.
-r | --raw Export a ZFS jail to an uncompressed RAW image.
-s | --safe Safely stop and start a ZFS jail before the exporting process.
@@ -28,3 +32,5 @@ Available options are:
--txz Export a jail using simple .txz compressed archive instead.
-v | --verbose Be more verbose during the ZFS send operation.
--xz Export a ZFS jail using XZ(.xz) compressed image.
Note: If no export option specified, the container should be redirected to standard output.

View File

@@ -1,7 +1,7 @@
htop
====
This command runs `htop` in the targeted jail.
This command runs ``htop`` in the targeted jail.
Requires htop to be installed in the jail.
.. image:: ../../images/htop.png

View File

@@ -8,10 +8,19 @@ Import a container backup image or archive.
ishmael ~ # bastille import /path/to/archive.file
The import sub-command supports both UFS and ZFS storage. ZFS based containers
will use ZFS snapshots. UFS based containers will use `txz` archives.
will use ZFS snapshots. UFS based containers will use ``txz`` archives.
To import to a specified release, specify it as the last argument.
.. code-block:: shell
Usage: bastille import [option(s)] file [RELEASE]
ishmael ~ # bastille import help
Usage: bastille import [option(s)] FILE [RELEASE]
Options:
-f | --force Force an archive import regardless if the checksum file does not match or missing.
-M | --static-mac Generate static MAC for jail when importing foreign jails like iocage.
-v | --verbose Be more verbose during the ZFS receive operation.
-x | --debug Enable debug mode.
Tip: If no option specified, container should be imported from standard input.

View File

@@ -17,7 +17,7 @@ This command allows copying files from jail to jail(s).
[folsom]:
/usr/local/bastille/jails/bastion/root/tmp/resolv.conf-cf -> /usr/local/bastille/jails/folsom/root/etc/resolv.conf
Unless you see errors reported in the output the `jcp` was successful.
Unless you see errors reported in the output the ``jcp`` was successful.
.. code-block:: shell

View File

@@ -3,18 +3,17 @@ limits
Set resourse limits for targeted jail(s).
To add a limit, use `bastille limits TARGET add OPTION VALUE`
To add a limit, use ``bastille limits TARGET add OPTION VALUE``
To clear the limits from the system, use `bastille limits TARGET clear`
To clear the limits from the system, use ``bastille limits TARGET clear``
To clear the limits, and remove the rctl.conf, use `bastille limits TARGET reset`
To clear the limits, and remove the rctl.conf, use ``bastille limits TARGET reset``
To remove a limit, use `bastille limits TARGET remove OPTION`
To remove a limit, use ``bastille limits TARGET remove OPTION``
.. code-block:: shell
ishmael ~ # bastille limits help
Usage: bastille limits [option(s)] TARGET [add OPTION VALUE|remove OPTION|clear|reset|[list|show] (active)|stats]
Example: bastille limits TARGET add memoryuse 1G"

View File

@@ -1,13 +1,15 @@
list
====
List jails, ports, releases, templates, logs, limits managed by bastille.
List jails, ports, releases, templates, logs, limits, exports and imports managed by bastille.
.. code-block:: shell
ishmael ~ # bastille list help
Usage: bastille list [option(s)] [-j|-a] [RELEASE [-p] [template] [JAIL|CONTAINER] [log] [limit] [import] [export] [backup]"
Usage: bastille list [option(s)] [-j|-a] [RELEASE (-p)|template|jails|logs|limits|imports|exports|backups]
Options:
-a | --all List all jails, running and stopped, in BastilleBSD format.
-j | --json List jails in json format.
-x | --debug Enable debug mode.

View File

@@ -1,15 +1,15 @@
mount
=====
To mount storage within the container use `bastille mount`.
To mount storage within the container use ``bastille mount``.
Syntax follows standard `/etc/fstab` format:
Syntax follows standard ``/etc/fstab`` format:
.. code-block:: shell
Usage: bastille mount TARGET HOST_PATH JAIL_PATH [filesystem_type options dump pass_number]
The 'options' string can include a comma-separated list of mount options, but must include one of (rw,ro,rq,sw,xx) according to fstab documentation.
The ``options`` string can include a comma-separated list of mount options, but must include one of (rw,ro,rq,sw,xx) according to fstab documentation.
Example: Mount a tmpfs filesystem with options.
.. code-block:: shell
@@ -50,4 +50,13 @@ It is possible to do the same for the jail path, but again, not recommemded.
ishmael ~ # bastille mount azkaban "/storage/my\ directory\ with\ spaces" /media/foo nullfs ro 0 0
[azkaban]:
Added: /storage/my\040directory\040with\040spaces /usr/local/bastille/jails/azkaban/root/media/foo nullfs ro 0 0
Add
.. code-block:: shell
ishmael ~ # bastille mount help
Usage: bastille mount [option(s)] TARGET HOST_PATH JAIL_PATH [filesystem_type options dump pass_number]
Options:
-a | --auto Auto mode. Start/stop jail(s) if required.
-x | --debug Enable debug mode.

View File

@@ -7,13 +7,13 @@ You can only add an interface once to a jail, with two exceptions.
1. For classic jails, you can add an interface as many times as you want, but each time with a different IP. All this does is add the IP as another alias on that interface.
2. For VNET jails, if the `-v|--vlan` switch is given along with a numerical VLAN ID, Bastille will add the VLAN ID to the jail as a vnetX.X interface, depending on which interface is specified.
2. For VNET jails, if the ``-v|--vlan`` switch is given along with a numerical VLAN ID, Bastille will add the VLAN ID to the jail as a vnetX.X interface, depending on which interface is specified.
Bridges and VNET interfaces can be added to VNET jails, no matter if they were created with `-V` or `-B`.
Bridges and VNET interfaces can be added to VNET jails, no matter if they were created with ``-V`` or ``-B``.
It is possible to passthrough an entire interface from the host to the jail using the `-P|--passthrough` option. This will make the interface fully available without the need for additional configuration. It will be available inside the jail just like it would be on the host. Adding an interface using this method will render it only available inside the jail. It will not be present on the host until the jail is stopped.
It is possible to passthrough an entire interface from the host to the jail using the ``-P|--passthrough`` option. This will make the interface fully available without the need for additional configuration. It will be available inside the jail just like it would be on the host. Adding an interface using this method will render it only available inside the jail. It will not be present on the host until the jail is stopped.
When cloning a jail that has a `-P|--passthrough` interface, you will have warnings when running both jails at the same time. The first jail to start will be assigned the interface, and since it will no longer be available to the host, it will not be possible to add it to the second jail. To solve this, you must manually remove the interface from the jail.conf file, or running `bastille network TARGET remove INTERFACE` while both jails are stopped.
When cloning a jail that has a ``-P|--passthrough`` interface, you will have warnings when running both jails at the same time. The first jail to start will be assigned the interface, and since it will no longer be available to the host, it will not be possible to add it to the second jail. To solve this, you must manually remove the interface from the jail.conf file, or running ``bastille network TARGET remove INTERFACE`` while both jails are stopped.
.. code-block:: shell

View File

@@ -20,9 +20,9 @@ Manage binary packages inside jails.
...[snip]...
The PKG sub-command can do more than just `install`. The
The PKG sub-command can do more than just ``install``. The
expectation is that you can fully leverage the pkg manager. This means,
`install`, `update`, `upgrade`, `audit`, `clean`, `autoremove`, etc...
``install``, ``update``, ``upgrade``, ``audit``, ``clean``, ``autoremove``, etc...
.. code-block:: shell
@@ -107,7 +107,7 @@ expectation is that you can fully leverage the pkg manager. This means,
.. code-block:: shell
ishmael ~ # bastille pkg help
Usage: bastille pkg [option(s)] TARGET COMMAND args
Usage: bastille pkg [option(s)] TARGET COMMAND ARGS
Options:
-a | --auto Auto mode. Start/stop jail(s) if required.

View File

@@ -9,7 +9,7 @@ This command allows copying files from jail to host.
[bastion]:
/usr/local/bastille/jails/bastion/root/test/testfile.txt -> /tmp/testfile.txt
Unless you see errors reported in the output the `rcp` was successful.
Unless you see errors reported in the output the ``rcp`` was successful.
.. code-block:: shell

View File

@@ -1,9 +1,9 @@
rdr
===
`bastille rdr` allows you to configure dynamic rdr rules for your containers
without modifying pf.conf (assuming you are using the `bastille0` interface
for a private network and have enabled `rdr-anchor 'rdr/*'` in /etc/pf.conf
``bastille rdr`` allows you to configure dynamic rdr rules for your containers
without modifying pf.conf (assuming you are using the ``bastille0`` interface
for a private network and have enabled ``rdr-anchor 'rdr/*'`` in /etc/pf.conf
as described in the Networking section).
Note: you need to be careful if host services are configured to run
@@ -30,7 +30,7 @@ specify the interface they run on in rc.conf (or other config files)
# bastille rdr dev1 clear
nat cleared
The `rdr` command includes 4 additional options:
The ``rdr`` command includes 4 additional options:
.. code-block:: shell
@@ -65,7 +65,7 @@ The `rdr` command includes 4 additional options:
The options can be used together, as seen above.
If you have multiple interfaces assigned to your jail, `bastille rdr` will
If you have multiple interfaces assigned to your jail, ``bastille rdr`` will
only redirect using the default one.
.. code-block:: shell

View File

@@ -1,7 +1,7 @@
rename
======
Rename a container.
Rename a jail.
.. code-block:: shell
@@ -9,7 +9,7 @@ Rename a container.
.. code-block:: shell
ishmael ~ # bastille rename azkaban arkham
ishmael ~ # bastille rename help
Usage: bastille rename [option(s)] TARGET NEW_NAME
Options:

View File

@@ -1,7 +1,7 @@
restart
=======
To restart a container you can use the `bastille restart` command.
Restart jail(s).
.. code-block:: shell
@@ -11,3 +11,14 @@ To restart a container you can use the `bastille restart` command.
[folsom]:
folsom: created
.. code-block:: shell
ishmael ~ # bastille restart help
Usage: bastille start [option(s)] TARGET
Options:
-b | --boot Respect jail boot setting.
-d | --delay VALUE Time to wait between starting each jail.
-v | --verbose Print every action on jail start.
-x | --debug Enable debug mode.

View File

@@ -1,7 +1,7 @@
service
=======
The `service` sub-command allows for managing services within jails. This
The ``service`` sub-command allows for managing services within jails. This
allows you to start, stop, restart, and otherwise interact with services
running inside the jail(s).

View File

@@ -1,7 +1,7 @@
setup
=====
The `setup` sub-command attempts to automatically configure a host system for
The ``setup`` sub-command attempts to automatically configure a host system for
Bastille containers. This allows you to configure networking, firewall, and storage
options for a Bastille host with one command.

View File

@@ -1,7 +1,7 @@
start
=====
To start a container you can use the `bastille start` command.
Start jail(s).
.. code-block:: shell
@@ -15,5 +15,7 @@ To start a container you can use the `bastille start` command.
Usage: bastille start [option(s)] TARGET
Options:
-v | --verbose Print every action on jail start.
-x | --debug Enable debug mode.
-b | --boot Respect jail boot setting.
-d | --delay VALUE Time to wait between starting each jail.
-v | --verbose Print every action on jail start.
-x | --debug Enable debug mode.

View File

@@ -1,7 +1,7 @@
stop
====
To stop a container you can use the `bastille stop` command.
Stop jail(s).
.. code-block:: shell
@@ -15,5 +15,7 @@ To stop a container you can use the `bastille stop` command.
Usage: bastille stop [option(s)] TARGET
Options:
-v | --verbose Print every action on jail stop.
-x | --debug Enable debug mode.
-b | --boot Respect jail boot setting.
-d | --delay VALUE Time to wait between stopping each jail.
-v | --verbose Print every action on jail stop.
-x | --debug Enable debug mode.

View File

@@ -1,7 +1,7 @@
sysrc
=====
The `sysrc` sub-command allows for safely editing system configuration files.
The ``sysrc`` sub-command allows for safely editing system configuration files.
In jail terms, this allows us to toggle on/off services and options at startup.
.. code-block:: shell
@@ -10,13 +10,12 @@ In jail terms, this allows us to toggle on/off services and options at startup.
[nginx]:
nginx_enable: NO -> YES
See `man sysrc(8)` for more info.
See ``man sysrc(8)`` for more info.
.. code-block:: shell
ishmael ~ # bastille sysrc help
Usage: bastille sysrc [option(s)] TARGET args
cat << EOF
Options:
-a | --auto Auto mode. Start/stop jail(s) if required.

View File

@@ -1,7 +1,7 @@
tags
====
The `tags` sub-command adds, removes or lists arbitrary tags on your jail(s).
The ``tags`` sub-command adds, removes or lists arbitrary tags on your jail(s).
.. code-block:: shell
@@ -14,9 +14,7 @@ The `tags` sub-command adds, removes or lists arbitrary tags on your jail(s).
.. code-block:: shell
ishmael ~ # bastille tags help
Usage: bastille tags TARGET [add|delete|list] [tag1,tag2]
Options:
-x | --debug Enable debug mode.

View File

@@ -7,8 +7,8 @@ Run preconfigured template files inside targeted jail(s).
ishmael ~ # bastille template azkaban project/template
Templates should be structured in `project/template/Bastillefile` format, and placed in the template
directory, which defaults to `/usr/local/bastille/templates`. The Bastillefile should contain the template
Templates should be structured in ``project/template/Bastillefile`` format, and placed in the template
directory, which defaults to ``/usr/local/bastille/templates``. The Bastillefile should contain the template
hooks. See the chapter called Template for a list of supported hooks.
.. code-block:: shell

View File

@@ -1,7 +1,7 @@
top
===
This command runs `top` in the targeted jail.
This command runs ``top`` in the targeted jail.
.. image:: ../../images/top.png

View File

@@ -1,7 +1,7 @@
umount
======
To unmount storage from a container use `bastille umount`.
Unmount storage from jail(s).
.. code-block:: shell
@@ -25,3 +25,12 @@ If the directory you are unmounting has spaces, make sure to escape them with a
ishmael ~ # bastille umount azkaban "/media/foo\ with\ spaces"
[azkaban]:
Unmounted: /usr/local/bastille/jails/jail4/root/media/foo with spaces
.. code-block:: shell
ishmael ~ # bastille umount help
Usage: bastille umount [option(s)] TARGET JAIL_PATH
Options:
-a | --auto Auto mode. Start/stop jail(s) if required.
-x | --debug Enable debug mode.

View File

@@ -1,7 +1,7 @@
update
======
The `update` command targets a release or a thick jail. Because thin jails are
The ``update`` command targets a release or a thick jail. Because thin jails are
based on a release, when the release is updated all the thin jails are automatically
updated as well.
@@ -40,3 +40,13 @@ To be safe, you may want to restart any jails that have been updated live.
If the jail is a thin jail, an error will be shown. If it is a thick jail, it will be updated just like
the release shown above.
.. code-block:: shell
ishmael ~ # bastille update help
Usage: bastille update [option(s)] TARGET
Options:
-a | --auto Auto mode. Start/stop jail(s) if required.
-f | --force Force update a release.
-x | --debug Enable debug mode.

View File

@@ -1,7 +1,7 @@
upgrade
=======
The `upgrade` command targets a thick or thin jail. Thin jails will be updated by changing the
The ``upgrade`` command targets a thick or thin jail. Thin jails will be updated by changing the
release mount point that it is based on. Thick jails will be upgraded normally.
.. code-block:: shell

View File

@@ -35,9 +35,8 @@ the release or template .
.. code-block:: shell
ishmael ~ # bastille verify 11.2-RELEASE
ishmael ~ # bastille verify help
Usage: bastille verify [RELEASE|TEMPLATE]
Options:
-x | --debug Enable debug mode.

View File

@@ -7,7 +7,6 @@ Manage ZFS properties, ceate and destroy snapshots, and check ZFS usage for targ
ishmael ~ # bastille zfs help
Usage: bastille zfs TARGET [set|get|snap|destroy_snap|df|usage] [key=value|date]
Options:
-x | --debug Enable debug mode.