daddy 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/itamae/cookbooks/tensorflow/install.rb +0 -1
- data/lib/daddy/itamae/config.rb +2 -1
- data/lib/daddy/utils/config.rb +3 -38
- data/lib/daddy/version.rb +1 -12
- data/lib/tasks/dad.rake +5 -0
- metadata +2 -13
- data/itamae/cookbooks/bazel/install.rb +0 -9
- data/itamae/cookbooks/nginx/config/rails.rb +0 -30
- data/itamae/cookbooks/nginx/config/templates/_passenger.conf.erb +0 -35
- data/itamae/cookbooks/selenium/chromedriver.rb +0 -23
- data/itamae/cookbooks/selenium/chromedriver_linux64-2.35_sha256sum.txt +0 -1
- data/itamae/cookbooks/selenium/chromedriver_linux64-2.37_sha256sum.txt +0 -1
- data/itamae/cookbooks/selenium/chromedriver_linux64-2.40_sha256sum.txt +0 -1
- data/itamae/cookbooks/selenium/geckodriver-v0.19.1-linux64_sha256sum.txt +0 -1
- data/itamae/cookbooks/selenium/geckodriver.rb +0 -21
- data/itamae/templates/etc/my.cnf.erb +0 -15
- data/itamae/templates/etc/yum.repos.d/vbatts-bazel.repo.erb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ecbbb75b02de583ccd016932676a1fa2dda83254bc5b6545134aea96e92db2e
|
4
|
+
data.tar.gz: 0ff829e7c3c0b8e2ad9e1646c8cd2d6f37b7bb0ab3a8fd9accb1e37a1b5cd809
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49fd08bd6962c097362cf9cb2d86e1e76517f340dda02571819cef28cb12828dc7f381db2aee0e8d64139d9cce20b615362ac66b3959b1ab1c89bc06dfaf8944
|
7
|
+
data.tar.gz: f2b1a4338da9ddbb00c3bedd9f4a0c5b5f2df9b962cd0610dac571e05fb659a0a57b29045cc8cb84e6807110e5d75e21bd5f11308fc59123553dc0b16d73f228
|
data/lib/daddy/itamae/config.rb
CHANGED
data/lib/daddy/utils/config.rb
CHANGED
@@ -1,44 +1,9 @@
|
|
1
|
+
require 'hashie'
|
2
|
+
|
1
3
|
module Daddy
|
2
4
|
module Utils
|
3
5
|
|
4
|
-
class Config
|
5
|
-
|
6
|
-
def initialize(yaml_path_or_hash = nil)
|
7
|
-
if yaml_path_or_hash.is_a?(Hash)
|
8
|
-
@hash = yaml_path_or_hash
|
9
|
-
elsif yaml_path_or_hash and File.exist?(yaml_path_or_hash)
|
10
|
-
@hash = YAML.load_file(yaml_path_or_hash)
|
11
|
-
else
|
12
|
-
@hash = {}
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
def [](key)
|
17
|
-
ret = false
|
18
|
-
|
19
|
-
if key.to_s.end_with?('?')
|
20
|
-
ret = @hash[key.to_s[0..-2]] ? true : false
|
21
|
-
else
|
22
|
-
ret = @hash[key.to_s]
|
23
|
-
|
24
|
-
if ret.nil?
|
25
|
-
ret = self.class.new
|
26
|
-
elsif ret.is_a?(Hash)
|
27
|
-
ret = self.class.new(ret)
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
ret
|
32
|
-
end
|
33
|
-
|
34
|
-
def []=(key, value)
|
35
|
-
@hash[key.to_s] = value
|
36
|
-
end
|
37
|
-
|
38
|
-
def method_missing(name, *args)
|
39
|
-
self[name]
|
40
|
-
end
|
41
|
-
|
6
|
+
class Config < Hashie::Mash
|
42
7
|
end
|
43
8
|
|
44
9
|
end
|
data/lib/daddy/version.rb
CHANGED
@@ -2,18 +2,7 @@ module Daddy
|
|
2
2
|
VERSION = [
|
3
3
|
VERSION_MAJOR = '0',
|
4
4
|
VERSION_MINOR = '7',
|
5
|
-
VERSION_REVISION = '
|
6
|
-
].join('.')
|
7
|
-
|
8
|
-
CHROME_DRIVER_VERSION = [
|
9
|
-
CHROME_DRIVER_VERSION_MAJOR = '2',
|
10
|
-
CHROME_DRIVER_VERSION_MINOR = '40'
|
11
|
-
].join('.')
|
12
|
-
|
13
|
-
GECKO_DRIVER_VERSION = [
|
14
|
-
GECKO_DRIVER_VERSION_MAJOR = '0',
|
15
|
-
GECKO_DRIVER_VERSION_MINOR = '19',
|
16
|
-
GECKO_DRIVER_VERSION_REVISION = '1'
|
5
|
+
VERSION_REVISION = '4'
|
17
6
|
].join('.')
|
18
7
|
|
19
8
|
PYTHON_VERSION = [
|
data/lib/tasks/dad.rake
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: daddy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ichy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|
@@ -288,7 +288,6 @@ files:
|
|
288
288
|
- app/assets/stylesheets/datepicker.css.scss
|
289
289
|
- app/assets/stylesheets/ympicker.css.scss
|
290
290
|
- itamae/cookbooks/app_base_dir.rb
|
291
|
-
- itamae/cookbooks/bazel/install.rb
|
292
291
|
- itamae/cookbooks/chrome/install.rb
|
293
292
|
- itamae/cookbooks/docker/install.rb
|
294
293
|
- itamae/cookbooks/docker/registry/install.rb
|
@@ -304,20 +303,12 @@ files:
|
|
304
303
|
- itamae/cookbooks/netdata/netdata-installer.sh
|
305
304
|
- itamae/cookbooks/nginx/config/gitbucket.rb
|
306
305
|
- itamae/cookbooks/nginx/config/jenkins.rb
|
307
|
-
- itamae/cookbooks/nginx/config/rails.rb
|
308
|
-
- itamae/cookbooks/nginx/config/templates/_passenger.conf.erb
|
309
306
|
- itamae/cookbooks/nginx/config/templates/unicorn.conf.erb
|
310
307
|
- itamae/cookbooks/obs_studio/install.rb
|
311
308
|
- itamae/cookbooks/phantomjs/install.rb
|
312
309
|
- itamae/cookbooks/python/Python-3.6.3_sha256sum.txt
|
313
310
|
- itamae/cookbooks/python/install.rb
|
314
311
|
- itamae/cookbooks/sbt/install.rb
|
315
|
-
- itamae/cookbooks/selenium/chromedriver.rb
|
316
|
-
- itamae/cookbooks/selenium/chromedriver_linux64-2.35_sha256sum.txt
|
317
|
-
- itamae/cookbooks/selenium/chromedriver_linux64-2.37_sha256sum.txt
|
318
|
-
- itamae/cookbooks/selenium/chromedriver_linux64-2.40_sha256sum.txt
|
319
|
-
- itamae/cookbooks/selenium/geckodriver-v0.19.1-linux64_sha256sum.txt
|
320
|
-
- itamae/cookbooks/selenium/geckodriver.rb
|
321
312
|
- itamae/cookbooks/tensorflow/install.rb
|
322
313
|
- itamae/cookbooks/trac/install.rb
|
323
314
|
- itamae/cookbooks/unicorn/install.rb
|
@@ -338,7 +329,6 @@ files:
|
|
338
329
|
- itamae/templates/etc/god/master.conf.erb
|
339
330
|
- itamae/templates/etc/init.d/god.erb
|
340
331
|
- itamae/templates/etc/logrotate.d/god.erb
|
341
|
-
- itamae/templates/etc/my.cnf.erb
|
342
332
|
- itamae/templates/etc/nginx/conf.d/servers/gitbucket.conf.erb
|
343
333
|
- itamae/templates/etc/nginx/conf.d/servers/jenkins.conf.erb
|
344
334
|
- itamae/templates/etc/sysconfig/jenkins.erb
|
@@ -348,7 +338,6 @@ files:
|
|
348
338
|
- itamae/templates/etc/yum.repos.d/jenkins.repo.erb
|
349
339
|
- itamae/templates/etc/yum.repos.d/mongodb-org.repo.erb
|
350
340
|
- itamae/templates/etc/yum.repos.d/nginx.repo.erb
|
351
|
-
- itamae/templates/etc/yum.repos.d/vbatts-bazel.repo.erb
|
352
341
|
- lib/capistrano/daddy.rb
|
353
342
|
- lib/capistrano/tasks/clear_cache.rake
|
354
343
|
- lib/capistrano/tasks/update_linked_files.rake
|
@@ -1,30 +0,0 @@
|
|
1
|
-
require 'daddy/itamae'
|
2
|
-
|
3
|
-
directory '/etc/nginx/conf.d/servers' do
|
4
|
-
user 'root'
|
5
|
-
owner 'root'
|
6
|
-
group 'root'
|
7
|
-
mode '755'
|
8
|
-
end
|
9
|
-
|
10
|
-
template "/etc/nginx/conf.d/servers/#{ENV['SERVER_NAME']}.conf" do
|
11
|
-
source ::File.join('templates', '_passenger.conf.erb')
|
12
|
-
user 'root'
|
13
|
-
owner 'root'
|
14
|
-
group 'root'
|
15
|
-
mode '644'
|
16
|
-
variables :app_name => ENV['APP_NAME'],
|
17
|
-
:server_name => ENV['SERVER_NAME'],
|
18
|
-
:rails_env => ENV['RAILS_ENV'],
|
19
|
-
:rails_root => ENV['RAILS_ROOT'],
|
20
|
-
:behind_load_balancer => false
|
21
|
-
end
|
22
|
-
|
23
|
-
if ENV['RAILS_ROOT'].start_with?("/home/#{ENV['USER']}/")
|
24
|
-
directory "/home/#{ENV['USER']}" do
|
25
|
-
user 'root'
|
26
|
-
owner ENV['USER']
|
27
|
-
group ENV['USER']
|
28
|
-
mode '755'
|
29
|
-
end
|
30
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
<%-
|
2
|
-
@letsencrypt = system("sudo test -e /etc/letsencrypt/live/#{@server_name}/fullchain.pem")
|
3
|
-
@selfsigned = system('sudo test -e /etc/pki/tls/certs/localhost.crt')
|
4
|
-
@ssl = @letsencrypt || @selfsigned
|
5
|
-
-%>
|
6
|
-
server {
|
7
|
-
listen 80;
|
8
|
-
<%- if @ssl -%>
|
9
|
-
listen 443 ssl;
|
10
|
-
<%- end -%>
|
11
|
-
server_name <%= @server_name %>;
|
12
|
-
access_log /opt/nginx/shared/logs/<%= @server_name %>_access.log ltsv;
|
13
|
-
|
14
|
-
<%- if @letsencrypt -%>
|
15
|
-
ssl_certificate /etc/letsencrypt/live/<%= @server_name %>/fullchain.pem;
|
16
|
-
ssl_certificate_key /etc/letsencrypt/live/<%= @server_name %>/privkey.pem;
|
17
|
-
<%- elsif @selfsigned -%>
|
18
|
-
ssl_certificate /etc/pki/tls/certs/localhost.crt;
|
19
|
-
ssl_certificate_key /etc/pki/tls/private/localhost.key;
|
20
|
-
<%- end -%>
|
21
|
-
|
22
|
-
root <%= ::File.join(@rails_root, 'public') %>;
|
23
|
-
passenger_enabled on;
|
24
|
-
passenger_app_env <%= @rails_env %>;
|
25
|
-
|
26
|
-
gzip on;
|
27
|
-
gzip_http_version 1.0;
|
28
|
-
gzip_proxied any;
|
29
|
-
gzip_min_length 500;
|
30
|
-
gzip_disable "MSIE [1-6]\.";
|
31
|
-
gzip_types text/plain text/xml text/css
|
32
|
-
text/comma-separated-values
|
33
|
-
text/javascript application/x-javascript
|
34
|
-
application/atom+xml;
|
35
|
-
}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
require 'daddy'
|
2
|
-
|
3
|
-
directory 'tmp'
|
4
|
-
|
5
|
-
version = ENV['CHROME_DRIVER_VERSION'] || Daddy::CHROME_DRIVER_VERSION
|
6
|
-
|
7
|
-
execute "download chromedriver-#{version}" do
|
8
|
-
cwd 'tmp'
|
9
|
-
command <<-EOF
|
10
|
-
curl -o chromedriver_linux64-#{version}.zip \
|
11
|
-
https://chromedriver.storage.googleapis.com/#{version}/chromedriver_linux64.zip
|
12
|
-
EOF
|
13
|
-
not_if "sha256sum -c #{::File.join(::File.dirname(__FILE__), "chromedriver_linux64-#{version}_sha256sum.txt")}"
|
14
|
-
end
|
15
|
-
|
16
|
-
execute "install chromedriver-#{version}" do
|
17
|
-
cwd 'tmp'
|
18
|
-
command <<-EOF
|
19
|
-
unzip chromedriver_linux64-#{version}.zip
|
20
|
-
sudo mv -f chromedriver /usr/local/bin/
|
21
|
-
EOF
|
22
|
-
not_if "/usr/local/bin/chromedriver -v | grep 'ChromeDriver #{version}'"
|
23
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
67fad24c4a85e3f33f51c97924a98b619722db15ce92dcd27484fb748af93e8e chromedriver_linux64-2.35.zip
|
@@ -1 +0,0 @@
|
|
1
|
-
94dfe45843a950e1452007850afbb58619882fec1ac9cdd534f3029fc9cf3edf chromedriver_linux64-2.37.zip
|
@@ -1 +0,0 @@
|
|
1
|
-
2ad85db0d73e642af4698ed889977784640445e873ceb956f7a364fa824c631d chromedriver_linux64-2.40.zip
|
@@ -1 +0,0 @@
|
|
1
|
-
7f55c4c89695fd1e6f8fc7372345acc1e2dbaa4a8003cee4bd282eed88145937 geckodriver-v0.19.1-linux64.tar.gz
|
@@ -1,21 +0,0 @@
|
|
1
|
-
require 'daddy/itamae'
|
2
|
-
|
3
|
-
directory 'tmp'
|
4
|
-
|
5
|
-
execute "download geckodriver-#{Daddy::GECKO_DRIVER_VERSION}" do
|
6
|
-
cwd 'tmp'
|
7
|
-
command <<-EOF
|
8
|
-
rm -Rf geckodriver-v#{Daddy::GECKO_DRIVER_VERSION}-linux64*
|
9
|
-
wget https://github.com/mozilla/geckodriver/releases/download/v#{Daddy::GECKO_DRIVER_VERSION}/geckodriver-v#{Daddy::GECKO_DRIVER_VERSION}-linux64.tar.gz
|
10
|
-
EOF
|
11
|
-
not_if "sha256sum -c #{::File.join(::File.dirname(__FILE__), "geckodriver-v#{Daddy::GECKO_DRIVER_VERSION}-linux64_sha256sum.txt")}"
|
12
|
-
end
|
13
|
-
|
14
|
-
execute "install geckodriver-#{Daddy::GECKO_DRIVER_VERSION}" do
|
15
|
-
cwd 'tmp'
|
16
|
-
command <<-EOF
|
17
|
-
tar zxf geckodriver-v#{Daddy::GECKO_DRIVER_VERSION}-linux64.tar.gz
|
18
|
-
sudo mv -f geckodriver /usr/local/bin/
|
19
|
-
EOF
|
20
|
-
not_if "/usr/local/bin/geckodriver -V | grep 'geckodriver #{Daddy::GECKO_DRIVER_VERSION}'"
|
21
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
[mysqld]
|
2
|
-
datadir=/var/lib/mysql
|
3
|
-
socket=/var/lib/mysql/mysql.sock
|
4
|
-
user=mysql
|
5
|
-
# Disabling symbolic-links is recommended to prevent assorted security risks
|
6
|
-
symbolic-links=0
|
7
|
-
|
8
|
-
character-set-server = utf8
|
9
|
-
|
10
|
-
[mysql]
|
11
|
-
default-character-set = utf8
|
12
|
-
|
13
|
-
[mysqld_safe]
|
14
|
-
log-error=/var/log/mysqld.log
|
15
|
-
pid-file=/var/run/mysqld/mysqld.pid
|
@@ -1,10 +0,0 @@
|
|
1
|
-
[vbatts-bazel]
|
2
|
-
name=Copr repo for bazel owned by vbatts
|
3
|
-
baseurl=https://copr-be.cloud.fedoraproject.org/results/vbatts/bazel/epel-7-$basearch/
|
4
|
-
type=rpm-md
|
5
|
-
skip_if_unavailable=True
|
6
|
-
gpgcheck=1
|
7
|
-
gpgkey=https://copr-be.cloud.fedoraproject.org/results/vbatts/bazel/pubkey.gpg
|
8
|
-
repo_gpgcheck=0
|
9
|
-
enabled=1
|
10
|
-
enabled_metadata=1
|