Installing packages on Minions
Hi,
I'm new to the salt stack. My requirement is to install the packages from the master on to the minions.
I created a software repository in my master machine under the directory - /usr/loca/mydebs.
But when I try to push the files by using pkg.install with 'sources' argument as below, the minions throw the error - "no such file or directory".
Please check the logs below:
Master :
sudo ./salt '*' pkg.install sources='[{"cloudflash": "salt://cloudflash.deb"}]'
bishop: ----------
note: "bishop is the minion" here
Minion: [Error ] Unable to cache file "salt://cloudflash.deb" from env "base". [Error ] Failed to cache salt://cloudflash.deb. Are you sure this path is correct?
Please let me know the correct procedure to push the packages from master to minion - present in the directory "/usr/local/mydebs".
Thanks, -Siva
@bsivaprasath if you add /usr/local/mydebs to your "file_roots" config option in the master's config, then your scenario should work.
Look here for an explanation of the file_roots: http://www.docs.saltstack.com/ref/file_server/file_roots.html?highlight=file_roots#directory-overlay
Thanks Dave for the quick reply. I modified the file_roots inside the "master" file that's present in the directory - salt-0.14.1/conf .
Here is how it looks now inside the master file:
file_roots: base: - /usr/local/mydebs
But then when I restart the service "salt-master" as below: ./salt-master -l debug
and then run this command ./salt '*' pkg.install sources='[{"cloudflash": "salt://cloudflash.deb"}]'
bishop:
Communication is successful. But the minion still unable to locate and cache the package.
it says - [Error ] Unable to cache file "salt://cloudflash.deb" from env "base". [Error ] Command ' dpkg-db -I ""' failed with return code: 2 [Error ] stderr: dpkg-deb: error: failed to read archive ':No such file or directory [Error ] Failed to cache salt://cloudflash.deb. Are you sure this path is correct?
Please let me know if you can see any missing things.
Do we have to compile the "salt-master" service for using the modified config file?.
Thanks, -Siva
Issue fixed. this was a setup issue on the master side. The config files were not installed properly. I could install packages from master to minion. Thanks