From d81ee25e5f9bed5500082d0530f5dd8e9d4ef244 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Sun, 9 Dec 2018 21:57:16 -0600 Subject: [PATCH 01/31] final v1.0 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d017bd1..715bb76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ - Add cisco asa from legacy [\#44](https://github.com/Boerderij/Varken/issues/44) - Add server ID to ombi to differenciate [\#43](https://github.com/Boerderij/Varken/issues/43) +**Merged pull requests:** + +- v1.0 Merge [\#45](https://github.com/Boerderij/Varken/pull/45) ([DirtyCajunRice](https://github.com/DirtyCajunRice)) + ## [v0.3-nightly](https://github.com/Boerderij/Varken/tree/v0.3-nightly) (2018-12-07) [Full Changelog](https://github.com/Boerderij/Varken/compare/v0.2-nightly...v0.3-nightly) From 35cb12f751b2a7f22bae571950f42269acca3df6 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Sun, 9 Dec 2018 22:56:09 -0600 Subject: [PATCH 02/31] passed data folder to tautulli for helper functions. Fixes #46 --- Varken.py | 2 +- varken/cisco.py | 1 - varken/helpers.py | 17 +++++++++-------- varken/tautulli.py | 9 +++++---- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Varken.py b/Varken.py index 6fe4ec3..bd6c1b8 100644 --- a/Varken.py +++ b/Varken.py @@ -79,7 +79,7 @@ if __name__ == "__main__": if CONFIG.tautulli_enabled: for server in CONFIG.tautulli_servers: - TAUTULLI = TautulliAPI(server, DBMANAGER) + TAUTULLI = TautulliAPI(server, DBMANAGER, DATA_FOLDER) if server.get_activity: schedule.every(server.get_activity_run_seconds).seconds.do(threaded, TAUTULLI.get_activity) diff --git a/varken/cisco.py b/varken/cisco.py index 6ce3392..750ad89 100644 --- a/varken/cisco.py +++ b/varken/cisco.py @@ -39,7 +39,6 @@ class CiscoAPI(object): return req = self.session.prepare_request(Request('GET', self.firewall.url + endpoint)) - print(req.headers) get = connection_handler(self.session, req, self.firewall.verify_ssl) if not get: diff --git a/varken/helpers.py b/varken/helpers.py index 25f99d9..b746085 100644 --- a/varken/helpers.py +++ b/varken/helpers.py @@ -14,21 +14,22 @@ from urllib.request import urlretrieve logger = logging.getLogger('varken') -def geoip_download(): - tar_dbfile = abspath(join('.', 'data', 'GeoLite2-City.tar.gz')) +def geoip_download(data_folder): + datafolder = data_folder + tar_dbfile = abspath(join(datafolder, 'GeoLite2-City.tar.gz')) url = 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz' urlretrieve(url, tar_dbfile) tar = tarfile.open(tar_dbfile, 'r:gz') for files in tar.getmembers(): if 'GeoLite2-City.mmdb' in files.name: files.name = os.path.basename(files.name) - tar.extract(files, abspath(join('.', 'data'))) + tar.extract(files, datafolder) os.remove(tar_dbfile) -def geo_lookup(ipaddress): - - dbfile = abspath(join('.', 'data', 'GeoLite2-City.mmdb')) +def geo_lookup(ipaddress, data_folder): + datafolder = data_folder + dbfile = abspath(join(datafolder, 'GeoLite2-City.mmdb')) now = time.time() try: @@ -36,9 +37,9 @@ def geo_lookup(ipaddress): db_age = now - dbinfo.st_ctime if db_age > (35 * 86400): os.remove(dbfile) - geoip_download() + geoip_download(datafolder) except FileNotFoundError: - geoip_download() + geoip_download(datafolder) reader = geoip2.database.Reader(dbfile) diff --git a/varken/tautulli.py b/varken/tautulli.py index 5ce6773..9112f83 100644 --- a/varken/tautulli.py +++ b/varken/tautulli.py @@ -8,7 +8,7 @@ from varken.structures import TautulliStream class TautulliAPI(object): - def __init__(self, server, dbmanager): + def __init__(self, server, dbmanager, data_folder): # Set Time of initialization self.now = datetime.now(timezone.utc).astimezone().isoformat() self.dbmanager = dbmanager @@ -17,6 +17,7 @@ class TautulliAPI(object): self.session.params = {'apikey': self.server.api_key, 'cmd': 'get_activity'} self.endpoint = '/api/v2' self.logger = logging.getLogger() + self.data_folder = data_folder def __repr__(self): return "".format(self.server.id) @@ -41,13 +42,13 @@ class TautulliAPI(object): for session in sessions: try: - geodata = geo_lookup(session.ip_address_public) + geodata = geo_lookup(session.ip_address_public, self.data_folder) except (ValueError, AddressNotFoundError): if self.server.fallback_ip: - geodata = geo_lookup(self.server.fallback_ip) + geodata = geo_lookup(self.server.fallback_ip, self.data_folder) else: my_ip = self.session.get('http://ip.42.pl/raw').text - geodata = geo_lookup(my_ip) + geodata = geo_lookup(my_ip, self.data_folder) if not all([geodata.location.latitude, geodata.location.longitude]): latitude = 37.234332396 From 230551bc0b9cfde820a6763016ea7da31b8225d4 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Mon, 10 Dec 2018 01:16:01 -0600 Subject: [PATCH 03/31] changed Missing available to 0/1 for grafana colorization --- varken/radarr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/varken/radarr.py b/varken/radarr.py index db4dd2e..e04ea49 100644 --- a/varken/radarr.py +++ b/varken/radarr.py @@ -40,9 +40,9 @@ class RadarrAPI(object): for movie in movies: if not movie.downloaded: if movie.isAvailable: - ma = True + ma = 0 else: - ma = False + ma = 1 movie_name = '{} ({})'.format(movie.title, movie.year) missing.append((movie_name, ma, movie.tmdbId)) From 8d7d3210f2ea2d8d233898fa1a60b5a82cd79906 Mon Sep 17 00:00:00 2001 From: samwiseg0 Date: Mon, 10 Dec 2018 12:21:02 -0800 Subject: [PATCH 04/31] Handle invalid config better and log it --- varken/iniparser.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/varken/iniparser.py b/varken/iniparser.py index 30629a0..d163423 100644 --- a/varken/iniparser.py +++ b/varken/iniparser.py @@ -29,7 +29,10 @@ class INIParser(object): self.ciscoasa_enabled = False self.ciscoasa_firewalls = [] - self.parse_opts() + try: + self.parse_opts() + except configparser.NoOptionError as e: + logger.error(e) def enable_check(self, server_type=None): t = server_type From ace92991b3ad1f816405f91c8235b8ee56b74da8 Mon Sep 17 00:00:00 2001 From: samwiseg0 Date: Mon, 10 Dec 2018 15:06:43 -0800 Subject: [PATCH 05/31] Added titleSlug to radarrEnhancement for #50 --- varken/radarr.py | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/varken/radarr.py b/varken/radarr.py index e04ea49..d4652c6 100644 --- a/varken/radarr.py +++ b/varken/radarr.py @@ -43,10 +43,15 @@ class RadarrAPI(object): ma = 0 else: ma = 1 - movie_name = '{} ({})'.format(movie.title, movie.year) - missing.append((movie_name, ma, movie.tmdbId)) - for title, ma, mid in missing: + movie_name = '{} ({})'.format(movie.title, movie.year) + + title_slug = movie.titleSlug + + missing.append((movie_name, ma, movie.tmdbId, title_slug)) + + + for title, ma, mid, title_slug in missing: hash_id = hashit('{}{}{}'.format(self.server.id, title, mid)) influx_payload.append( { @@ -56,7 +61,8 @@ class RadarrAPI(object): "Missing_Available": ma, "tmdbId": mid, "server": self.server.id, - "name": title + "name": title, + "titleSlug": title_slug }, "time": self.now, "fields": { @@ -94,17 +100,20 @@ class RadarrAPI(object): for queue_item in download_queue: movie = queue_item.movie + name = '{} ({})'.format(movie.title, movie.year) + title_slug = movie.titleSlug + if queue_item.protocol.upper() == 'USENET': protocol_id = 1 else: protocol_id = 0 queue.append((name, queue_item.quality['quality']['name'], queue_item.protocol.upper(), - protocol_id, queue_item.id)) + protocol_id, queue_item.id, title_slug)) - for name, quality, protocol, protocol_id, qid in queue: + for name, quality, protocol, protocol_id, qid, title_slug in queue: hash_id = hashit('{}{}{}'.format(self.server.id, name, quality)) influx_payload.append( { @@ -116,7 +125,8 @@ class RadarrAPI(object): "name": name, "quality": quality, "protocol": protocol, - "protocol_id": protocol_id + "protocol_id": protocol_id, + "titleSlug": title_slug }, "time": self.now, "fields": { From 82b247d1c07937590d5529cd960e4225056da170 Mon Sep 17 00:00:00 2001 From: samwiseg0 Date: Mon, 10 Dec 2018 16:49:22 -0800 Subject: [PATCH 06/31] Handle exceptions in a differnt place --- varken/iniparser.py | 22 +++++++++++----------- varken/radarr.py | 8 ++------ 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/varken/iniparser.py b/varken/iniparser.py index d163423..b242329 100644 --- a/varken/iniparser.py +++ b/varken/iniparser.py @@ -29,20 +29,20 @@ class INIParser(object): self.ciscoasa_enabled = False self.ciscoasa_firewalls = [] - try: - self.parse_opts() - except configparser.NoOptionError as e: - logger.error(e) + self.parse_opts() def enable_check(self, server_type=None): t = server_type - global_server_ids = self.config.get('global', t) - if global_server_ids.lower() in ['false', 'no', '0']: - logger.info('%s disabled.', t.upper()) - return False - else: - sids = self.clean_check(global_server_ids, t) - return sids + try: + global_server_ids = self.config.get('global', t) + if global_server_ids.lower() in ['false', 'no', '0']: + logger.info('%s disabled.', t.upper()) + return False + else: + sids = self.clean_check(global_server_ids, t) + return sids + except configparser.NoOptionError as e: + logger.error(e) @staticmethod def clean_check(server_id_list, server_type=None): diff --git a/varken/radarr.py b/varken/radarr.py index d4652c6..e19623c 100644 --- a/varken/radarr.py +++ b/varken/radarr.py @@ -46,9 +46,7 @@ class RadarrAPI(object): movie_name = '{} ({})'.format(movie.title, movie.year) - title_slug = movie.titleSlug - - missing.append((movie_name, ma, movie.tmdbId, title_slug)) + missing.append((movie_name, ma, movie.tmdbId, movie.titleSlug)) for title, ma, mid, title_slug in missing: @@ -103,15 +101,13 @@ class RadarrAPI(object): name = '{} ({})'.format(movie.title, movie.year) - title_slug = movie.titleSlug - if queue_item.protocol.upper() == 'USENET': protocol_id = 1 else: protocol_id = 0 queue.append((name, queue_item.quality['quality']['name'], queue_item.protocol.upper(), - protocol_id, queue_item.id, title_slug)) + protocol_id, queue_item.id, movie.titleSlug)) for name, quality, protocol, protocol_id, qid, title_slug in queue: hash_id = hashit('{}{}{}'.format(self.server.id, name, quality)) From 387202d2a966e1437f9b88a785f6c519c44e60b3 Mon Sep 17 00:00:00 2001 From: samwiseg0 Date: Mon, 10 Dec 2018 16:55:47 -0800 Subject: [PATCH 07/31] Add extra_type to Tautulli structures --- varken/structures.py | 1 + 1 file changed, 1 insertion(+) diff --git a/varken/structures.py b/varken/structures.py index 44c202a..34fa91c 100644 --- a/varken/structures.py +++ b/varken/structures.py @@ -274,6 +274,7 @@ class TautulliStream(NamedTuple): subtitle_language: str = None stream_subtitle_container: str = None sub_type: str = None + extra_type: str = None class TVShow(NamedTuple): From 51d03126f8d8d522cfa053c315abe63fc7c316a5 Mon Sep 17 00:00:00 2001 From: samwiseg0 Date: Mon, 10 Dec 2018 17:27:50 -0800 Subject: [PATCH 08/31] Convert missing available to True False --- varken/radarr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/varken/radarr.py b/varken/radarr.py index e19623c..11d0e14 100644 --- a/varken/radarr.py +++ b/varken/radarr.py @@ -40,9 +40,9 @@ class RadarrAPI(object): for movie in movies: if not movie.downloaded: if movie.isAvailable: - ma = 0 + ma = True else: - ma = 1 + ma = False movie_name = '{} ({})'.format(movie.title, movie.year) From 5812a2d4c11123db308da661b192c58b1fcf592b Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Mon, 10 Dec 2018 19:55:45 -0600 Subject: [PATCH 09/31] Revert "Convert missing available to True False" This reverts commit 273706d1 --- varken/radarr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/varken/radarr.py b/varken/radarr.py index 11d0e14..e19623c 100644 --- a/varken/radarr.py +++ b/varken/radarr.py @@ -40,9 +40,9 @@ class RadarrAPI(object): for movie in movies: if not movie.downloaded: if movie.isAvailable: - ma = True + ma = 0 else: - ma = False + ma = 1 movie_name = '{} ({})'.format(movie.title, movie.year) From 7cf9c0b165ececab3958ccd2df6201fb8f199721 Mon Sep 17 00:00:00 2001 From: samwiseg0 Date: Mon, 10 Dec 2018 17:59:03 -0800 Subject: [PATCH 10/31] Add logs to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index f97a8aa..cc45351 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ data/varken.ini .idea/ Legacy/configuration.py varken-venv/ +logs/ From 92b1e26f34da3a3f25fe6d749a8f5b0dbc1b401f Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Mon, 10 Dec 2018 20:27:54 -0600 Subject: [PATCH 11/31] Travis-CI Dockerbuild test --- .travis.yml | 12 ++++++++++++ Dockerfile | 16 ++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 .travis.yml create mode 100644 Dockerfile diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..6e28370 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,12 @@ +services: + - docker + +script: + - docker build -t boerderij/varken:$TRAVIS_BRANCH . + - docker ps -a + - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + - docker push boerderij/varken:$TRAVIS_BRANCH + +env: + global: + - secure: c91+zQXN28Anr2q94vhJAzN36teKovgniNmUI0MaejYfwcShN8TVeojkxbP+AxZuvGh1AfvB26LQeuPqAAntoNxvtPg3PLxv93rRSkAf0jk9apm9biYDAJNAM3OSiqCGfzfNhtUHmPmybRy2UmRXpHc6ZU1GmOdX2yyXCC2S6wjJOGabRpCA2Lw1vNnQuSJMDZ78amybZNmqAkK+rxe9hH2TGwcSImW8dlW2Ryt8H4a2s9VW9rbebQF+PzY4pw+OlIarpVUXZzUyEq8PS2EmJTuhrNA+RtZWJ4yRZ33jK4UqZRJzfC4FniZzSqtV/P3YGgSFNzhM87y5VhNiauX6QmtIDfLUV6c86cWCy24O41SrAJQOi4CLszJVkYfyggVFoRFegNS2+njN+f2Bbbx3rHtmNds0cDSfFuK3XhtTe0EhNgHLXOCX4IyAGzYWO+afmbqm/8S+m/QjCT28+0GgxYSqD2qO3FuPRA7woWucrKl2xa/tYikkurkDif0yBHxPac8mB8KLPLrjGzHlBG6SYYpTlpjWJrddbYhm0EZVmMkkFHRHLcOK8AOHKQipQBHmP+wvTGouwaZ8Uv5+uDNZ76st4BZR1tfXCtZ6A0RLRspo0wJ5EKlrNr8OIQGdj1G4TJ0H029mycqkAQ5yFPlvF/wAZ0shVFb/uMejpQw+2ks= \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..023a197 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM lsiobase/alpine.python3 + +LABEL maintainer="dirtycajunrice" + +ENV branch="master" + +RUN \ + git clone --single-branch -b $branch https://github.com/Boerderij/Varken.git /app && \ + python3 -m pip install -r /app/requirements.txt && \ + chown -R abc:abc \ + /config \ + /app + +CMD cp /app/data/varken.example.ini /config/varken.example.ini && python3 /app/Varken.py --data-folder /config + +VOLUME /config \ No newline at end of file From 82bd92a16b13dd5c50c338b4476ac04867b0b654 Mon Sep 17 00:00:00 2001 From: samwiseg0 Date: Mon, 10 Dec 2018 19:10:59 -0800 Subject: [PATCH 12/31] Added logging to the GeoLite2 downloader --- varken/helpers.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/varken/helpers.py b/varken/helpers.py index b746085..f3c02e4 100644 --- a/varken/helpers.py +++ b/varken/helpers.py @@ -16,14 +16,24 @@ logger = logging.getLogger('varken') def geoip_download(data_folder): datafolder = data_folder + tar_dbfile = abspath(join(datafolder, 'GeoLite2-City.tar.gz')) + url = 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz' + logger.info('Downloading GeoLite2 from %s', url) urlretrieve(url, tar_dbfile) + tar = tarfile.open(tar_dbfile, 'r:gz') + logging.debug('Opening GeoLite2 tar file : %s', tar_dbfile) + for files in tar.getmembers(): if 'GeoLite2-City.mmdb' in files.name: + logging.debug('"GeoLite2-City.mmdb" FOUND in tar file') files.name = os.path.basename(files.name) + tar.extract(files, datafolder) + logging.debug('%s has been extracted to %s', files, datafolder) + os.remove(tar_dbfile) From 647c3181614ce821b906d1a3311445b0221f4f5a Mon Sep 17 00:00:00 2001 From: samwiseg0 Date: Mon, 10 Dec 2018 19:16:13 -0800 Subject: [PATCH 13/31] Add logging to geo_lookup. --- varken/helpers.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/varken/helpers.py b/varken/helpers.py index f3c02e4..0fb4d6a 100644 --- a/varken/helpers.py +++ b/varken/helpers.py @@ -33,12 +33,14 @@ def geoip_download(data_folder): tar.extract(files, datafolder) logging.debug('%s has been extracted to %s', files, datafolder) - + os.remove(tar_dbfile) def geo_lookup(ipaddress, data_folder): datafolder = data_folder + logging.debug('Reading GeoLite2 from %s', datafolder) + dbfile = abspath(join(datafolder, 'GeoLite2-City.mmdb')) now = time.time() @@ -46,9 +48,13 @@ def geo_lookup(ipaddress, data_folder): dbinfo = os.stat(dbfile) db_age = now - dbinfo.st_ctime if db_age > (35 * 86400): + logging.info('GeoLite2 DB is older than 35 days. Attempting to re-download...') + os.remove(dbfile) + geoip_download(datafolder) except FileNotFoundError: + logging.error('GeoLite2 DB not found. Attempting to download...') geoip_download(datafolder) reader = geoip2.database.Reader(dbfile) From 901b62cc3a13478ee034ec8392c3d9011719466b Mon Sep 17 00:00:00 2001 From: samwiseg0 Date: Mon, 10 Dec 2018 19:35:36 -0800 Subject: [PATCH 14/31] Log data folder on start --- Varken.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Varken.py b/Varken.py index bd6c1b8..8d6e5eb 100644 --- a/Varken.py +++ b/Varken.py @@ -58,6 +58,8 @@ if __name__ == "__main__": vl = VarkenLogger(data_folder=DATA_FOLDER, debug=opts.debug) vl.logger.info('Starting Varken...') + vl.logger.info('Data folder is "%s"', DATA_FOLDER) + vl.logger.info(u"{} {} ({}{})".format( platform.system(), platform.release(), platform.version(), ' - {}'.format(PLATFORM_LINUX_DISTRO) if PLATFORM_LINUX_DISTRO else '' From 2b5023d4dc73a2288c7158cb64307702f84b6d74 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Mon, 10 Dec 2018 21:54:01 -0600 Subject: [PATCH 15/31] updated readme + travis. Also addresses #53 --- .travis.yml | 2 +- README.md | 74 ++++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 60 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6e28370..f746698 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ services: script: - docker build -t boerderij/varken:$TRAVIS_BRANCH . - - docker ps -a + - docker images - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - docker push boerderij/varken:$TRAVIS_BRANCH diff --git a/README.md b/README.md index eb16bc3..838724d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Varken +[![Build Status](https://travis-ci.org/Boerderij/Varken.svg?branch=master)](https://travis-ci.org/Boerderij/Varken) [![Discord](https://img.shields.io/badge/Discord-Varken-7289DA.svg?logo=discord&style=flat-square)](https://discord.gg/AGTG44H) [![BuyMeACoffee](https://img.shields.io/badge/BuyMeACoffee-Donate-ff813f.svg?logo=CoffeeScript&style=flat-square)](https://www.buymeacoffee.com/varken) -[![Docker Pulls](https://img.shields.io/docker/pulls/boerderij/varken.svg?style=flat-square)](https://hub.docker.com/r/boerderij/varken/) Dutch for PIG. PIG is an Acronym for Plex/InfluxDB/Grafana @@ -12,28 +12,47 @@ frontend Requirements: * Python3.6+ * Python3-pip +* InfluxDB

-## Quick Setup -1. Clone the repository `sudo git clone https://github.com/Boerderij/Varken.git /opt/Varken` -1. Follow the systemd install instructions located in `varken.systemd` -1. Create venv in project `cd /opt/Varken && /usr/bin/python3 -m venv varken-venv` -1. Install requirements `/opt/Varken/varken-venv/bin/python -m pip install -r requirements.txt` -1. Make a copy of `varken.example.ini` to `varken.ini` in the `data` folder - `cp /opt/Varken/data/varken.example.ini /opt/Varken/data/varken.ini` -1. Make the appropriate changes to `varken.ini` - ie.`nano /opt/Varken/data/varken.ini` -1. Make sure all the files have the appropriate permissions `sudo chown varken:varken -R /opt/Varken` -1. After completing the [getting started](http://docs.grafana.org/guides/getting_started/) portion of grafana, create your datasource for influxdb. -1. Install `grafana-cli plugins install grafana-worldmap-panel` +## Quick Setup (Git Clone) +``` +# Clone the repository +git clone https://github.com/Boerderij/Varken.git /opt/Varken +# Follow the systemd install instructions located in varken.systemd +nano /opt/Varken/varken.systemd +cp /opt/Varken/varken.systemd /etc/systemd/system/varken.service + +# Create venv in project +/usr/bin/python3 -m venv /opt/Varken/varken-venv + +# Install requirements +/opt/Varken/varken-venv/bin/python -m pip install -r requirements.txt + +# Make a copy of varken.example.ini to varken.ini in the data folder +cp /opt/Varken/data/varken.example.ini /opt/Varken/data/varken.ini + +# Make the appropriate changes to varken.ini +nano /opt/Varken/data/varken.ini + +# Make sure all the files have the appropriate permissions +chown $USER:$USER -R /opt/Varken + +# Start the service and enable it +systemctl start varken +systemctl enable varken +``` ### Docker Repo is included in [Boerderij/docker-Varken](https://github.com/Boerderij/docker-Varken) - +[![Docker-Layers](https://images.microbadger.com/badges/image/boerderij/varken.svg)](https://microbadger.com/images/boerderij/varken") +[![Docker-Version](https://images.microbadger.com/badges/version/boerderij/varken.svg)](https://microbadger.com/images/boerderij/varken") +[![Docker Pulls](https://img.shields.io/docker/pulls/boerderij/varken.svg)](https://hub.docker.com/r/boerderij/varken/) +[![Docker Stars](https://img.shields.io/docker/stars/boerderij/varken.svg)](https://hub.docker.com/r/boerderij/varken/)
Example

@@ -42,7 +61,32 @@ docker run -d \ --name=varken \ -v :/config \ -e PGID= -e PUID= \ - boerderij/varken:nightly + boerderij/varken ```

+ +#### Tags +* **latest** +* **nightly** +* **release-tag** e.g. v1.0 + +#### Upgrading with docker +```sh +docker stop varken +docker rm varken +# Run deploy command above +``` + +### InfluxDB +[InfluxDB Installation documentation](https://docs.influxdata.com/influxdb/v1.7/introduction/installation/) +Influxdb is required but not packaged as part of Varken. Varken will create +its database on its own. If you choose to give varken user permissions that +do not include database creation, please ensure you create an influx database +named `varken` + +### Grafana +Grafana is used in our examples but not required, nor packaged as part of +Varken. Panel example pictures are pinned in the grafana-panels channel of +discord. Future releases may contain a json-generator, but it does not exist +as varken stands today. \ No newline at end of file From 22a1bf84bd1856bfbda3f49f543327b7a3376634 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Mon, 10 Dec 2018 21:56:07 -0600 Subject: [PATCH 16/31] sigh... spaces and such --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 838724d..2628902 100644 --- a/README.md +++ b/README.md @@ -79,13 +79,14 @@ docker rm varken ``` ### InfluxDB -[InfluxDB Installation documentation](https://docs.influxdata.com/influxdb/v1.7/introduction/installation/) +[InfluxDB Installation Documentation](https://docs.influxdata.com/influxdb/v1.7/introduction/installation/) Influxdb is required but not packaged as part of Varken. Varken will create its database on its own. If you choose to give varken user permissions that do not include database creation, please ensure you create an influx database named `varken` ### Grafana +[Grafana Installation Documentation(http://docs.grafana.org/installation/) Grafana is used in our examples but not required, nor packaged as part of Varken. Panel example pictures are pinned in the grafana-panels channel of discord. Future releases may contain a json-generator, but it does not exist From f71a632d29ea0e617fd6821096f3b8e8c2877ecb Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Mon, 10 Dec 2018 21:59:10 -0600 Subject: [PATCH 17/31] sigh... spaces and such --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 2628902..e01046b 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ systemctl enable varken ### Docker Repo is included in [Boerderij/docker-Varken](https://github.com/Boerderij/docker-Varken) + [![Docker-Layers](https://images.microbadger.com/badges/image/boerderij/varken.svg)](https://microbadger.com/images/boerderij/varken") [![Docker-Version](https://images.microbadger.com/badges/version/boerderij/varken.svg)](https://microbadger.com/images/boerderij/varken") [![Docker Pulls](https://img.shields.io/docker/pulls/boerderij/varken.svg)](https://hub.docker.com/r/boerderij/varken/) @@ -80,6 +81,7 @@ docker rm varken ### InfluxDB [InfluxDB Installation Documentation](https://docs.influxdata.com/influxdb/v1.7/introduction/installation/) + Influxdb is required but not packaged as part of Varken. Varken will create its database on its own. If you choose to give varken user permissions that do not include database creation, please ensure you create an influx database @@ -87,6 +89,7 @@ named `varken` ### Grafana [Grafana Installation Documentation(http://docs.grafana.org/installation/) + Grafana is used in our examples but not required, nor packaged as part of Varken. Panel example pictures are pinned in the grafana-panels channel of discord. Future releases may contain a json-generator, but it does not exist From f472c6cc97c99ead09604ec9abf5bfbf86aebbff Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Mon, 10 Dec 2018 22:03:04 -0600 Subject: [PATCH 18/31] sigh... spaces and such --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index e01046b..b0ceab1 100644 --- a/README.md +++ b/README.md @@ -48,8 +48,6 @@ systemctl enable varken ``` ### Docker -Repo is included in [Boerderij/docker-Varken](https://github.com/Boerderij/docker-Varken) - [![Docker-Layers](https://images.microbadger.com/badges/image/boerderij/varken.svg)](https://microbadger.com/images/boerderij/varken") [![Docker-Version](https://images.microbadger.com/badges/version/boerderij/varken.svg)](https://microbadger.com/images/boerderij/varken") [![Docker Pulls](https://img.shields.io/docker/pulls/boerderij/varken.svg)](https://hub.docker.com/r/boerderij/varken/) @@ -88,7 +86,7 @@ do not include database creation, please ensure you create an influx database named `varken` ### Grafana -[Grafana Installation Documentation(http://docs.grafana.org/installation/) +[Grafana Installation Documentation](http://docs.grafana.org/installation/) Grafana is used in our examples but not required, nor packaged as part of Varken. Panel example pictures are pinned in the grafana-panels channel of From 0be7c6123682e0ec226d04fe150507710ae76416 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Mon, 10 Dec 2018 22:40:23 -0600 Subject: [PATCH 19/31] split out stages for travis --- .travis.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index f746698..89e7b26 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,17 @@ services: - docker -script: - - docker build -t boerderij/varken:$TRAVIS_BRANCH . - - docker images - - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - - docker push boerderij/varken:$TRAVIS_BRANCH +jobs: + include: + - stage: "Build and Push" + name: "Build" + script: + - docker build -t boerderij/varken:$TRAVIS_BRANCH . + - docker images + - name: "Push" + script: + - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + - docker push boerderij/varken:$TRAVIS_BRANCH env: global: From 2ec4b50514992c8d06c50efbc177acdb642b504c Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Mon, 10 Dec 2018 22:43:41 -0600 Subject: [PATCH 20/31] split out stages for travis --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 89e7b26..f4ed0fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,12 +4,9 @@ services: jobs: include: - stage: "Build and Push" - name: "Build" script: - docker build -t boerderij/varken:$TRAVIS_BRANCH . - docker images - - name: "Push" - script: - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - docker push boerderij/varken:$TRAVIS_BRANCH From 661634ba6730fc3d1adb8d5318e04630c870716e Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Mon, 10 Dec 2018 22:50:28 -0600 Subject: [PATCH 21/31] added licence --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..59cd926 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Boerderij + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From adbc908678ebd6787f9b39b666181134c6a3c942 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Mon, 10 Dec 2018 22:56:37 -0600 Subject: [PATCH 22/31] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 31 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 +++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..0364d15 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help us improve +title: "[BUG]" +labels: awaiting-approval +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. ... +2. ... +3. ... +4. ... + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Environment (please complete the following information):** + - OS: [e.g. Ubuntu 18.04.1 or Docker:Tag] + - Version [e.g. v1.1] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..54cdb66 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: "[Feature Request]" +labels: awaiting-approval +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From 35a3db6710002b250e56379c8f687db7b0589b91 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Mon, 10 Dec 2018 23:03:21 -0600 Subject: [PATCH 23/31] test travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f4ed0fe..4653958 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ jobs: include: - stage: "Build and Push" script: - - docker build -t boerderij/varken:$TRAVIS_BRANCH . + - docker build --build-arg branch=$TRAVIS_BRANCH -t boerderij/varken:$TRAVIS_BRANCH . - docker images - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - docker push boerderij/varken:$TRAVIS_BRANCH From b1a882546b3eef99ac2cb38d9d37a5c97793542e Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Mon, 10 Dec 2018 23:11:54 -0600 Subject: [PATCH 24/31] test2 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 023a197..16ccdab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM lsiobase/alpine.python3 LABEL maintainer="dirtycajunrice" -ENV branch="master" +#ENV branch="master" RUN \ git clone --single-branch -b $branch https://github.com/Boerderij/Varken.git /app && \ From 7add64e48b272eba82d5d00693eb09a39a8560f0 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Mon, 10 Dec 2018 23:16:30 -0600 Subject: [PATCH 25/31] test3? --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 16ccdab..facaef6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,9 @@ FROM lsiobase/alpine.python3 LABEL maintainer="dirtycajunrice" -#ENV branch="master" +ARG branch="master" + +ENV branch=$branch RUN \ git clone --single-branch -b $branch https://github.com/Boerderij/Varken.git /app && \ From a772ddb5a61d9785d783e3d8d33be7fa52831f55 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Tue, 11 Dec 2018 00:01:24 -0600 Subject: [PATCH 26/31] made time local to the function. Fixes #56 --- varken/ombi.py | 9 ++++----- varken/radarr.py | 11 ++++------- varken/sonarr.py | 21 ++++++++++----------- varken/tautulli.py | 8 +++----- 4 files changed, 21 insertions(+), 28 deletions(-) diff --git a/varken/ombi.py b/varken/ombi.py index f38ca49..7ea33fc 100644 --- a/varken/ombi.py +++ b/varken/ombi.py @@ -8,7 +8,6 @@ from varken.structures import OmbiRequestCounts class OmbiAPI(object): def __init__(self, server, dbmanager): - self.now = datetime.now(timezone.utc).astimezone().isoformat() self.dbmanager = dbmanager self.server = server # Create session to reduce server web thread load, and globally define pageSize for all requests @@ -20,7 +19,7 @@ class OmbiAPI(object): return "".format(self.server.id) def get_total_requests(self): - self.now = datetime.now(timezone.utc).astimezone().isoformat() + now = datetime.now(timezone.utc).astimezone().isoformat() tv_endpoint = '/api/v1/Request/tv' movie_endpoint = "/api/v1/Request/movie" @@ -42,7 +41,7 @@ class OmbiAPI(object): "type": "Request_Total", "server": self.server.id }, - "time": self.now, + "time": now, "fields": { "total": movie_requests + tv_requests, "movies": movie_requests, @@ -54,7 +53,7 @@ class OmbiAPI(object): self.dbmanager.write_points(influx_payload) def get_request_counts(self): - self.now = datetime.now(timezone.utc).astimezone().isoformat() + now = datetime.now(timezone.utc).astimezone().isoformat() endpoint = '/api/v1/Request/count' req = self.session.prepare_request(Request('GET', self.server.url + endpoint)) @@ -70,7 +69,7 @@ class OmbiAPI(object): "tags": { "type": "Request_Counts" }, - "time": self.now, + "time": now, "fields": { "pending": requests.pending, "approved": requests.approved, diff --git a/varken/radarr.py b/varken/radarr.py index e19623c..1b23923 100644 --- a/varken/radarr.py +++ b/varken/radarr.py @@ -8,7 +8,6 @@ from varken.structures import Movie, Queue class RadarrAPI(object): def __init__(self, server, dbmanager): - self.now = datetime.now(timezone.utc).astimezone().isoformat() self.dbmanager = dbmanager self.server = server # Create session to reduce server web thread load, and globally define pageSize for all requests @@ -21,7 +20,7 @@ class RadarrAPI(object): def get_missing(self): endpoint = '/api/movie' - self.now = datetime.now(timezone.utc).astimezone().isoformat() + now = datetime.now(timezone.utc).astimezone().isoformat() influx_payload = [] missing = [] @@ -45,10 +44,8 @@ class RadarrAPI(object): ma = 1 movie_name = '{} ({})'.format(movie.title, movie.year) - missing.append((movie_name, ma, movie.tmdbId, movie.titleSlug)) - for title, ma, mid, title_slug in missing: hash_id = hashit('{}{}{}'.format(self.server.id, title, mid)) influx_payload.append( @@ -62,7 +59,7 @@ class RadarrAPI(object): "name": title, "titleSlug": title_slug }, - "time": self.now, + "time": now, "fields": { "hash": hash_id } @@ -73,7 +70,7 @@ class RadarrAPI(object): def get_queue(self): endpoint = '/api/queue' - self.now = datetime.now(timezone.utc).astimezone().isoformat() + now = datetime.now(timezone.utc).astimezone().isoformat() influx_payload = [] queue = [] @@ -124,7 +121,7 @@ class RadarrAPI(object): "protocol_id": protocol_id, "titleSlug": title_slug }, - "time": self.now, + "time": now, "fields": { "hash": hash_id } diff --git a/varken/sonarr.py b/varken/sonarr.py index 8f71817..117136a 100644 --- a/varken/sonarr.py +++ b/varken/sonarr.py @@ -8,10 +8,7 @@ from varken.structures import Queue, TVShow class SonarrAPI(object): def __init__(self, server, dbmanager): - # Set Time of initialization - self.now = datetime.now(timezone.utc).astimezone().isoformat() self.dbmanager = dbmanager - self.today = str(date.today()) self.server = server # Create session to reduce server web thread load, and globally define pageSize for all requests self.session = Session() @@ -24,9 +21,10 @@ class SonarrAPI(object): def get_missing(self): endpoint = '/api/calendar' + today = str(date.today()) last_days = str(date.today() + timedelta(days=-self.server.missing_days)) - self.now = datetime.now(timezone.utc).astimezone().isoformat() - params = {'start': last_days, 'end': self.today} + now = datetime.now(timezone.utc).astimezone().isoformat() + params = {'start': last_days, 'end': today} influx_payload = [] missing = [] @@ -63,7 +61,7 @@ class SonarrAPI(object): "sxe": sxe, "airs": air_date }, - "time": self.now, + "time": now, "fields": { "hash": hash_id @@ -75,11 +73,12 @@ class SonarrAPI(object): def get_future(self): endpoint = '/api/calendar/' - self.now = datetime.now(timezone.utc).astimezone().isoformat() + today = str(date.today()) + now = datetime.now(timezone.utc).astimezone().isoformat() future = str(date.today() + timedelta(days=self.server.future_days)) influx_payload = [] air_days = [] - params = {'start': self.today, 'end': future} + params = {'start': today, 'end': future} req = self.session.prepare_request(Request('GET', self.server.url + endpoint, params=params)) get = connection_handler(self.session, req, self.server.verify_ssl) @@ -116,7 +115,7 @@ class SonarrAPI(object): "airs": air_date, "downloaded": dl_status }, - "time": self.now, + "time": now, "fields": { "hash": hash_id } @@ -128,7 +127,7 @@ class SonarrAPI(object): def get_queue(self): influx_payload = [] endpoint = '/api/queue' - self.now = datetime.now(timezone.utc).astimezone().isoformat() + now = datetime.now(timezone.utc).astimezone().isoformat() queue = [] req = self.session.prepare_request(Request('GET', self.server.url + endpoint)) @@ -168,7 +167,7 @@ class SonarrAPI(object): "protocol": protocol, "protocol_id": protocol_id }, - "time": self.now, + "time": now, "fields": { "hash": hash_id } diff --git a/varken/tautulli.py b/varken/tautulli.py index 9112f83..a62da8f 100644 --- a/varken/tautulli.py +++ b/varken/tautulli.py @@ -9,8 +9,6 @@ from varken.structures import TautulliStream class TautulliAPI(object): def __init__(self, server, dbmanager, data_folder): - # Set Time of initialization - self.now = datetime.now(timezone.utc).astimezone().isoformat() self.dbmanager = dbmanager self.server = server self.session = Session() @@ -23,7 +21,7 @@ class TautulliAPI(object): return "".format(self.server.id) def get_activity(self): - self.now = datetime.now(timezone.utc).astimezone().isoformat() + now = datetime.now(timezone.utc).astimezone().isoformat() influx_payload = [] req = self.session.prepare_request(Request('GET', self.server.url + self.endpoint)) @@ -119,7 +117,7 @@ class TautulliAPI(object): "device_type": session.platform, "server": self.server.id }, - "time": self.now, + "time": now, "fields": { "hash": hash_id } @@ -133,7 +131,7 @@ class TautulliAPI(object): "type": "current_stream_stats", "server": self.server.id }, - "time": self.now, + "time": now, "fields": { "stream_count": int(get['stream_count']), "total_bandwidth": int(get['total_bandwidth']), From 3c0c742264e66598697b13da5036e2e4884ac45c Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Tue, 11 Dec 2018 00:05:37 -0600 Subject: [PATCH 27/31] test for cibuild --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index facaef6..6fab470 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,10 @@ ARG branch="master" ENV branch=$branch +#COPY / /app/Varken + RUN \ + echo $PWD && ls && \ git clone --single-branch -b $branch https://github.com/Boerderij/Varken.git /app && \ python3 -m pip install -r /app/requirements.txt && \ chown -R abc:abc \ From 98a16d93320a5e8907ce381da79736c66ec861cc Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Tue, 11 Dec 2018 00:13:17 -0600 Subject: [PATCH 28/31] test4 --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6fab470..259cb60 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,11 +6,9 @@ ARG branch="master" ENV branch=$branch -#COPY / /app/Varken +COPY / /app/Varken RUN \ - echo $PWD && ls && \ - git clone --single-branch -b $branch https://github.com/Boerderij/Varken.git /app && \ python3 -m pip install -r /app/requirements.txt && \ chown -R abc:abc \ /config \ From 3264def09987b9ba790543b93759d6512056760a Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Tue, 11 Dec 2018 00:15:38 -0600 Subject: [PATCH 29/31] test5 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 259cb60..c0d4517 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ ARG branch="master" ENV branch=$branch -COPY / /app/Varken +COPY / /app RUN \ python3 -m pip install -r /app/requirements.txt && \ From 6bacee5f591ebb78218fc2fb27e3015df6ba4829 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Tue, 11 Dec 2018 00:25:52 -0600 Subject: [PATCH 30/31] Changelog + Version bump --- CHANGELOG.md | 27 ++++++++++++++++++++++++++- varken/__init__.py | 2 +- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 715bb76..61c3fe2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,31 @@ # Change Log -## [v1.0](https://github.com/Boerderij/Varken/tree/v1.0) (2018-12-09) +## [v1.1](https://github.com/Boerderij/Varken/tree/v1.1) (2018-12-11) +[Full Changelog](https://github.com/Boerderij/Varken/compare/v1.0...v1.1) + +**Implemented enhancements:** + +- Convert missing available to True False [\#54](https://github.com/Boerderij/Varken/issues/54) +- Handle invalid config better and log it [\#51](https://github.com/Boerderij/Varken/issues/51) +- Feature Request - Include value from Radarr [\#50](https://github.com/Boerderij/Varken/issues/50) +- Change true/false to 0/1 for missing movies [\#47](https://github.com/Boerderij/Varken/issues/47) + +**Fixed bugs:** + +- \[BUG\] Time does not update from "today" [\#56](https://github.com/Boerderij/Varken/issues/56) +- geoip\_download does not account for moving data folder [\#46](https://github.com/Boerderij/Varken/issues/46) + +**Closed issues:** + +- Initial startup requires admin access to InfluxDB [\#53](https://github.com/Boerderij/Varken/issues/53) +- Ability to add custom tautulli port [\#49](https://github.com/Boerderij/Varken/issues/49) + +**Merged pull requests:** + +- v1.1 Merge [\#57](https://github.com/Boerderij/Varken/pull/57) ([DirtyCajunRice](https://github.com/DirtyCajunRice)) +- Update issue templates [\#55](https://github.com/Boerderij/Varken/pull/55) ([DirtyCajunRice](https://github.com/DirtyCajunRice)) + +## [v1.0](https://github.com/Boerderij/Varken/tree/v1.0) (2018-12-10) [Full Changelog](https://github.com/Boerderij/Varken/compare/v0.3-nightly...v1.0) **Implemented enhancements:** diff --git a/varken/__init__.py b/varken/__init__.py index 341988c..c3ef0d4 100644 --- a/varken/__init__.py +++ b/varken/__init__.py @@ -1 +1 @@ -VERSION = 1.0 +VERSION = 1.1 From b393675713000aa13222ae4579c1138b5ec22ca1 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Tue, 11 Dec 2018 00:29:00 -0600 Subject: [PATCH 31/31] remove need for branches --- .travis.yml | 2 +- Dockerfile | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4653958..f4ed0fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ jobs: include: - stage: "Build and Push" script: - - docker build --build-arg branch=$TRAVIS_BRANCH -t boerderij/varken:$TRAVIS_BRANCH . + - docker build -t boerderij/varken:$TRAVIS_BRANCH . - docker images - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - docker push boerderij/varken:$TRAVIS_BRANCH diff --git a/Dockerfile b/Dockerfile index c0d4517..aa7fcf9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,10 +2,6 @@ FROM lsiobase/alpine.python3 LABEL maintainer="dirtycajunrice" -ARG branch="master" - -ENV branch=$branch - COPY / /app RUN \