Closed electrocucaracha closed 4 years ago
All in all this is good set of changes, and the reduction in image size is definitely an improvement. My only concerns are:
-config /etc/<app>.yml
parameter when overriding the entrypoint.All in all this is good set of changes, and the reduction in image size is definitely an improvement. My only concerns are:
* Entrypoints, as the eNB has to be the last application to run (otherwise it will fail). * While there are several ways to work around this, it will require further update of the example deployment code in the repository. * Existing deployments: One example can be seen [here](https://github.com/cncf/cnf-testbed/blob/master/examples/use_case/gogtp-k8s/k8s_bridged_cmk/gogtp/templates/deployment.yaml). Existing code will need to be updated to include the `-config /etc/<app>.yml` parameter when overriding the entrypoint.
Hey @michaelspedersen thanks for the quick response. I was thinking to create a docker-compose.yml
file as a quick way to express requirements and order execution but I'm still working on it.
Regarding the configuration file, I was thinking to override the configuration file /etc/<app>.yml
with a customized file something like this:
docker run -d -v ./enb/single-host-enb.yml:/etc/enb.yml gogtp:enb
Running it through Docker would be one approach, but for the testbed we will likely still have to consider Helm as well. Adding the configuration can be done by a volume mount similar to what you mention, but ideally it should be added as a configmap.
IIRC the binary will look for the configuration in it's own directory, so unless the config is pushed to /usr/local/bin (let's not do that :) ) then I think the best approach is to update all of the existing code to always include the path to the configuration file as well.
Yeah, using a ConfigMap should be more appropriate. The main idea is to separate the configuration file somewhere it can be override it to following some of the twelve factor principles.
Regarding the destination of the binaries and configuration, eventually they need to be changed to a least privileged place. Running docker containers with all privileged permissions could be a bad idea.
Last but not least, I noticed that some containers expose ports which are not defined in the Dockerfiles. I'm going to keep testing and their review code.
Changes added to the Tested. Some updates are needed for existing use-cases, but until the images are updated on docker hub everything will function "as usual"
Updated use-cases to reflect changes to GoGTP code and changes to image.
The current Dockerfile implementation of the Network Functions has the following sizes
Implementing some of the official best practices, the following results can be achieved.
So these changes reduce the space required by the Docker registry.