2012-10-25 19:09:07 +00:00
|
|
|
===================
|
|
|
|
Ubuntu Installation
|
|
|
|
===================
|
2012-05-20 15:49:16 +00:00
|
|
|
|
2012-10-25 19:09:07 +00:00
|
|
|
Add repository
|
2014-10-08 21:56:28 +00:00
|
|
|
==============
|
2012-05-20 15:49:16 +00:00
|
|
|
|
2014-12-11 03:35:09 +00:00
|
|
|
The latest packages for Ubuntu are published in the saltstack PPA. If you have
|
|
|
|
the ``add-apt-repository`` utility, you can add the repository and import the
|
2012-12-20 19:20:48 +00:00
|
|
|
key in one step:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
sudo add-apt-repository ppa:saltstack/salt
|
|
|
|
|
2013-03-21 02:23:55 +00:00
|
|
|
.. admonition:: add-apt-repository: command not found?
|
|
|
|
|
2013-06-30 23:05:29 +00:00
|
|
|
The ``add-apt-repository`` command is not always present on Ubuntu systems.
|
2014-07-14 17:37:13 +00:00
|
|
|
This can be fixed by installing `python-software-properties`:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
2013-03-21 02:23:55 +00:00
|
|
|
|
2013-06-30 21:39:23 +00:00
|
|
|
sudo apt-get install python-software-properties
|
2013-03-21 02:23:55 +00:00
|
|
|
|
2014-11-14 00:13:50 +00:00
|
|
|
The following may be required as well:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
sudo apt-get install software-properties-common
|
|
|
|
|
2013-06-30 23:05:29 +00:00
|
|
|
Note that since Ubuntu 12.10 (Raring Ringtail), ``add-apt-repository`` is
|
|
|
|
found in the `software-properties-common` package, and is part of the base
|
|
|
|
install. Thus, ``add-apt-repository`` should be able to be used
|
|
|
|
out-of-the-box to add the PPA.
|
|
|
|
|
2013-08-11 02:55:51 +00:00
|
|
|
Alternately, manually add the repository and import the PPA key with these
|
|
|
|
commands:
|
2012-05-20 15:49:16 +00:00
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2012-10-25 19:09:07 +00:00
|
|
|
echo deb http://ppa.launchpad.net/saltstack/salt/ubuntu `lsb_release -sc` main | sudo tee /etc/apt/sources.list.d/saltstack.list
|
2012-10-31 18:11:06 +00:00
|
|
|
wget -q -O- "http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x4759FA960E27C0A6" | sudo apt-key add -
|
2012-12-20 19:20:48 +00:00
|
|
|
|
|
|
|
After adding the repository, update the package management database:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2012-06-05 18:39:51 +00:00
|
|
|
sudo apt-get update
|
|
|
|
|
2012-12-20 19:20:48 +00:00
|
|
|
|
2012-10-25 19:09:07 +00:00
|
|
|
Install packages
|
2014-10-08 21:56:28 +00:00
|
|
|
================
|
2012-07-22 00:52:56 +00:00
|
|
|
|
2014-12-11 03:35:09 +00:00
|
|
|
Install the Salt master, minion, or syndic from the repository with the apt-get
|
|
|
|
command. These examples each install one daemon, but more than one package name
|
2012-10-25 19:09:07 +00:00
|
|
|
may be given at a time:
|
2012-06-05 18:47:32 +00:00
|
|
|
|
2012-10-25 19:09:07 +00:00
|
|
|
.. code-block:: bash
|
2012-06-05 18:39:51 +00:00
|
|
|
|
2014-12-11 03:35:09 +00:00
|
|
|
sudo apt-get install salt-master
|
2012-10-25 19:27:12 +00:00
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2012-10-25 19:09:07 +00:00
|
|
|
sudo apt-get install salt-minion
|
2012-10-25 19:27:12 +00:00
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2012-10-25 19:09:07 +00:00
|
|
|
sudo apt-get install salt-syndic
|
2012-05-20 15:49:16 +00:00
|
|
|
|
2012-07-22 00:52:56 +00:00
|
|
|
.. _ubuntu-config:
|
|
|
|
|
2014-10-08 21:56:28 +00:00
|
|
|
|
|
|
|
ZeroMQ 4
|
|
|
|
========
|
|
|
|
|
2014-12-01 18:48:17 +00:00
|
|
|
We recommend using ZeroMQ 4 where available. ZeroMQ 4 is already available for
|
|
|
|
Ubuntu 14.04 and Ubuntu 14.10 and nothing additional needs to be done. However,
|
|
|
|
the **chris-lea/zeromq** PPA can be used to provide ZeroMQ 4 on Ubuntu 12.04 LTS.
|
|
|
|
Adding this PPA can be done with a :mod:`pkgrepo.managed <salt.states.pkgrepo.managed>`
|
|
|
|
state.
|
2014-10-08 21:56:28 +00:00
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
zeromq-ppa:
|
|
|
|
pkgrepo.managed:
|
|
|
|
- ppa: chris-lea/zeromq
|
|
|
|
|
|
|
|
The following states can be used to upgrade ZeroMQ and pyzmq, and then restart
|
|
|
|
the minion:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
update_zmq:
|
2014-12-13 06:29:48 +00:00
|
|
|
pkg.latest:
|
2014-10-08 21:56:28 +00:00
|
|
|
- pkgs:
|
|
|
|
- zeromq
|
|
|
|
- python-zmq
|
|
|
|
- order: last
|
2014-12-13 06:29:48 +00:00
|
|
|
cmd.wait:
|
|
|
|
- name: |
|
|
|
|
echo service salt-minion restart | at now + 1 minute
|
2014-10-08 21:56:28 +00:00
|
|
|
- watch:
|
|
|
|
- pkg: update_zmq
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
This example assumes that atd is installed and running, see here_ for a more
|
|
|
|
detailed explanation.
|
|
|
|
|
|
|
|
.. _here: http://docs.saltstack.com/en/latest/faq.html#what-is-the-best-way-to-restart-a-salt-daemon-using-salt
|
|
|
|
|
|
|
|
If this repo is added *before* Salt is installed, then installing either
|
|
|
|
``salt-master`` or ``salt-minion`` will automatically pull in ZeroMQ 4.0.4, and
|
|
|
|
additional states to upgrade ZeroMQ and pyzmq are unnecessary.
|
|
|
|
|
|
|
|
|
2012-11-25 16:23:01 +00:00
|
|
|
Post-installation tasks
|
|
|
|
=======================
|
2012-05-20 15:49:16 +00:00
|
|
|
|
2014-12-11 15:51:43 +00:00
|
|
|
Now go to the :doc:`Configuring Salt</ref/configuration/index>` page.
|