-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding pkg-sync tool and update docs to reflect changes in syncing
Signed-off-by: Matt Wrock <[email protected]>
- Loading branch information
Showing
12 changed files
with
419 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
core/hab | ||
core/hab-sup | ||
core/hab-launcher | ||
habitat/builder-api | ||
habitat/builder-api-proxy | ||
habitat/builder-datastore | ||
habitat/builder-minio | ||
habitat/builder-memcached |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
core/hab | ||
core/hab-sup | ||
core/hab-launcher | ||
habitat/builder-api | ||
habitat/builder-api-proxy | ||
habitat/builder-datastore | ||
habitat/builder-minio | ||
habitat/builder-memcached |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# pkg-sync | ||
|
||
A tool for syncing packages in an on-prem builder instance with the packages in public builder. | ||
|
||
Given a channel (defaults to `LTS-2024`) and an on-prem builder url and token, this tool can download all core, chef, or chef-platform packages in the channel from the piblic Chef Habitat builder that the on-prem instance does not already have and upload them to the on-prem builder. | ||
|
||
This performs a pre-flight check to ensure that you do not have local core, chef, or chef-platform packages in the channel that are not in the same channel on bldr.habitat.sh. If there are, these local packages must be demoted. | ||
|
||
This tool can also be used to generate a list of packages without actually syncing them. | ||
|
||
## Usage | ||
|
||
Install this package with: | ||
|
||
``` | ||
hab pkg install habitat/pkg-sync | ||
``` | ||
|
||
Examples: | ||
|
||
Sync all the latest core, chef, or chef-platform LTS-2024 packages that you do not already have from the public builder and upload them to your on-prem builder instance. | ||
|
||
``` | ||
hab pkg exec habitat/pkg-sync pkg-sync --bldr-url https://your-builder.tld --channel LTS-2024 --auth <your_public_Builder_instance_token> | ||
``` | ||
|
||
Generate a list of all LTS-2024 packages in the core, chef, and chef-platform origins. | ||
|
||
``` | ||
hab pkg exec habitat/pkg-sync pkg-sync --generate-airgap-list --channel LTS-2024 | ||
``` | ||
|
||
These lists can be used with `hab pkg download` to download the hart files from builder: | ||
|
||
``` | ||
hab pkg download --target x86_64-linux --channel LTS-2024 --file package_list_x86_64-linux.txt --download-directory builder_bootstrap | ||
hab pkg download --target x86_64-windows --channel LTS-2024 --file package_list_x86_64-windows.txt --download-directory builder_bootstrap | ||
``` | ||
|
||
You could then copy the `--download-directory` contents to an airgapped builder and use `hab pkg bulkupload` to upload them: | ||
|
||
``` | ||
export HAB_AUTH_TOKEN=<your_on-prem_Builder_instance_token> | ||
hab pkg bulkupload --url https://your-builder.tld --channel LTS-2024 --auto-create-origins builder_bootstrap/ | ||
``` |
Oops, something went wrong.