Skip to content

Commit

Permalink
Removed ha-dockermon (Portainer supercedes it)
Browse files Browse the repository at this point in the history
  • Loading branch information
bachya committed Nov 16, 2018
1 parent 5e4ce8f commit 02bf26d
Show file tree
Hide file tree
Showing 18 changed files with 2 additions and 314 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ lint:
pipenv run flake8 appdaemon/settings bin/enabled_toggles
pipenv run pydocstyle appdaemon/settings bin/enabled_toggles
pipenv run pylint --disable=import-error,no-name-in-module,too-few-public-methods appdaemon/settings bin/enabled_toggles
pipenv run yamllint amazon-dash/settings appdaemon/settings ha-dockermon/settings home-assistant/settings
pipenv run yamllint amazon-dash/settings appdaemon/settings home-assistant/settings
17 changes: 0 additions & 17 deletions appdaemon/settings/apps/hass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,6 @@ new_appdaemon_version_automation:
icon: mdi:home-assistant
initial: true

new_ha_dockermon_version_automation:
module: hass
class: NewVersionNotification
dependencies:
- notification_manager
- presence_manager
entities:
available: sensor.hadockermon_available
installed: sensor.hadockermon_installed
properties:
app_name: ha-dockermon
enabled_config:
entity_name: notify_of_new_versions
name: Notify of new versions
icon: mdi:home-assistant
initial: true

new_hass_version_automation:
module: hass
class: NewVersionNotification
Expand Down
4 changes: 1 addition & 3 deletions bin/update
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ sudo chown -R root:root /var/lib/docker/volumes/hub_amazon-dash-config/_data/
# Update Glances configs:
copy_config_data "hub_glances-config" "/glances/settings"

# Update ha-dockermon configs:
copy_config_data "hub_ha-dockermon-config" "/ha-dockermon/settings"

# Update Home Assistant configs:
copy_config_data "hub_hass-config" "/home-assistant/settings"

Expand All @@ -69,6 +66,7 @@ docker-compose build
# Restart the containers:
docker-compose down --remove-orphans
docker image prune -f
docker images -q | xargs docker rmi
docker container prune -f
docker-compose up -d
docker network prune -f
Expand Down
21 changes: 0 additions & 21 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,30 +52,10 @@ services:
- /etc/localtime:/etc/localtime:ro
- glances-config:/etc/glances:ro

ha-dockermon:
build:
context: ./ha-dockermon/docker
args:
version: 0.0.10
command: /usr/src/app/start.sh
container_name: ha-dockermon
environment:
- config_dir=/config
image: bachya/ha-dockermon
ports:
- "8126:8126/tcp"
restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock
- ha-dockermon-config:/config:ro
- shared:/shared

hass:
container_name: hass
depends_on:
- glances
- ha-dockermon
- mosquitto
- mysql
devices:
Expand Down Expand Up @@ -175,7 +155,6 @@ volumes:
appdaemon-config:
fail2ban-config:
glances-config:
ha-dockermon-config:
hass-config:
mosquitto-config:
nginx-config:
Expand Down
2 changes: 0 additions & 2 deletions ha-dockermon/docker/.dockerignore

This file was deleted.

31 changes: 0 additions & 31 deletions ha-dockermon/docker/Dockerfile

This file was deleted.

9 changes: 0 additions & 9 deletions ha-dockermon/docker/conf/supervisor/supervisor.conf

This file was deleted.

7 changes: 0 additions & 7 deletions ha-dockermon/docker/start.sh

This file was deleted.

11 changes: 0 additions & 11 deletions ha-dockermon/settings/configuration.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions home-assistant/settings/conf/customize-glob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
friendly_name: Pressure
"sensor.climate_*_temperature":
friendly_name: Temperature
"sensor.hadockermon_*":
icon: "mdi:toggle-switch-off"
"sensor.hass_*":
icon: "mdi:home-assistant"
"sensor.tasmota_*":
Expand Down
16 changes: 0 additions & 16 deletions home-assistant/settings/conf/packages/durmstrang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,3 @@ sensor:
bachya@durmstrang.myserver.com
cat /proc/uptime | awk \'{ print $1 / 86400 }\' | cut -f1 -d"."
unit_of_measurement: "days"

