commit | c066864d994b0e274cad20d37608bce4d15f368a | [log] [tgz] |
---|---|---|
author | Joey Armstrong <joey@opennetworking.org> | Tue Feb 06 17:00:39 2024 -0500 |
committer | Joey Armstrong <joey@opennetworking.org> | Wed Feb 07 09:51:19 2024 -0500 |
tree | e421c3f5a3c3986c7e74c14356c5768e589236c3 | |
parent | 13647a8baa066a7f29fa33e4b8000cc4d44b798c [diff] |
[VOL-5272] Check on code review input from Mirko D [VOL-5031] - original ticket app-install.sh -------------- o Fixed a typo in parsed path: + use names="${names[0]}" to extract path from sed command output. + Inline comments showing input string and names array variable. o Screen sources with latest shellcheck v0.9.0. o Replace cd $HERE && cd $APP_ROOT with {pushd,popd} and error checking. o Usability enhancements to improve log readability: + func init: validate and display envionment vars used. + Display banners and whitespace to breakup a long stream of artifact copying and unpacking. o Add simple getopts command line switches to enable --debug mode. o Replace "cp -v" with "rsync --checksum" + Adds error checking, detect bit flip. + Only copy files when needed. Dockerfile.voltha-onos ---------------------- o Install rsync command, mia from the base docker image. o Display command version installed for rsync and unzip. Change-Id: Ief6ca6bf381394d6a50e6bb17037228a2fe2041a
Docker build environment capable of producing a version of onos and needed apps that can run with voltha. Typically the onos restful api would be used to include apps after onos is started. This provides a build environment that includes current released and enabled oar files or optionally can import locally built oar files.
By default the current set of onos apps is imported from a maven repository as read from dependencies.xml
.
make build
If you wish to include your own onos apps then export the LOCAL_ONOSAPPS
environment variable to have locally built oar files copied from local_imports/oar
into the docker build environment rather than pulling from maven. Any oar files in this directory will be included and set to start on onos startup.
Note! its assumed that the standard apps (olt-app, sadis, aaa, and dhcpl2relay) build environment is one up directory from this build environment. Modify get-local-oars.sh
if this is not the case:
export LOCAL_ONOSAPPS=true make build
The voltha-onos build also includes a mechanism to build in a default onos network-config.json
file. You can simply edit network-cfg.json
before building the docker image. Or if using docker-compose or k8s volume mount over the built in file within the container /root/onos/config/network-cfg.json
with your own.
For example, in a docker-compose file:
onos: image: "${DOCKER_REGISTRY}${DOCKER_REPOSITORY}voltha-onos:${DOCKER_TAG}" ports: - "8101:8101" # ssh - "6653:6653" # OF - "8181:8181" # UI environment: ONOS_APPS: 'drivers,openflow-base' volumes: - "/var/run/docker.sock:/tmp/docker.sock" - "./network-cfg.json:/root/onos/config/network-cfg.json" networks: - default restart: unless-stopped