Open soostdijck opened 6 years ago
I think part of the problem might lie in the fact that I've put my .kitchen.yml inside the formula subdirectory, so my path looks like ~/git/salt/formula-core/exim/.kitchen.yml
. I've got 'is_file_root: true'.
The reason for this layout in my case is that I have one formula-style git repo with multiple formulas in that same repo to keep the amount of repo's to a reasonable amount. So my layout it something like this:
ls -1 ~/git/salt/formula-core/
Gemfile
Gemfile.lock
README.md
exim
iptables
motd
munin-node
nrpe
ntp
selinux
snmp
etc...
is exim your formula root? or is git/salt/formula-core? because that is where all the formulas are located.
You might take a look at using dependencies
with paths to the formula directories?
The formula root is git/salt/formula-core
but because there are many formulas in one git repo I have a .kitchen.yml in each subdirectory (exim, snmp, ntp,etc), so something like git/salt/formula-core/exim/.kitchen.yml
.
My intention is to keep the kitchen configs simpler by not having one monolithic one at the top level of my formula (like hot it's normally done in formulas).
note: formula fetch scritpt is bit special way escaped as kitchen do some magic with it when transporting/running it. was a nightmare. imho it is not usable/test-able out of kitchen. I may link the other version for comparison.the link command is missing expected kitchen user as i see in logs.we actually link the pillar files on the formula. I would like to keep the functionality but probably document, generalize the concept and make it conditional if /metadata folter resides on the repo.
It would be nice if there was an option to pull these scripts from a custom location. Then users can hack around all they want.
I want to move this away from these scripts, and instead put as many of the dependencies in the sand box as possible (besides spm) so that they are just transferred over.
Currently the state is "info needed". What info do you need? :)
updated
I've been having trouble with the softlink that is created by the function
linkFormulas()
insidelib/kitchen/provisioner/formula-fetch.sh
. For me it's creating a broken softlink to a dependency, inside my vagrant/kitchen test box.My kitchen converge output is:
The softlink should instead link to
access -> /usr/share/salt-formulas/env/_formulas/access
and all would be well...I think the issue is line 76 inside formula-fetch.sh - there is a $name too many. However I'm having a hard time testing this (to make a useful PR). I can't find how to change the salt_solo provisioner so that it pulls the scripts from
https://github.com/saltstack/kitchen-salt/tree/master/lib/kitchen/provisioner
from some other url.