aethernal-agent 0.4.8 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 73c244ced26f829ddc772d377d01ac16b09c0afbb9676f2fc1534fb89b5ec3db
4
- data.tar.gz: cd96d7e94479a5948120d384ccc93687da0c7e8459ee3f6b4638c01a7a6ddaf2
3
+ metadata.gz: 2d8055c7d1b1bf71af6a321abd229cdb2fcf82d79d88174ba7815ef7b7dd2f38
4
+ data.tar.gz: cbbd579c4230a2690749292dbbcd4985caa7f259169869d2d9456cf737721805
5
5
  SHA512:
6
- metadata.gz: 793258a548ca4e38801ffd6a5f70a2f5991641b6322e0202702af7203cbb1299f4f0fdec15adbc6de29d7eca23341d7e98a30931fa5704e6f87fdc56ef23d633
7
- data.tar.gz: 2b7845a4c23879bdf59201ec110f79197a5d317d47c2a5dd4ae24d26173551fa66f9856a9fc3555ad7e2c4f15c8c93c4395a9457a8a9303cfcc91bf9ae80f9de
6
+ metadata.gz: 809e13d887f7fef2600032d1968528b7118e682a771fe4e36542e7512e19288fc4f3297e5ee13403b881f9a379237351b889bf73042812ea8042ef0abe9dc077
7
+ data.tar.gz: e18fbd01adae6c4342d4811ecc404cfd4ef52e339d43f5eb226b7f3a3aa8332bf550610ce7436d8f23ccdfbb8eea82f7b77b4fcf0283c8ab35ef94b47afb0bf6
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aethernal-agent (0.4.3)
5
- activesupport (~> 6.0.3.4)
4
+ aethernal-agent (0.5.0)
5
+ activesupport
6
6
  bcrypt
7
7
  docker-api (~> 1.34.2)
8
8
  ruby2_keywords (= 0.0.2)
@@ -15,25 +15,25 @@ PATH
15
15
  GEM
16
16
  remote: https://rubygems.org/
17
17
  specs:
18
- activesupport (6.0.3.4)
18
+ activesupport (6.1.3.2)
19
19
  concurrent-ruby (~> 1.0, >= 1.0.2)
20
- i18n (>= 0.7, < 2)
21
- minitest (~> 5.1)
22
- tzinfo (~> 1.1)
23
- zeitwerk (~> 2.2, >= 2.2.2)
24
- backports (3.20.1)
20
+ i18n (>= 1.6, < 2)
21
+ minitest (>= 5.1)
22
+ tzinfo (~> 2.0)
23
+ zeitwerk (~> 2.3)
24
+ backports (3.21.0)
25
25
  bcrypt (3.1.16)
26
26
  coderay (1.1.3)
27
- concurrent-ruby (1.1.7)
27
+ concurrent-ruby (1.1.8)
28
28
  diff-lcs (1.4.4)
29
29
  docker-api (1.34.2)
30
30
  excon (>= 0.47.0)
31
31
  multi_json
32
- excon (0.78.1)
33
- i18n (1.8.7)
32
+ excon (0.81.0)
33
+ i18n (1.8.10)
34
34
  concurrent-ruby (~> 1.0)
35
35
  method_source (1.0.0)
36
- minitest (5.14.3)
36
+ minitest (5.14.4)
37
37
  multi_json (1.15.0)
38
38
  mustermann (1.1.1)
39
39
  ruby2_keywords (~> 0.0.1)
@@ -89,14 +89,13 @@ GEM
89
89
  net-telnet (= 0.1.1)
90
90
  sfl
91
91
  sqlite3 (1.4.2)
92
- terminal-table (2.0.0)
93
- unicode-display_width (~> 1.1, >= 1.1.1)
94
- thor (1.0.1)
95
- thread_safe (0.3.6)
92
+ terminal-table (3.0.1)
93
+ unicode-display_width (>= 1.1.1, < 3)
94
+ thor (1.1.0)
96
95
  tilt (2.0.10)
97
- tzinfo (1.2.9)
98
- thread_safe (~> 0.1)
99
- unicode-display_width (1.7.0)
96
+ tzinfo (2.0.4)
97
+ concurrent-ruby (~> 1.0)
98
+ unicode-display_width (2.0.0)
100
99
  zeitwerk (2.4.2)
101
100
 
102
101
  PLATFORMS
@@ -110,4 +109,4 @@ DEPENDENCIES
110
109
  serverspec
