2012-09-06 04:12:17 +00:00
|
|
|
=======
|
|
|
|
Solaris
|
|
|
|
=======
|
|
|
|
|
2012-12-22 03:39:22 +00:00
|
|
|
Salt was added to the OpenCSW package repository in September of 2012 by Romeo
|
|
|
|
Theriault <romeot@hawaii.edu> at version 0.10.2 of Salt. It has mainly been
|
|
|
|
tested on Solaris 10 (sparc), though it is built for and has been tested
|
|
|
|
minimally on Solaris 10 (x86), Solaris 9 (sparc/x86) and 11 (sparc/x86).
|
|
|
|
(Please let me know if you're using it on these platforms!) Most of the testing
|
|
|
|
has also just focused on the minion, though it has verified that the master
|
|
|
|
starts up successfully on Solaris 10.
|
2012-09-06 04:12:17 +00:00
|
|
|
|
2014-12-11 03:35:09 +00:00
|
|
|
Comments and patches for better support on these platforms is very welcome.
|
2012-10-02 02:49:32 +00:00
|
|
|
|
2013-03-18 19:59:27 +00:00
|
|
|
As of version 0.10.4, Solaris is well supported under salt, with all of the
|
2012-12-22 03:39:22 +00:00
|
|
|
following working well:
|
2012-10-02 02:49:32 +00:00
|
|
|
|
2012-10-26 06:13:10 +00:00
|
|
|
1. remote execution
|
|
|
|
2. grain detection
|
2014-12-11 03:35:09 +00:00
|
|
|
3. service control with SMF
|
2012-10-26 06:13:10 +00:00
|
|
|
4. 'pkg' states with 'pkgadd' and 'pkgutil' modules
|
|
|
|
5. cron modules/states
|
|
|
|
6. user and group modules/states
|
|
|
|
7. shadow password management modules/states
|
2012-09-06 04:12:17 +00:00
|
|
|
|
2012-12-22 03:39:22 +00:00
|
|
|
Salt is dependent on the following additional packages. These will
|
2014-07-14 17:37:13 +00:00
|
|
|
automatically be installed as dependencies of the ``py_salt`` package:
|
|
|
|
|
|
|
|
- py_yaml
|
|
|
|
- py_pyzmq
|
|
|
|
- py_jinja2
|
|
|
|
- py_msgpack_python
|
|
|
|
- py_m2crypto
|
|
|
|
- py_crypto
|
|
|
|
- python
|
2012-09-06 04:12:17 +00:00
|
|
|
|
|
|
|
Installation
|
|
|
|
============
|
|
|
|
|
2012-12-22 03:39:22 +00:00
|
|
|
To install Salt from the OpenCSW package repository you first need to install
|
|
|
|
`pkgutil`_ assuming you don't already have it installed:
|
2012-09-06 04:12:17 +00:00
|
|
|
|
|
|
|
On Solaris 10:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
pkgadd -d http://get.opencsw.org/now
|
|
|
|
|
|
|
|
On Solaris 9:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
wget http://mirror.opencsw.org/opencsw/pkgutil.pkg
|
|
|
|
pkgadd -d pkgutil.pkg all
|
|
|
|
|
2012-12-22 03:39:22 +00:00
|
|
|
Once pkgutil is installed you'll need to edit it's config file
|
|
|
|
``/etc/opt/csw/pkgutil.conf`` to point it at the unstable catalog:
|
2012-09-06 04:12:17 +00:00
|
|
|
|
|
|
|
.. code-block:: diff
|
|
|
|
|
|
|
|
- #mirror=http://mirror.opencsw.org/opencsw/testing
|
|
|
|
+ mirror=http://mirror.opencsw.org/opencsw/unstable
|
|
|
|
|
2013-03-18 19:59:27 +00:00
|
|
|
OK, time to install salt.
|
2012-09-06 04:12:17 +00:00
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
# Update the catalog
|
|
|
|
root> /opt/csw/bin/pkgutil -U
|
|
|
|
# Install salt
|
|
|
|
root> /opt/csw/bin/pkgutil -i -y py_salt
|
|
|
|
|
|
|
|
Minion Configuration
|
2012-10-04 21:00:26 +00:00
|
|
|
====================
|
2012-09-06 04:12:17 +00:00
|
|
|
|
2012-12-22 03:39:22 +00:00
|
|
|
Now that salt is installed you can find it's configuration files in
|
|
|
|
``/etc/opt/csw/salt/``.
|
2012-09-06 04:12:17 +00:00
|
|
|
|
2012-12-22 03:39:22 +00:00
|
|
|
You'll want to edit the minion config file to set the name of your salt master
|
|
|
|
server:
|
2012-09-06 04:12:17 +00:00
|
|
|
|
|
|
|
.. code-block:: diff
|
|
|
|
|
|
|
|
- #master: salt
|
|
|
|
+ master: your-salt-server
|
|
|
|
|
2012-12-22 03:39:22 +00:00
|
|
|
If you would like to use `pkgutil`_ as the default package provider for your
|
|
|
|
Solaris minions, you can do so using the :conf_minion:`providers` option in the
|
|
|
|
minion config file.
|
|
|
|
|
2012-09-06 04:12:17 +00:00
|
|
|
You can now start the salt minion like so:
|
|
|
|
|
|
|
|
On Solaris 10:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
svcadm enable salt-minion
|
|
|
|
|
|
|
|
|
|
|
|
On Solaris 9:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
/etc/init.d/salt-minion start
|
|
|
|
|
2012-12-22 03:39:22 +00:00
|
|
|
You should now be able to log onto the salt master and check to see if the
|
|
|
|
salt-minion key is awaiting acceptance:
|
2012-09-06 04:12:17 +00:00
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
salt-key -l un
|
2014-12-11 03:35:09 +00:00
|
|
|
|
2012-09-06 04:12:17 +00:00
|
|
|
Accept the key:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
salt-key -a <your-salt-minion>
|
|
|
|
|
|
|
|
Run a simple test against the minion:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
salt '<your-salt-minion>' test.ping
|
|
|
|
|
|
|
|
Troubleshooting
|
2012-10-04 21:00:26 +00:00
|
|
|
===============
|
2012-09-06 04:12:17 +00:00
|
|
|
|
|
|
|
Logs are in ``/var/log/salt``
|
|
|
|
|
2014-12-11 03:35:09 +00:00
|
|
|
.. _pkgutil: http://www.opencsw.org/manual/for-administrators/getting-started.html
|