Custom Asset - how to deploy to local server

Hi there,

I’ve been evaluating open remote for a custom project. I’ve followed the various guides and I have OR running on a local self-hosted server behind a Caddy reverse proxy wireguard tunnel.

I now wish to create my own custom asset rather than use the Thing asset.

I’ve cloned the custom project and created my own asset. Running under IntelJ I can serve the manager and my custom asset is shown and is available to configure.

I now wish to incorporate the changes on my local self-hosted server. There is a hint in the wiki about volume mapping the changes, but I can’t figure out how to do this. I’ve successful run ./gradlew clean installDist
running
docker compose -f profile/deploy.yml build manager
WARN[0000] No services to build

How do I then build a local manager image that is based on this project so that I could save/load it onto my local self-hosted server.

My next thought would be to clone the entire openremote repo (not just the custom project) then merge my model changes and rebuild the openremote project using the docker compose build method. I could then use the docker save/load method. Is this the advisable method to pursue?

I’ve tried to build the openremote on my ubuntu 22.04 machine but get a few build errors which I am trying to resolve.

The ultimate goal is to have my custom asset include an agent link (MQTT) pre-setup to subscribe to a topic based on an attribute (the mac address of the agent) with a number of rules pre-configured. I am thinking that using the API and some scripts would be sensible for this.

Am I on the correct path?

Robin

I’m going to reply to my own question for the record:

On the development machine the folder deployment/build/image contains the build jar files from the custom project.

So to volume map this into a running image on another machine make a copy of the folder

tar cvf deployment.tar deployment/*

copy the deployment.tar to the self hosted machine running open-remote

untar it in the directory where the openremote docker-compose.yml is localed
tar xvf deployment.tar

I only wanted to volume map the deployment folder for the manager so I untared to a directory called man-deployment

then I added the following to the volume mapping for the manager service

  • ./man-deployment/build/image:/deployment

Restarting the services and my new asset was added.