111
110
 
112
111
  BUNDLED WITH
113
- 2.2.5
112
+ 2.2.15
@@ -21,6 +21,8 @@ module AethernalAgent
21
21
 
22
22
  def initialize(options = {})
23
23
  options = HashWithIndifferentAccess.new(options)
24
+ options[:ubuntu_version] = ubuntu_release
25
+
24
26
  self.global_options = options
25
27
  self.plugin_path = options[:file_path] || caller_locations(0)[1].path
26
28
  self.user = options[:user]
@@ -44,8 +46,11 @@ module AethernalAgent
44
46
  self.manifest.package.each_key do |package_type|
45
47
  case package_type
46
48
  when 'apt'
49
+ AethernalAgent.logger.debug("apt options: #{self.manifest.package['apt']} for ubuntu version #{ubuntu_release}")
47
50
  options = self.manifest.package['apt'][ubuntu_release]
48
- AethernalAgent.logger.debug("Using apt for ubuntu #{ubuntu_release} - #{options}")
51
+ options = self.manifest.package['apt']["all"] if self.manifest.package['apt']["all"].present?
52
+
53
+ AethernalAgent.logger.debug("Matched options: #{options}")
49
54
  packages = options['packages']
50
55
 
51
56
  if options.has_key?('add_sources')
@@ -71,9 +76,12 @@ module AethernalAgent
71
76
  end
72
77
  when 'direct_download'
73
78
  opts = self.manifest.package[package_type]
79
+ opts = self.manifest.package[package_type][ubuntu_release] if self.manifest.package[package_type][ubuntu_release].present?
80
+
74
81
  target_file = File.join(app_path, opts["target_name"])
75
82
  directory(app_path, owner: self.user)
76
83
  AethernalAgent.logger.debug("Downloading file from '#{opts["url"]}' to '#{target_file}'")
84
+
77
85
  File.open(target_file, "wb") do |saved_file|
78
86
  open(opts["url"], "rb") do |read_file|
79
87
  saved_file.write(read_file.read)
@@ -17,6 +17,7 @@ module AethernalAgent
17
17
  end
18
18
 
19
19
  def apt_package(options = {})
20
+ AethernalAgent.logger.info "Installing apt package(s) with options: #{options}"
20
21
  action = options[:action]
21
22
  action = :install if action.nil?
22
23
 
@@ -62,3 +62,8 @@ package:
62
62
  - python3.7
63
63
  - python3-distutils
64
64
  - python3-pip
65
+ "2004":
66
+ packages:
67
+ - python3.8
68
+ - python3-distutils
69
+ - python3-pip
@@ -7,7 +7,11 @@ UMask=0002
7
7
  Restart=on-failure
8
8
  RestartSec=5
9
9
  Type=simple
10
+ <% if @ubuntu_version == "2004" %>
11
+ ExecStart=/usr/bin/python3.8 %h/apps/bazarr/bazarr.py -c %h/.config/bazarr/data
12
+ <% else %>
10
13
  ExecStart=/usr/bin/python3.7 %h/apps/bazarr/bazarr.py -c %h/.config/bazarr/data
14
+ <% end %>
11
15
  KillSignal=SIGINT
12
16
  TimeoutStopSec=20
13
17
  SyslogIdentifier=bazarr
@@ -6,6 +6,7 @@ class AethernalAgent::Gitea < AethernalAgent::App
6
6
  def install_packages(options = {})
7
7
  super(options)
8
8
  file(gitea_path, chmod: 711, owner: self.user)
9
+ file(File.join(gitea_path, 'gitea'), chmod: 711, owner: self.user)
9
10
  end
10
11
 
11
12
  def remove_app_user(options = {})
@@ -41,10 +41,16 @@ estimated_size_mb: 295
41
41
  package:
42
42
  folder_name: nextcloud
43
43
  direct_download:
44
- url: https://download.nextcloud.com/server/releases/nextcloud-18.0.4.tar.bz2
45
- target_name: nextcloud-18.0.4.tar.bz2
46
- auto_extract: true
47
- always_latest: false
44
+ "1804":
45
+ url: https://download.nextcloud.com/server/releases/nextcloud-18.0.4.tar.bz2
46
+ target_name: nextcloud-18.0.4.tar.bz2
47
+ auto_extract: true
48
+ always_latest: false
49
+ "2004":
50
+ url: https://download.nextcloud.com/server/releases/nextcloud-21.0.2.tar.bz2
51
+ target_name: nextcloud-21.0.2.tar.bz2
52
+ auto_extract: true
53
+ always_latest: false
48
54
  apt:
