FAQ
I need to interact with salt on a windows minion. I am trying to use the
salt client api, e.g.

import salt.client
caller = salt.client.Caller()

Here is what I have tried:

1. Install python 2.7
2. Import all the eggs into my path

sys.path.append("C:\salt\salt-2014.7.1.win-amd64\library.zip")
sys.path.append("c:\salt\salt-2014.7.1.win-amd64\esky-0.9.8-py2.7.egg")
sys.path.append("C:\salt\salt-2014.7.1.win-amd64\sky-0.9.8-py2.7.egg")
sys.path.append("C:\salt\salt-2014.7.1.win-amd64\jinja2-2.7.1-py2.7.egg")
sys.path.append("C:\salt\salt-2014.7.1.win-amd64\markupsafe-0.18-py2.7.egg")
sys.path.append(
"C:\salt\salt-2014.7.1.win-amd64\msgpack_python-0.4.2-py2.7-win-amd64.egg")
sys.path.append(
"C:\salt\salt-2014.7.1.win-amd64\psutil-2.1.0-py2.7-win-amd64.egg")
sys.path.append(
"C:\salt\salt-2014.7.1.win-amd64\pyzmq-14.1.1-py2.7-win-amd64.egg")
sys.path.append("C:\salt\salt-2014.7.1.win-amd64\salt-2014.7.1-py2.7.egg")
sys.path.append("C:\salt\salt-2014.7.1.win-amd64\setuptools-1.1.6-py2.7.egg"
)
sys.path.append("c:\salt\salt-2014.7.1.win-amd64\wmi-1.4.9-py2.7.egg")
sys.path.append("C:\salt\salt-2014.7.1.win-amd64")

At this point, when I execute the script above, it crashes the python
shell. :-)

I then tried following the instructions from
https://github.com/saltstack/salt-windows-install.

1. Install all the things
2a. Run python \Python27\Scripts\salt-minion -c 'c:\salt\minion'
OR
2b. Run python and them import salt.client

I get the same error
*ImportError: No module named requests*

Does anyone know how to use the client API on windows, ideally without
installing salt, i.e. using what comes out of the installer?



--
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.

