From eefc87cbbb613ffc8010507f5ceb34798e5e801f Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Sun, 16 Dec 2012 02:17:44 -0600 Subject: [PATCH] Move info about pidfile into master/minion config Thanks to s0undt3ch for suggesting this. Anything to type less on the command line :) Also, the filenames for the master and minion templates are "master" and "minion", not "master.template" and "minion.template". Corrected this. --- doc/topics/hacking.rst | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/doc/topics/hacking.rst b/doc/topics/hacking.rst index bae38c4a2e25..6b54b8db0f83 100644 --- a/doc/topics/hacking.rst +++ b/doc/topics/hacking.rst @@ -108,23 +108,27 @@ the configuration, log, and cache files contained in the virtualenv as well. Copy the master and minion config files into your virtualenv:: mkdir -p /path/to/your/virtualenv/etc/salt - cp ./salt/conf/master.template /path/to/your/virtualenv/etc/salt/master - cp ./salt/conf/minion.template /path/to/your/virtualenv/etc/salt/minion + cp ./salt/conf/master /path/to/your/virtualenv/etc/salt/master + cp ./salt/conf/minion /path/to/your/virtualenv/etc/salt/minion Edit the master config file: 1. Uncomment and change the ``user: root`` value to your own user. 2. Uncomment and change the ``root_dir: /`` value to point to ``/path/to/your/virtualenv``. -3. If you are also running a non-development version of Salt you will have to +3. Uncomment and change the ``pidfile: /var/run/salt-minion.pid`` value to + point to ``/path/to/your/virtualenv/salt-minion.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. Edit the minion config file: 1. Repeat the edits you made in the master config for the ``user`` and ``root_dir`` values as well as any port changes. -2. Uncomment and change the ``master: salt`` value to point at ``localhost``. -3. Uncomment and change the ``id:`` value to something descriptive like +2. Uncomment and change the ``pidfile: /var/run/salt-master.pid`` value to + point to ``/path/to/your/virtualenv/salt-master.pid``. +3. Uncomment and change the ``master: salt`` value to point at ``localhost``. +4. Uncomment and change the ``id:`` value to something descriptive like "saltdev". This isn't strictly necessary but it will serve as a reminder of which Salt installation you are working with. @@ -140,8 +144,8 @@ Start the master and minion, accept the minon's key, and verify your local Salt installation is working:: cd /path/to/your/virtualenv - salt-master -c ./etc/salt -d --pid-file ./salt-master.pid - salt-minion -c ./etc/salt -d --pid-file ./salt-minion.pid + salt-master -c ./etc/salt -d + salt-minion -c ./etc/salt -d salt-key -c ./etc/salt -L salt-key -c ./etc/salt -A salt -c ./etc/salt '*' test.ping