49
55
  "1804":
50
56
  packages:
@@ -52,3 +58,9 @@ package:
52
58
  - php-sqlite3
53
59
  - php7.2-gd php7.2-json php7.2-mysql php7.2-curl php7.2-mbstring
54
60
  - php7.2-intl php-imagick php7.2-xml php7.2-zip
61
+ "2004":
62
+ packages:
63
+ - libapache2-mod-php7.4
64
+ - php-sqlite3
65
+ - php7.4-gd php7.4-json php7.4-mysql php7.4-curl php7.4-mbstring
66
+ - php7.4-intl php-imagick php7.4-xml php7.4-zip
@@ -1,10 +1,10 @@
1
1
  class AethernalAgent::Nextcloud < AethernalAgent::App
2
2
  def initialize(options = {})
3
- options[:home] = home_folder_path
4
3
  super(options)
5
4
  end
6
5
 
7
6
  def install_packages(options = {})
7
+ options[:home] = home_folder_path
8
8
  remove_app_user
9
9
  super(options)
10
10
  directory(home_folder_path("/www"), action: :create)
@@ -48,3 +48,10 @@ package:
48
48
  key_url: "https://downloads.plex.tv/plex-keys/PlexSign.key"
49
49
  packages:
50
50
  - plexmediaserver
51
+ "2004":
52
+ add_sources:
53
+ plex:
54
+ source_url: "deb https://downloads.plex.tv/repo/deb public main"
55
+ key_url: "https://downloads.plex.tv/plex-keys/PlexSign.key"
56
+ packages:
57
+ - plexmediaserver
@@ -52,7 +52,7 @@ estimated_size_mb: 23
52
52
  package:
53
53
  folder_name: Radarr
54
54
  apt:
55
- "1804":
55
+ "all":
56
56
  packages:
57
57
  - mediainfo
58
58
  direct_download:
@@ -35,7 +35,7 @@ package:
35
35
  auto_extract: true
36
36
  always_latest: false
37
37
  apt:
38
- "1804":
38
+ "all":
39
39
  packages:
40
40
  - python3
41
41
  - python3-pip
@@ -38,3 +38,9 @@ package:
38
38
  - python-pip
39
39
  - python-setuptools
40
40
  - python-pkg-resources
41
+ "2004":
42
+ packages:
43
+ - python3
44
+ - python3-pip
45
+ - python3-setuptools
46
+ - python3-pkg-resources
@@ -26,13 +26,13 @@ class AethernalAgent::Tautulli < AethernalAgent::App
26
26
  tautulli_config_path: tautulli_config_path,
27
27
  password: opts['password'],
28
28
  user: self.user}
29
-
30
- write_template(template_path('config.ini.erb'),
31
- tautulli_config_path('config.ini'),
32
- @vars,
33
- {owner: self.user})
34
29
  end
35
30
 
31
+ write_template(template_path('config.ini.erb'),
32
+ tautulli_config_path('config.ini'),
33
+ @vars,
34
+ {owner: self.user})
35
+
36
36
  return create_return_args(@vars)
37
37
  end
38
38
 
@@ -182,19 +182,19 @@ home_stats_count = 5
182
182
  cleanup_files = 0
183
183
  check_github_on_startup = 1
184
184
  http_port = <%= @port %>
185
- log_dir = <%= @tautulli_config_path %>/logs
185
+ log_dir = <%= @tautulli_config_path %>/data/logs
186
186
  update_db_interval = 24
187
187
  interface = default
188
188
  pms_ssl = 0
189
189
  git_path = ""
190
190
  home_stats_cards = "watch_statistics, top_tv, popular_tv, top_movies, popular_movies, top_music, popular_music, top_users, top_platforms, last_watched"
191
191
  time_format = HH:mm
192
- cache_dir = <%= @tautulli_config_path %>/cache
193
- https_cert = <%= @tautulli_config_path %>/server.crt
192
+ cache_dir = <%= @tautulli_config_path %>/data/cache
193
+ https_cert = <%= @tautulli_config_path %>/data/server.crt
194
194
  api_key = ""
195
195
  date_format = YYYY-MM-DD
196
196
  home_stats_type = 0