Search Discussions

  • Carolyn Van Slyck at Mar 20, 2015 at 7:53 pm
    Following up I tried running easy_install requests, and now it is also
    crashing the python shell when creating a Caller...
    On Friday, March 20, 2015 at 2:48:32 PM UTC-5, Carolyn Van Slyck wrote:

    I need to interact with salt on a windows minion. I am trying to use the
    salt client api, e.g.

    import salt.client
    caller = salt.client.Caller()

    Here is what I have tried:

    1. Install python 2.7
    2. Import all the eggs into my path

    sys.path.append("C:\salt\salt-2014.7.1.win-amd64\library.zip")
    sys.path.append("c:\salt\salt-2014.7.1.win-amd64\esky-0.9.8-py2.7.egg")
    sys.path.append("C:\salt\salt-2014.7.1.win-amd64\sky-0.9.8-py2.7.egg")
    sys.path.append("C:\salt\salt-2014.7.1.win-amd64\jinja2-2.7.1-py2.7.egg")
    sys.path.append(
    "C:\salt\salt-2014.7.1.win-amd64\markupsafe-0.18-py2.7.egg")
    sys.path.append(
    "C:\salt\salt-2014.7.1.win-amd64\msgpack_python-0.4.2-py2.7-win-amd64.egg"
    )
    sys.path.append(
    "C:\salt\salt-2014.7.1.win-amd64\psutil-2.1.0-py2.7-win-amd64.egg")
    sys.path.append(
    "C:\salt\salt-2014.7.1.win-amd64\pyzmq-14.1.1-py2.7-win-amd64.egg")
    sys.path.append("C:\salt\salt-2014.7.1.win-amd64\salt-2014.7.1-py2.7.egg")
    sys.path.append(
    "C:\salt\salt-2014.7.1.win-amd64\setuptools-1.1.6-py2.7.egg")
    sys.path.append("c:\salt\salt-2014.7.1.win-amd64\wmi-1.4.9-py2.7.egg")
    sys.path.append("C:\salt\salt-2014.7.1.win-amd64")

    At this point, when I execute the script above, it crashes the python
    shell. :-)

    I then tried following the instructions from
    https://github.com/saltstack/salt-windows-install.

    1. Install all the things
    2a. Run python \Python27\Scripts\salt-minion -c 'c:\salt\minion'
    OR
    2b. Run python and them import salt.client

    I get the same error
    *ImportError: No module named requests*

    Does anyone know how to use the client API on windows, ideally without
    installing salt, i.e. using what comes out of the installer?


    --
    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.
  • Carolyn Van Slyck at Mar 26, 2015 at 1:12 pm
    I finally realized that it wasn't crashing python, instead salt was exiting
    which caused the python interpreter to close without any messages or logs.
    On Friday, March 20, 2015 at 2:53:27 PM UTC-5, Carolyn Van Slyck wrote:

    Following up I tried running easy_install requests, and now it is also
    crashing the python shell when creating a Caller...
    On Friday, March 20, 2015 at 2:48:32 PM UTC-5, Carolyn Van Slyck wrote:

    I need to interact with salt on a windows minion. I am trying to use the
    salt client api, e.g.

    import salt.client
    caller = salt.client.Caller()

    Here is what I have tried:

    1. Install python 2.7
    2. Import all the eggs into my path

    sys.path.append("C:\salt\salt-2014.7.1.win-amd64\library.zip")
    sys.path.append("c:\salt\salt-2014.7.1.win-amd64\esky-0.9.8-py2.7.egg")
    sys.path.append("C:\salt\salt-2014.7.1.win-amd64\sky-0.9.8-py2.7.egg")
    sys.path.append("C:\salt\salt-2014.7.1.win-amd64\jinja2-2.7.1-py2.7.egg")
    sys.path.append(
    "C:\salt\salt-2014.7.1.win-amd64\markupsafe-0.18-py2.7.egg")
    sys.path.append(
    "C:\salt\salt-2014.7.1.win-amd64\msgpack_python-0.4.2-py2.7-win-amd64.egg"
    )
    sys.path.append(
    "C:\salt\salt-2014.7.1.win-amd64\psutil-2.1.0-py2.7-win-amd64.egg")
    sys.path.append(
    "C:\salt\salt-2014.7.1.win-amd64\pyzmq-14.1.1-py2.7-win-amd64.egg")
    sys.path.append("C:\salt\salt-2014.7.1.win-amd64\salt-2014.7.1-py2.7.egg"
    )
    sys.path.append(
    "C:\salt\salt-2014.7.1.win-amd64\setuptools-1.1.6-py2.7.egg")
    sys.path.append("c:\salt\salt-2014.7.1.win-amd64\wmi-1.4.9-py2.7.egg")
    sys.path.append("C:\salt\salt-2014.7.1.win-amd64")

    At this point, when I execute the script above, it crashes the python
    shell. :-)

    I then tried following the instructions from
    https://github.com/saltstack/salt-windows-install.

    1. Install all the things
    2a. Run python \Python27\Scripts\salt-minion -c 'c:\salt\minion'
    OR
    2b. Run python and them import salt.client

    I get the same error
    *ImportError: No module named requests*

    Does anyone know how to use the client API on windows, ideally without
    installing salt, i.e. using what comes out of the installer?


    --
    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.
  • David Boucha at Apr 3, 2015 at 6:11 pm
    Hi Carolyn,

    Because of the way the Windows Salt minion has been built by freezing
    python, Salt and all Salt's dependencies, it make it quite hard to do what
    you're trying to do.

    Starting with 2015.2 we're shipping a slimmed down, but unfrozen build of
    python, Salt and the dependencies. This means you'll be able to open up a
    python
    shell right into Salt's environment as well as pip install new modules,
    etc. This will still be a separate python environment from what may or may
    not be on the system already.

    We have an RC build you can try out, if you'd like.

    http://docs.saltstack.com/downloads/Salt-Minion-2015.2.0rc2-x86-Setup.exe
    http://docs.saltstack.com/downloads/Salt-Minion-2015.2.0rc2-AMD64-Setup.exe

    Let me know how those work for you.

    Dave
    On Thu, Mar 26, 2015 at 7:12 AM, Carolyn Van Slyck wrote:

    I finally realized that it wasn't crashing python, instead salt was
    exiting which caused the python interpreter to close without any messages
    or logs.

    On Friday, March 20, 2015 at 2:53:27 PM UTC-5, Carolyn Van Slyck wrote:

    Following up I tried running easy_install requests, and now it is also
    crashing the python shell when creating a Caller...
    On Friday, March 20, 2015 at 2:48:32 PM UTC-5, Carolyn Van Slyck wrote:

    I need to interact with salt on a windows minion. I am trying to use the
    salt client api, e.g.

    import salt.client
    caller = salt.client.Caller()

    Here is what I have tried:

    1. Install python 2.7
    2. Import all the eggs into my path

    sys.path.append("C:\salt\salt-2014.7.1.win-amd64\library.zip")
    sys.path.append("c:\salt\salt-2014.7.1.win-amd64\esky-0.9.8-py2.7.egg")
    sys.path.append("C:\salt\salt-2014.7.1.win-amd64\sky-0.9.8-py2.7.egg")
    sys.path.append("C:\salt\salt-2014.7.1.win-amd64\jinja2-2.7.1-py2.7.egg"
    )
    sys.path.append("C:\salt\salt-2014.7.1.win-amd64\markupsafe-
    0.18-py2.7.egg")
    sys.path.append("C:\salt\salt-2014.7.1.win-amd64\msgpack_
    python-0.4.2-py2.7-win-amd64.egg")
    sys.path.append("C:\salt\salt-2014.7.1.win-amd64\psutil-2.1.
    0-py2.7-win-amd64.egg")
    sys.path.append("C:\salt\salt-2014.7.1.win-amd64\pyzmq-14.1.
    1-py2.7-win-amd64.egg")
    sys.path.append("C:\salt\salt-2014.7.1.win-amd64\salt-2014.
    7.1-py2.7.egg")
    sys.path.append("C:\salt\salt-2014.7.1.win-amd64\setuptools-
    1.1.6-py2.7.egg")
    sys.path.append("c:\salt\salt-2014.7.1.win-amd64\wmi-1.4.9-py2.7.egg")
    sys.path.append("C:\salt\salt-2014.7.1.win-amd64")

    At this point, when I execute the script above, it crashes the python
    shell. :-)

    I then tried following the instructions from
    https://github.com/saltstack/salt-windows-install.

    1. Install all the things
    2a. Run python \Python27\Scripts\salt-minion -c 'c:\salt\minion'
    OR
    2b. Run python and them import salt.client

    I get the same error
    *ImportError: No module named requests*

    Does anyone know how to use the client API on windows, ideally without
    installing salt, i.e. using what comes out of the installer?



    --
    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.
    --
    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupsalt-users @
postedMar 20, '15 at 7:48p
activeApr 3, '15 at 6:11p
posts4
users2

2 users in discussion

Carolyn Van Slyck: 3 posts David Boucha: 1 post

People

Translate

site design / logo © 2022 Grokbase