2012-02-25 21:51:46 +00:00
|
|
|
=======
|
|
|
|
FreeBSD
|
|
|
|
=======
|
2012-02-25 21:15:11 +00:00
|
|
|
|
2015-09-15 03:34:35 +00:00
|
|
|
Installation
|
|
|
|
============
|
2012-02-25 21:41:27 +00:00
|
|
|
|
2015-09-15 03:34:35 +00:00
|
|
|
Salt is available in binary package form from both the FreeBSD pkgng repository
|
|
|
|
or directly from SaltStack. The instructions below outline installation via
|
|
|
|
both methods:
|
2012-02-25 21:41:27 +00:00
|
|
|
|
2015-09-15 03:34:35 +00:00
|
|
|
FreeBSD repo
|
2012-02-25 21:41:27 +00:00
|
|
|
============
|
|
|
|
|
2015-09-15 03:34:35 +00:00
|
|
|
The FreeBSD pkgng repository is preconfigured on systems 10.x and above. No
|
2016-03-01 15:36:23 +00:00
|
|
|
configuration is needed to pull from these repositories.
|
2014-04-10 15:03:00 +00:00
|
|
|
|
2018-05-28 21:13:12 +00:00
|
|
|
.. code-block:: bash
|
2014-04-10 15:03:00 +00:00
|
|
|
|
|
|
|
pkg install py27-salt
|
|
|
|
|
2015-09-15 03:34:35 +00:00
|
|
|
These packages are usually available within a few days of upstream release.
|
|
|
|
|
2015-09-23 20:01:20 +00:00
|
|
|
.. _freebsd-upstream:
|
|
|
|
|
2015-09-15 03:34:35 +00:00
|
|
|
SaltStack repo
|
|
|
|
==============
|
|
|
|
|
|
|
|
SaltStack also hosts internal binary builds of the Salt package, available from
|
2015-11-02 16:26:25 +00:00
|
|
|
https://repo.saltstack.com/freebsd/. To make use of this repository, add the
|
2015-09-15 03:34:35 +00:00
|
|
|
following file to your system:
|
2012-02-29 20:41:38 +00:00
|
|
|
|
2015-09-15 03:34:35 +00:00
|
|
|
**/usr/local/etc/pkg/repos/saltstack.conf:**
|
|
|
|
|
2018-05-28 21:13:12 +00:00
|
|
|
.. code-block:: text
|
2015-09-15 03:34:35 +00:00
|
|
|
|
|
|
|
saltstack: {
|
2015-11-02 16:26:25 +00:00
|
|
|
url: "https://repo.saltstack.com/freebsd/${ABI}/",
|
2015-09-15 03:34:35 +00:00
|
|
|
enabled: yes
|
|
|
|
}
|
|
|
|
|
|
|
|
You should now be able to install Salt from this new repository:
|
|
|
|
|
2018-05-28 21:13:12 +00:00
|
|
|
.. code-block:: bash
|
2015-09-15 03:34:35 +00:00
|
|
|
|
|
|
|
pkg install py27-salt
|
2012-02-25 21:41:27 +00:00
|
|
|
|
2015-09-15 03:34:35 +00:00
|
|
|
These packages are usually available earlier than upstream FreeBSD. Also
|
|
|
|
available are release candidates and development releases. Use these pre-release
|
|
|
|
packages with caution.
|
2012-02-25 21:41:27 +00:00
|
|
|
|
2012-11-25 16:23:01 +00:00
|
|
|
Post-installation tasks
|
|
|
|
=======================
|
2012-02-25 21:41:27 +00:00
|
|
|
|
2012-11-25 16:23:01 +00:00
|
|
|
**Master**
|
2012-02-25 21:41:27 +00:00
|
|
|
|
2012-11-25 16:23:01 +00:00
|
|
|
Copy the sample configuration file:
|
2012-02-29 20:41:38 +00:00
|
|
|
|
2018-05-28 21:13:12 +00:00
|
|
|
.. code-block:: bash
|
2012-02-25 21:41:27 +00:00
|
|
|
|
|
|
|
cp /usr/local/etc/salt/master.sample /usr/local/etc/salt/master
|
|
|
|
|
|
|
|
**rc.conf**
|
|
|
|
|
2015-09-15 03:34:35 +00:00
|
|
|
Activate the Salt Master in ``/etc/rc.conf``:
|
2012-02-28 04:19:29 +00:00
|
|
|
|
2018-05-28 21:13:12 +00:00
|
|
|
.. code-block:: bash
|
2012-02-25 21:41:27 +00:00
|
|
|
|
2015-09-15 03:34:35 +00:00
|
|
|
sysrc salt_master_enable="YES"
|
2012-02-25 21:41:27 +00:00
|
|
|
|
2012-02-29 20:41:38 +00:00
|
|
|
**Start the Master**
|
|
|
|
|
2012-11-25 16:23:01 +00:00
|
|
|
Start the Salt Master as follows:
|
2012-02-29 20:41:38 +00:00
|
|
|
|
2018-05-28 21:13:12 +00:00
|
|
|
.. code-block:: bash
|
2012-02-25 21:41:27 +00:00
|
|
|
|
|
|
|
service salt_master start
|
|
|
|
|
2012-11-25 16:23:01 +00:00
|
|
|
**Minion**
|
2012-02-25 21:41:27 +00:00
|
|
|
|
2012-11-25 16:23:01 +00:00
|
|
|
Copy the sample configuration file:
|
2012-02-25 21:41:27 +00:00
|
|
|
|
2018-05-28 21:13:12 +00:00
|
|
|
.. code-block:: bash
|
2012-02-25 21:41:27 +00:00
|
|
|
|
2012-11-25 16:23:01 +00:00
|
|
|
cp /usr/local/etc/salt/minion.sample /usr/local/etc/salt/minion
|
2012-02-25 21:41:27 +00:00
|
|
|
|
|
|
|
**rc.conf**
|
|
|
|
|
2015-09-15 03:34:35 +00:00
|
|
|
Activate the Salt Minion in ``/etc/rc.conf``:
|
2012-02-28 04:19:29 +00:00
|
|
|
|
2018-05-28 21:13:12 +00:00
|
|
|
.. code-block:: bash
|
2012-02-25 21:41:27 +00:00
|
|
|
|
2015-09-15 03:34:35 +00:00
|
|
|
sysrc salt_minion_enable="YES"
|
2012-02-25 21:41:27 +00:00
|
|
|
|
2012-11-25 16:23:01 +00:00
|
|
|
**Start the Minion**
|
2012-02-25 21:41:27 +00:00
|
|
|
|
2012-11-25 16:23:01 +00:00
|
|
|
Start the Salt Minion as follows:
|
2012-02-29 20:41:38 +00:00
|
|
|
|
2018-05-28 21:13:12 +00:00
|
|
|
.. code-block:: bash
|
2012-02-25 21:41:27 +00:00
|
|
|
|
2012-11-25 16:23:01 +00:00
|
|
|
service salt_minion start
|
2012-02-25 21:41:27 +00:00
|
|
|
|
2016-12-15 23:50:16 +00:00
|
|
|
Now go to the :ref:`Configuring Salt<configuring-salt>` page.
|