2012-02-25 21:51:46 +00:00
|
|
|
=======
|
|
|
|
FreeBSD
|
|
|
|
=======
|
2012-02-25 21:15:11 +00:00
|
|
|
|
2012-02-25 21:41:27 +00:00
|
|
|
Salt was added to the FreeBSD ports tree Dec 26th, 2011 by Christer Edwards
|
2015-09-15 03:34:35 +00:00
|
|
|
<christer.edwards@gmail.com>. It has been tested on FreeBSD 7.4, 8.2, 9.0,
|
|
|
|
9.1, 10.0 and later releases.
|
2012-02-25 21:41:27 +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
|
|
|
|
configuration is needed to pull from these repositories.
|
2014-04-10 15:03:00 +00:00
|
|
|
|
2015-09-15 03:34:35 +00:00
|
|
|
.. code-block:: shell
|
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.
|
|
|
|
|
|
|
|
SaltStack repo
|
|
|
|
==============
|
|
|
|
|
|
|
|
SaltStack also hosts internal binary builds of the Salt package, available from
|
|
|
|
http://repo.saltstack.org/freebsd/. To make use of this repository, add the
|
|
|
|
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:**
|
|
|
|
|
|
|
|
.. code-block:: json
|
|
|
|
|
|
|
|
saltstack: {
|
|
|
|
url: "http://repo.saltstack.org/freebsd/${ABI}/",
|
|
|
|
mirror_type: "srv",
|
|
|
|
enabled: yes
|
|
|
|
priority: 10
|
|
|
|
}
|
|
|
|
|
|
|
|
You should now be able to install Salt from this new repository:
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
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
|
|
|
|
2015-09-15 03:34:35 +00:00
|
|
|
.. code-block:: shell
|
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
|
|
|
|
2015-09-15 03:34:35 +00:00
|
|
|
.. code-block:: shell
|
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
|
|
|
|
2015-09-15 03:34:35 +00:00
|
|
|
.. code-block:: shell
|
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
|
|
|
|
2015-09-15 03:34:35 +00:00
|
|
|
.. code-block:: shell
|
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
|
|
|
|
2015-09-15 03:34:35 +00:00
|
|
|
.. code-block:: shell
|
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
|
|
|
|
2015-09-15 03:34:35 +00:00
|
|
|
.. code-block:: shell
|
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
|
|
|
|
2014-02-26 20:28:13 +00:00
|
|
|
Now go to the :doc:`Configuring Salt</ref/configuration/index>` page.
|