Discussion:
[salt-users] Install dev salt instance from git repo clone
Tanoti
2014-11-03 17:49:15 UTC
Permalink
I've been reading the docs about installing a dev Salt instance from a git
clone so I can do some more hacking
(http://docs.saltstack.com/en/latest/topics/development/hacking.html) and
so far so good. Due to the way the server is built, I have the repo in my
home directory and the dev salt instance is installed in a system area
using virtualenv as instructed. I can't work out how to specify which
branch of my clone to use in the "pip install -e /path/to/clone/salt"
command? Also, what is the best way to sync changes in the repo to the dev
instance, do I just copy and overwrite the file?

Any help appreciated :)

John
--
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Colton Myers
2014-11-19 22:24:01 UTC
Permalink
Hey John,

Sorry for the late reply, I'm going through old unanswered threads.

From what I understand, `pip install -e` just installs symlinks such that the module or program is being run directly from the specified directory. So to change branches, you would just need to go to that directory and run `git checkout new_branch`. And use `git pull` to get the new changes from upstream.

Hope that helps. Keep me posted if I misunderstood your problem.

--
Colton Myers
Platform Engineer, SaltStack
@basepi on Github/Twitter/IRC
I've been reading the docs about installing a dev Salt instance from a git clone so I can do some more hacking (http://docs.saltstack.com/en/latest/topics/development/hacking.html) and so far so good. Due to the way the server is built, I have the repo in my home directory and the dev salt instance is installed in a system area using virtualenv as instructed. I can't work out how to specify which branch of my clone to use in the "pip install -e /path/to/clone/salt" command? Also, what is the best way to sync changes in the repo to the dev instance, do I just copy and overwrite the file?
Any help appreciated :)
John
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
For more options, visit https://groups.google.com/d/optout <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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Tanoti
2014-11-20 09:15:05 UTC
Permalink
Colton,

Many thanks for the reply. After some digging I realised what was going on
with the symlinks. I supposed it's because I am not that familiar with git
but I'm not too clear on how to ensure that the salt instance sees the
correct files for a branch if all it is looking at is the repo area? If I
create a local branch for a feature and make some changes, I realise that
the salt instance will see those modified files. If I want to then switch
back to the clean develop branch for comparison and run against that, or
create a second feature branch, how do I switch so that the salt instance
is seeing the files in the correct state?

Many thanks,
John
--
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Colton Myers
2014-11-24 22:22:20 UTC
Permalink
If I'm understanding your question correctly, you would just need to do a `git checkout develop` or check out whatever feature branch you want to run off of. Then restart your minion and master and they should be running on the new code, assuming you have your `pip install -e` set up correctly.

Hope that helps.

--
Colton Myers
Platform Engineer, SaltStack
@basepi on Github/Twitter/IRC
Post by Tanoti
Colton,
Many thanks for the reply. After some digging I realised what was going on with the symlinks. I supposed it's because I am not that familiar with git but I'm not too clear on how to ensure that the salt instance sees the correct files for a branch if all it is looking at is the repo area? If I create a local branch for a feature and make some changes, I realise that the salt instance will see those modified files. If I want to then switch back to the clean develop branch for comparison and run against that, or create a second feature branch, how do I switch so that the salt instance is seeing the files in the correct state?
Many thanks,
John
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
For more options, visit https://groups.google.com/d/optout <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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...