Skip to content

Commit

Permalink
Fleet Management Docker Support
Browse files Browse the repository at this point in the history
* docker-compose.yml: Change docker-compose file to reference to pankalog/fleet-management for the manager and pankalog/fleet-deployment for the deployment image. Also, set all required variables to logical defaults, whilst still allowing user customization for them.

* build_and_publish_to_docker.sh: Made for me to easily rebuild and publish images with 1 script. Takes approximately 4 minutes. Requires login to correct user, repositories create correctly, etc. Publishes to both latest and commit hash tags. Also runs the entire fleet-management OpenRemote stack.

* Update README.md to reflect the new changes for Docker container quickstart
  • Loading branch information
pankalog committed Jan 22, 2024
1 parent c1aa391 commit 5ae7952
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 15 deletions.
45 changes: 36 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,51 @@
# Welcome to OpenRemote's Fleet Management Repository!
# OpenRemote Fleet Management Integration v1

This repository contains the OpenRemote custom project that contains full support for fleet management features, like location tracking and session tracking, and also the industry-first **complete, automatic data recognition** from any Teltonika Telematics device model.
![CI/CD](https://github.com/openremote/fleet-management/workflows/CI/CD/badge.svg)
[![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/)

Please look at the wiki for the tutorial on how to set up your ownfleet management system, and the Developer Guide to understand the inner workings of the fleet management implementation.
This repository contains the OpenRemote custom project that contains full support for fleet management features, like
location tracking and session tracking, and also the industry-first **complete, automatic data recognition** from any
Teltonika Telematics device model.

Please look at the wiki for the tutorial on how to set up your own fleet management system, and the Developer Guide to
understand the inner workings of the fleet management implementation.

## Quickstart

An online demo will be made available to the public shortly, but you can still run the OpenRemote fleet management implementation locally using Docker:
An online demo will be made available to the public shortly, but you can still run the OpenRemote fleet management
implementation locally using Docker:

The quickest way to get your own environment with full access is to make use of our docker images (both `amd64` and `arm64` are supported).
The quickest way to get your own environment with full access is to make use of our docker images (both `amd64` and
`arm64` are supported).
1. Make sure you have [Docker Desktop](https://www.docker.com/products/docker-desktop) installed (v18+).
2. Download the docker compose file:
[OpenRemote Stack](https://raw.githubusercontent.com/openremote/fleet-management/master/docker-compose.yml) (Right click 'Save link as...')
3. In a terminal `cd` to where you just saved the compose file and then run:
```
docker-compose pull
docker-compose -p fleet-management up
docker-compose -p fleet-management up -d
```
If all goes well then you should now be able to access the OpenRemote Manager UI at [https://localhost](https://localhost).
You will need to accept the self-signed certificate, see [here](https://www.technipages.com/google-chrome-bypass-your-connection-is-not-private-message) for details how to do this in Chrome
(similar for other browsers).

### Login credentials
Username: admin
Password: secret

### Changing host and/or port
The URL you use to access the system is important, the default is configured as `https://localhost` if you are using a VM or want to run on a different port then you will need to set the `OR_HOSTNAME` and `OR_SSL_PORT` environment variables, so if for example you will be accessing using `https://192.168.1.1:8443` then use the following startup command:

BASH:
```
OR_HOSTNAME=192.168.1.1 OR_SSL_PORT=8443 docker-compose -p fleet-management up -d
```
or

CMD:
```
If all goes well then you should now be able to access the OpenRemote Manager UI at [https://localhost](https://localhost). You will need to accept the self-signed
certificate, see [here](https://www.technipages.com/google-chrome-bypass-your-connection-is-not-private-message) for details how to do this in Chrome (similar for other browsers).
cmd /C "set OR_HOSTNAME=192.168.1.1 && set OR_SSL_PORT=8443 && docker-compose -p fleet-management up -d"
```


# Custom Project Format

Expand Down
2 changes: 1 addition & 1 deletion build_and_publish_to_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ docker login
docker buildx create --use --platform=linux/arm64,linux/amd64 --name multi-platform-builder
docker buildx build --push --platform linux/amd64,linux/arm64 -t pankalog/fleet-deployment:"$GIT_DEPLOYMENT_VERSION" -t pankalog/fleet-deployment:"latest" --builder multi-platform-builder ./deployment/build/
docker buildx build --push --platform linux/amd64,linux/arm64 -t pankalog/fleet-management:"$GIT_DEPLOYMENT_VERSION" -t pankalog/fleet-management:"latest" --builder multi-platform-builder ./openremote/manager/build/install/manager/
OR_ADMIN_PASSWORD=secret OR_HOSTNAME=localhost DEPLOYMENT_VERSION="$GIT_DEPLOYMENT_VERSION" MANAGER_VERSION="$GIT_DEPLOYMENT_VERSION" docker-compose -p fleet-management up -d
docker-compose -p fleet-management up -d
10 changes: 5 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ services:
# This service will only populate an empty volume on startup and then exit.
# If the volume already contains data, it exits immediately.
deployment:
image: pankalog/fleet-deployment:${DEPLOYMENT_VERSION?DEPLOYMENT_VERSION must be set}
image: pankalog/fleet-deployment:${DEPLOYMENT_VERSION:-latest}
volumes:
- deployment-data:/deployment

Expand All @@ -79,7 +79,7 @@ services:
- deployment-data:/data
environment:
LE_EMAIL: ${OR_EMAIL_ADMIN}
DOMAINNAME: ${OR_HOSTNAME?OR_HOSTNAME must be set}
DOMAINNAME: ${OR_HOSTNAME:-localhost}
DOMAINNAMES: ${OR_ADDITIONAL_HOSTNAMES:-}
# USE A CUSTOM PROXY CONFIG - COPY FROM https://github.com/openremote/proxy/blob/main/haproxy.cfg
#HAPROXY_CONFIG: '/data/proxy/haproxy.cfg'
Expand All @@ -102,7 +102,7 @@ services:
volumes:
- deployment-data:/deployment
environment:
KEYCLOAK_ADMIN_PASSWORD: ${OR_ADMIN_PASSWORD:?OR_ADMIN_PASSWORD must be set}
KEYCLOAK_ADMIN_PASSWORD: ${OR_ADMIN_PASSWORD:-secret}
KC_HOSTNAME: ${OR_HOSTNAME:-localhost}
KC_HOSTNAME_PORT: ${OR_SSL_PORT:--1}
# <<: *awslogs
Expand All @@ -122,7 +122,7 @@ services:
environment:
# Here are some typical environment variables you want to set
# see openremote/profile/deploy.yml for details
OR_ADMIN_PASSWORD: ${OR_ADMIN_PASSWORD?OR_ADMIN_PASSWORD must be set}
OR_ADMIN_PASSWORD: ${OR_ADMIN_PASSWORD:-secret}
OR_SETUP_TYPE: # Typical values to support are staging and production
OR_SETUP_RUN_ON_RESTART:
OR_EMAIL_HOST:
Expand All @@ -131,7 +131,7 @@ services:
OR_EMAIL_X_HEADERS:
OR_EMAIL_FROM:
OR_EMAIL_ADMIN:
OR_HOSTNAME: ${OR_HOSTNAME?OR_HOSTNAME must be set}
OR_HOSTNAME: ${OR_HOSTNAME:-localhost}
OR_ADDITIONAL_HOSTNAMES: ${OR_ADDITIONAL_HOSTNAMES:-}
OR_SSL_PORT: ${OR_SSL_PORT:--1}
OR_DEV_MODE: ${OR_DEV_MODE:-false}
Expand Down

0 comments on commit 5ae7952

Please sign in to comment.