Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/carbonin/assisted-image-service
https://github.com/carbonin/assisted-image-service
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/carbonin/assisted-image-service
- Owner: carbonin
- License: apache-2.0
- Created: 2021-07-20T21:05:08.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-07-31T00:52:54.000Z (over 3 years ago)
- Last Synced: 2024-10-24T05:30:28.310Z (23 days ago)
- Language: Go
- Size: 54.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Assisted Image Service
This service customizes and serves RHCOS images for the [Assisted Installer Service](https://github.com/openshift/assisted-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.## Running the Service
Build the image and run it locally using `podman`
```bash
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.## Running tests
```bash
skipper make test
```## Configuration
- `DATA_DIR` - Path at which to store downloaded RHCOS images.
- `RHCOS_VERSIONS` - JSON string indicating the supported versions and their required urls.
- `PORT` - Service listen port
- `HTTPS_KEY_FILE` - tls key file path
- `HTTPS_CERT_FILE` - tls cert file path
- `ASSISTED_SERVICE_URL` - URL to use to query assisted service for image informationExample `RHCOS_VERSIONS`:
```json
{
"4.6": {
"iso_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"
},
"4.7": {
"iso_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"
},
"4.8": {
"iso_url": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.8.0-rc.3/rhcos-4.8.0-rc.3-x86_64-live.x86_64.iso",
"rootfs_url": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.8.0-rc.3/rhcos-live-rootfs.x86_64.img"
}
}
```## API
### `GET /images/{image_id}`
Downloads the RHCOS image for the specified image ID.
#### Query paraeters
`version`: indicates the version of the RHCOS base image to use (must match a key in `RHCOS_VERSIONS`)
### `GET /health`
Returns 200 if the service is ready to respond to requests
### `GET /metrics`
Prometheus metrics scraping endpoint