Start my openremote in EC2 with the command or deploy.
It seems that the services started correctly and the manager’s custom ui catches it fine.
but the keycloack is not taking my deployment folder, I try to lower the container and activate it again but it does not work for me.
When I inspect the container I get this:
[
{
"Id": "3745b4be280f30c8ac89a70e3efc5e65b2462a362b42f9b44ba5c324fbbeff69",
"Created": "2021-05-24T08:16:12.640834676Z",
"Path": "/opt/jboss/tools/docker-entrypoint.sh",
"Args": [
"-b",
"0.0.0.0"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 8791,
"ExitCode": 0,
"Error": "",
"StartedAt": "2021-05-24T10:03:20.771229709Z",
"FinishedAt": "2021-05-24T09:58:57.503237608Z",
"Health": {
"Status": "unhealthy",
"FailingStreak": 46,
"Log": [
{
"Start": "2021-05-24T10:08:30.079543499Z",
"End": "2021-05-24T10:08:33.0797368Z",
"ExitCode": -1,
"Output": "Health check exceeded timeout (3s)"
},
{
"Start": "2021-05-24T10:08:36.084507542Z",
"End": "2021-05-24T10:08:39.084793303Z",
"ExitCode": -1,
"Output": "Health check exceeded timeout (3s)"
},
{
"Start": "2021-05-24T10:08:42.091558199Z",
"End": "2021-05-24T10:08:45.091765279Z",
"ExitCode": -1,
"Output": "Health check exceeded timeout (3s)"
},
{
"Start": "2021-05-24T10:08:48.096973999Z",
"End": "2021-05-24T10:08:51.097173057Z",
"ExitCode": -1,
"Output": "Health check exceeded timeout (3s)"
},
{
"Start": "2021-05-24T10:08:54.10298612Z",
"End": "2021-05-24T10:08:57.103198357Z",
"ExitCode": -1,
"Output": "Health check exceeded timeout (3s)"
}
]
}
},
"Image": "sha256:2dbea055ad352076276238fdf4dc1f1ad3cb251370e0a74c6661aac20f001872",
"ResolvConfPath": "/var/lib/docker/containers/3745b4be280f30c8ac89a70e3efc5e65b2462a362b42f9b44ba5c324fbbeff69/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/3745b4be280f30c8ac89a70e3efc5e65b2462a362b42f9b44ba5c324fbbeff69/hostname",
"HostsPath": "/var/lib/docker/containers/3745b4be280f30c8ac89a70e3efc5e65b2462a362b42f9b44ba5c324fbbeff69/hosts",
"LogPath": "/var/lib/docker/containers/3745b4be280f30c8ac89a70e3efc5e65b2462a362b42f9b44ba5c324fbbeff69/3745b4be280f30c8ac89a70e3efc5e65b2462a362b42f9b44ba5c324fbbeff69-json.log",
"Name": "/openremote_keycloak_1",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "docker-default",
"ExecIDs": null,
"HostConfig": {
"Binds": [
"/home/ubuntu/myiot/deployment:/deployment:rw"
],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "openremote_private",
"PortBindings": {},
"RestartPolicy": {
"Name": "",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": [],
"CapAdd": null,
"CapDrop": null,
"CgroupnsMode": "host",
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "shareable",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": null,
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": null,
"DeviceCgroupRules": null,
"DeviceRequests": null,
"KernelMemory": 0,
"KernelMemoryTCP": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": false,
"PidsLimit": null,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": [
"/proc/asound",
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware"
],
"ReadonlyPaths": [
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
},
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/a3d31b892dc470023b15cea30db840d9d61abc311d472867e9d5d299d2c7b44d-init/diff:/var/lib/docker/overlay2/6bde08a2ebe21b357657201d9d16887fca171cf85453798be50da56eb28d5025/diff:/var/lib/docker/overlay2/3ee1f23c8ca8a56677b5bf09cae3516be589212252ae26ae05c76ced210c3b3b/diff:/var/lib/docker/overlay2/cced57fe34c476def65d3efa6b1f131935a4ccf40bb8080a55d985dd21bc464a/diff:/var/lib/docker/overlay2/cbc62b142c2eb575c6eb4bb09cf10e01ef88473951c7c147b1cbc12b70f73e69/diff:/var/lib/docker/overlay2/74f8232b8981f5b2762d99d389320d51cae3d2276cb38e37892e83c394e6eabb/diff:/var/lib/docker/overlay2/164d7148fa3d56bc05d686b5ad527ed2cdda8b5186c0038fe0e43723b14744d4/diff:/var/lib/docker/overlay2/c7777717fe7587b2d30420ae795c9ed54336662157bda1c124111287c48db20a/diff:/var/lib/docker/overlay2/b61bc5ff0cec040104eafd19fddedee5dfa2ee9ef32e3b64d5f7d7d7a86b8fdb/diff:/var/lib/docker/overlay2/9bda776ad04f9a563937c5df1d8f0d69b34a5d41d3e8d5d5e7a0d74bc6b1fd51/diff:/var/lib/docker/overlay2/ca2abb9e3cfbe6ea21df4a1983a46b3d9285af12dce687615d96b389d8af4ffa/diff:/var/lib/docker/overlay2/2d8d9ac79af28cfc51268414ae71f71b99ede68517127df60d0929d9dc5f7183/diff",
"MergedDir": "/var/lib/docker/overlay2/a3d31b892dc470023b15cea30db840d9d61abc311d472867e9d5d299d2c7b44d/merged",
"UpperDir": "/var/lib/docker/overlay2/a3d31b892dc470023b15cea30db840d9d61abc311d472867e9d5d299d2c7b44d/diff",
"WorkDir": "/var/lib/docker/overlay2/a3d31b892dc470023b15cea30db840d9d61abc311d472867e9d5d299d2c7b44d/work"
},
"Name": "overlay2"
},
"Mounts": [
{
"Type": "bind",
"Source": "/home/ubuntu/myiot/deployment",
"Destination": "/deployment",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
}
],
"Config": {
"Hostname": "3745b4be280f",
"Domainname": "",
"User": "1000",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"8080/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"KEYCLOAK_PASSWORD=secret",
"KEYCLOAK_FRONTEND_URL=https://myiot.es/auth",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"container=oci",
"KEYCLOAK_VERSION=12.0.1",
"JDBC_POSTGRES_VERSION=42.2.5",
"JDBC_MYSQL_VERSION=8.0.22",
"JDBC_MARIADB_VERSION=2.5.4",
"JDBC_MSSQL_VERSION=8.2.2.jre11",
"LAUNCH_JBOSS_IN_BACKGROUND=1",
"JBOSS_HOME=/opt/jboss/keycloak",
"LANG=en_US.UTF-8",
"DB_VENDOR=postgres",
"DB_ADDR=postgresql",
"DB_PORT=5432",
"DB_DATABASE=openremote",
"DB_USER=postgres",
"DB_PASSWORD=postgres",
"DB_SCHEMA=public",
"KEYCLOAK_USER=admin",
"PROXY_ADDRESS_FORWARDING=true",
"TZ=Europe/Amsterdam"
],
"Cmd": [
"-b",
"0.0.0.0"
],
"Healthcheck": {
"Test": [
"CMD",
"curl",
"--fail",
"--silent",
"http://myiot.es:8080/auth"
],
"Interval": 3000000000,
"Timeout": 3000000000,
"StartPeriod": 60000000000,
"Retries": 30
},
"Image": "openremote/keycloak:12.0.1.1",
"Volumes": {
"/deployment": {}
},
"WorkingDir": "",
"Entrypoint": [
"/opt/jboss/tools/docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": {
"architecture": "x86_64",
"build-date": "2021-04-14T21:02:42.814986",
"com.docker.compose.config-hash": "c2014653651c905def7267c759abf25a002c8077a2fe0369af2130f0d28d7ec8",
"com.docker.compose.container-number": "1",
"com.docker.compose.oneoff": "False",
"com.docker.compose.project": "openremote",
"com.docker.compose.project.config_files": "mvp-docker-compose.yml",
"com.docker.compose.project.working_dir": "/home/ubuntu/myiot",
"com.docker.compose.service": "keycloak",
"com.docker.compose.version": "1.25.0",
"com.redhat.build-host": "cpt-1002.osbs.prod.upshift.rdu2.redhat.com",
"com.redhat.component": "ubi8-minimal-container",
"com.redhat.license_terms": "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI",
"description": "The Universal Base Image Minimal is a stripped down image that uses microdnf as a package manager. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly.",
"distribution-scope": "public",
"git-commit": "04855b12b86a272aab2c09274cef8475518ca2a0",
"io.k8s.description": "The Universal Base Image Minimal is a stripped down image that uses microdnf as a package manager. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly.",
"io.k8s.display-name": "Red Hat Universal Base Image 8 Minimal",
"io.openshift.expose-services": "",
"io.openshift.tags": "minimal rhel8",
"maintainer": "Red Hat, Inc.",
"name": "ubi8-minimal",
"release": "298.1618432845",
"summary": "Provides the latest release of the minimal Red Hat Universal Base Image 8.",
"url": "https://access.redhat.com/containers/#/registry.access.redhat.com/ubi8-minimal/images/8.3-298.1618432845",
"vcs-ref": "f53dab37c7541dd0080f410727c5886e85c09ee7",
"vcs-type": "git",
"vendor": "Red Hat, Inc.",
"version": "8.3"
}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "c44bd6bd3631cd832d15ce46c29253c9091c5c01b840eb27d91c752586139c88",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"8080/tcp": null
},
"SandboxKey": "/var/run/docker/netns/c44bd6bd3631",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"openremote_private": {
"IPAMConfig": {
"IPv4Address": "10.0.1.4"
},
"Links": null,
"Aliases": [
"keycloak",
"3745b4be280f"
],
"NetworkID": "myip8x5s6wmde6qst1y495q4p",
"EndpointID": "a14a3e671956ecb825c50c2920e400eeb97268a50827765452b616827442ce67",
"Gateway": "",
"IPAddress": "10.0.1.4",
"IPPrefixLen": 24,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:0a:00:01:04",
"DriverOpts": null
},
"openremote_public": {
"IPAMConfig": {
"IPv4Address": "10.0.2.2"
},
"Links": null,
"Aliases": [
"keycloak",
"3745b4be280f"
],
"NetworkID": "r89j4qoxjzkw25g3liejir9g7",
"EndpointID": "b8a690d67eb80187746e5abe632e864fa5fb29973cecedf3bb67ac4347fbae95",
"Gateway": "",
"IPAddress": "10.0.2.2",
"IPPrefixLen": 24,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:0a:00:02:02",
"DriverOpts": null
}
}
}
}
]
Nor can I find the folder on my server where you are getting the themes from. Inside my deployment folder I have my keycloack / themes folder
My mvp-docker-compose.yml file is this:
# OpenRemote v3
#
# Profile that runs the vanilla stack on https://localhost using a self-signed SSL certificate,
# with username 'admin' and password 'secret'. There is no map data available in the vanilla
# system so the map tile server will not function. Persistent data is stored in a docker
# volume called postgresql-data between restarts, simply delete this volume to reset the
# system to an empty state.
#
# Please see profile/deploy.yml for configuration details for each service.
#
version: "3.7"
networks:
public:
driver: overlay
driver_opts:
encrypted: "true"
private:
driver: overlay
driver_opts:
encrypted: "true"
attachable: false
volumes:
proxy-data:
postgresql-data:
deployment-data:
services:
proxy:
image: openremote/proxy:${PROXY_VERSION:-2.1.2.2}
networks:
- public
- private
depends_on:
- manager
healthcheck:
interval: 3s
timeout: 3s
start_period: 2s
retries: 3
test: ["CMD", "curl", "--fail", "--silent", "http://myiot.es:80"]
ports:
- "80:80"
- "443:443"
- "8883:8883"
volumes:
- proxy-data:/deployment
deploy:
replicas: 1
restart_policy:
delay: 10s
window: 30s
update_config:
failure_action: rollback
order: start-first
delay: 30m
environment:
DOMAINNAME: ${DOMAINNAME:-myiot.es}
LE_EMAIL: admin@${DOMAINNAME}
manager:
image: openremote/manager:${MANAGER_VERSION:-latest}
networks:
- private
depends_on:
- keycloak
healthcheck:
interval: 3s
timeout: 3s
start_period: 2s
retries: 120
test: ["CMD", "curl", "--fail", "--silent", "http://myiot.es:8080"]
volumes:
- ./deployment:/deployment
deploy:
replicas: 1
update_config:
failure_action: rollback
order: start-first
delay: 10s
environment:
SETUP_ADMIN_PASSWORD: ${PASSWORD:-secret}
IDENTITY_NETWORK_HOST: ${IDENTITY_NETWORK_HOST:-myiot.es}
SETUP_EMAIL_HOST: ${EMAIL_HOST:-email-smtp.eu-west-1.amazonaws.com}
SETUP_EMAIL_USER: ${EMAIL_USER}
SETUP_EMAIL_PASSWORD: ${EMAIL_PASSWORD}
SETUP_EMAIL_PORT: ${SETUP_EMAIL_PORT:-587}
SETUP_EMAIL_FROM_KEYCLOAK: no-reply@${DOMAINNAME}
SETUP_EMAIL_FROM_DEFAULT: admin@${DOMAINNAME}
keycloak:
image: openremote/keycloak:${KEYCLOAK_VERSION:-12.0.1.1}
networks:
- public
- private
depends_on:
- postgresql
healthcheck:
test: ["CMD", "curl", "--fail", "--silent", "http://myiot.es:8080/auth"]
interval: 3s
timeout: 3s
start_period: 60s
retries: 30
deploy:
replicas: 1
update_config:
failure_action: rollback
order: start-first
delay: 10m
volumes:
- ./deployment:/deployment
environment:
KEYCLOAK_PASSWORD: ${PASSWORD:-secret}
KEYCLOAK_FRONTEND_URL: "https://${IDENTITY_NETWORK_HOST:-myiot.es}/auth"
postgresql:
image: openremote/postgresql:${POSTGRESQL_VERSION:-9.6.21.0}
networks:
- private
healthcheck:
interval: 3s
timeout: 3s
start_period: 2s
retries: 30
test: ["CMD", "gosu", "postgres", "pg_isready"]
deploy:
replicas: 1
update_config:
failure_action: rollback
order: start-first
delay: 20m
volumes:
- postgresql-data:/var/lib/postgresql/data
I’ve tried clearing the image and container from keycloack and trying again to generate it from my yml but it didn’t work either. Any idea what I may be doing wrong? Thank you