This service customizes and serves RHCOS images for the Assisted Installer Service. It downloads a set of RHCOS images on startup based on config and responds to a single API endpoint to allow a user to download a customized image for use with assisted service.
Build the image and run it locally using podman
make build run
This will start the service running on port 8080 by default.
It will also bind-mount the data
and certs
local directories into the container root.
skipper make test
DATA_DIR
- Path at which to store downloaded RHCOS images.RHCOS_VERSIONS
- JSON string indicating the supported versions and their required urls.LISTEN_PORT
- Image Service listen portHTTPS_KEY_FILE
- tls key file pathHTTPS_CERT_FILE
- tls cert file pathASSISTED_SERVICE_SCHEME
- protocol to use to query assisted service for image informationASSISTED_SERVICE_HOST
- host or host:port to use to query assisted service for image informationREQUEST_AUTH_TYPE
- determines how the auth token should be passed to the assisted service - eitherheader
orparam
- For
header
a header of the formAuthorization: Bearer <token>
is used - For
param
anapi_key=<token>
query parameter is added to the URL
- For
MAX_CONCURRENT_REQUESTS
- caps the number of inflight image downloads to avoid things like open file limits
Example RHCOS_VERSIONS
:
[
{
"openshift_version": "4.6",
"cpu_architecture": "x86_64",
"url": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.6/4.6.8/rhcos-4.6.8-x86_64-live.x86_64.iso",
"rootfs_url": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.6/4.6.8/rhcos-live-rootfs.x86_64.img"
},
{
"openshift_version": "4.7",
"cpu_architecture": "x86_64",
"url": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.7/4.7.13/rhcos-4.7.13-x86_64-live.x86_64.iso",
"rootfs_url": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.7/4.7.13/rhcos-live-rootfs.x86_64.img"
},
{
"openshift_version": "4.8",
"cpu_architecture": "x86_64",
"url": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.8/4.8.2/rhcos-4.8.2-x86_64-live.x86_64.iso",
"rootfs_url": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.8/4.8.2/rhcos-live-rootfs.x86_64.img"
}
]
Downloads the RHCOS image for the specified image ID.
version
: indicates the version of the RHCOS base image to use (must match an entry inRHCOS_VERSIONS
)arch
: the base image cpu architecture (must match an entry inRHCOS_VERSIONS
)type
:full-iso
to download the ISO including the rootfs,minimal-iso
to download the iso without the rootfsapi_key
: the api token to pass through to the assisted service calls if authentication is required
Returns 200 if the service is ready to respond to requests
Prometheus metrics scraping endpoint