This repository was archived by the owner on Feb 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 526
coreupdate: document serving packages from s3 #1204
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,59 @@ | ||
# Configure CoreUpdate to serve packages from AWS S3 | ||
|
||
The [updateservicectl][updateservicectl] tool can be used to fetch Container Linux updates from upstream and push the update payload to AWS S3. This process is documented for a general file server at: [CoreUpdate - Air Gapped Package Management][airgap] | ||
|
||
Download the update payload from the upstream public CoreUpdate instance. The command below fetches the update payload for Container Linux release 1632.2.1: | ||
|
||
``` | ||
$ updateservicectl --server=https://public.update.core-os.net package download --dir=/packages/ --version=1632.2.1 | ||
``` | ||
|
||
Now the /packages/ directory contains a JSON file with update metadata and the Gzipped update payload: | ||
|
||
``` | ||
$ tree packages | ||
packages | ||
├── e96281a6-d1af-4bde-9a0a-97b76e56dc57_1632.2.1_info.json | ||
└── e96281a6-d1af-4bde-9a0a-97b76e56dc57_1632.2.1_update.gz | ||
|
||
0 directories, 2 files | ||
``` | ||
|
||
Use the `updateservicectl package create bulk` command to create the package on a CoreUpdate instance. In the example below, CoreUpdate is running at: `http://coreupdate.example.com:8000`. | ||
|
||
``` | ||
$ updateservicectl --server=http://coreupdate.example.com:8000 --user=admin --key=4025a24d-b1e4-4294-b0ca package create bulk --base-url=https://s3-us-west-1.amazonaws.com/core-update-support --dir=/packages | ||
``` | ||
|
||
Note the use of the flags `--user` and `--key` these will be required. Most often the user will be `admin` and the key can be found in the `/etc/coreupdate/config.yaml` file. | ||
|
||
Be certain to format the URL passed to the `--base-url` flag as described in the AWS document: "[AWS S3 Regions and Endpoints][aws-endpoints]". | ||
|
||
On successful creation of the package, the output of this command will state where to upload payloads: | ||
|
||
``` | ||
2018/02/06 15:59:41 Creating package with AppId=e96281a6-d1af-4bde-9a0a-97b76e56dc57 and Version=1632.2.1 | ||
2018/02/06 15:59:41 Package metadata uploaded. Total=1 Errors=0 | ||
2018/02/06 15:59:41 Please upload payloads to https://s3-us-west-1.amazonaws.com/core-update-support. | ||
``` | ||
|
||
Upload the update package to the S3 bucket: | ||
|
||
``` | ||
aws s3 cp /packages/e96281a6-d1af-4bde-9a0a-97b76e56dc57_1632.2.1_update.gz s3://core-update-support | ||
``` | ||
|
||
Access is a very important thing to consider. It is required to have a bucket policy that will allow the machines updating to download the payload. A tool such as `curl` can be used to verify the payload can be fetched: | ||
|
||
``` | ||
curl -L https://s3-us-west-1.amazonaws.com/core-update-support/e96281a6-d1af-4bde-9a0a-97b76e56dc57_1632.2.1_update.gz -o test.gz | ||
``` | ||
|
||
Consult the document [CoreUpdate - Configure Machines][core-update-config] for details on configuring a Container Linux host to use CoreUpdate. | ||
|
||
|
||
[updateservicectl]: https://github.com/coreos/updateservicectl/releases | ||
[airgap]: on-premises-deployment.html#air-gapped-package-management | ||
[aws-endpoints]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region | ||
[core-update-config]: configure-machines.html | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we leave two blank lines between doc and links