| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
This wraps the build-system in Docker so that the host system and the target system are decoupled. This allows:
The advantage of these scenarios is that they allow reproducible builds and testing for developers. This is the first iteration of the build-system to allow the team to use it and get used to it.
For configurations that involve building and running the agent alone, we still use docker-compose for consistency with more complex configurations. The more complex configurations allow the agent to be run in conjunction with parts of the cloud infrastructure (these parts of the code are not public), or with external brokers (such as VerneMQ for MQTT), or with other external tools (such as TSDB to allow the agent to export metrics). Note: no external TSDB scenarios are available in the first iteration, they will be added in subsequent iterations.
This differs from the packaging dockerfiles as it designed to be used for local development. The main difference is that these files are designed to support incremental compilation in the following way:
The exact improvement on the compile-cycle depends on the speed of the network connection to pull the netdata dependencies, but should shrink the time considerably. For example, on a macbook pro the initial install takes about 1min + network delay [Note: there is something bad happening with the standard installer at the end of the container build as it tries to kill the running agent - this is very slow and bad] and the incremental step only takes 15s. On a debian host with a fast network this reduces 1m30 -> 13s.
build_external/bin/clean-install.sh arch current
docker run -it --rm arch_current_dev
echo >>daemon/main.c # Simulate edit by touching file
build_external/bin/make-install.sh arch current
docker run -it --rm arch_current_devCurrently there is no detection of when the installer needs to be rerun (really this is when the autoreconf / configure step must be rerun). Netdata was not written with multi-stage builds in mind and we need to work out how to do this in the future. For now it is up to you to know when you need to rerun the clean build step.
build_external/bin/clean-install.sh arch current
build_external/bin/clean-install.sh ubuntu 19.10
docker run -it --rm arch_current_dev
echo >>daemon/main.c # Simulate edit by touching file
build_external/bin/make-install.sh arch current
docker run -it --rm arch_current_dev
echo >>daemon/daemon.c # Simulate second edit step
build_external/bin/make-install.sh arch current # Observe a single file is rebuilt
build_external/bin/make-install.sh arch current # Observe both files are rebuiltThe state of the build in the two containers is independent.
This functions the same as the previous example but is wrapped in docker-compose to allow injection into more complex test configurations.
Distro=debian Version=10 docker-compose -f projects/only-agent/docker-compose.yml upNote: it is possible to run multiple copies of the agent using the --scale option for docker-compose up.
Distro=debian Version=10 docker-compose -f projects/only-agent/docker-compose.yml up --scale agent=3# Need to call clean-install on the configs used in the parent-child containers
docker-compose -f parent-child/docker-compose.yml up --scale agent_child1=2Note: this is not production ready yet, but it is left in so that we can see how it behaves and improve it. Currently it produces the following problems:
This is for internal use only as it requires access to a private repo. Clone the vernemq-docker repo and follow the instructions within to build an image called vernemq.
build_external/bin/clean-install.sh arch current # Only needed first time
docker-compose -f build_external/projects/aclk-testing/vernemq-compose.yml -f build_external/projects/aclk-testing/agent-compose.yml up --buildNotes:
| Back | FazBrowse Home | New Git URL |