docker-formula how to use

293 views
Skip to first unread message

Peter Waller

unread,
Dec 16, 2013, 1:23:28 PM12/16/13
to salt-...@googlegroups.com
Hi All,

I submitted this as an issue here: <https://github.com/saltstack-formulas/docker-formula/issues/5> but haven't had any response. I'm having the same problem here: <https://github.com/saltstack-formulas/salt-formula/issues>.

I'm having this problem generally with formulas. As someone new to salt with not enough time to study it in a lot of detail, it is not obvious enough how to get started with it and how to arrange files in my git repositories and on the file system. I would appreciate it if anyone could point me at some complete examples.

I've pasted it below. If anyone is able to help I will submit a pull request with improved instructions.

Thanks in advance,

- Peter

-- Paste follows --

I get in principle that I should be able to add it to my `gitfs_remotes` and then `include` it, but I can't get it working.

In my master config:

```yaml
fileserver_backend:
  - roots
  - git

gitfs_remotes:
  - https://github.com/saltstack-formulas/docker-formula
```

In my `devops-packages.sls`:

```yaml
include:
  - docker
```

(I also tried docker.docker)

Then I ran:

```
sudo salt-call -l debug state.sls devops-packages
```

But I got:

```
Data failed to compile:
----------
    Specified SLS docker.docker in environment base is not available on the salt
 master
```

Seth House

unread,
Dec 16, 2013, 2:01:08 PM12/16/13
to salt-...@googlegroups.com
Try switching your fileserver_backend entries so that Git comes first.

Three other debugging tips:

* You can list what files are available on your master with ``cp.list_master``.
* Watch the master log for complaints about GitPython.
* Don't be shy about trashing Salt's cache and restarting the master.
(Lives in /var/cache/salt/master/gitfs.)
> --
> 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.

Peter Waller

unread,
Dec 18, 2013, 4:40:44 AM12/18/13
to salt-...@googlegroups.com
So indeed it complains about gitpython when I restart the git master.

My expectation was that salt-call was a better way to debug during development, yet the error doesn't show up there. Why not? Bug? or am I abusing salt-call?

My second expectation was that gitfs would "Just work" and that it had no additional prerequisites. What is the best way to install salt onto my machines? Preferably using salt and with all of my configuration in one place..

Seth House

unread,
Dec 18, 2013, 11:04:18 PM12/18/13
to salt-...@googlegroups.com
On Wed, Dec 18, 2013 at 2:40 AM, Peter Waller <pe...@scraperwiki.com> wrote:
> So indeed it complains about gitpython when I restart the git master.

Ah. Glad you found it.

> My expectation was that salt-call was a better way to debug during
> development, yet the error doesn't show up there. Why not? Bug? or am I
> abusing salt-call?

salt-call is useful for debugging some minion-side parts of Salt. It
wasn't useful in this case because GitFS has a master-side
requirement.

> My second expectation was that gitfs would "Just work" and that it had no
> additional prerequisites. What is the best way to install salt onto my
> machines? Preferably using salt and with all of my configuration in one
> place..

GitPython isn't a hard dep since gitfs is an opt-in, so make sure you
install GitPython when you install the salt-master on a new machine.
Reply all
Reply to author
Forward
0 new messages