Files
hackacad/docs/chapters/targeting.rst

65 lines
4.0 KiB
ReStructuredText
Raw Normal View History

2018-11-24 20:07:20 -07:00
Targeting
=========
2020-07-13 19:27:23 -06:00
Bastille uses a `command target arguments` syntax, meaning that each command
2019-11-20 19:16:21 -07:00
requires a target. Targets are usually containers, but can also be releases.
2020-07-13 19:27:23 -06:00
Targeting a container is done by providing the exact containers name.
2020-07-13 19:27:23 -06:00
Targeting a release is done by providing the release name. (Note: do not
include the `-pX` point-release version.)
2019-11-20 19:16:21 -07:00
Bastille includes a pre-defined keyword ALL to target all running containers.
In the future I would like to support more options, including globbing, lists
and regular-expressions.
2019-11-20 19:16:21 -07:00
Examples: Containers
====================
.. code-block:: shell
ishmael ~ # bastille ...
+-----------+--------+------------------+-------------------------------------------------------------+
| command | target | args | description |
+===========+========+==================+=============================================================+
2019-11-20 19:16:21 -07:00
| cmd | ALL | 'sockstat -4' | execute `sockstat -4` in ALL containers (ip4 sockets) |
2020-04-14 11:52:29 +02:00
+-----------+--------+-----+------------+-------------------------------------------------------------+
| console | mariadb02 | --- | console (shell) access to mariadb02 |
+----+------+--------+-----+------------+-------------------------------------------------------------+
2019-11-20 19:16:21 -07:00
| pkg | web01 | 'install nginx' | install nginx package in web01 container |
+-----------+--------+------------------+-------------------------------------------------------------+
2019-11-20 19:16:21 -07:00
| pkg | ALL | upgrade | upgrade packages in ALL containers |
2020-04-14 11:52:29 +02:00
+-----------+--------+------------------+-------------------------------------------------------------+
2019-11-20 19:16:21 -07:00
| pkg | ALL | audit | (CVE) audit packages in ALL containers |
2020-04-14 11:52:29 +02:00
+-----------+--------+------------------+-------------------------------------------------------------+
2019-11-20 19:16:21 -07:00
| sysrc | web01 | nginx_enable=YES | execute `sysrc nginx_enable=YES` in web01 container |
2020-04-14 11:52:29 +02:00
+-----------+--------+------------------+-------------------------------------------------------------+
2019-11-20 19:16:21 -07:00
| template | ALL | username/base | apply `username/base` template to ALL containers |
2020-04-14 11:52:29 +02:00
+-----------+--------+------------------+-------------------------------------------------------------+
2019-11-20 19:16:21 -07:00
| start | web02 | --- | start web02 container |
2020-04-14 11:52:29 +02:00
+----+------+----+---+------------------+--------------+----------------------------------------------+
| cp | bastion03 | /tmp/resolv.conf-cf etc/resolv.conf | copy host-path to container-path in bastion03|
+----+------+----+---+---------------------------------+----------------------------------------------+
| create | folsom | 13.2-RELEASE 10.17.89.10 | create 13.2 container named `folsom` with IP |
+-----------+--------+---------------------------------+----------------------------------------------+
Examples: Releases
==================
.. code-block:: shell
ishmael ~ # bastille ...
+-----------+--------------+--------------+-------------------------------------------------------------+
| command | target | args | description |
+===========+==============+==============+=============================================================+
| bootstrap | 13.2-RELEASE | --- | bootstrap 13.2-RELEASE release |
2020-04-14 11:52:29 +02:00
+-----------+--------------+--------------+-------------------------------------------------------------+
| update | 12.4-RELEASE | --- | update 12.4-RELEASE release |
2020-04-14 11:52:29 +02:00
+-----------+--------------+--------------+-------------------------------------------------------------+
| verify | 12.4-RELEASE | --- | verify 12.4-RELEASE release |
2020-04-14 11:52:29 +02:00
+-----------+--------------+--------------+-------------------------------------------------------------+