Skip to content
This repository was archived by the owner on Feb 12, 2021. It is now read-only.

Commit 9157293

Browse files
author
Luca Bruno
authored
Merge pull request #1204 from kbrwn/coreupdate-aws-s3
coreupdate: document serving packages from s3
2 parents bd06659 + a4c7edd commit 9157293

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

coreupdate/coreupdate-aws-s3.md

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Configure CoreUpdate to serve packages from AWS S3
2+
3+
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]
4+
5+
Download the update payload from the upstream public CoreUpdate instance. The command below fetches the update payload for Container Linux release 1632.2.1:
6+
7+
```
8+
$ updateservicectl --server=https://public.update.core-os.net package download --dir=/packages/ --version=1632.2.1
9+
```
10+
11+
Now the /packages/ directory contains a JSON file with update metadata and the Gzipped update payload:
12+
13+
```
14+
$ tree packages
15+
packages
16+
├── e96281a6-d1af-4bde-9a0a-97b76e56dc57_1632.2.1_info.json
17+
└── e96281a6-d1af-4bde-9a0a-97b76e56dc57_1632.2.1_update.gz
18+
19+
0 directories, 2 files
20+
```
21+
22+
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`.
23+
24+
```
25+
$ 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
26+
```
27+
28+
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.
29+
30+
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]".
31+
32+
On successful creation of the package, the output of this command will state where to upload payloads:
33+
34+
```
35+
2018/02/06 15:59:41 Creating package with AppId=e96281a6-d1af-4bde-9a0a-97b76e56dc57 and Version=1632.2.1
36+
2018/02/06 15:59:41 Package metadata uploaded. Total=1 Errors=0
37+
2018/02/06 15:59:41 Please upload payloads to https://s3-us-west-1.amazonaws.com/core-update-support.
38+
```
39+
40+
Upload the update package to the S3 bucket:
41+
42+
```
43+
aws s3 cp /packages/e96281a6-d1af-4bde-9a0a-97b76e56dc57_1632.2.1_update.gz s3://core-update-support
44+
```
45+
46+
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:
47+
48+
```
49+
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
50+
```
51+
52+
Consult the document [CoreUpdate - Configure Machines][core-update-config] for details on configuring a Container Linux host to use CoreUpdate.
53+
54+
55+
[updateservicectl]: https://github.com/coreos/updateservicectl/releases
56+
[airgap]: on-premises-deployment.html#air-gapped-package-management
57+
[aws-endpoints]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
58+
[core-update-config]: configure-machines.html
59+

0 commit comments

Comments
 (0)