itamae-plugin-recipe-redmine 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/itamae-plugin-recipe-redmine.gemspec +1 -0
- data/lib/itamae/plugin/recipe/redmine/create_user.sh +14 -0
- data/lib/itamae/plugin/recipe/redmine/default.rb +45 -11
- data/lib/itamae/plugin/recipe/redmine/templates/database.yml.erb +1 -1
- data/lib/itamae/plugin/recipe/redmine/version.rb +1 -1
- metadata +24 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 63b19e4bd5ad23bdb28976bbe3e94bf37881dcb2
|
4
|
+
data.tar.gz: 885b826c67c956a78b76dd96d900c5b18be3d4f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bb287b2d5deabb824b4ef75cbe246160efa32a236d52628cd2e5dd1be4b885aa54aa5bcc059534c832f4ac978bffb77eb9a92e3052fec500f11d21204ef7035
|
7
|
+
data.tar.gz: aa94ae11a8a671b65ed5897eef3f6c307405d4c96667aad897fe4b997ab52570ea901651f20248e7f476fd2c176988510eb9f13892c0269f90945f43e2ad0e52
|
@@ -23,6 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
25
|
spec.add_dependency 'itamae', '~> 1.10', '>= 1.10.2'
|
26
|
+
spec.add_dependency 'itamae-plugin-recipe-postgresql', '~> 0', '>= 0.0.1'
|
26
27
|
|
27
28
|
spec.add_development_dependency "bundler", "~> 1.17"
|
28
29
|
spec.add_development_dependency "rake", "~> 10.0"
|
@@ -1,10 +1,12 @@
|
|
1
|
-
|
1
|
+
include_recipe 'postgresql'
|
2
2
|
|
3
|
+
require_relative 'version'
|
3
4
|
version = ENV['REDMINE_VERSION'] || Itamae::Plugin::Recipe::Redmine::REDMINE_VERSION
|
4
5
|
|
5
6
|
%w{
|
6
7
|
ImageMagick
|
7
8
|
ImageMagick-devel
|
9
|
+
expect
|
8
10
|
ipa-pgothic-fonts
|
9
11
|
libcurl-devel
|
10
12
|
libffi-devel
|
@@ -60,16 +62,30 @@ execute "build redmine-#{version}" do
|
|
60
62
|
not_if "test -e /opt/redmine/redmine-#{version}/INSTALLED"
|
61
63
|
end
|
62
64
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
65
|
+
template "/opt/redmine/redmine-#{version}/config/configuration.yml" do
|
66
|
+
user 'root'
|
67
|
+
owner 'redmine'
|
68
|
+
group 'redmine'
|
69
|
+
mode '644'
|
70
|
+
end
|
71
|
+
|
72
|
+
template "/opt/redmine/redmine-#{version}/config/database.yml" do
|
73
|
+
user 'root'
|
74
|
+
owner 'redmine'
|
75
|
+
group 'redmine'
|
76
|
+
mode '644'
|
77
|
+
variables redmine_password: ENV['REDMINE_PASSWORD'] || 'redmine'
|
78
|
+
end
|
79
|
+
|
80
|
+
execute 'createuser' do
|
81
|
+
user 'postgres'
|
82
|
+
command "#{::File.join(File.dirname(__FILE__), 'create_user.sh')} #{ENV['REDMINE_PASSWORD'] || 'redmine'}"
|
83
|
+
not_if "psql -c \"select * from pg_user where usename = 'redmine';\" | grep redmine"
|
84
|
+
end
|
85
|
+
|
86
|
+
execute 'createdb -E UTF-8 -l ja_JP.UTF-8 -O redmine -T template0 redmine' do
|
87
|
+
user 'postgres'
|
88
|
+
not_if "psql -c \"select * from pg_database where datname = 'redmine';\" | grep redmine"
|
73
89
|
end
|
74
90
|
|
75
91
|
gem_package 'bundler' do
|
@@ -78,8 +94,26 @@ gem_package 'bundler' do
|
|
78
94
|
end
|
79
95
|
|
80
96
|
execute 'bundle _1.17.3_ install --without development test --path vendor/bundle' do
|
97
|
+
user 'redmine'
|
81
98
|
cwd "/opt/redmine/redmine-#{version}"
|
99
|
+
command <<-EOF
|
100
|
+
set -eu
|
101
|
+
bundle _1.17.3_ install --without development test --path vendor/bundle
|
102
|
+
touch BUNDLED
|
103
|
+
EOF
|
104
|
+
not_if "test -e /opt/redmine/redmine-#{version}/BUNDLED"
|
105
|
+
end
|
106
|
+
|
107
|
+
execute 'redmine initialization' do
|
82
108
|
user 'redmine'
|
109
|
+
cwd "/opt/redmine/redmine-#{version}"
|
110
|
+
command <<-EOF
|
111
|
+
set -eu
|
112
|
+
bundle exec rake generate_secret_token
|
113
|
+
bundle exec rake db:migrate RAILS_ENV=production
|
114
|
+
touch INITIALIZED
|
115
|
+
EOF
|
116
|
+
not_if "test -e /opt/redmine/redmine-#{version}/INITIALIZED"
|
83
117
|
end
|
84
118
|
|
85
119
|
link 'current' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itamae-plugin-recipe-redmine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- y-matsuda
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: itamae
|
@@ -30,6 +30,26 @@ dependencies:
|
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 1.10.2
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: itamae-plugin-recipe-postgresql
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 0.0.1
|
43
|
+
type: :runtime
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '0'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 0.0.1
|
33
53
|
- !ruby/object:Gem::Dependency
|
34
54
|
name: bundler
|
35
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -74,6 +94,7 @@ files:
|
|
74
94
|
- bin/console
|
75
95
|
- bin/setup
|
76
96
|
- itamae-plugin-recipe-redmine.gemspec
|
97
|
+
- lib/itamae/plugin/recipe/redmine/create_user.sh
|
77
98
|
- lib/itamae/plugin/recipe/redmine/default.rb
|
78
99
|
- lib/itamae/plugin/recipe/redmine/redmine-3.4.10_sha256sum.txt
|
79
100
|
- lib/itamae/plugin/recipe/redmine/templates/configuration.yml.erb
|
@@ -99,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
120
|
version: '0'
|
100
121
|
requirements: []
|
101
122
|
rubyforge_project:
|
102
|
-
rubygems_version: 2.
|
123
|
+
rubygems_version: 2.5.2.3
|
103
124
|
signing_key:
|
104
125
|
specification_version: 4
|
105
126
|
summary: itamae recipe to ease redmine installation
|