diff --git a/templates/openhab/3/docker-compose.yml.tpl b/templates/openhab/3/docker-compose.yml.tpl index 51f614b..d5ba352 100644 --- a/templates/openhab/3/docker-compose.yml.tpl +++ b/templates/openhab/3/docker-compose.yml.tpl @@ -23,10 +23,9 @@ services: {{- end}} OPENHAB_HTTP_PORT: "${HTTP_PORT}" OPENHAB_HTTPS_PORT: "${HTTPS_PORT}" - image: "openhab/openhab:2.2.0-snapshot-${IMAGE_ARCHITECTURE}-${IMAGE_DISTRIBUTION}" - labels: - io.rancher.container.pull_image: always + image: "openhab/openhab:2.2.0-${IMAGE_ARCHITECTURE}-${IMAGE_DISTRIBUTION}" {{- if ne .Values.HOST_LABEL ""}} + labels: io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} {{- end}} {{- if ne .Values.NETWORK_MODE "managed"}} diff --git a/templates/openhab/3/rancher-compose.yml b/templates/openhab/3/rancher-compose.yml index fa75b96..f2811ec 100644 --- a/templates/openhab/3/rancher-compose.yml +++ b/templates/openhab/3/rancher-compose.yml @@ -2,7 +2,7 @@ version: '2' catalog: name: "openHAB" - version: "2.2.0-SNAPSHOT" + version: "2.2.0" description: "An open source, technology agnostic home automation platform" upgrade_from: "2.0.0" questions: diff --git a/templates/openhab/4/README.md b/templates/openhab/4/README.md new file mode 100644 index 0000000..9ebd9a7 --- /dev/null +++ b/templates/openhab/4/README.md @@ -0,0 +1,16 @@ +## Introduction + +The open Home Automation Bus (openHAB) project aims at providing a universal integration platform for all things around home automation. It is a pure Java solution, fully based on OSGi. + +It is designed to be absolutely vendor-neutral as well as hardware/protocol-agnostic. openHAB brings together different bus systems, hardware devices and interface protocols by dedicated bindings. These bindings send and receive commands and status updates on the openHAB event bus. This concept allows designing user interfaces with a unique look & feel, but with the possibility to operate devices based on a big number of different technologies. Besides the user interfaces, it also brings the power of automation logics across different system boundaries. + +For further Information please refer to [www.openhab.org](http://www.openhab.org). + +## Getting Started + +Refer to the [tutorials](http://docs.openhab.org/tutorials) on how to get started with openHAB. + +## Community: How to Get Involved + +In case of problems or questions, please join the [openHAB community](https://community.openhab.org). + diff --git a/templates/openhab/4/docker-compose.yml.tpl b/templates/openhab/4/docker-compose.yml.tpl new file mode 100644 index 0000000..e0bc05b --- /dev/null +++ b/templates/openhab/4/docker-compose.yml.tpl @@ -0,0 +1,59 @@ +version: '2' + +services: + openhab: +{{- if eq .Values.PCAP_SUPPORT_ENABLED "true"}} + cap_add: + - NET_ADMIN + - NET_RAW + command: "./start.sh" +{{- end}} +{{- if or (ne .Values.DEVICE_MAPPING_1 "") (ne .Values.DEVICE_MAPPING_2 "") }} + devices: +{{- end}} +{{- if ne .Values.DEVICE_MAPPING_1 ""}} + - "${DEVICE_MAPPING_1}" +{{- end}} +{{- if ne .Values.DEVICE_MAPPING_2 ""}} + - "${DEVICE_MAPPING_2}" +{{- end}} + environment: +{{- if ne .Values.EXTRA_JAVA_OPTS ""}} + EXTRA_JAVA_OPTS: "${EXTRA_JAVA_OPTS}" +{{- end}} + OPENHAB_HTTP_PORT: "${HTTP_PORT}" + OPENHAB_HTTPS_PORT: "${HTTPS_PORT}" + image: "openhab/openhab:2.3.0-snapshot-${IMAGE_ARCHITECTURE}-${IMAGE_DISTRIBUTION}" + labels: + io.rancher.container.pull_image: always +{{- if ne .Values.HOST_LABEL ""}} + io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} +{{- end}} +{{- if ne .Values.NETWORK_MODE "managed"}} + network_mode: ${NETWORK_MODE} +{{- end}} + ports: + - ${HTTP_PORT}:${HTTP_PORT} + - ${HTTPS_PORT}:${HTTPS_PORT} + restart: unless-stopped + tty: true + volumes: +{{- if eq .Values.USE_HOST_TIME "true"}} + - "/etc/localtime:/etc/localtime:ro" + - "/etc/timezone:/etc/timezone:ro" +{{- end}} + - "addons:/openhab/addons" + - "conf:/openhab/conf" + - "userdata:/openhab/userdata" + +volumes: + addons: + driver: ${VOLUME_DRIVER} + per_container: true + conf: + driver: ${VOLUME_DRIVER} + per_container: true + userdata: + driver: ${VOLUME_DRIVER} + per_container: true + diff --git a/templates/openhab/4/rancher-compose.yml b/templates/openhab/4/rancher-compose.yml new file mode 100644 index 0000000..1a8845b --- /dev/null +++ b/templates/openhab/4/rancher-compose.yml @@ -0,0 +1,124 @@ +version: '2' + +catalog: + name: "openHAB" + version: "2.3.0-SNAPSHOT" + description: "An open source, technology agnostic home automation platform" + upgrade_from: "2.0.0" + questions: + - variable: "IMAGE_ARCHITECTURE" + label: "Image Architecture" + description: | + Use "amd64" for AMD/Intel 64-bit architectures (e.g. x64, x86-64, x86_64). + Use "armhf" for ARMv7 32-bit architectures (e.g. most RaspberryPi 1/2/3). + Use "arm64" for ARMv8 64-bit architectures (not RaspberryPi 3) + required: true + default: "amd64" + type: enum + options: + - amd64 + - armhf + - arm64 + + - variable: "IMAGE_DISTRIBUTION" + label: "Image Distribution" + description: "The distribution on which the container image is based" + required: true + default: "debian" + type: enum + options: + - alpine + - debian + + - variable: "NETWORK_MODE" + label: "Network Mode" + description: "The network stack to connect the container to" + required: true + default: "host" + type: enum + options: + - host + - bridge + - managed + - none + + - variable: "HOST_LABEL" + label: "Host Label" + description: "Schedules openHAB to run only on hosts that have a specific label. Example: 'openhab=true'" + default: "" + type: "string" + required: false + + - variable: "USE_HOST_TIME" + label: "Use Host Time" + description: "Adds /etc/localtime and /etc/timezone as volumes from the host for providing timezone information" + required: true + default: false + type: boolean + + - variable: "PCAP_SUPPORT_ENABLED" + label: "Enable Packet Capture Support" + description: "Runs openHAB as root and adds network capabilities e.g. for libpcap support" + required: true + default: false + type: boolean + + - variable: "HTTP_PORT" + label: "HTTP Port" + description: "The port used for HTTP connections" + default: 8080 + required: true + type: "int" + + - variable: "HTTPS_PORT" + label: "HTTPS Port" + description: "The port used for HTTPS connections" + default: 8443 + required: true + type: "int" + + - variable: "DEVICE_MAPPING_1" + label: "Device Mapping 1" + description: "Maps a device from the host to the container. Example: '/dev/ttyUSB0' or '/dev/ttyController:/dev/ttyS1'" + default: "" + type: "string" + required: false + + - variable: "DEVICE_MAPPING_2" + label: "Device Mapping 2" + description: "Maps another device from the host to the container. Example: '/dev/ttyUSB1' or '/dev/ttyController:/dev/ttyS2'" + default: "" + type: "string" + required: false + + - variable: "VOLUME_DRIVER" + label: "Volume Driver" + description: "The volume driver used for persisting data" + required: true + default: "local" + type: enum + options: + - local + - rancher-ebs + - rancher-efs + - rancher-nfs + + - variable: "EXTRA_JAVA_OPTS" + label: "Extra Java Options" + description: "Starts the openHAB JVM with the provided extra options. Example: '-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0:/dev/zwave'" + default: "" + type: "string" + required: false + + + +services: + openhab: + scale: 1 + health_check: + port: ${HTTP_PORT} + interval: 5000 + response_timeout: 5000 + healthy_threshold: 2 + unhealthy_threshold: 3 + diff --git a/templates/openhab/config.yml b/templates/openhab/config.yml index 446a398..e1312a1 100644 --- a/templates/openhab/config.yml +++ b/templates/openhab/config.yml @@ -1,6 +1,6 @@ name: openHAB description: An open source, technology agnostic home automation platform -version: 2.1.0 +version: 2.2.0 category: Automation license: Eclipse Public License 1.0 projectURL: https://www.openhab.org