Custom Docker Deployment via NFS-Client

Hello Guys,

I have a problem with the custom deployment of a container.

I have set up a cluster system using 4 Raspberry Pis (1 Master and 3 Workers) connected via NFS-Client. The normal OPENREMOTE system works fine, and everything is set up correctly (as shown in the attached screenshot; Manager - Worker3, etc.).

Local Machine (for testing): Now I want to set up a custom project. I downloaded the data from GitHub, installed the programs, executed ./gradlew clean installDist, and built the Docker image using docker build -t openremote/manager:latest ./manager/build/install/manager. After that, I started the Docker container using docker compose -f docker-compose.yml up -d, and everything worked fine on my local machine.

Then I tried to apply the same process on my cluster system. The Docker build process worked (docker build -t openremote/manager:latest ./manager/build/install/manager), and I started the Docker container using docker stack deploy --with-registry-auth --compose-file docker-compose.yml Monitor01. However, it somehow didn’t use the container I had prepared earlier.

I think the issue is related to the different nodes (Master + Workers) …

I want to use my own custom widgets, so I need to figure out why it didn’t work. Or is there another way to include custom widgets?

Thanks for your help.

Hey, sounds like an interesting setup you have created.

When you say custom widgets, I assume you mean for use within the manager app or do you also have your own custom app?

If you need to deploy a customised manager app then you could just compile your customised manager app using ./gradlew clean installDist :openremote:ui:app:manager and then volume map that into the standard manager image at /opt/web/manager.

This doesn’t help explain why your custom docker image wasn’t used though. Did you build the image on the RPi or using buildx and then save → load the image? Check that your image is loaded into the RPi docker engine docker image ls before deploying.

1 Like

Hello,

This behavior is expected in Docker Swarm. By default, docker stack deploy requires images to be available in a Docker registry (such as Docker Hub or a private registry), rather than just locally. In my opinion, the simplest approach would be to create your own registry and push the custom manager image there. I would recommend using AWS ECR, which provides 500 MB of free storage within the 12-month free tier.

1 Like

You can also take a look at this old thread Keycloack does not recognize my themes

1 Like

To add on to this @bano19 , it’s also very easy to deploy your own OSS registry, I’d recommend Sonatype Nexus 3, it’s very easy to set up, with a great UI, and is a single-container solution, so if you can run it, I’d definitely recommend it. CNCF Distribution is much simpler and lightweight but also presents some issues. Harbor is also very widely used, but is a bit more difficult to deploy.

1 Like

Hello everyone,

Thank you all for your quick responses!

@Rich: Yes, this is something entirely new for me. I’ve already managed to configure the Docker Swarm to use my custom deployments (Maps, Keycloak, Colors, etc.). I think @michal and @panos are right with their suggestions, and I’ll try to build the image, either using AWS ECR or Sonatype Nexus 3.

At the moment, I’m unable to make any changes, but I hope to continue working on it in 2 to 3 weeks. I’ll keep you all updated as I make progress.

Thanks again to everyone! I will keep you guys updated.

1 Like