mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-26 10:34:24 +01:00
Correct typos and resolve formatting issues including incorrect heading levels and missing TOC entries. Fixes: #541. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
59 lines
2.0 KiB
Markdown
59 lines
2.0 KiB
Markdown
# Kata OBS to Packagecloud sync tool
|
|
|
|
* [How it works](#how-it-works)
|
|
* [Detailed behaviour](#detailed-behaviour)
|
|
* [Install and Usage](#install-and-usage)
|
|
|
|
`kata-pkgsync` is a tool to synchronize Kata package from OBS to Packagecloud.
|
|
|
|
## How it works
|
|
|
|
`kata-pkgsync` autonomously discovers OBS packages, repositories, and architectures
|
|
in a OBS project.
|
|
It can detect:
|
|
- which of the binary files published on OBS are already stored on Packagecloud,
|
|
- which ones still needs to be synchronized,
|
|
- which packages on Packagecloud are orphans, i.e. do not have a corresponding
|
|
file published on OBS.
|
|
|
|
Based on this information, `kata-pkgsyncs` can download only the necessary
|
|
files from OBS, upload them on Packagecloud, and delete orphans Packagecloud packages.
|
|
|
|
|
|
## Detailed behaviour
|
|
|
|
This is the sequence of tasks executed:
|
|
|
|
1. Fetch the configuration from a YAML config file.
|
|
2. For each OBS project specified, retrieve the available repositories,
|
|
architectures, packages. For each combination of `{repository,architecture,package}`,
|
|
retrieve the list of the build artifacts (i.e. the "rpm" / "deb" package files).
|
|
3. Get the list of files/packages already uploaded on Packagecloud.
|
|
This is to avoid re-uploading packages already sent to Packagecloud.
|
|
4. Build a list of files that needs to be synchronized from OBS to Packagecloud,
|
|
and identify which of the Packagecloud files have a corresponding file published
|
|
on OBS.
|
|
5. Download the identified files from OBS. The download phase create a local cache
|
|
of packages, to avoid re-downloading files if already done.
|
|
6. Upload the identified files to Packagecloud.
|
|
7. Optionally, delete orphans files from Packagecloud.
|
|
|
|
## Install and Usage
|
|
|
|
Install with:
|
|
```
|
|
$ go get github.com/kata-containers/packaging/cmd/kata-pkgsync`
|
|
```
|
|
|
|
Create your configuration:
|
|
```
|
|
$ cd $GOPATH/src/github.com/kata-containers/packaging/cmd/kata-pkgsync
|
|
$ cp config-example.yaml config.yaml
|
|
```
|
|
|
|
Run in "default" mode:
|
|
```
|
|
$ ~/go/bin/kata-pkgsync
|
|
```
|
|
See the help (`kata-pkgsync -h`) for more details.
|