Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRefactor to enable mach bootstrap (and leaner Docker builds) #577
Conversation
This information about the Homebrew user was needed for a workaround which involved invoking Homebrew directly, since Homebrew cannot be run as root. However, the improved Homebrew versions support means this workaround (to installing autoconf and autoconf@2.13 concurrently) is no longer necessary and was removed in commit a063248. This code was inadvertently left dangling, and is now cleaned up.
de4b39e
to
a73281e
|
OK, this is good enough to allow |
d9501f0
to
76a1867
|
This looks pretty good to me. I think the machine <-> IP files might be a bit out of date (missing some macs, listing one that we don't use anymore) but otherwise it should be good to go. Thanks! |
76a1867
to
d1f503b
d1f503b
to
21f9d3d
|
Oh, I totally forgot about that, I pulled in the code from #369 so we can get rid of those unused static hosts. Actually tested this in a VM, added some fixes to make it work and updated it to make it ready to add new OS support, r? @larsbergstrom (for real this time) |
Fully managing the contents of the whole hosts file ensures that unused or obsolete hosts entries are removed promptly. Since we have setup DNS for our build machines, remove the relevant static entries from the hosts file.
4ab2df1
to
e047350
These states should only be run for fully managed nodes, e.g. those under our administrative control, so move them to the admin/init.sls file. This is part of a refactor making it possible to run the states installing Salt build dependencies without making other system level changes, for use in mach bootstrap. Use the `os` grain instead of the `kernel` grain for targeting, for slightly better semantics.
Move the Python (2 and 3) related states into a separate SLS file, so they can be reused without pulling in the servo user state, which is in common. Instead of adding this new SLS file to the top file, include it from other SLS files that depend on a Python installation. This makes it possible to `state.apply servo-build-dependencies` independently, with is needed for `mach bootstrap`. Note: No effort was made to separate Python 2 and Python 3, as the virtualenv pip package will create executables for both.
The reference to /etc/apt/sources.list.d allows cleaning that directory of extraneous sources files. This should only be done on fully managed nodes, so guard this requisite with a pillar check. The check defaults to True for backwards compatibility (i.e. not having to change the production pillars).
This will make it easier to maintain these lists. Additionally, be more strict about matching on OS type to make it easier to support more OSes in the future.
e047350
to
ef029a8
|
@bors-servo r+ |
|
|
|
|
Refactor to enable mach bootstrap (and leaner Docker builds) This refactor will make it possible to run the states installing Salt build dependencies without making other system level changes, for use in mach bootstrap. This will also allow skipping unnecessary states for use in Docker image creation #560, for faster image builds and reduced image size. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/577) <!-- Reviewable:end -->
Use Salt for mach bootstrap <!-- Please describe your changes on the following line: --> This is currently WIP, but allows Salt for `mach bootstrap`. Not looking for review yet, just posting for visibility. You can run `./mach bootstrap` and Salt will run, letting you know what changes it would make for bootstrapping (doesn't actually run yet though). Currently, this reads from saltfs using gitfs, meaning it always tracks the master branch. (Note that this is blocked on servo/saltfs#577 landing; in the meantime, I've included a small workaround in this PR to pull from my updated saltfs branch, which will need to be removed.) In the future, the relevant Salt code may be merged in tree as part of Docker support for TC, and the bootstrapper should be updated to read from in tree. Also, our Windows machines have not been Salted, so the existing Windows bootstrappers are retained. TODO: - [x] Hook into existing bootstrapping code less hackily - [x] Actually bootstrap instead of always using `test=True` mode (includes sudo) - [x] Default to interactive mode (test first, then ask), with a force flag - [x] Don't require running from the repository root directory - [x] Make it easy to add support for other distros --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they should be verified manually <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14974) <!-- Reviewable:end -->
…-mach-bootstrap); r=metajack <!-- Please describe your changes on the following line: --> This is currently WIP, but allows Salt for `mach bootstrap`. Not looking for review yet, just posting for visibility. You can run `./mach bootstrap` and Salt will run, letting you know what changes it would make for bootstrapping (doesn't actually run yet though). Currently, this reads from saltfs using gitfs, meaning it always tracks the master branch. (Note that this is blocked on servo/saltfs#577 landing; in the meantime, I've included a small workaround in this PR to pull from my updated saltfs branch, which will need to be removed.) In the future, the relevant Salt code may be merged in tree as part of Docker support for TC, and the bootstrapper should be updated to read from in tree. Also, our Windows machines have not been Salted, so the existing Windows bootstrappers are retained. TODO: - [x] Hook into existing bootstrapping code less hackily - [x] Actually bootstrap instead of always using `test=True` mode (includes sudo) - [x] Default to interactive mode (test first, then ask), with a force flag - [x] Don't require running from the repository root directory - [x] Make it easy to add support for other distros --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they should be verified manually <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 1f76aa6ef7ec7db0a0c40223874a72e8f4059deb
…-mach-bootstrap); r=metajack <!-- Please describe your changes on the following line: --> This is currently WIP, but allows Salt for `mach bootstrap`. Not looking for review yet, just posting for visibility. You can run `./mach bootstrap` and Salt will run, letting you know what changes it would make for bootstrapping (doesn't actually run yet though). Currently, this reads from saltfs using gitfs, meaning it always tracks the master branch. (Note that this is blocked on servo/saltfs#577 landing; in the meantime, I've included a small workaround in this PR to pull from my updated saltfs branch, which will need to be removed.) In the future, the relevant Salt code may be merged in tree as part of Docker support for TC, and the bootstrapper should be updated to read from in tree. Also, our Windows machines have not been Salted, so the existing Windows bootstrappers are retained. TODO: - [x] Hook into existing bootstrapping code less hackily - [x] Actually bootstrap instead of always using `test=True` mode (includes sudo) - [x] Default to interactive mode (test first, then ask), with a force flag - [x] Don't require running from the repository root directory - [x] Make it easy to add support for other distros --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they should be verified manually <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 1f76aa6ef7ec7db0a0c40223874a72e8f4059deb UltraBlame original commit: 1383f4886eaa98d20f3581e7dcbaa09f50ecd0d8
…-mach-bootstrap); r=metajack <!-- Please describe your changes on the following line: --> This is currently WIP, but allows Salt for `mach bootstrap`. Not looking for review yet, just posting for visibility. You can run `./mach bootstrap` and Salt will run, letting you know what changes it would make for bootstrapping (doesn't actually run yet though). Currently, this reads from saltfs using gitfs, meaning it always tracks the master branch. (Note that this is blocked on servo/saltfs#577 landing; in the meantime, I've included a small workaround in this PR to pull from my updated saltfs branch, which will need to be removed.) In the future, the relevant Salt code may be merged in tree as part of Docker support for TC, and the bootstrapper should be updated to read from in tree. Also, our Windows machines have not been Salted, so the existing Windows bootstrappers are retained. TODO: - [x] Hook into existing bootstrapping code less hackily - [x] Actually bootstrap instead of always using `test=True` mode (includes sudo) - [x] Default to interactive mode (test first, then ask), with a force flag - [x] Don't require running from the repository root directory - [x] Make it easy to add support for other distros --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they should be verified manually <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 1f76aa6ef7ec7db0a0c40223874a72e8f4059deb UltraBlame original commit: 1383f4886eaa98d20f3581e7dcbaa09f50ecd0d8
…-mach-bootstrap); r=metajack <!-- Please describe your changes on the following line: --> This is currently WIP, but allows Salt for `mach bootstrap`. Not looking for review yet, just posting for visibility. You can run `./mach bootstrap` and Salt will run, letting you know what changes it would make for bootstrapping (doesn't actually run yet though). Currently, this reads from saltfs using gitfs, meaning it always tracks the master branch. (Note that this is blocked on servo/saltfs#577 landing; in the meantime, I've included a small workaround in this PR to pull from my updated saltfs branch, which will need to be removed.) In the future, the relevant Salt code may be merged in tree as part of Docker support for TC, and the bootstrapper should be updated to read from in tree. Also, our Windows machines have not been Salted, so the existing Windows bootstrappers are retained. TODO: - [x] Hook into existing bootstrapping code less hackily - [x] Actually bootstrap instead of always using `test=True` mode (includes sudo) - [x] Default to interactive mode (test first, then ask), with a force flag - [x] Don't require running from the repository root directory - [x] Make it easy to add support for other distros --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they should be verified manually <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 1f76aa6ef7ec7db0a0c40223874a72e8f4059deb UltraBlame original commit: 1383f4886eaa98d20f3581e7dcbaa09f50ecd0d8
aneeshusa commentedJan 12, 2017
•
edited by larsbergstrom
This refactor will make it possible to run the states installing Salt build dependencies
without making other system level changes, for use in mach bootstrap.
This will also allow skipping unnecessary states for use in Docker image creation #560, for faster image builds and reduced image size.
This change is