From 32bda8cdbbbb7ea3b31a96a87a6e004810f2103f Mon Sep 17 00:00:00 2001 From: brydenf Date: Wed, 1 Jul 2020 15:00:27 +0200 Subject: [PATCH] Added an alternative local environment setup Signed-off-by: brydenf --- 02-developer-how-to.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/02-developer-how-to.md b/02-developer-how-to.md index 673088a..0d00382 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. -- GitLab