diff --git a/02-developer-how-to.md b/02-developer-how-to.md index 673088a6e3d84863c2019ff4c820f1fad2340abf..0d003826f0a716647977a0fde60f4f0c13d64f3d 100644 --- a/02-developer-how-to.md +++ b/02-developer-how-to.md @@ -412,3 +412,27 @@ kubectl -n osm delete service/ro # undo both with: # kubectl -n osm apply -f /etc/osm/docker/osm_pods/ro.yaml ``` +## Alternative +### Clone relevant git repository +Visit [the projects list](https://osm.etsi.org/gerrit/#/admin/projects/) to find out which +repository you need. +For NBI for example: +``` +git clone "https://osm.etsi.org/gerrit/osm/NBI" +``` +### Build container +Once changes have been made and the component is ready to be redeployed, it must first be built. + +Run (from within the cloned repository) +``` +docker build -t opensourcemano/nbi:dev -f Dockerfile.local . +``` +replacing `opensourcemano/nbi:dev` with the name of the container to be rebuilt (as it appears in `docker ps`). + +The first build will take considerably longer than subsequent builds as packages will need to be fetched for the first time. +### Redeploy container +Once the container has been built, it can be redeployed: +``` +docker service update osm_nbi --image opensourcemano/nbi:dev --force +``` +Again, replacing the relevant sections with the component you are updating.