Salt on Mac OS X

1,298 views
Skip to first unread message

Paul Walsh

unread,
Jun 1, 2013, 12:01:35 PM6/1/13
to salt-...@googlegroups.com
I know there is another thread here (at least one other thread), about this issue. But it doesn't help me much.

I am running Python 2.7.5 on Homebrew. I have a number of virtualenvs - a pretty complete Python setup for web dev.

I want to run a salt master to control my servers.

Following the instructions on this page ( http://docs.saltstack.com/topics/installation/osx.html ), I have Salt's dependencies installed via Homebrew.

I have installed Salt via pip (pip install salt) with my Homebrew managed Python (not in a separate venv).

I have verified that salt is installed (import salt from Python console).


Now, from here, the docs refer to this file:

/etc/salt/master

It doesn't exist, but that is ok, I don't expect it to. So, I checked in the salt package in /usr/local/lib/python2.7/site-packages (the site packages of my Homebrew python), and I see no master configuration file. Also, unlike the instructions in this previous thread ( https://groups.google.com/forum/?fromgroups#!topic/salt-users/G5ERLWjhN3s ) I have no "conf" directory, nor a salt/master.template file.


I have also checked in the homebrew managed etc directory (usr/local/etc) and nothing salt-related is there.

In the terminal, running salt-master returns:

Failed to create directory path "/etc/salt/pki/master" - [Errno 13] Permission denied: '/etc/salt'

So, it looks to me like salt is trying to configure itself, but obviously it can write to /etc, as it is not running under a sudo user, nor do I want it to be.

So, my situation - I have a working Salt that I don't know how I can configure.


Help?

Erik Johnson

unread,
Jun 1, 2013, 2:49:24 PM6/1/13
to salt-...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

pip won't install the master and minion config files, I don't think. You can find them in git here: https://github.com/saltstack/salt/tree/develop/conf


--

-Erik

"For me, it is far better to grasp the universe as it really is than to persist in delusion, however satisfying and reassuring."  -- Carl Sagan

Colton Myers

unread,
Jun 1, 2013, 3:02:19 PM6/1/13
to salt-...@googlegroups.com
Yep, if pip didn't install them, just create /etc/salt yourself and then put those config files there.  =)

--
Colton Myers

Paul Walsh

unread,
Jun 1, 2013, 3:13:13 PM6/1/13
to salt-...@googlegroups.com
well, I don't want to run as sudo, and so I don't want to write into /etc/

Is there a way to do this without sudo?

Erik Johnson

unread,
Jun 1, 2013, 3:15:10 PM6/1/13
to salt-...@googlegroups.com
On Sat, Jun 1, 2013 at 2:13 PM, Paul Walsh <pauly...@gmail.com> wrote:
well, I don't want to run as sudo, and so I don't want to write into /etc/

Is there a way to do this without sudo?





Yeah, you can use the -c command line option to specify the directory where salt should look for config files. If you plan on running as non-root, you'll also need to change the "user" parameter in the config file to the appropriate user.

Paul Walsh

unread,
Jun 1, 2013, 3:39:31 PM6/1/13
to salt-...@googlegroups.com
hmm, I am confused... 

I can verify salt-master runs with sudo. So, I am just going to run it as such, no biggie.

But then, I pass it my config file:

sudo salt-master -c ~/Sites/globals/salt/master

And, even though salt-master runs, it must be with some default config, because it tells me:

WARNING: "/Users/paulwalsh/Sites/globals/salt/master" directory does not exist.

It is, obviously, a file, not a directory.

Erik Johnson

unread,
Jun 1, 2013, 4:24:35 PM6/1/13
to salt-...@googlegroups.com
On Sat, Jun 1, 2013 at 2:39 PM, Paul Walsh <pauly...@gmail.com> wrote:
hmm, I am confused... 

I can verify salt-master runs with sudo. So, I am just going to run it as such, no biggie.

But then, I pass it my config file:

sudo salt-master -c ~/Sites/globals/salt/master

And, even though salt-master runs, it must be with some default config, because it tells me:

WARNING: "/Users/paulwalsh/Sites/globals/salt/master" directory does not exist.

It is, obviously, a file, not a directory.




I am pretty sure that this particular logging inaccuracy was fixed in git a couple weeks ago.

Ben Hosmer

unread,
Jun 1, 2013, 5:47:48 PM6/1/13
to salt-...@googlegroups.com
I've never looked at a homebrew formula, but I wonder if it would be worth it to have a salt-master/minion formula?


--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Ben Hosmer

Brevard Tech - Brevard County Florida's Tech User Group

Corey Quinn

unread,
Jun 1, 2013, 7:12:44 PM6/1/13
to salt-...@googlegroups.com
I've investigated what it would take to get Salt into Homebrew a few months back, and the answer is "a lot." Homebrew has a policy of not packaging things that pypi makes available to avoid conflicts / duplication. In other words, to get this working we'd have to pretty much have an onmibus style package, as we're not going to be able to dep in libzmq's python bindings, or the other non-standard python libraries that Salt needs.

That said, if we find some way to do a dependency rollup to the point where you can give me a tarball that will let me install the whole kit and kaboodle with no external dependies, I'd say we're in business.

For what it's worth, I've looked around a bit, and the *only* configuration manager that's currently in Homebrew is cfengine, so we're hardly alone in this.

-- Corey

Sam Lai

unread,
Jun 1, 2013, 11:56:06 PM6/1/13
to salt-...@googlegroups.com
IIRC, the -c parameter needs to point to *the directory containing the
master configuration file*, not the master configuration file itself,
i.e.

sudo salt-master -c ~/Sites/globals/salt

... should work.

Paul Walsh

unread,
Jun 2, 2013, 2:38:17 AM6/2/13
to salt-...@googlegroups.com
wow, that is it, thanks!

Paul Walsh

unread,
Jun 2, 2013, 11:38:43 AM6/2/13
to salt-...@googlegroups.com
I am almost there.

I have all my config for Salt in a directory of my choosing.

It seems I still must run salt as sudo / root, as other wise I get a list of warning thrown at me about things that might not work.

The last thing is, changing the maxfiles limit - nothing seems to work.

Not this:

sudo launchctl limit maxfiles 10000

Not this:

sudo launchctl limit maxfiles 10000

and not this (including reboot after *creating the file*):

# /etc/launchd.conf
limit maxfiles 10000 unlimited

After all these various attempts, everytime check the max files limit, it is 256 - the default. And of course, salt also tells me this when I start it.

Any solutions?

Corey Quinn

unread,
Jun 2, 2013, 5:32:38 PM6/2/13
to salt-...@googlegroups.com, salt-...@googlegroups.com


On Jun 2, 2013, at 8:38 AM, Paul Walsh <pauly...@gmail.com> wrote:

I am almost there.

I have all my config for Salt in a directory of my choosing.

It seems I still must run salt as sudo / root, as other wise I get a list of warning thrown at me about things that might not work.

The last thing is, changing the maxfiles limit - nothing seems to work.

Not this:

sudo launchctl limit maxfiles 10000

Not this:

sudo launchctl limit maxfiles 10000


These two are the same? 


and not this (including reboot after *creating the file*):

# /etc/launchd.conf
limit maxfiles 10000 unlimited

After all these various attempts, everytime check the max files limit, it is 256 - the default. And of course, salt also tells me this when I start it.

Any solutions?


Yup. Unlimited isn't valid anymore,, you have to set both a hard and soft limit. 

Try sudo launchctl limit maxfiles 4096 8192

Lloyd Chang

unread,
Aug 24, 2013, 4:04:26 PM8/24/13
to salt-...@googlegroups.com
Hey there,

Are contents of docs.saltstack.com hosted in a GitHub repository? Why? I'd like to inline comment osx.html with documentation fixes needed as GitHub pull requests. However, osx.html doesn't show up via the search https://github.com/search?q=%40saltstack+osx.html

My User Story: I ran into issues that Paul Walsh reported. User-experience wise, I wasn't able to inline fixes needed in directly at http://docs.saltstack.com/topics/installation/osx.html as web page comments, and I didn't see a docs.saltstack.com repository at https://github.com/saltstack to propose a GitHub pull request, which led me to this discussion with proposes fixes to documentation.

Now, how might we merge proposed fixes into the authoritative source of truth copy of osx.html? Who should I contact beyond this mailing list?

Thanks,
Lloyd

David Boucha

unread,
Aug 24, 2013, 4:34:40 PM8/24/13
to salt users list

Great questions!

All the contents of docs.saltstack.com are found within the "docs" directory of the salt github repo.

Just submit a pull request against the main salt github repo

We really appreciate the help!

Lloyd Chang

unread,
Aug 25, 2013, 3:22:30 AM8/25/13
to salt-...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages