The Data Retriever component is responsible for retrieving the Homewizard data and store it in the InfluxDB database.
You can pull an existing image from Dockerhub.
-
Build the project as a container image
docker build . -f Dockerfile-amd64 -t homewizard-datacollector:<tag>
-
Run the program
docker run homewizard-datacollector:001 --network="host"
The
--network="host"
argument makes sure that the container connects to the host's network.
If you want to run the image on a Raspberry PI, you need to use the Dockerfile-arm32
for building the image.
If you build this container for arm32 on a Windows system, use docker buildx to build the image.
You also need the required emulators. Find information on how to install them here.
Make sure that you have the linux/arm/v7 emulator. Verify this by executing docker buildx ls
.
Additional background information for this can be found here.
Once everything is in place, build the image using this command:
docker buildx build . -f .\Dockerfile-arm32 -t homewizard-datacollector:<tag>
-
Build the container locally
-
Tag the container so that it can be pushed to dockerhub:
docker tag homewizard-datacollector:001 docker.io/fgheysels/homewizard-datacollector:001
-
Make sure to be logged in with Docker Hub via
docker login
-
Push the image to the repository
docker push fgheysels/homewizard-datacollector:0.0.1
-
Pull image
docker pull docker.io/fgheysels/homewizard-datacollector:0.0.1
Deploy the component on a Kubernetes cluster by simply deploying the deployment manifest which is found in the .\deploy\k8s\
folder.
kubectl apply -f .\deploy\k8s\deployment.yaml -n homewizard-data