Skip to content

Commit 4548274

Browse files
committed
Initial import of the cookbook.
0 parents  commit 4548274

20 files changed

+724
-0
lines changed

.gitignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
*~
2+
*#
3+
.#*
4+
\#*#
5+
.*.sw[a-z]
6+
*.un~
7+
pkg/
8+
9+
# Berkshelf
10+
.vagrant
11+
/cookbooks
12+
Berksfile.lock
13+
14+
# Bundler
15+
Gemfile.lock
16+
bin/*
17+
.bundle/*
18+
19+
.kitchen/
20+
.kitchen.local.yml

.kitchen.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
driver:
3+
name: vagrant
4+
network:
5+
- ["forwarded_port", {guest: 8080, host: 8080}]
6+
7+
provisioner:
8+
name: chef_solo
9+
10+
platforms:
11+
- name: ubuntu-14.04
12+
13+
suites:
14+
- name: default
15+
run_list:
16+
- recipe[jetbrains_license_server::default]
17+
attributes:

Berksfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source "https://supermarket.getchef.com"
2+
3+
metadata

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# 0.1.0
2+
3+
Initial release of jetbrains_license_server
4+
5+
* Enhancements
6+
* an enhancement
7+
8+
* Bug Fixes
9+
* a bug fix

Cheffile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
site 'http://community.opscode.com/api/v1'
2+
3+
cookbook 'jetbrains_license_server', path: '.'

Gemfile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'berkshelf'
4+
5+
# Uncomment these lines if you want to live on the Edge:
6+
#
7+
# group :development do
8+
# gem "berkshelf", github: "berkshelf/berkshelf"
9+
# gem "vagrant", github: "mitchellh/vagrant", tag: "v1.5.2"
10+
# end
11+
#
12+
# group :plugins do
13+
# gem "vagrant-berkshelf", github: "berkshelf/vagrant-berkshelf"
14+
# gem "vagrant-omnibus", github: "schisamo/vagrant-omnibus"
15+
# end
16+
17+
gem 'test-kitchen'
18+
gem 'kitchen-vagrant'
19+
gem 'chefspec'

LICENSE

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright (C) 2014 Rapid7, LLC.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

README.md

+120
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# jetbrains_license_server-cookbook
2+
3+
Installs the JetBrains License Server
4+
5+
## Supported Platforms
6+
7+
- Linux
8+
9+
## Attributes
10+
11+
### default
12+
<table>
13+
<tr>
14+
<th>Key</th>
15+
<th>Type</th>
16+
<th>Description</th>
17+
<th>Default</th>
18+
</tr>
19+
<tr>
20+
<td><tt>['jetbrains_license_server']['version']</tt></td>
21+
<td>Integer</td>
22+
<td>Version of the License Server to download and install</td>
23+
<td><tt>374</tt></td>
24+
</tr>
25+
<tr>
26+
<td><tt>['jetbrains_license_server']['download']['uri']</tt></td>
27+
<td>String</td>
28+
<td>Base URI for the License Server zip file</td>
29+
<td><tt>'http://download-cf.jetbrains.com/lcsrv/'</tt></td>
30+
</tr>
31+
<tr>
32+
<td><tt>['jetbrains_license_server']['download']['file_prefix']</tt></td>
33+
<td>String</td>
34+
<td>The first part of the filename preceeding the version.</td>
35+
<td><tt>'licenseServer-war'</tt></td>
36+
</tr>
37+
<tr>
38+
<td><tt>['jetbrains_license_server']['download']['file_suffix']</tt></td>
39+
<td>String</td>
40+
<td>The filename extension.</td>
41+
<td><tt>'zip'</tt></td>
42+
</tr>
43+
<tr>
44+
<td><tt>['jetbrains_license_server']['checksum']</tt></td>
45+
<td>String</td>
46+
<td>SHA-256 Checksum of the LicenseServer to download</td>
47+
<td><tt>'a3935a2fdd644d780b30f05855c9d1b0b0582be1ad92919df40a0c3fd7ff33a1'</tt></td>
48+
</tr>
49+
<tr>
50+
<td><tt>['jetbrains_license_server']['modelContext_path']</tt></td>
51+
<td>String</td>
52+
<td>Path to the modelContext.xml file exploded from the war file.</td>
53+
<td><tt>'licenseServer/WEB-INF/classes/META-INF/modelContext.xml'</tt></td>
54+
</tr>
55+
<tr>
56+
<td><tt>['jetbrains_license_server']['derby_dir']</tt></td>
57+
<td>String</td>
58+
<td>Subdirectory name where the database lives</td>
59+
<td><tt>'derby'</tt></td>
60+
</tr>
61+
</table>
62+
63+
### java
64+
<table>
65+
<tr>
66+
<th>Key</th>
67+
<th>Type</th>
68+
<th>Description</th>
69+
<th>Default</th>
70+
</tr>
71+
<tr>
72+
<td><tt>['java']['version']</tt></td>
73+
<td>String</td>
74+
<td>Version of java to install</td>
75+
<td><tt>'7'</tt></td>
76+
</tr>
77+
</table>
78+
79+
### tomcat
80+
<table>
81+
<tr>
82+
<th>Key</th>
83+
<th>Type</th>
84+
<th>Description</th>
85+
<th>Default</th>
86+
</tr>
87+
<tr>
88+
<td><tt>['tomcat']['base_version']</tt></td>
89+
<td>Integer</td>
90+
<td>Version of tomcat to install</td>
91+
<td><tt>7</tt></td>
92+
</tr>
93+
</table>
94+
95+
## Usage
96+
97+
### jetbrains_license_server::default
98+
99+
Include `jetbrains_license_server` in your node's `run_list`:
100+
101+
```json
102+
{
103+
"run_list": [
104+
"recipe[jetbrains_license_server::default]"
105+
]
106+
}
107+
```
108+
109+
## Contributing
110+
111+
1. Fork the repository on Github
112+
2. Create a named feature branch (i.e. `add-new-recipe`)
113+
3. Write your change
114+
4. Write tests for your change (if applicable)
115+
5. Run the tests, ensuring they all pass
116+
6. Submit a Pull Request
117+
118+
## License and Authors
119+
120+
Author:: Ryan Hass (<[email protected]>)

Thorfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# encoding: utf-8
2+
3+
require 'bundler'
4+
require 'bundler/setup'
5+
require 'berkshelf/thor'
6+
7+
begin
8+
require 'kitchen/thor_tasks'
9+
Kitchen::ThorTasks.new
10+
rescue LoadError
11+
puts ">>>>> Kitchen gem not loaded, omitting tasks" unless ENV['CI']
12+
end

attributes/default.rb

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#
2+
# Copyright (C) 2014 Rapid7, LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
default['jetbrains_license_server']['version'] = 374
18+
default['jetbrains_license_server']['download']['uri'] = 'http://download-cf.jetbrains.com/lcsrv/'
19+
default['jetbrains_license_server']['download']['file_prefix'] = 'licenseServer-war'
20+
default['jetbrains_license_server']['download']['file_suffix'] = 'zip'
21+
default['jetbrains_license_server']['checksum'] = 'a3935a2fdd644d780b30f05855c9d1b0b0582be1ad92919df40a0c3fd7ff33a1'
22+
default['jetbrains_license_server']['modelContext_path'] = 'licenseServer/WEB-INF/classes/META-INF/modelContext.xml'
23+
default['jetbrains_license_server']['derby_dir'] = 'derby'

attributes/java.rb

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Copyright (C) 2014 Rapid7, LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
force_default['java']['jdk_version'] = '7'

attributes/tomcat.rb

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#
2+
# Copyright (C) 2014 Rapid7, LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
force_default['tomcat']['base_version'] = 7
18+
19+
# Force reload of the tomcat cookbook attributes file since other
20+
# attributes reference the base_version attribute.
21+
# SEE: http://tickets.opscode.com/browse/CHEF-4234
22+
node.from_file(run_context.resolve_attribute(*parse_attribute_file_spec('tomcat')))

chefignore

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Put files/directories that should be ignored in this file when uploading
2+
# or sharing to the community site.
3+
# Lines that start with '# ' are comments.
4+
5+
# OS generated files #
6+
######################
7+
.DS_Store
8+
Icon?
9+
nohup.out
10+
ehthumbs.db
11+
Thumbs.db
12+
13+
# SASS #
14+
########
15+
.sass-cache
16+
17+
# EDITORS #
18+
###########
19+
\#*
20+
.#*
21+
*~
22+
*.sw[a-z]
23+
*.bak
24+
REVISION
25+
TAGS*
26+
tmtags
27+
*_flymake.*
28+
*_flymake
29+
*.tmproj
30+
.project
31+
.settings
32+
mkmf.log
33+
34+
## COMPILED ##
35+
##############
36+
a.out
37+
*.o
38+
*.pyc
39+
*.so
40+
*.com
41+
*.class
42+
*.dll
43+
*.exe
44+
*/rdoc/
45+
46+
# Testing #
47+
###########
48+
.watchr
49+
.rspec
50+
spec/*
51+
spec/fixtures/*
52+
test/*
53+
features/*
54+
Guardfile
55+
Procfile
56+
57+
# SCM #
58+
#######
59+
.git
60+
*/.git
61+
.gitignore
62+
.gitmodules
63+
.gitconfig
64+
.gitattributes
65+
.svn
66+
*/.bzr/*
67+
*/.hg/*
68+
*/.svn/*
69+
70+
# Berkshelf #
71+
#############
72+
cookbooks/*
73+
tmp
74+
75+
# Cookbooks #
76+
#############
77+
CONTRIBUTING
78+
CHANGELOG*
79+
80+
# Strainer #
81+
############
82+
Colanderfile
83+
Strainerfile
84+
.colander
85+
.strainer
86+
87+
# Vagrant #
88+
###########
89+
.vagrant
90+
Vagrantfile
91+
92+
# Travis #
93+
##########
94+
.travis.yml

metadata.rb

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name 'jetbrains_license_server'
2+
maintainer 'Ryan Hass'
3+
maintainer_email '[email protected]'
4+
license 'All rights reserved'
5+
description 'Installs/Configures jetbrains_license_server'
6+
long_description 'Installs/Configures jetbrains_license_server'
7+
version '0.1.0'
8+
9+
depends 'apt', '>= 2.6.0'
10+
depends 'tomcat', '>= 0.16.2'

0 commit comments

Comments
 (0)