shell_command:
restart_glances_durmstrang: >-
curl -u "hassuser:glances_password"
http://durmstrang.myserver.com:8126/container/glances/restart
switch:
- platform: rest
resource: http://durmstrang.myserver.com:8126/container/glances
name: Durmstrang Glances
body_on: '{"state": "start"}'
body_off: '{"state": "stop"}'
is_on_template: >
{{ value_json is not none and value_json.state == "running" }}
username: !secret ha_dockermon_username
password: !secret ha_dockermon_password
16 changes: 0 additions & 16 deletions home-assistant/settings/conf/packages/gryffindor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,3 @@ sensor:
bachya@gryffindor.myserver.com
cat /proc/uptime | awk \'{ print $1 / 86400 }\' | cut -f1 -d"."
unit_of_measurement: "days"

shell_command:
restart_glances_gryffindor: >-
curl -u "hassuser:glances_password"
http://gryffindor.myserver.com:8126/container/glances/restart
switch:
- platform: rest
resource: http://gryffindor.myserver.com:8126/container/glances
name: Gryffindor Glances
body_on: '{"state": "start"}'
body_off: '{"state": "stop"}'
is_on_template: >
{{ value_json is not none and value_json.state == "running" }}
username: !secret ha_dockermon_username
password: !secret ha_dockermon_password
100 changes: 0 additions & 100 deletions home-assistant/settings/conf/packages/hub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,103 +21,3 @@ sensor:
command: >
cat /proc/uptime | awk \'{ print $1 / 86400 }\' | cut -f1 -d"."
unit_of_measurement: "days"

shell_command:
restart_appdaemon_hub: >-
curl -u "hassuser:glances_password"
http://localhost:8126/container/appdaemon/restart
restart_amazon_dash_hub: >-
curl -u "hassuser:DUiwH;p%9yfL6ExeEuUT"
http://localhost:8126/container/amazon-dash/restart
restart_glances_hub: >-
curl -u "hassuser:glances_password"
http://localhost:8126/container/glances/restart
restart_hass_hub: >-
curl -u "hassuser:glances_password"
http://localhost:8126/container/hass/restart
restart_mosquitto_hub: >-
curl -u "mosquittouser:glances_password"
http://localhost:8126/container/mosquitto/restart
restart_mysql_hub: >-
curl -u "mysqluser:glances_password"
http://localhost:8126/container/mysql/restart
restart_nginx_hub: >-
curl -u "nginxuser:glances_password"
http://localhost:8126/container/nginx/restart
switch:
- platform: rest
resource: http://localhost:8126/container/appdaemon
name: AppDaemon
body_on: '{"state": "start"}'
body_off: '{"state": "stop"}'
is_on_template: >
{{ value_json is not none and value_json.state == "running" }}
username: !secret ha_dockermon_username
password: !secret ha_dockermon_password

- platform: rest
resource: http://localhost:8126/container/amazon-dash
name: Amazon Dash
body_on: '{"state": "start"}'
body_off: '{"state": "stop"}'
is_on_template: >
{{ value_json is not none and value_json.state == "running" }}
username: !secret ha_dockermon_username
password: !secret ha_dockermon_password

- platform: rest
resource: http://localhost:8126/container/glances
name: Hub Glances
body_on: '{"state": "start"}'
body_off: '{"state": "stop"}'
is_on_template: >
{{ value_json is not none and value_json.state == "running" }}
username: !secret ha_dockermon_username
password: !secret ha_dockermon_password

- platform: rest
resource: http://localhost:8126/container/hass
name: Home Assistant
body_on: '{"state": "start"}'
body_off: '{"state": "stop"}'
is_on_template: >
{{ value_json is not none and value_json.state == "running" }}
username: !secret ha_dockermon_username
password: !secret ha_dockermon_password