197
- https_key = <%= @tautulli_config_path %>/server.key
197
+ https_key = <%= @tautulli_config_path %>/data/server.key
198
198
  git_user = drzoidberg33
199
199
  home_library_cards = library_statistics_first
200
200
  git_branch = master
@@ -4,7 +4,7 @@ After=syslog.target network.target
4
4
 
5
5
  [Service]
6
6
  Type=simple
7
- ExecStart=%h/apps/tautulli/Tautulli.py --config=%h/.config/tautulli/config.ini --datadir=%h/.config/tautulli
7
+ ExecStart=/usr/bin/python3 %h/apps/tautulli/Tautulli.py --config=%h/.config/tautulli/config.ini --datadir=%h/.config/tautulli/data
8
8
  TimeoutStopSec=20
9
9
  KillMode=process
10
10
  Restart=on-failure
@@ -50,7 +50,6 @@ module AethernalAgent
50
50
  return true
51
51
  end
52
52
 
53
-
54
53
  def wait_on_file(path, tries = 20)
55
54
  AethernalAgent.logger.info("Waiting on file #{path} to exist")
56
55
 
@@ -146,7 +145,10 @@ module AethernalAgent
146
145
  end
147
146
 
148
147
  def ubuntu_release
149
- return "1804"
148
+ AethernalAgent.logger.debug("Looking for Linux version number.")
149
+ version_number = %x( lsb_release -sr )
150
+ AethernalAgent.logger.debug("Returning version number: #{version_number.to_s.gsub('.', '')}")
151
+ version_number.to_s.gsub('.', '').strip
150
152
  end
151
153
 
152
154
  def prepare_test_config
@@ -1,3 +1,3 @@
1
1
  module AethernalAgent
2
- VERSION = "0.4.8"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aethernal-agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maran
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-22 00:00:00.000000000 Z
11
+ date: 2021-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -238,10 +238,10 @@ files:
238
238
  - lib/aethernal_agent/operation.rb
239
239
  - lib/aethernal_agent/operation_pool.rb
240
240
  - lib/aethernal_agent/plugins/bazarr/bazarr.rb
241
- - lib/aethernal_agent/plugins/bazarr/files/bazarr.service
242
241
  - lib/aethernal_agent/plugins/bazarr/manifest.yml
243
242
  - lib/aethernal_agent/plugins/bazarr/meta/bazarr.png
244
243
  - lib/aethernal_agent/plugins/bazarr/templates/bazarr.apache.conf.erb
244
+ - lib/aethernal_agent/plugins/bazarr/templates/bazarr.service.erb
245
245
  - lib/aethernal_agent/plugins/bazarr/templates/config.ini.erb
246
246
  - lib/aethernal_agent/plugins/cardigann/cardigann.rb
247
247
  - lib/aethernal_agent/plugins/cardigann/files/cardigann.service
@@ -373,12 +373,12 @@ files:
373
373
  - lib/aethernal_agent/plugins/syncthing/syncthing.rb
374
374
  - lib/aethernal_agent/plugins/syncthing/templates/config.xml.erb
375
375
  - lib/aethernal_agent/plugins/syncthing/templates/syncthing.apache.conf.erb
376
- - lib/aethernal_agent/plugins/tautulli/files/tautulli.service
377
376
  - lib/aethernal_agent/plugins/tautulli/manifest.yml
378
377
  - lib/aethernal_agent/plugins/tautulli/meta/tautulli.png
379
378
  - lib/aethernal_agent/plugins/tautulli/tautulli.rb
380
379
  - lib/aethernal_agent/plugins/tautulli/templates/config.ini.erb
381
380
  - lib/aethernal_agent/plugins/tautulli/templates/tautulli.apache.conf.erb
381
+ - lib/aethernal_agent/plugins/tautulli/templates/tautulli.service.erb
382
382
  - lib/aethernal_agent/plugins/vnc/files/xstartup
383
383
  - lib/aethernal_agent/plugins/vnc/manifest.yml
384
384
  - lib/aethernal_agent/plugins/vnc/meta/vnc.png
@@ -411,7 +411,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
411
411
  - !ruby/object:Gem::Version
412
412
  version: '0'
413
413
  requirements: []
414
- rubygems_version: 3.2.5
414
+ rubygems_version: 3.2.18
415
415
  signing_key:
416
416
  specification_version: 4
417
417
  summary: Aethernal Agent for Aethernal.host.