100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
Added DATE_TAG to profiles, moved demo.yml to docker-compose.yml, minor updates
Christian Bauer70256f9176a6
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txtindex 1ec764b7a..e06982de6 100644--- a/CONTRIBUTORS.txt+++ b/CONTRIBUTORS.txt@@ -1,2 +1,4 @@Christian Bauer <[email protected]>Richard Turner <[email protected]>+Michael Rademaker <[email protected]>+Robin Dekkers <[email protected]>diff --git a/README.md b/README.mdindex 3391a524f..059169edb 100644--- a/README.md+++ b/README.md@@ -8,49 +8,79 @@ If you want to try OpenRemote v2, [read the OpenRemote v2 documentation](https:/## Quickstart-Checkout this project or at a minimum, get the Docker Compose [profiles](profile/) and ensure you have [Docker Community Edition](https://www.docker.com/) installed, then either use images from docker hub (easiest) or build the images locally first.+Checkout this project and ensure you have [Docker Community Edition](https://www.docker.com/) installed, then either use images from Docker Hub (easiest) or build the images locally first.-### Use images from Docker Hub-We publish our docker images to [Docker Hub](https://hub.docker.com/u/openremote/), please be aware that the published images may be out of date compared to the codebase, if you want to run the latest code then you may need to build the images first. To run a demo using Docker Hub images simply run the following command from the repo root (or directory containing the `profile` directory if you only downloaded the profiles):+***NOTE: If you are not using Docker Community Edition but the older Docker Toolbox (Virtual Box), you must specify the `IDENTITY_NETWORK_HOST` environment variable as the IP address of the Docker VM when executing `docker-compose` commands:***```-docker-compose -p openremote -f profile/demo.yml up --no-build+Windows Command Prompt (quotes are essential):+set "IDENTITY_NETWORK_HOST=192.168.99.100" && docker-compose ...++Bash:+IDENTITY_NETWORK_HOST=192.168.99.100 docker-compose ...```-### Build images locally-Alternatively you can build the docker images locally, to do this please refer to the [Developer Guide](https://github.com/openremote/openremote/wiki/Developer-Guide%3A-Building-the-code) to build the code, once the code is built+### Starting OpenRemote with images from Docker Hub++We publish Docker images to [Docker Hub](https://hub.docker.com/u/openremote/), please be aware that the published images may be out of date compared to this codebase. If you want to run the latest code, build the images from this source.++To run OpenRemote using Docker Hub images simply execute the following command from the checked out root project directory:```-docker-compose -p openremote -f profile/demo.yml up --build+docker-compose up --no-build```-***NOTE: If you are using docker toolbox (Virtual Box) then you must specify the `IDENTITY_NETWORK_HOST` environment variable as the IP address of the docker VM:***+### Starting OpenRemote with source-build images++Alternatively you can build the Docker images locally from source. First build the code:+```-Command Prompt: set "IDENTITY_NETWORK_HOST=192.168.99.100" && docker-compose... (quotation marks are essential)-Bash: IDENTITY_NETWORK_HOST=192.168.99.100 docker-compose....+./gradlew clean build installDist -x test```-Once you have running docker containers you can Access the manager UI and API (you will have to accept the 'insecure' self-signed SSL certificate):+Next, build the Docker images and start the stack with:```-URL: https://localhost/ (https://192.168.99.100/ if using Docker Toolbox)+docker-compose up --build+```++A first build will download many dependencies (and cache them locally for future builds), this can take up to 30 minutes.++### Using the OpenRemote demo++When all Docker containers are ready, you can access the OpenRemote UI and API with a webbrowser (replace `localhost` with `192.168.99.100` if you are using Docker Toolbox):++**OpenRemote Manager:** https://localhostUsername: adminPassword: secret-```--The console app of `tenantA` can be accessed on https://localhost/tenantA/ with username `testuser3` and password `testuser3`.-Stop the stack and remove all unused data volumes (alternatively delete only the openremote volumes if you don't want all unused volumes to be removed) with:+**Demo Smart Building App:** https://localhost/smart-building-v1/+Username: testuser3+Password: testuser3++You must accept and make an exception for the 'insecure' self-signed SSL certificate. You can configure a production installation of OpenRemote with a your own certificate or automatically use one from [Let's Encrypt](https://letsencrypt.org/).++### Preserving data and configuration++Interrupting the `docker-compose up` execution stops the stack running in the foreground. The OpenRemote containers will stop but not be removed. To stop **and** remove the containers, use:```-docker-compose -p openremote -f profile/demo.yml down-docker volume prune+docker-compose down```-To preserve data between restarts, don't delete the Docker volumes `openremote_deployment-data` and `openremote_postgresql-data` between restarts. You must also change `SETUP_WIPE_CLEAN_INSTALL` to `false` in `demo.yml`!+This will not affect your data, which is durably stored independently from containers in Docker volumes (see all with `docker volume ls`):-More configuration options of the images are documented [in the deploy.yml profile](https://github.com/openremote/openremote/blob/master/profile/deploy.yml).+- `openremote_deployment-data` (map tiles, static resources)+- `openremote_postgresql-data` (user/asset database storage)+- `openremote_proxy-data` (SSL proxy configuration and certificates)+If you want to create a backup of your installation, make a copy of these volumes.++**The default configuration will wipe the user/asset database storage and import demo data when containers are started!** This can be changed with the environment variable `SETUP_WIPE_CLEAN_INSTALL`. Set it to to `false` in `docker-compose.yml` or provide it on the command line.++When a configuration environment variable is changed, you must recreate containers. Stop and remove them with `docker-compose down` and then `docker-compose up` the stack again.++More configuration options of the images are documented [in the deploy.yml profile](https://github.com/openremote/openremote/blob/master/profile/deploy.yml).## Contributing to OpenRemotediff --git a/profile/demo.yml b/docker-compose.ymlsimilarity index 80%rename from profile/demo.ymlrename to docker-compose.ymlindex 296f391af..5485d569a 100644--- a/profile/demo.yml+++ b/docker-compose.yml@@ -5,11 +5,11 @@## Install Docker Community edition (https://docker.com/) on Windows, macOS, or Linux.#-# Start a transient demo stack with:+# Start a demo stack in the project root directory with:#-# docker-compose -p openremote -f profile/demo.yml up+# docker-compose up#-# For full documentation, see deploy.yml+# For full documentation, see profile/deploy.yml## Steps to create a permanent installation:#@@ -26,16 +26,17 @@## SETUP_WIPE_CLEAN_INSTALL=true \# SETUP_ADMIN_PASSWORD=secret \-# docker-compose -p openremote -f profile/demo.yml up+# docker-compose up## This creates the initial database and optionally imports some examples. Inspect the-# running installation and ensure it's working. You are now ready to restart the stack-# without the clean wipe option. Passwords can be changed in the application.+# running installation and ensure it's working. You should now stop the stack and remove+# all containers. It is important that you recreate the containers and start again WITHOUT+# the SETUP_WIPE_CLEAN_INSTALL setting! Passwords can be changed in the application.## Database schemas will be upgraded to new versions of the services automatically, you do# not have to wipe all data to install a new version of OpenRemote.#-# Your extension JAR files should be in the manager's ../deployment/manager/extensions/ directory.+# Your extension JAR files should be in the deployment/manager/extensions/ directory.#version: '2.2'@@ -50,8 +51,8 @@ services:# This service will only populate an empty volume on startup and then exit.# If the volume already contains data, it exits immediately.deployment:- build: '../deployment'- image: openremote/deployment:latest+ build: 'deployment'+ image: openremote/deployment:${DATE_TAG:-latest}volumes:- deployment-data:/deployment@@ -61,7 +62,7 @@ services:# and SSL certificates.proxy:extends:- file: deploy.yml+ file: profile/deploy.ymlservice: proxydepends_on:manager:@@ -76,7 +77,7 @@ services:# configuration files which were baked into the managers image.manager:extends:- file: deploy.yml+ file: profile/deploy.ymlservice: managerdepends_on:keycloak:@@ -86,7 +87,7 @@ services:keycloak:extends:- file: deploy.yml+ file: profile/deploy.ymlservice: keycloakdepends_on:postgresql:@@ -99,7 +100,7 @@ services:# Alternatively, you can store postgresql data in a directory on your host.postgresql:extends:- file: deploy.yml+ file: profile/deploy.ymlservice: postgresqlvolumes:- postgresql-data:/deploymentdiff --git a/manager/Dockerfile b/manager/Dockerfileindex 338422ee2..dad536cf1 100644--- a/manager/Dockerfile+++ b/manager/Dockerfile@@ -1,10 +1,6 @@FROM debian:stretchMAINTAINER [email protected]-# Add git commit label must be specified at build time using --build-arg GIT_COMMIT=dadadadadad-ARG GIT_COMMIT=unknown-LABEL git-commit=$GIT_COMMIT-# Install curl, wget, ca-certificates, procpsRUN apt-get update && apt-get install -y --no-install-recommends \procps \@@ -63,6 +59,10 @@ RUN set -ex; \# see CA_CERTIFICATES_JAVA_VERSION notes aboveRUN /var/lib/dpkg/info/ca-certificates-java.postinst configure+# Add git commit label must be specified at build time using --build-arg GIT_COMMIT=dadadadadad+ARG GIT_COMMIT=unknown+LABEL git-commit=$GIT_COMMIT+ENV JAVA_OPTS -Xmx1gENV APP_DOCROOT /deployment/manager/appdiff --git a/profile/deploy.yml b/profile/deploy.ymlindex 3651440bd..99b733eab 100644--- a/profile/deploy.yml+++ b/profile/deploy.yml@@ -1,13 +1,8 @@# OpenRemote v3#-# Install Docker Community edition (https://docker.com/) on Windows, macOS, or Linux.-#-# Start the stack with:-#-# docker-compose -p openremote -f profile/demo.yml up-#-# Note that you must extend this configuration to complete it with service-# dependencies and volume mappings, see demo.yml.+# This is the base configuration profile. Note that you must extend this+# configuration to complete it with service dependencies and volume+# mappings, see docker-compose.yml for a usable complete configuration.#version: '2.2'@@ -21,7 +16,7 @@ services:context: '../proxy'# Image will be pulled when using the `docker-compose pull` command or `docker-compose up --no-build`- image: openremote/proxy:latest+ image: openremote/proxy:${DATE_TAG:-latest}environment:@@ -86,7 +81,7 @@ services:build: '../manager/build/install/manager'# Image will be pulled when using the `docker-compose pull` command or `docker-compose up --no-build`- image: openremote/manager:latest+ image: openremote/manager:${DATE_TAG:-latest}environment:@@ -257,7 +252,7 @@ services:build: '../keycloak'# Image will be pulled when using the `docker-compose pull` command or `docker-compose up --no-build`- image: openremote/keycloak:latest+ image: openremote/keycloak:${DATE_TAG:-latest}environment:@@ -304,7 +299,7 @@ services:build: '../postgresql'# Image will be pulled when using the `docker-compose pull` command or `docker-compose up --no-build`- image: openremote/postgresql:latest+ image: openremote/postgresql:${DATE_TAG:-latest}environment:@@ -313,7 +308,7 @@ services:TZ: Europe/Zurich# Create database and user if there is no data. For production, run- # this once with your volume mapping for the data directory (see demo.yml),+ # this once with your volume mapping for the data directory (see docker-compose.yml),# then remove the variables and restart to preserve the stored data. It# doesn't hurt if you don't remove it, an existing will never be reconfigured.POSTGRES_DB: openremote@@ -335,4 +330,4 @@ services:# Map tile server for serving raster tiles using mbtilesmap:build: '../map'- image: openremote/tileserver-gl+ image: openremote/tileserver-gl:${DATE_TAG:-latest}diff --git a/profile/dev-proxy.yml b/profile/dev-proxy.ymlindex cec62abf1..8337b7022 100644--- a/profile/dev-proxy.yml+++ b/profile/dev-proxy.yml@@ -49,7 +49,7 @@ services:build:context: ../keycloakdockerfile: dev.Dockerfile- image: openremote/keycloak_dev:latest+ image: openremote/keycloak_dev:${DATE_TAG:-latest}# Access directly if needed on localhostports:- "127.0.0.1:8081:8080"diff --git a/profile/dev-testing.yml b/profile/dev-testing.ymlindex 459603a6c..ecf06ff52 100644--- a/profile/dev-testing.yml+++ b/profile/dev-testing.yml@@ -20,7 +20,7 @@ services:build:context: ../keycloakdockerfile: dev.Dockerfile- image: openremote/keycloak_dev:latest+ image: openremote/keycloak_dev:${DATE_TAG:-latest}volumes:- ../ui/keycloak/themes/openremote:/opt/jboss/keycloak/themes/openremotedepends_on:diff --git a/profile/dev.yml b/profile/dev.ymlindex c795a0258..05735a10f 100644--- a/profile/dev.yml+++ b/profile/dev.yml@@ -54,7 +54,7 @@ services:build:context: ../keycloakdockerfile: dev.Dockerfile- image: openremote/keycloak_dev:latest+ image: openremote/keycloak_dev:${DATE_TAG:-latest}# Access directly if needed on localhostports:- "127.0.0.1:8081:8080"diff --git a/ui/yarn.lock b/ui/yarn.lockindex ea2003ac1..d1a2e974d 100644--- a/ui/yarn.lock+++ b/ui/yarn.lock@@ -656,6 +656,32 @@lodash "^4.17.10"to-fast-properties "^2.0.0"+"@fortawesome/fontawesome-common-types@^0.2.15":+ version "0.2.15"+ resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.15.tgz#16af950653083d1e3064061de9f8e5e3b579f688"+ integrity sha512-ATBRyKJw1d2ko+0DWN9+BXau0EK3I/Q6pPzPv3LhJD7r052YFAkAdfb1Bd7ZqhBsJrdse/S7jKxWUOZ61qBD4g==++"@fortawesome/fontawesome-svg-core@^1.2.12":+ version "1.2.15"+ resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.15.tgz#368f9fc7e8e8d8636495dc7483f97510f920ba97"+ integrity sha512-M/sHyl4g2VBtKYkay1Z+XImMyTVcaBPmehYtPw4HKD9zg2E7eovB7Yx98aUfZjPbroGqa+IL4/+KhWBMOGlHIQ==+ dependencies:+ "@fortawesome/fontawesome-common-types" "^0.2.15"++"@fortawesome/free-regular-svg-icons@^5.6.3":+ version "5.7.2"+ resolved "https://registry.yarnpkg.com/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-5.7.2.tgz#7113bf9df5a970918b8cac8eb45e5ad120818741"+ integrity sha512-ZO+zQcncfT7omTsTIjBkugj/dFXiSnoK44I5p0/WAoNX8aX2Au7j+uxq1qFX4bevkfGFGsPeJUYU1+Q1PB/5pQ==+ dependencies:+ "@fortawesome/fontawesome-common-types" "^0.2.15"++"@fortawesome/free-solid-svg-icons@^5.6.3":+ version "5.7.2"+ resolved "https://registry.yarnpkg.com/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.7.2.tgz#9ec2ed353d630092a8e19cc8aae2f716572963e5"+ integrity sha512-iujcXMyAvIbWM8W3jkOLpvJbR+rPpdN1QyqhZeJaLRdHPH4JmuovIAYP4vx5Sa1csZVXfRD1eDWqVZ/jGM620A==+ dependencies:+ "@fortawesome/fontawesome-common-types" "^0.2.15"+"@mapbox/[email protected]":version "0.2.2"resolved "https://registry.yarnpkg.com/@mapbox/geojson-area/-/geojson-area-0.2.2.tgz#18d7814aa36bf23fbbcc379f8e26a22927debf10"@@ -3813,6 +3839,11 @@ mocha@^3.4.2:mkdirp "0.5.1"supports-color "3.1.2"+moment@^2.24.0:+ version "2.24.0"+ resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b"+ integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==+move-concurrently@^1.0.1:version "1.0.1"resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92"