openstack-helm-images/mini-mirror
Jean-Philippe Evrard d9c6cbc697 Use infra pipelines and roles
Now that openstack-infra has new roles to build/upload/promote
artifacts from gating, we are making use of them as much as we can.

Mini-mirror was also changed:
- It was wrongly affiliated to SUSE, so that Copyright line was removed.
- The docker file was incorrectly named, and was therefore renamed for
  consistency.

The LOCI jobs were not updated, and will be part of another commit.

Change-Id: Ic37e634c52cb98e12568783ca6c7ac93e92ea2a7
2019-02-26 16:01:57 +01:00
..
etc Add mini-mirror image 2019-01-12 11:38:56 -06:00
sources/aptly-example Add mini-mirror image 2019-01-12 11:38:56 -06:00
tools Add mini-mirror image 2019-01-12 11:38:56 -06:00
Dockerfile.ubuntu_xenial Use infra pipelines and roles 2019-02-26 16:01:57 +01:00
README.rst Add mini-mirror image 2019-01-12 11:38:56 -06:00
build.sh Use infra pipelines and roles 2019-02-26 16:01:57 +01:00

README.rst

Mini-mirror Image Build

Mini-mirror is a service that mirrors existing Debian/Ubuntu repositories and can be used as an APT source for OpenStack-Helm deployments with no internet connectivity.

Build Requirements

Add mirror sources

Mini-mirror requires a directory at build-time that contains the repositories and packages that will be mirrored.

sources/
| -- source1/
     |-- source.txt
     |-- packages.txt
| -- source2/
     |-- source.txt
     |-- packages.txt

Sources are defined as directories containing the files:

  • source.txt - contains location and metadata information for a source.
  • packages.txt - contains a list of packages, formatted as package queries for a source.

Example source.txt format:

source_url source_key_url dist components

Example packages.txt format:

package1
package2
package3 (>=3.6)

To specify the location of your sources directory, export the following environment variable:

export MIRROR_SOURCE_DIR=/path/to/sources

Generate a signing key

Warning

The demo image published in the OpenStack-Helm-Addons repository is not signed. It should NOT be used in production and signing should be enabled in the Aptly config file.

Mini-mirror signs the release file during the image build process. Supply a path to a valid GPG key using the RELEASE_SIGN_KEY environment variable.

export RELEASE_SIGN_KEY_PATH=key.gpg

Additionally, supply your GPG key passphrase with the RELEASE_SIGN_KEY_PASSPHRASE environment variable:

export RELEASE_SIGN_KEY_PASSPHRASE=passphrase

Create an Aptly config file (optional)

Specify the location of your Aptly config file using the APTLY_CONFIG_PATH environment variable:

export APTLY_CONFIG_PATH=aptly.conf

Proxy

If building the mini-mirror image behind a proxy server, define the standard HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables. They will be passed as build-args.

Build

To build the mini-mirror image, execute the following:

export DISTRO=ubuntu
./build.sh