2013-11-15 05:18:31 +00:00
|
|
|
==============
|
|
|
|
Salt Bootstrap
|
|
|
|
==============
|
|
|
|
|
|
|
|
The Salt Bootstrap script allows for a user to install the Salt Minion or
|
|
|
|
Master on a variety of system distributions and versions. This shell script
|
|
|
|
known as ``bootstrap-salt.sh`` runs through a series of checks to determine
|
|
|
|
the operating system type and version. It then installs the Salt binaries
|
2013-11-16 04:47:26 +00:00
|
|
|
using the appropriate methods. The Salt Bootstrap script installs the
|
2013-11-15 05:18:31 +00:00
|
|
|
minimum number of packages required to run Salt. This means that in the event
|
2013-11-16 04:47:26 +00:00
|
|
|
you run the bootstrap to install via package, Git will not be installed.
|
|
|
|
Installing the minimum number of packages helps ensure the script stays as
|
|
|
|
lightweight as possible, assuming the user will install any other required
|
|
|
|
packages after the Salt binaries are present on the system. The script source
|
|
|
|
is available on GitHub: https://github.com/saltstack/salt-bootstrap
|
2013-11-15 05:18:31 +00:00
|
|
|
|
2014-04-27 09:02:42 +00:00
|
|
|
|
2013-11-15 05:18:31 +00:00
|
|
|
Supported Operating Systems
|
|
|
|
---------------------------
|
|
|
|
- Amazon Linux 2012.09
|
|
|
|
- Arch
|
|
|
|
- CentOS 5/6
|
2014-04-27 09:02:42 +00:00
|
|
|
- Debian 6.x/7.x/8(git installations only)
|
2013-11-15 05:18:31 +00:00
|
|
|
- Fedora 17/18
|
2014-04-27 09:02:42 +00:00
|
|
|
- FreeBSD 9.1/9.2/10
|
2013-11-15 05:18:31 +00:00
|
|
|
- Gentoo
|
|
|
|
- Linaro
|
|
|
|
- Linux Mint 13/14
|
|
|
|
- OpenSUSE 12.x
|
2014-04-27 09:02:42 +00:00
|
|
|
- Oracle Linux 5/5
|
2013-11-15 05:18:31 +00:00
|
|
|
- Red Hat 5/6
|
|
|
|
- Red Hat Enterprise 5/6
|
2014-04-27 09:02:42 +00:00
|
|
|
- Scientific Linux 5/6
|
2013-11-15 05:18:31 +00:00
|
|
|
- SmartOS
|
|
|
|
- SuSE 11 SP1/11 SP2
|
2014-04-27 09:02:42 +00:00
|
|
|
- Ubuntu 10.x/11.x/12.x/13.04/13.10
|
|
|
|
- Elementary OS 0.2
|
|
|
|
|
2013-11-15 05:18:31 +00:00
|
|
|
|
2013-11-16 04:47:26 +00:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
In the event you do not see your distribution or version available please
|
|
|
|
review the develop branch on Github as it main contain updates that are
|
|
|
|
not present in the stable release:
|
|
|
|
https://github.com/saltstack/salt-bootstrap/tree/develop
|
|
|
|
|
2014-04-27 09:02:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
Example Usage
|
|
|
|
~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
If you're looking for the *one-liner* to install salt, please scroll to the
|
|
|
|
bottom and use the instructions for `Installing via an Insecure One-Liner`_
|
|
|
|
|
2014-07-13 15:40:53 +00:00
|
|
|
.. note::
|
2014-04-27 09:02:42 +00:00
|
|
|
In every two-step example, you would be well-served to examine the downloaded file and examine
|
|
|
|
it to ensure that it does what you expect.
|
|
|
|
|
|
|
|
|
|
|
|
Using ``curl`` to install latest git:
|
|
|
|
|
2014-07-10 22:47:51 +00:00
|
|
|
.. code:: bash
|
2014-04-27 09:02:42 +00:00
|
|
|
|
2014-06-07 12:31:12 +00:00
|
|
|
curl -L https://bootstrap.saltstack.com -o install_salt.sh
|
2014-04-27 09:02:42 +00:00
|
|
|
sudo sh install_salt.sh git develop
|
|
|
|
|
|
|
|
|
|
|
|
Using ``wget`` to install your distribution's stable packages:
|
|
|
|
|
2014-07-10 22:47:51 +00:00
|
|
|
.. code:: bash
|
2014-04-27 09:02:42 +00:00
|
|
|
|
2014-06-07 12:31:12 +00:00
|
|
|
wget -O install_salt.sh https://bootstrap.saltstack.com
|
2014-04-27 09:02:42 +00:00
|
|
|
sudo sh install_salt.sh
|
|
|
|
|
2014-04-29 23:25:59 +00:00
|
|
|
|
2014-04-27 09:02:42 +00:00
|
|
|
Install a specific version from git using ``wget``:
|
|
|
|
|
2014-07-10 22:47:51 +00:00
|
|
|
.. code:: bash
|
2014-04-27 09:02:42 +00:00
|
|
|
|
2014-06-07 12:31:12 +00:00
|
|
|
wget -O install_salt.sh https://bootstrap.saltstack.com
|
2014-04-27 09:02:42 +00:00
|
|
|
sudo sh install_salt.sh -P git v0.16.4
|
|
|
|
|
|
|
|
If you already have python installed, ``python 2.6``, then it's as easy as:
|
|
|
|
|
2014-07-10 22:47:51 +00:00
|
|
|
.. code:: bash
|
2014-04-27 09:02:42 +00:00
|
|
|
|
2014-06-07 12:31:12 +00:00
|
|
|
python -m urllib "https://bootstrap.saltstack.com" > install_salt.sh
|
2014-04-27 09:02:42 +00:00
|
|
|
sudo sh install_salt.sh git develop
|
|
|
|
|
|
|
|
|
|
|
|
All python versions should support the following one liner:
|
|
|
|
|
2014-07-10 22:47:51 +00:00
|
|
|
.. code:: bash
|
2014-04-27 09:02:42 +00:00
|
|
|
|
2014-06-07 12:31:12 +00:00
|
|
|
python -c 'import urllib; print urllib.urlopen("https://bootstrap.saltstack.com").read()' > install_salt.sh
|
2014-04-27 09:02:42 +00:00
|
|
|
sudo sh install_salt.sh git develop
|
|
|
|
|
|
|
|
|
|
|
|
On a FreeBSD base system you usually don't have either of the above binaries available. You **do**
|
|
|
|
have ``fetch`` available though:
|
|
|
|
|
2014-07-10 22:47:51 +00:00
|
|
|
.. code:: bash
|
2014-04-27 09:02:42 +00:00
|
|
|
|
2014-06-07 12:31:12 +00:00
|
|
|
fetch -o install_salt.sh https://bootstrap.saltstack.com
|
2014-04-27 09:02:42 +00:00
|
|
|
sudo sh install_salt.sh
|
|
|
|
|
|
|
|
|
|
|
|
If all you want is to install a ``salt-master`` using latest git:
|
|
|
|
|
2014-07-10 22:47:51 +00:00
|
|
|
.. code:: bash
|
2014-04-27 09:02:42 +00:00
|
|
|
|
2014-06-07 12:31:12 +00:00
|
|
|
curl -o install_salt.sh.sh -L https://bootstrap.saltstack.com
|
2014-04-27 09:02:42 +00:00
|
|
|
sudo sh install_salt.sh.sh -M -N git develop
|
|
|
|
|
|
|
|
If you want to install a specific release version (based on the git tags):
|
|
|
|
|
2014-07-10 22:47:51 +00:00
|
|
|
.. code:: bash
|
2014-04-27 09:02:42 +00:00
|
|
|
|
2014-06-07 12:31:12 +00:00
|
|
|
curl -o install_salt.sh.sh -L https://bootstrap.saltstack.com
|
2014-04-27 09:02:42 +00:00
|
|
|
sudo sh install_salt.sh.sh git v0.16.4
|
|
|
|
|
|
|
|
To install a specific branch from a git fork:
|
|
|
|
|
2014-07-10 22:47:51 +00:00
|
|
|
.. code:: bash
|
2014-04-27 09:02:42 +00:00
|
|
|
|
2014-06-07 12:31:12 +00:00
|
|
|
curl -o install_salt.sh.sh -L https://bootstrap.saltstack.com
|
2014-04-27 09:02:42 +00:00
|
|
|
sudo sh install_salt.sh.sh -g https://github.com/myuser/salt.git git mybranch
|
|
|
|
|
|
|
|
|
|
|
|
Installing via an Insecure One-Liner
|
|
|
|
------------------------------------
|
|
|
|
|
|
|
|
The following examples illustrate how to install Salt via a one-liner.
|
|
|
|
|
2014-07-13 15:40:53 +00:00
|
|
|
.. note::
|
2014-07-14 17:37:13 +00:00
|
|
|
|
|
|
|
Warning! These methods do not involve a verification step and assume that
|
|
|
|
the delivered file is trustworthy.
|
2014-04-27 09:02:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
Examples
|
|
|
|
~~~~~~~~
|
|
|
|
|
|
|
|
Installing the latest develop branch of Salt:
|
|
|
|
|
2014-07-10 22:47:51 +00:00
|
|
|
.. code:: bash
|
2014-04-27 09:02:42 +00:00
|
|
|
|
2014-06-07 12:31:12 +00:00
|
|
|
curl -L https://bootstrap.saltstack.com | sudo sh -s -- git develop
|
2014-04-27 09:02:42 +00:00
|
|
|
|
|
|
|
Any of the example above which use two-lines can be made to run in a single-line
|
|
|
|
configuration with minor modifications.
|
|
|
|
|
|
|
|
|
2013-11-15 05:18:31 +00:00
|
|
|
Example Usage
|
|
|
|
-------------
|
|
|
|
|
|
|
|
The Salt Bootstrap script has a wide variety of options that can be passed as
|
|
|
|
well as several ways of obtaining the bootstrap script itself.
|
|
|
|
|
2014-01-13 05:37:59 +00:00
|
|
|
For example, using ``curl`` to install your distribution's stable packages:
|
2013-11-15 05:18:31 +00:00
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2014-06-07 12:31:12 +00:00
|
|
|
curl -L https://bootstrap.saltstack.com | sudo sh
|
2013-11-15 05:18:31 +00:00
|
|
|
|
|
|
|
|
2014-01-13 05:37:59 +00:00
|
|
|
Using ``wget`` to install your distribution's stable packages:
|
2013-11-15 05:18:31 +00:00
|
|
|
|
2014-01-13 05:37:59 +00:00
|
|
|
.. code-block:: bash
|
2013-11-15 05:18:31 +00:00
|
|
|
|
2014-06-07 12:31:12 +00:00
|
|
|
wget -O - https://bootstrap.saltstack.com | sudo sh
|
2013-11-15 05:18:31 +00:00
|
|
|
|
|
|
|
|
2014-01-13 05:37:59 +00:00
|
|
|
Installing the latest version available from git with ``curl``:
|
2013-11-15 05:18:31 +00:00
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2014-06-07 12:31:12 +00:00
|
|
|
curl -L https://bootstrap.saltstack.com | sudo sh -s -- git develop
|
2013-11-15 05:18:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
Install a specific version from git using ``wget``:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2014-06-07 12:31:12 +00:00
|
|
|
wget -O - https://bootstrap.saltstack.com | sh -s -- -P git v0.16.4
|
2013-11-15 05:18:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
If you already have python installed, ``python 2.6``, then it's as easy as:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2014-06-07 12:31:12 +00:00
|
|
|
python -m urllib "https://bootstrap.saltstack.com" | sudo sh -s -- git develop
|
2013-11-15 05:18:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
All python versions should support the following one liner:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2014-06-07 12:31:12 +00:00
|
|
|
python -c 'import urllib; print urllib.urlopen("https://bootstrap.saltstack.com").read()' | \
|
2013-11-15 05:18:31 +00:00
|
|
|
sudo sh -s -- git develop
|
|
|
|
|
|
|
|
|
2014-01-13 05:37:59 +00:00
|
|
|
On a FreeBSD base system you usually don't have either of the above binaries
|
|
|
|
available. You **do** have ``fetch`` available though:
|
2013-11-15 05:18:31 +00:00
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2014-06-07 12:31:12 +00:00
|
|
|
fetch -o - https://bootstrap.saltstack.com | sudo sh
|
2013-11-15 05:18:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
If all you want is to install a ``salt-master`` using latest git:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2014-06-07 12:31:12 +00:00
|
|
|
curl -L https://bootstrap.saltstack.com | sudo sh -s -- -M -N git develop
|
2013-11-15 05:18:31 +00:00
|
|
|
|
2013-11-16 04:47:26 +00:00
|
|
|
|
2013-11-15 05:18:31 +00:00
|
|
|
If you want to install a specific release version (based on the git tags):
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2014-06-07 12:31:12 +00:00
|
|
|
curl -L https://bootstrap.saltstack.com | sudo sh -s -- git v0.16.4
|
2013-11-15 05:18:31 +00:00
|
|
|
|
2013-11-16 04:47:26 +00:00
|
|
|
|
|
|
|
Downloading the develop branch (from here standard command line options may be
|
|
|
|
passed):
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2014-06-07 12:31:12 +00:00
|
|
|
wget https://bootstrap.saltstack.com/develop
|
2013-11-16 04:47:26 +00:00
|
|
|
|
2013-11-15 05:18:31 +00:00
|
|
|
Command Line Options
|
|
|
|
--------------------
|
|
|
|
|
2014-07-14 17:37:13 +00:00
|
|
|
Here's a summary of the command line options:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
2014-03-22 20:56:05 +00:00
|
|
|
|
2014-03-23 07:31:20 +00:00
|
|
|
$ sh bootstrap-salt.sh -h
|
2014-03-22 20:56:05 +00:00
|
|
|
|
|
|
|
Usage : bootstrap-salt.sh [options] <install-type> <install-type-args>
|
|
|
|
|
|
|
|
Installation types:
|
|
|
|
- stable (default)
|
|
|
|
- daily (ubuntu specific)
|
|
|
|
- git
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
$ bootstrap-salt.sh
|
|
|
|
$ bootstrap-salt.sh stable
|
|
|
|
$ bootstrap-salt.sh daily
|
|
|
|
$ bootstrap-salt.sh git
|
|
|
|
$ bootstrap-salt.sh git develop
|
|
|
|
$ bootstrap-salt.sh git v0.17.0
|
|
|
|
$ bootstrap-salt.sh git 8c3fadf15ec183e5ce8c63739850d543617e4357
|
|
|
|
|
|
|
|
Options:
|
|
|
|
-h Display this message
|
|
|
|
-v Display script version
|
|
|
|
-n No colours.
|
|
|
|
-D Show debug output.
|
|
|
|
-c Temporary configuration directory
|
|
|
|
-g Salt repository URL. (default: git://github.com/saltstack/salt.git)
|
|
|
|
-k Temporary directory holding the minion keys which will pre-seed
|
|
|
|
the master.
|
|
|
|
-M Also install salt-master
|
|
|
|
-S Also install salt-syndic
|
|
|
|
-N Do not install salt-minion
|
|
|
|
-X Do not start daemons after installation
|
|
|
|
-C Only run the configuration function. This option automatically
|
|
|
|
bypasses any installation.
|
|
|
|
-P Allow pip based installations. On some distributions the required salt
|
|
|
|
packages or its dependencies are not available as a package for that
|
|
|
|
distribution. Using this flag allows the script to use pip as a last
|
|
|
|
resort method. NOTE: This only works for functions which actually
|
|
|
|
implement pip based installations.
|
|
|
|
-F Allow copied files to overwrite existing(config, init.d, etc)
|
|
|
|
-U If set, fully upgrade the system prior to bootstrapping salt
|
|
|
|
-K If set, keep the temporary files in the temporary directories specified
|
|
|
|
with -c and -k.
|
|
|
|
-I If set, allow insecure connections while downloading any files. For
|
|
|
|
example, pass '--no-check-certificate' to 'wget' or '--insecure' to 'curl'
|
|
|
|
-A Pass the salt-master DNS name or IP. This will be stored under
|
|
|
|
${BS_SALT_ETC_DIR}/minion.d/99-master-address.conf
|
2014-03-23 13:14:40 +00:00
|
|
|
-i Pass the salt-minion id. This will be stored under
|
|
|
|
${BS_SALT_ETC_DIR}/minion_id
|
2014-03-22 20:56:05 +00:00
|
|
|
-L Install the Apache Libcloud package if possible(required for salt-cloud)
|
|
|
|
-p Extra-package to install while installing salt dependencies. One package
|
|
|
|
per -p flag. You're responsible for providing the proper package name.
|