commit | 1670916de18d7bceb67e2d319d5f408db8af13e8 | [log] [tgz] |
---|---|---|
author | pierventre <pier@opennetworking.org> | Thu Jul 16 20:48:24 2020 +0200 |
committer | pierventre <pier@opennetworking.org> | Wed Jul 29 21:15:06 2020 +0200 |
tree | 01ee8a2ad3ce4cd4543e6e98c0d1e9c10f601007 | |
parent | f03097a6927cb4edaa6027a021d0a29a71f20c83 [diff] |
[AETHER-443][AETHER-453] Improve tost-onos image builder - The workspace is built from scratch (onos and apps) - Apps are built using local version or pulled from mvn repos - 'tost-onos' is a minimal onos image built using 'tost' profile - 'tost' is an onos image buit on top of 'tost-onos' with the tost apps Change-Id: Id8ac664d16e6eaade658ba5bc41de1359aae09c5
Docker build environment capable of producing a version of ONOS and needed apps that can run with TOST. Typically the ONOS restful api would be used to include apps after ONOS is started.
We provide multiple targets for the Makefile
onos
is used to setup the workspace for the build. It is possible to build the image using a specific branch (export ONOS_BRANCH
variable) or a specific review (export ONOS_REVIEW
variable). It clones onos
if does not exist in the workspace and uses current workspace unless above vars are defined.
onos-build
is used to build a specialized Docker image of ONOS that will contain only the apps needed by TOST. It depends on onos-checkout
target
# Build a Docker image from the current workspace. make onos-build
# Build a Docker image from the onos-2.2 branch. export ONOS_BRANCH=onos-2.2 && make onos-build
# Build a Docker image from the review 123456. export ONOS_REVIEW=12345 && make onos-build
Use target clean
to remove the local artificats generated by the tool.
make clean
We provide multiple push-target for the Makefile. You need to first login by docker login
command to push the image on a repository.
onos-push
will push the produced ONOS_IMAGENAME
on the defined DOCKER_REGISTRY
and DOCKER_REPOSITORY
.
export DOCKER_REPOSITORY=onosproject/ make onos-push