mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
hacking on osx. a few typos. more 1st person nuke.
removed more of the first-person stuff. referred to the new osx docs for specific info.
This commit is contained in:
parent
29ef77adf0
commit
733a5b9825
@ -98,8 +98,8 @@ Clone the repository using::
|
||||
.. note:: tags
|
||||
|
||||
Just cloning the repository is enough to work with Salt and make
|
||||
contributions. However, you must fetch additional tags into your clone to
|
||||
have Salt report the correct version for itself. To do this you must first
|
||||
contributions. However, fetching additional tags from git is required to
|
||||
have Salt report the correct version for itself. To do this, first
|
||||
add the git repository as an upstream source::
|
||||
|
||||
git remote add upstream http://github.com/saltstack/salt
|
||||
@ -117,15 +117,13 @@ Create a new `virtualenv`_::
|
||||
On Arch Linux, where Python 3 is the default installation of Python, use the
|
||||
``virtualenv2`` command instead of ``virtualenv``.
|
||||
|
||||
.. note:: Using your system Python modules in the virtualenv
|
||||
.. note:: Using system Python modules in the virtualenv
|
||||
|
||||
If you have the required python modules installed on your system already
|
||||
and would like to use them in the virtualenv rather than having pip
|
||||
download and compile new ones into this environment, run ``virtualenv``
|
||||
with the ``--system-site-packages`` option. If you do this, you can skip
|
||||
the pip command below that installs the dependencies (pyzmq, M2Crypto,
|
||||
etc.), assuming that the listed modules are all installed in your system
|
||||
PYTHONPATH at the time you create your virtualenv.
|
||||
To use already-installed python modules in virtualenv (instead of having pip
|
||||
download and compile new ones), run ``virtualenv --system-site-packages``
|
||||
Using this method eliminates the requirement to install the salt dependencies
|
||||
again, although it does assume that the listed modules are all installed in the
|
||||
system PYTHONPATH at the time of virtualenv creation.
|
||||
|
||||
Activate the virtualenv::
|
||||
|
||||
@ -139,25 +137,24 @@ Install Salt (and dependencies) into the virtualenv::
|
||||
|
||||
.. note:: Installing M2Crypto
|
||||
|
||||
You may need ``swig`` and ``libssl-dev`` to build M2Crypto. If you
|
||||
encounter the error ``command 'swig' failed with exit status 1``
|
||||
while installing M2Crypto, try installing it with the following command::
|
||||
``swig`` and ``libssl-dev`` are required to build M2Crypto. To fix
|
||||
the error ``command 'swig' failed with exit status 1`` while installing M2Crypto,
|
||||
try installing it with the following command::
|
||||
|
||||
env SWIG_FEATURES="-cpperraswarn -includeall -D__`uname -m`__ -I/usr/include/openssl" pip install M2Crypto
|
||||
|
||||
Debian and Ubuntu systems have modified openssl libraries and mandate that
|
||||
a patched version of M2Crypto be installed. This means that M2Crypto
|
||||
needs to be installed via apt:
|
||||
needs to be installed via apt::
|
||||
|
||||
apt-get install python-m2crypto
|
||||
|
||||
This also means that you should use ``--system-site-packages`` when
|
||||
creating the virtualenv, to pull in the M2Crypto installed using apt.
|
||||
|
||||
This also means that pulling in the M2Crypto installed using apt requires using
|
||||
``--system-site-packages`` when creating the virtualenv.
|
||||
|
||||
.. note:: Important note for those developing using RedHat variants
|
||||
|
||||
If you are developing on a RedHat variant, be advised that the package
|
||||
For developers using a RedHat variant, be advised that the package
|
||||
provider for newer Redhat-based systems (:doc:`yumpkg.py
|
||||
<../ref/modules/all/salt.modules.yumpkg>`) relies on RedHat's python
|
||||
interface for yum. The variants that use this module to provide package
|
||||
@ -167,9 +164,8 @@ Install Salt (and dependencies) into the virtualenv::
|
||||
* `Fedora Linux`_ releases 11 and later
|
||||
* `Amazon Linux`_
|
||||
|
||||
If you are developing using one of these releases, you will want to create
|
||||
your virtualenv using the ``--system-site-packages`` option so that these
|
||||
modules are available in the virtualenv.
|
||||
Developers using one of these systems should create the salt virtualenv using the
|
||||
``--system-site-packages`` option to ensure that the correct modules are available.
|
||||
|
||||
.. _`RHEL`: https://www.redhat.com/products/enterprise-linux/
|
||||
.. _`CentOS`: http://centos.org/
|
||||
@ -178,14 +174,8 @@ Install Salt (and dependencies) into the virtualenv::
|
||||
|
||||
.. note:: Installing dependencies on OS X.
|
||||
|
||||
One simple way to get all needed dependencies on OS X is to use homebrew,
|
||||
and install the following packages::
|
||||
|
||||
brew install swig
|
||||
brew install zmq
|
||||
|
||||
Afterward the pip commands should run without a hitch. Also be sure to set
|
||||
max_open_files to 2048 (see below).
|
||||
You can install needed dependencies on OS X using homebrew or macports.
|
||||
See :doc:`OS X Installation </topics/installation/osx`
|
||||
|
||||
Running a self-contained development version
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -210,7 +200,6 @@ Edit the master config file:
|
||||
``/path/to/your/virtualenv/salt-master.pid``.
|
||||
4. If you are also running a non-development version of Salt you will have to
|
||||
change the ``publish_port`` and ``ret_port`` values as well.
|
||||
5. On OS X also set max_open_files to 2048.
|
||||
|
||||
Edit the minion config file:
|
||||
|
||||
@ -263,19 +252,18 @@ path. This can be done in a couple different ways:
|
||||
``NOTE:`` The socket path is limited to 107 characters on Solaris and Linux,
|
||||
and 103 characters on BSD-based systems.
|
||||
|
||||
.. note:: File descriptor limits
|
||||
|
||||
File descriptor limit
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
Ensure that the system open file limit is raised to at least 2047::
|
||||
|
||||
Check your file descriptor limit with::
|
||||
# check your current limit
|
||||
ulimit -n
|
||||
|
||||
ulimit -n
|
||||
|
||||
If it is less than 2047, you should increase it with::
|
||||
|
||||
ulimit -n 2047
|
||||
(or "limit descriptors 2047" for c-shell)
|
||||
# raise the limit. persists only until reboot
|
||||
# use 'limit descriptors 2047' for c-shell
|
||||
ulimit -n 2047
|
||||
|
||||
To set file descriptors on OSX, refer to the :doc:`OS X Installation </topics/installation/osx` instructions.
|
||||
|
||||
Running the tests
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
Loading…
Reference in New Issue
Block a user