[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
7 files changed
tree: 01ee8a2ad3ce4cd4543e6e98c0d1e9c10f601007
  1. .gitignore
  2. .gitreview
  3. CODE_OF_CONDUCT.md
  4. Dockerfile.tost
  5. Makefile
  6. ONOS_VERSION
  7. README.md
  8. VERSION
  9. app-install.sh
  10. dependencies.xml
  11. mvn_settings.sh
README.md

TOST ONOS Development Build Environment

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.

Build

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

Clean

Use target clean to remove the local artificats generated by the tool.

make clean

Push

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