mirror of
https://github.com/hackacad/bastille.git
synced 2026-01-04 11:43:48 +01:00
docs: Add centarlized-assets
This commit is contained in:
76
docs/chapters/centralized-assets.rst
Normal file
76
docs/chapters/centralized-assets.rst
Normal file
@@ -0,0 +1,76 @@
|
||||
Centralized Assets
|
||||
==================
|
||||
|
||||
Sometimes it is preferable to share applications, libraries, packages or even directories
|
||||
and files across multiple jails.
|
||||
|
||||
Or perhaps we just want to avoid all the time it takes to create a jail, and manully configure
|
||||
it with the packages we normally use.
|
||||
|
||||
Bastille offers a number of ways to do the above.
|
||||
|
||||
Templates
|
||||
---------
|
||||
|
||||
A template is a predefined file containing instructions to execute on a targeted jail. This
|
||||
is one of the easiest ways to create a repeatable environment for your Bastille jails. Simply
|
||||
create your template, the execute it on as many jails as you prefer.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
ishmael ~ # bastille template "jail1 jail2" project/template
|
||||
|
||||
See the chapter on templates for details on how to create your own templates.
|
||||
|
||||
Mounting
|
||||
--------
|
||||
|
||||
On of the fastest ways to share directories and files across multiple jails is with
|
||||
the ``bastille mount`` command.
|
||||
|
||||
The following command will mount ``/my/host/directory`` into ``jail1`` and ``jail2``
|
||||
at ``/my/jail/directory`` with read and write access. To mount with read only access,
|
||||
simply use ``ro`` instead of ``rw`` as the option.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
ishmael ~ # bastille mount "jail1 jail2" /my/host/directory /my/jail/directory nullfs rw 0 0
|
||||
|
||||
Cloning
|
||||
-------
|
||||
|
||||
Bastille allows you to create a full duplicate of your jail using ``bastille clone``. To clone
|
||||
your jail to a duplicate jail, use the following command.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
ishmael ~ # bastille clone myjail mynewjail 10.0.0.3
|
||||
|
||||
This will create an exact duplicate of ``myjail`` at ``mynewjail``.
|
||||
|
||||
Custom Releases
|
||||
---------------
|
||||
|
||||
Bastille allows creating custom releases from jails, then using those releases to create
|
||||
more jails.
|
||||
|
||||
To start, we must first create our jail. Make sure it is a thick jail, as this process will
|
||||
not work with any other jail types.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
ishmael ~ # bastille create -T myjail 14.2-RELEASE 10.0.0.1
|
||||
|
||||
Once the jail is up and running, configure it to your liking, then run the followin commmand
|
||||
to create a custom release based on your jail.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
ishmael ~ # bastille convert myjail myrelease
|
||||
|
||||
Once this process completes, you will be able to run the following command to create a jail
|
||||
base off your newly created release.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
ishmael ~ # bastille create -T --no-validate myjail myrelease 10.0.0.2
|
||||
@@ -19,6 +19,7 @@ https://docs.bastillebsd.org.
|
||||
chapters/networking
|
||||
chapters/usage
|
||||
chapters/upgrading
|
||||
chapters/centralized-assets
|
||||
chapters/subcommands/index
|
||||
chapters/template
|
||||
chapters/jail-config
|
||||
|
||||
Reference in New Issue
Block a user