- platform: rest
resource: http://localhost:8126/container/mosquitto
name: Mosquitto
body_on: '{"state": "start"}'
body_off: '{"state": "stop"}'
is_on_template: >
{{ value_json is not none and value_json.state == "running" }}
username: !secret ha_dockermon_username
password: !secret ha_dockermon_password

- platform: rest
resource: http://localhost:8126/container/mysql
name: MySQL
body_on: '{"state": "start"}'
body_off: '{"state": "stop"}'
is_on_template: >
{{ value_json is not none and value_json.state == "running" }}
username: !secret ha_dockermon_username
password: !secret ha_dockermon_password

- platform: rest
resource: http://localhost:8126/container/nginx
name: NGINX
body_on: '{"state": "start"}'
body_off: '{"state": "stop"}'
is_on_template: >
{{ value_json is not none and value_json.state == "running" }}
username: !secret ha_dockermon_username
password: !secret ha_dockermon_password
16 changes: 0 additions & 16 deletions home-assistant/settings/conf/packages/hufflepuff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,3 @@ sensor:
bachya@hufflepuff.myserver.com
cat /proc/uptime | awk \'{ print $1 / 86400 }\' | cut -f1 -d"."
unit_of_measurement: "days"

shell_command:
restart_glances_hufflepuff: >-
curl -u "hassuser:glances_password"
http://hufflepuff.myserver.com:8126/container/glances/restart
switch:
- platform: rest
resource: http://hufflepuff.myserver.com:8126/container/glances
name: Hufflepuff Glances
body_on: '{"state": "start"}'
body_off: '{"state": "stop"}'
is_on_template: >
{{ value_json is not none and value_json.state == "running" }}
username: !secret ha_dockermon_username
password: !secret ha_dockermon_password
30 changes: 0 additions & 30 deletions home-assistant/settings/conf/packages/ravenclaw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,3 @@ sensor:
bachya@ravenclaw.myserver.com
cat /proc/uptime | awk \'{ print $1 / 86400 }\' | cut -f1 -d"."
unit_of_measurement: "days"

shell_command:
restart_glances_ravenclaw: >-
curl -u "hassuser:glances_password"
http://ravenclaw.myserver.com:8126/container/glances/restart
restart_hass_ravenclaw: >-
curl -u "hassuser:glances_password"
http://ravenclaw.myserver.com:8126/container/hass/restart
switch:
- platform: rest
resource: http://ravenclaw.myserver.com:8126/container/glances
name: Ravenclaw Glances
body_on: '{"state": "start"}'
body_off: '{"state": "stop"}'
is_on_template: >
{{ value_json is not none and value_json.state == "running" }}
username: !secret ha_dockermon_username
password: !secret ha_dockermon_password

- platform: rest
resource: http://ravenclaw.myserver.com:8126/container/hass
name: Ravenclaw HASS (Elder Bachs)
body_on: '{"state": "start"}'
body_off: '{"state": "stop"}'
is_on_template: >
{{ value_json is not none and value_json.state == "running" }}
username: !secret ha_dockermon_username
password: !secret ha_dockermon_password
16 changes: 0 additions & 16 deletions home-assistant/settings/conf/packages/slytherin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,3 @@ sensor:
bachya@slytherin.myserver.com
cat /proc/uptime | awk \'{ print $1 / 86400 }\' | cut -f1 -d"."
unit_of_measurement: "days"

shell_command:
restart_glances_slytherin: >-
curl -u "hassuser:glances_password"
http://slytherin.myserver.com:8126/container/glances/restart
switch:
- platform: rest
resource: http://slytherin.myserver.com:8126/container/glances
name: Slytherin Glances
body_on: '{"state": "start"}'
body_off: '{"state": "stop"}'
is_on_template: >
{{ value_json is not none and value_json.state == "running" }}
username: !secret ha_dockermon_username
password: !secret ha_dockermon_password
Loading

0 comments on commit 02bf26d

Please sign in to comment.