https://github.com/jcmoraisjr/coreos-omaha
Partial Omaha protocol implementation used by CoreOS hosts
https://github.com/jcmoraisjr/coreos-omaha
Last synced: 3 months ago
JSON representation
Partial Omaha protocol implementation used by CoreOS hosts
- Host: GitHub
- URL: https://github.com/jcmoraisjr/coreos-omaha
- Owner: jcmoraisjr
- Created: 2016-10-16T19:17:07.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-17T00:56:53.000Z (almost 8 years ago)
- Last Synced: 2025-01-20T14:50:11.651Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CoreOS Omaha
Partial [Omaha](https://coreos.com/products/coreupdate/docs/latest/update-protocol.html) protocol implementation used by CoreOS hosts.
[](https://quay.io/repository/jcmoraisjr/coreos-omaha)
# Usage
Configure CoreOS update server to point to CoreOS Omaha server:
```console
# /etc/coreos/update.conf
GROUP=stable
SERVER=http://omaha.my-server.com:8000
```Cloud-init:
```console
#cloud-config
coreos:
update:
group: stable
server: http://omaha.my-server.com:8000
```The following arguments are mandatory:
* `--urlbase=` Base URL where CoreOS images should be downloaded
* `--channel=` One channel declaration, may be used once per channelOptional arguments:
* `--date` Show date and time when logging
* `--servername=` An optional server name used on response objects
* `--listen=` Port to listen, default is `8000`
* `--trustproxy` Use when behind a proxy which defines `X-Forwarded-For` header# Channels
Use as much `--channel` arguments as the number of channels.
The argument has the following syntax:
```console
--channel=,,,,
```Where:
* `name` is the name of the channel, like `beta` or `stable`
* `version` is the complete version number, like `1122.2.0` or `1192.0.0`
* `size` is the file size in bytes
* `sha1-hash` is the base64 encode of the sha1 hash: `openssl sha -sha1 -binary update.gz | base64`
* `sha256-hash` is the base64 encode of the sha256 hash: `openssl sha -sha256 -binary update.gz | base64`Download original images from `https://update.release.core-os.net/amd64-usr//update.gz`.
# Configure
This systemd unit has the most common configurations. Change `update.my-server.com` below to the server where you want CoreOS hosts download the images.
```console
[Unit]
Description=CoreOS Omaha
After=docker.service
Requires=docker.service
[Service]
ExecStartPre=-/usr/bin/docker stop coreos-omaha
ExecStartPre=-/usr/bin/docker rm coreos-omaha
ExecStart=/usr/bin/docker run \
--name coreos-omaha \
-p 8000:8000 \
quay.io/jcmoraisjr/coreos-omaha:latest \
--channel=alpha,1192.0.0,254754856,EVjNyHkg2EtSUSyf477ExtjP/Lo=,VJiWOBmoFECZk1znmglW6HrknpcQ9LJyb+meaimBjjg= \
--channel=beta,1185.1.0,247835613,v333LDdL31kVpWeyv+/PtK7fysg=,zE55qgObyunDfNuF0Ny2zwq9hNz98umv7d43F2YY37A= \
--channel=stable,1122.2.0,212555113,+ZFmPWzv1OdfmKHaGSojbK5Xj3k=,cSBzKN0c6vKinrH0SdqUZSHlQtCa90vmeKC7p/xk19M= \
--urlbase=http://update.my-server.com/coreos/amd64-usr \
--servername=update.my-server.com
ExecStop=-/usr/bin/docker stop coreos-omaha
RestartSec=10s
Restart=always
[Install]
WantedBy=multi-user.target
```