trouble getting boto and salt-cloud working.
I've installed Python 2.7.9 and added the Boto module, but when I go to
import it inside of Salt, I get:
File "c:\Python27\lib\site-packages\boto\exception.py", line 28, in
<module>
import xml.sax
ImportError: No module named sax
I think my PYTHONPATH is set correctly:
C:\salt>echo %PYTHONPATH%
C:\Python27;C:\Python27\Lib;C:\Python27\Lib\site-packages
But Salt doesn't seem to be using it:
['C:\\salt\\salt-2014.7.1.win-amd64\\library.zip',
'c:\\salt\\salt-2014.7.1.win-amd64\\esky-0.9.8-py2.7.egg',
'c:\\salt\\salt-2014.7.1.win-amd64\\jinja2-2.7.1-py2.7.egg',
'c:\\salt\\salt-2014.7.1.win-amd64\\markupsafe-0.18-py2.7.egg',
'c:\\salt\\salt-2014.7.1.win-am64\\msgpack_python-0.4.2-py2.7-win-amd64.egg',
'c:\\salt\\salt-2014.7.1.win-amd64\\psutil-2.1.0-py2.7-win-amd64.egg',
'c:\\salt\\salt-2014.7.1.win-amd64\\pyzmq-14.1.1-py2.7-win-amd64.egg',
'c:\\salt\\salt-2014.7.1.win-amd64\\salt-2014.7.1-py2.7.egg',
'c:\\salt\\salt-2014.7.1.win-amd64\\setuptools-1.1.6-py2.7.egg',
'c:\\salt\\salt-2014.7.1.win-amd64\\wmi-1.4.9-py2.7.egg', 'C:\\salt\\salt-2014.7.1.win-amd64',
*'c:\\Python27', 'c:\\Python27\\lib\\site-packages'*]
I assume this is something to do with how the library is vendored into the
Salt windows installer directory.
I also tried making a .egg file and dropping it into the Salt directory,
which had the same error until I manually shoved lib/xml/sax.pyc and
lib/logging/config.pyc into the library.zip file.
My use case is that I'm want to use the salt-cloud modules
(http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cloud.html)
to look up other machines in EC2 to get their IPs (rather than using a
master and a mine) and also add the machine to load balancers/DNS etc.
I'd like to avoid doing my own Windows fork of Salt just to add a few
additional modules. Does anyone have any advice on how to do this? I really
would like to be able to use additional modules with Salt, but the Windows
packaging process seems to make that very difficult without putting the
modules in at build time.
Alternatively, if I wanted to make the effort, could I technically bypass
the Windows installer entirely and install all the deps
(https://github.com/saltstack/salt-windows-install) and python files from
git, then just start Salt like I would on a Linux box?
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.