Skip to content

Commit ee7eb74

Browse files
committed
Initial commit
0 parents  commit ee7eb74

14 files changed

+608
-0
lines changed

CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Redmine2 CHANGELOG
2+
3+
This file is used to list changes made in each version of the redmine2 cookbook.
4+
5+
## 0.1.0
6+
7+
- [Anton Minin] - Initial release of redmine2
8+
9+
- - -
10+
Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.
11+
12+
The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown.

README.md

+142
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# Redmine2 Cookbook
2+
3+
Installs Redmine v2, a Ruby on Rails ticket tracking and wiki tool
4+
5+
## Requirements
6+
7+
### Platform
8+
9+
Tested on ubuntu 12.04
10+
11+
### cookbooks
12+
13+
* postgresql
14+
* [rbenv](https://github.com/fnichol/chef-rbenv)
15+
* [ruby_build](https://github.com/fnichol/chef-ruby_build)
16+
* nginx
17+
* runit
18+
* database
19+
20+
## </tr>
21+
<tr>
22+
<td><tt>s
23+
24+
<table>
25+
<tr>
26+
<th>Key</th>
27+
<th>Type</th>
28+
<th>Description</th>
29+
<th>Default</th>
30+
</tr>
31+
<tr>
32+
<td><tt>['redmine2']['bacon']</tt></td>
33+
<td>Boolean</td>
34+
<td>whether to include bacon</td>
35+
<td><tt>true</tt></td>
36+
</tr>
37+
38+
</tr>
39+
<tr>
40+
<td><tt>['redmine']['home']</tt></td>
41+
<td>String</td>
42+
<td>Location for Redmine application</td>
43+
<td><tt>/home/redmine</tt></td>
44+
</tr>
45+
<tr>
46+
<td><tt>['redmine']['host']</tt></td>
47+
<td>String</td>
48+
<td>Redmine Domain</td>
49+
<td><tt>redmine.example.com</tt></td>
50+
</tr>
51+
<tr>
52+
<td><tt>['redmine']['user']</tt></td>
53+
<td>String</td>
54+
<td>Owner of redmine files</td>
55+
<td><tt>redmine</tt></td>
56+
</tr>
57+
<tr>
58+
<td><tt>['redmine']['ruby_version']</tt></td>
59+
<td>String</td>
60+
<td>Redmine Ruby Version</td>
61+
<td><tt>1.9.3-p484</tt></td>
62+
</tr>
63+
<tr>
64+
<td><tt>['redmine']['version']</tt></td>
65+
<td>String</td>
66+
<td>Redmine version</td>
67+
<td><tt>2.4.3</tt></td>
68+
</tr>
69+
<tr>
70+
<td><tt>['redmine']['db']['type']</tt></td>
71+
<td>String</td>
72+
<td>Type of redmine database</td>
73+
<td><tt>postgresql</tt></td>
74+
</tr>
75+
<tr>
76+
<td><tt>['redmine']['db']['dbname']</tt></td>
77+
<td>String</td>
78+
<td>Redmine DB name</td>
79+
<td><tt>redmine</tt></td>
80+
</tr>
81+
<tr>
82+
<td><tt>['redmine']['db']['username']</tt></td>
83+
<td>String</td>
84+
<td>Redmine DB user</td>
85+
<td><tt>redmine</tt></td>
86+
</tr>
87+
<tr>
88+
<td><tt>['redmine']['db']['hostname']</tt></td>
89+
<td>String</td>
90+
<td>Redmine DB host</td>
91+
<td><tt>localhost</tt></td>
92+
</tr>
93+
<tr>
94+
<td><tt>['redmine']['db']['password']</tt></td>
95+
<td>String</td>
96+
<td>Redmine DB password</td>
97+
<td><tt>123456</tt></td>
98+
</tr>
99+
</table>
100+
101+
## Usage
102+
103+
To install via librarian-chef add to your Cheffile the following lines
104+
105+
```
106+
cookbook 'rbenv', git: 'https://github.com/fnichol/chef-rbenv'
107+
cookbook 'redmine2', git: 'https://github.com/aminin/redmine2-cookbook'
108+
```
109+
110+
and run `librarian-chef install`
111+
112+
Configure your role/node e.g.:
113+
114+
```json
115+
{
116+
redmine: {
117+
host: 'redmine.dev',
118+
db: {
119+
password: '<top-secret1>'
120+
}
121+
},
122+
postgresql: {
123+
password: {
124+
postgres: '<top-secret2>' # Need admin access to create redmine DB
125+
}
126+
},
127+
run_list: %w(recipe[postgresql::server] recipe[redmine2])
128+
}
129+
```
130+
131+
## Contributing
132+
133+
1. Fork the repository on Github
134+
2. Create a named feature branch (like `add_component_x`)
135+
3. Write your change
136+
4. Write tests for your change (if applicable)
137+
5. Run the tests, ensuring they all pass
138+
6. Submit a Pull Request using Github
139+
140+
## License and Authors
141+
142+
Authors: TODO: List authors

attributes/default.rb

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
default['redmine'] ||= {}
2+
default['redmine']['user'] = 'redmine'
3+
default['redmine']['home'] = '/home/redmine'
4+
default['redmine']['host'] = 'redmine.example.com'
5+
default['redmine']['version'] = '2.4.3'
6+
default['redmine']['ruby_version'] = '1.9.3-p484'
7+
default['redmine']['create_db'] = true
8+
9+
default['redmine']['db'] ||= {}
10+
default['redmine']['db']['type'] = 'postgresql'
11+
default['redmine']['db']['hostname'] = 'localhost'
12+
default['redmine']['db']['dbname'] = 'redmine'
13+
default['redmine']['db']['username'] = 'redmine'
14+
default['redmine']['db']['password'] = '123456'

metadata.rb

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name 'redmine2'
2+
maintainer 'Anton Minin'
3+
maintainer_email '[email protected]'
4+
license 'Apache 2.0'
5+
description 'Installs/Configures redmine2'
6+
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
7+
version '0.1.0'
8+
9+
conflicts 'redmine'
10+
11+
depends 'postgresql'
12+
depends 'rbenv' # https://github.com/fnichol/chef-rbenv
13+
depends 'ruby_build' # https://github.com/fnichol/chef-ruby_build
14+
depends 'nginx'
15+
depends 'runit'
16+
depends 'database'
17+
18+
recommends 'mysql'
19+
recommends 'sqlite'
20+
21+
supports 'ubuntu'
22+
23+
attribute 'redmine',
24+
display_name: 'Redmine Hash',
25+
description: 'Hash of Redmine attributes',
26+
type: 'hash'
27+
28+
attribute 'redmine/home',
29+
display_name: 'Redmine Directory',
30+
description: 'Location for Redmine application',
31+
default: '/home/redmine',
32+
recipes: ['redmine2::default']
33+
34+
attribute 'redmine/host',
35+
display_name: 'Redmine Domain',
36+
description: 'Redmine Domain',
37+
default: 'redmine.example.com',
38+
recipes: ['redmine2::default']
39+
40+
attribute 'redmine/user',
41+
display_name: 'Redmine User',
42+
description: 'Owner of redmine files',
43+
default: 'redmine',
44+
recipes: ['redmine2::default']
45+
46+
attribute 'redmine/ruby_version',
47+
display_name: 'Redmine Ruby Version',
48+
description: 'Version of Ruby to run Redmine',
49+
default: '1.9.3-p484',
50+
recipes: ['redmine2::default']
51+
52+
attribute 'redmine/version',
53+
display_name: 'Redmine version',
54+
description: 'Redmine version',
55+
default: '2.4.3',
56+
recipes: ['redmine2::default']
57+
58+
attribute 'redmine/create_db',
59+
display_name: 'Create DB on install',
60+
description: 'Whether to create DB',
61+
default: true,
62+
type: 'boolean',
63+
recipes: ['redmine2::default']
64+
65+
attribute 'redmine/db',
66+
display_name: 'Redmine DB Hash',
67+
description: 'Hash of redmine database attributes',
68+
type: 'hash'
69+
70+
attribute 'redmine/db/type',
71+
display_name: 'Redmine DB type',
72+
description: 'Type of redmine database',
73+
choice: %w(sqlite postgresql mysql),
74+
default: 'postgresql',
75+
recipes: ['redmine2::default']
76+
77+
attribute 'redmine/db/dbname',
78+
display_name: 'Redmine DB name',
79+
description: 'Redmine DB name',
80+
default: 'redmine',
81+
recipes: ['redmine2::default']
82+
83+
attribute 'redmine/db/username',
84+
display_name: 'Redmine DB user',
85+
description: 'Redmine DB user',
86+
default: 'redmine',
87+
recipes: ['redmine2::default']
88+
89+
attribute 'redmine/db/hostname',
90+
display_name: 'Redmine DB host',
91+
description: 'Redmine DB host',
92+
default: 'localhost',
93+
recipes: ['redmine2::default']
94+
95+
attribute 'redmine/db/password',
96+
display_name: 'Redmine DB password',
97+
description: 'Redmine DB password',
98+
default: '123456',
99+
recipes: ['redmine2::default']

0 commit comments

Comments
 (0)