-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add hab install to download and install required distros #112
Conversation
15b5adb
to
26f3146
Compare
- If a object processed by `hab.utils.dump_object` has a dump method, it will be called. Verbosity is now passed to dump_object. - Improvements to Site.dump output including calling dump on file paths. - `Resolver.resolve_requirements` will now call `Solver.simplify_requirements` if passed a list automatically. - `MergeDict.default_format` now recursively formats dictionary values. - Documentation improvement.
26f3146
to
369b44b
Compare
Use the command `tox p` or `tox run-parallel` to enable parallel mode.
988eca6
to
2aa900c
Compare
I've been thinking about dropping python 3.6 for a while and some tests I'm working on are suffering from |
dda68f5
to
cf5cb74
Compare
cf5cb74
to
a9705f6
Compare
This class will replace the current code used to find distros. This allows us to implement sub-classes to change how they are found. For example to allow us to resolve dependencies hosted on the cloud for download and install. Add `hab.utils.glob_path` that supports globbing a pathlib.Path object with glob strings in the path.
a9705f6
to
c981991
Compare
cb6b80b
to
e0c3980
Compare
I'm not dropping support for python 3.7 currently. It's still useful to be able to import hab in older applications. However the hab install feature is not supporting using aws s3 for downloading. While it is still accessible boto3 has dropped support for it. If it stops working in the future I likely will drop support for it in python 3.7. The testing suite won't test the py37-s3 testing suite to check for issues. |
e0c3980
to
181fa73
Compare
These classes allow hab to resolve distros stored as .zip files both locally and on cloud services (aws s3 buckets). - Support sidecar .hab.json files next to the distro .zip files for remote services that don't support reading ranges of a file. - For services that support reading ranges of files like s3 it can download the .hab.json file from inside of the remote .zip file without downloading the entire .zip file first. - Add `hab.utils.loads_json` that raises the same errors as `load_json_file` but works on strings instead of files.
b7164ba
to
caafe56
Compare
- Add `hab install` command that resolves all distros required to resolve multiple URI's and then download and install any missing distros. - Distro resolving is now handled by `DistroFinder` or sub-class. - Site now has a downloads dictionary that configures how `hab install` can resolve remote distros for installing locally. - `Resolver.distro_mode_override` with context can be used to change `Resolver.distro`'s output to the `Site.downloads["distros"] used to find remote distros to install.
CentOS is rapidly being dropped so no longer a need to support it. Identical pathlib requirements don't compare equal in 3.6 and below.
S3 testing features are only supported for python 3.8+
caafe56
to
133c4cf
Compare
I still need to update the readme but here is an example site file. Adds the ability to resolve URI's and download and install any missing distros using a new cli command similar to The readme still needs updated but this example site file shows the basics of configuring {
"set": {
"config_paths": [
"{relative_root}/configs"
],
"distro_paths": [
"{relative_root}/distros/*"
],
"downloads": {
"cache_root": "{relative_root}/downloads",
"distros": [
[
"hab.distro_finders.s3_zip:DistroFinderS3Zip",
"s3://bucket-name/hab_distros",
{
"profile_name": "aws-credential-name"
}
]
],
"install_root": "{relative_root}/distros"
}
}
} |
Add the cli command
hab install
. This resolves the required distros for multiple URI's against a remote download server, downloads and installs any missing distros.This also re-works how distros are resolved into a DistroFinder class or subclasses. These can be used to customize how distros are resolved by hab. This includes resolving distros from aws s3 buckets.
Checklist
Types of Changes
Proposed Changes