Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Salt gitfs to keep master synced with repo #264

Closed
aneeshusa opened this issue Mar 22, 2016 · 6 comments
Closed

Use Salt gitfs to keep master synced with repo #264

aneeshusa opened this issue Mar 22, 2016 · 6 comments

Comments

@aneeshusa
Copy link
Member

@aneeshusa aneeshusa commented Mar 22, 2016

Docs: https://docs.saltstack.com/en/2015.5/topics/tutorials/gitfs.html

Salt has a built-in backend that uses a git repo (such as this one) to provide the files in the /srv/salt tree (the fileserver).

We should use it instead of manually git pulling on the master.

@metajack
Copy link
Contributor

@metajack metajack commented Mar 22, 2016

+1

Is this feature new? I don't remember seeing this back when we set this up.

@aneeshusa
Copy link
Member Author

@aneeshusa aneeshusa commented Mar 22, 2016

This has been around for a long time, although I'm not sure exactly when it was added (at least as old as 2014.7.0, possibly as old as 0.16.3 based on a quick skim of the docs).

I'm not yet sure about how this would interact with the workflow of iterating on changes directly on the servo-master machine.

edunham added a commit to edunham/saltfs that referenced this issue Mar 23, 2016
edunham added a commit to edunham/saltfs that referenced this issue Mar 24, 2016
edunham added a commit to edunham/saltfs that referenced this issue Mar 24, 2016
@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Apr 7, 2016

If we don't have a local filesystem we can edit, what's the procedure for doing test highstate against the live system? There are a few pieces (e.g., the web hooks, buildbot, etc.) that we have no testing for and, in practice, I've needed to do and roll out 3 or 4 fixup tries before I actually get the original patch that was r+'d live.

cc @edunham

@aneeshusa
Copy link
Member Author

@aneeshusa aneeshusa commented Apr 7, 2016

We can pass a command line flag to the salt command to point to a different configuration directory, which lets us set up test configurations that point at local files to use interactively. This way, regular salt commands continue to use the gitfs fileserver backend, and we can set up separate temporary directories for testing. I'd recommend putting such directories in /tmp so they don't stick around too long.

That being said, testing in production makes me uneasy and I'd prefer to build a better testing story for our configurations, both making testing inside Vagrant easier and adding more automated functional tests. It's just too easy to forget to pass a command line flag to Salt (I've done this more times on my own setup than I'd like to admit).

@aneeshusa aneeshusa closed this May 1, 2016
@aneeshusa aneeshusa reopened this May 1, 2016
@aneeshusa
Copy link
Member Author

@aneeshusa aneeshusa commented May 1, 2016

Hit the wrong button, whoops.

@aneeshusa
Copy link
Member Author

@aneeshusa aneeshusa commented May 1, 2016

FYI, I've been looking into this for #350. The solution I mentioned above (custom config directories) won't work, but I've found an alternative solution. See #350 for the details.

@aneeshusa aneeshusa mentioned this issue May 1, 2016
2 of 4 tasks complete
bors-servo added a commit that referenced this issue Aug 10, 2016
Salt the Salt master

Use Salt to install the Salt master.
The Salt master will get restart on configuration changes,
but will need to be manually restarted on package changes to
allow for proper ordering of updating.
(Salt masters must be updated before Salt minions.)

Use Jinja to generate the config file YAML directly, preventing
typos in the master config file and providing access to master
configuration options in the SLS file (e.g. the file_roots locations).

Incorporates and thus fixes #298.

TODO:
  - [x] Add gitfs support. Fixes #264.
  - [x] Add _modules/ dir and backport `launchctl.py` module

TODO after landing:
  - [ ] Add master install instructions to the wiki
  - [ ] Update Salt-inside-Vagrant usage instructions on the wiki

After I finish the WIP tasks, landing this will unblock a bunch of other things that need the `launchctl.py` module (upgraded ssh, salt-minion salting, upgrading salt, etc.)

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/350)
<!-- Reviewable:end -->
@edunham edunham closed this in #350 Aug 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.