salt icon indicating copy to clipboard operation
salt copied to clipboard

win_gitrepos path for package files unknown

Open joshmule opened this issue 12 years ago • 6 comments

This may be a bug in my understanding, but I'm having troubles with packages paths for winrepo packages attached via win_gitrepos. Here is what we have in /etc/salt/master:

win_gitrepos:
  - https://readonly:user:[email protected]/path/winrepo.git

From inside the winrepo gitfs top-level directory, we have only directories:

$ls
firefox  notepad++  putty etc

From inside any of the subdirs, we have a layout like this:

$ls putty
init.sls  putty-0.63-installer.exe
$cat putty/init.sls
putty:
  0.63:
    installer: 'salt://winrepo/putty/putty-0.63-installer.exe'
    full_name: 'PuTTY version 0.63'
    locale: en_US
    reboot: False
    install_flags: '/sp- /verysilent'

My confusion is around the salt:// path that should be used inside the init.sls files. Where is win_gitrepos "mounted" by the salt master such that I can reference windows package files via a salt:// style URL ? Or is storing the package files themselves in win_gitrepos not allowed or intended to work?

joshmule avatar Sep 17 '14 15:09 joshmule

Thanks for the report @joshmule! I am not very familiar with the Windows modules, but maybe @UtahDave can help you out here.

rallytime avatar Sep 17 '14 16:09 rallytime

Let me note that our setup works perfectly when on a local filesystem, with a path of /srv/salt/win/repo.
In that case the path in putty/init.sls to the installer file is 'salt://win/repo/putty/putty-0.63-installer.exe'

I'm simply wondering what the salt:// path should be when using win_gitrepos

joshmule avatar Sep 17 '14 17:09 joshmule

If you're using this default setting in your master configt:

win_repo: '/srv/salt/win/repo'

Then this should work:

installer: 'salt://win/repo/putty/putty-0.63-installer.exe'

UtahDave avatar Sep 17 '14 18:09 UtahDave

That does work when not using win_gitrepos, are you saying that when using win_gitrepos the path is also the same? When we are using win_gitrepos, should we still be setting win_repo at all? There is no /srv/salt/anything on the local filesystem after we've switched to using gitfs and win_gitrepos ... hence the confusion.

joshmule avatar Sep 17 '14 18:09 joshmule

Yeah, the winrepo stuff was built long before gitfs existed. winrepo doesn't know anything about gitfs yet.

Winrepo just clones the repositories onto the filesystem. So you'll need to use both gitfs and roots for your fileserver_backends.

UtahDave avatar Sep 17 '14 18:09 UtahDave

This worked, thank you. When using win_gitrepos, the path changed from:

installer: 'salt://win/repo/putty/putty-0.63-installer.exe'

... to ...

installer: 'salt://win/repo/gitfs/<reponame>.git/putty/putty-0.63-installer.exe'

Again thank you for the clarification.

joshmule avatar Sep 30 '14 03:09 joshmule