Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/20-quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ You can quickly try the online demo with restricted access, login credentials ar
[Online demo](https://demo.openremote.app/manager/?realm=smartcity)

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+).
1. Install [Docker Desktop](https://www.docker.com/products/docker-desktop), which includes Docker Compose.
2. Download the Docker Compose file:
[OpenRemote Stack](https://raw.githubusercontent.com/openremote/core/main/docker-compose.yml) (Right click 'Save link as...')
3. In a terminal `cd` to where you just saved the compose file and then run:
```shell
docker-compose pull
docker-compose -p openremote up
docker compose pull
docker compose -p openremote up
```
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).
Expand All @@ -32,13 +32,13 @@ The URL you use to access the system is important, the default is configured as

BASH:
```shell
OR_HOSTNAME=192.168.1.1 docker-compose -p openremote up -d
OR_HOSTNAME=192.168.1.1 docker compose -p openremote up -d
```
or

CMD:
```shell
cmd /C "set OR_HOSTNAME=192.168.1.1 && docker-compose -p openremote up -d"
cmd /C "set OR_HOSTNAME=192.168.1.1 && docker compose -p openremote up -d"
```

## What next
Expand Down
8 changes: 5 additions & 3 deletions docs/developer-guide/010-preparing-the-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ To build OpenRemote projects, you have to first prepare the environment on your
Ensure you have installed and configured the following tools:

## Runtime tooling
OpenRemote is primarily packaged as Docker images and deployed using docker compose, you will need a docker compatible runtime:
OpenRemote is primarily packaged as Docker images and deployed using Docker Compose, you will need a docker compatible runtime:
* [Docker](https://docs.docker.com/engine/install/)
* [Docker compose](https://docs.docker.com/compose/install/)
* [Docker Compose](https://docs.docker.com/compose/install/)

Docker Desktop includes Docker Compose. If you install Docker Engine separately, also install the [Docker Compose plug-in](https://docs.docker.com/compose/install/linux/).

Ensure the following commands execute successfully:

```shell
docker -v
docker-compose -v
docker compose version
```

## Development tooling
Expand Down
4 changes: 2 additions & 2 deletions docs/developer-guide/020-setting-up-an-ide.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ If you have successfully cloned the OpenRemote repo or a custom project repo, yo
### Without SSL and proxy

```shell
docker-compose -p openremote -f profile/dev-testing.yml up --build -d
docker compose -p openremote -f profile/dev-testing.yml up --build -d
```

### With SSL and proxy

```shell
docker-compose -p openremote -f profile/dev-proxy.yml up --build -d
docker compose -p openremote -f profile/dev-proxy.yml up --build -d
```

## Importing a project in an IDE
Expand Down
12 changes: 6 additions & 6 deletions docs/developer-guide/030-docker-compose-profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ This is a demo profile which starts all services and provides a quick start for
#### Prerequisites
Docker images must have been pulled from Docker Hub:
```shell
docker-compose pull
docker compose pull
```

Or the Docker images must have been built locally (requires the full stack be built):
```shell
./gradlew clean installDist
docker-compose build
docker compose build
```

To start the containers:
```shell
docker-compose up -d
docker compose up -d
```

### UI Development (dev-ui.yml)
Expand All @@ -43,18 +43,18 @@ This is for doing development work on the UI without having to run the manager i
#### Prerequisites
Docker images must have been pulled from Docker Hub:
```shell
docker-compose -f profile/dev-ui.yml pull
docker compose -f profile/dev-ui.yml pull
```

Or the docker images must have been built locally (requires the full stack be built):
```shell
./gradlew clean installDist
docker-compose -f profile/dev-ui.yml build
docker compose -f profile/dev-ui.yml build
```

To start the containers:
```shell
docker-compose -f profile/dev-ui.yml up -d
docker compose -f profile/dev-ui.yml up -d
```

#### Exposed Services
Expand Down
36 changes: 18 additions & 18 deletions docs/developer-guide/100-system-administration.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ This document summarises the database performance, storage footprint, and system

Use the following docker command to access the database on the docker host:
```shell
docker exec -it openremote_postgresql_1 psql -U postgres
docker exec -it openremote-postgresql-1 psql -U postgres
```

### Storage & compression
Expand Down Expand Up @@ -354,7 +354,7 @@ delete from asset_datapoint where timestamp < now() - INTERVAL '7 days';

#### Accessing the exported CSV file
```shell
docker cp <PROJECT_NAME>_postgresql_1:/deployment/datapoints.csv ./
docker cp <PROJECT_NAME>-postgresql-1:/deployment/datapoints.csv ./
```

#### Importing asset data points
Expand Down Expand Up @@ -506,16 +506,16 @@ ssh -L 8404:localhost:8404 <HOST>
## OpenRemote Manager
### Insert a different manager_config.json file
```shell
docker exec <PROJECT_NAME>_manager_1 mkdir -p /deployment/manager/app
docker cp ./manager_config.json <PROJECT_NAME>_manager_1:/deployment/manager/app/manager_config.json
docker exec <PROJECT_NAME>-manager-1 mkdir -p /deployment/manager/app
docker cp ./manager_config.json <PROJECT_NAME>-manager-1:/deployment/manager/app/manager_config.json

# Make sure to restart the containers for applying the changes
```

### Insert an .mbtiles file for applying a different map
```shell
docker exec <PROJECT_NAME>_manager_1 mkdir -p /deployment/map
docker cp ./<FILE_NAME>.mbtiles <PROJECT_NAME>_manager_1:/deployment/map/mapdata.mbtiles
docker exec <PROJECT_NAME>-manager-1 mkdir -p /deployment/map
docker cp ./<FILE_NAME>.mbtiles <PROJECT_NAME>-manager-1:/deployment/map/mapdata.mbtiles

# Make sure to restart the containers for applying the changes
```
Expand All @@ -530,14 +530,14 @@ docker volume prune -a
docker image prune -a
```

### Restart exited containers (without using `docker-compose up`)
### Restart exited containers (without using `docker compose up`)
If the containers are exited then they can be restarted using the `docker` command, the startup order is important:

* docker start `<PROJECT_NAME>_postgresql_1`
* docker start `<PROJECT_NAME>_keycloak_1`
* docker start `<PROJECT_NAME>_map_1` (only if there is a map container)
* docker start `<PROJECT_NAME>_manager_1`
* docker start `<PROJECT_NAME>_proxy_1`
* docker start `<PROJECT_NAME>-postgresql-1`
* docker start `<PROJECT_NAME>-keycloak-1`
* docker start `<PROJECT_NAME>-map-1` (only if there is a map container)
* docker start `<PROJECT_NAME>-manager-1`
* docker start `<PROJECT_NAME>-proxy-1`


### Using Docker Compose
Expand All @@ -548,16 +548,16 @@ Service images will be built automatically when they do not exist in the Docker

Here are a few useful Docker Compose commands:

* `docker-compose -f <PROFILE> pull <SERVICE> <SERVICE>...` - Force pull requested services from Docker Hub, if no services specified then all services will be pulled (e.g. docker-compose -f profile/manager.yml pull to pull all services)
* `docker-compose -f <PROFILE> build <SERVICE> <SERVICE>...` - Build/Rebuild requested services, if no services specified then all services will be built
* `docker-compose -f <PROFILE> up <SERVICE> <SERVICE>...` - Creates and starts requested services, if no services specified then all services will be created and started (also auto attaches to console output from each service use `-d` to not attach to the console output)
* `docker-compose -f <PROFILE> up --build <SERVICE> <SERVICE>...` - Creates and starts requested services but also forces building the services first (useful if the source code has changed as docker-compose will not be aware of this change and you would otherwise end up deploying 'stale' services)
* `docker-compose -f <PROFILE> down <SERVICE> <SERVICE>...` - Stops and removes requested services, if no services specified then all services will be stopped and removed. Sometimes the shutdown doesn't work properly and you have to run `down` again to completely remove all containers and networks.
* `docker compose -f <PROFILE> pull <SERVICE> <SERVICE>...` - Force pull requested services from Docker Hub, if no services specified then all services will be pulled (e.g. docker compose -f profile/manager.yml pull to pull all services)
* `docker compose -f <PROFILE> build <SERVICE> <SERVICE>...` - Build/Rebuild requested services, if no services specified then all services will be built
* `docker compose -f <PROFILE> up <SERVICE> <SERVICE>...` - Creates and starts requested services, if no services specified then all services will be created and started (also auto attaches to console output from each service use `-d` to not attach to the console output)
* `docker compose -f <PROFILE> up --build <SERVICE> <SERVICE>...` - Creates and starts requested services but also forces building the services first (useful if the source code has changed as Docker Compose will not be aware of this change and you would otherwise end up deploying 'stale' services)
* `docker compose -f <PROFILE> down <SERVICE> <SERVICE>...` - Stops and removes requested services, if no services specified then all services will be stopped and removed. Sometimes the shutdown doesn't work properly and you have to run `down` again to completely remove all containers and networks.

* When deploying profiles you can provide a project name to prefix the container names (by default Docker Compose will use the configuration profile's folder name); the project name can be specified with the -p argument using the CLI:

```shell
docker-compose -p <your_project_name> -f <profile> -f <profile_override> up -d <service1> <service2> ...
docker compose -p <your_project_name> -f <profile> -f <profile_override> up -d <service1> <service2> ...
```


Expand Down
2 changes: 1 addition & 1 deletion docs/developer-guide/110-working-on-ui-and-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Front end applications are [webcomponent](https://www.webcomponents.org/) based
To work on an app for example the `Manager UI` :
- From the main directory, start the required containers, use dev-ui.yml for example:
```shell
docker-compose -f profile/dev-ui.yml up -d
docker compose -f profile/dev-ui.yml up -d
```
By default, this makes the manager container serve the apps present in the latest docker image on port 8080 e.g. `http://localhost:8080/manager/` . While these apps are not necessary for this case, the included manager container webservice is.

Expand Down
10 changes: 5 additions & 5 deletions docs/developer-guide/150-create-docker-machine-on-aws-ec2.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ services:
#### Fetch OpenVPN Docker image

```shell
docker-compose run --rm openvpn ovpn_genconfig -u udp://aws
docker compose run --rm openvpn ovpn_genconfig -u udp://aws
```

#### Generate certificates

```shell
docker-compose run --rm openvpn ovpn_initpki
docker compose run --rm openvpn ovpn_initpki
```

#### Start OpenVPN container

```shell
$ docker-compose up -d openvpn
$ docker compose up -d openvpn
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
09934f3f52b2 kylemanna/openvpn "ovpn_run" 6 seconds ago Up 4 seconds 0.0.0.0:1194->1194/udp openvpn
Expand All @@ -63,13 +63,13 @@ CONTAINER ID IMAGE COMMAND CREATED
#### Generate certificate for a client

```shell
docker-compose run --rm openvpn easyrsa build-client-full client nopass
docker compose run --rm openvpn easyrsa build-client-full client nopass
```

#### Get config to local machine

```shell
docker-compose run --rm openvpn ovpn_getclient client > aws.ovpn
docker compose run --rm openvpn ovpn_getclient client > aws.ovpn
```

#### Import config to your OpenVPN client (Tunnelblick on Mac)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ cd chirpstack-docker
```
2. Start ChirpStack
```shell
docker-compose up
docker compose up
```
3. Login to the ChirpStack UI (`http://localhost:8080/` `admin/admin`)
## Create the ChirpStack LoRaWAN Gateway
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/010-deploying/10-custom-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ In this guide we will go through the first time setting up your [custom project]
2. Clone your repository from the [custom-project template](https://github.com/openremote/custom-project).\
This is easiest if you have an [SSH-key in your GitHub account](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)
3. [Set up your IDE](../../developer-guide/020-setting-up-an-ide.md). Note that Application run configurations are already prepared when using this template. \
Use `docker-compose -f profile\dev-testing.yml up --build -d` and run the 'Custom Deployment' configuration. You should have two containers running in Docker, and the manager through your IDE.
Use `docker compose -f profile\dev-testing.yml up --build -d` and run the 'Custom Deployment' configuration. You should have two containers running in Docker, and the manager through your IDE.
4. Run the modelWatch gradle task to build the typescript model `./gradlew modelWatch`
5. Next we serve the Manager UI from the `/openremote/ui/app/manager` directory with `npm run serve "--" --env config=..\..\..\..\deployment\manager\app`.

Expand Down
8 changes: 4 additions & 4 deletions docs/user-guide/010-deploying/70-balena-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ administrator from the CLI/from the BalenaCloud dashboard.
To create a new release, you can push this directory to the fleet using the included shell file in `balena/run_balena_build.sh`.

## Parameters:
* `--dry-run`: This flag enables the dry-run mode. When this mode is enabled, the script will build the Docker images and bring up the containers locally using docker-compose instead of pushing to the Balena fleet.
* `--dry-run`: This flag enables the dry-run mode. When this mode is enabled, the script will build the Docker images and bring up the containers locally using `docker compose` instead of pushing to the Balena fleet.
* `--skip-build`: This flag skips the build process. When enabled, the script will not remove the existing manager-build directory or rebuild the project.
* `<balena_fleet_slug>`: This is a required argument specifying the Balena fleet slug to which the application will be pushed.

Expand All @@ -63,22 +63,22 @@ To create a new release, you can push this directory to the fleet using the incl
* It then returns to the balena directory.
* Copy New Builds: If the manager-build directory does not exist, the script copies the new build files from Gradle's build output to ./manager-build.
* Push to Balena or Run Docker Compose:
* If DRY_RUN is true, the script builds the Docker images without using the cache and starts the containers locally using docker-compose with the --force-recreate option.
* If DRY_RUN is true, the script builds the Docker images without using the cache and starts the containers locally using `docker compose` with the --force-recreate option.
* If DRY_RUN is false, the script pushes the application to the specified Balena fleet using the balena push command with the --nocache option.

# Quirks you should be aware of

In general, Balena CLI/Balena API/BalenaCloud do things their own way. Some examples:

* You cannot set a `docker-compose.yml` file to be used specifically for balena, it NEEDS to use `docker-compose.yml`.
* `balena push` **does not** build the image locally. All folders/files referenced in the Dockerfiles/docker-compose
* `balena push` **does not** build the image locally. All folders/files referenced in the Dockerfiles or Docker Compose
files are uploaded to their own builder platform and are built on their premises. This is done to allow building
the images in all of the different architectures that you might use the release in.
* You cannot use environment variables in the way you usually do. Using default/error values in environment variables
does not work.
* For the above point, the concept of environment variables in a `docker-compose.yml` file doesn't quite exist;
environment variables in Balena environments are set using the CLI or the dashboard, and there are fleet-level and
device-level variables. You would set an environment variable in the docker-compose file specifically when it's an
device-level variables. You would set an environment variable in the Docker Compose file specifically when it's an
environment variable that applies for ALL devices that may run this in BalenaOS (or for debugging locally of course).
All environment variables of a device/fleet are included in ALL services. So `OR_MAIN_THREAD_WAIT_MS` WILL end up on
the proxy container, and Keycloak, and the manager, etc.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ You can connect an IKEA TRÅDFRI Gateway to the manager. The manager will import

## Docker configuration

If you are using Docker (and docker-compose) to run OpenRemote, you need to change the configuration of docker-compose in order to use the IKEA TRÅDFRI protocol.
If you are using Docker Compose to run OpenRemote, you need to change the Docker Compose configuration in order to use the IKEA TRÅDFRI protocol.
In the `profile/deploy.yml` file, uncomment the lines below the following line: "# Uncomment to support the IKEA TRÅDFRI protocol. USE AT YOUR OWN RISK.".
This line occurs 6 times in the `profile/deploy.yml` file. Make sure to find all of them.

Expand Down
Loading