This cookbook installs and configures Apache TomEE. It starts downloading TomEE from an tomee_url specified in attributes/default.rb.
This cookbook is a beta version inspired on Opscode's Tomcat cookbook.
- Debian, Ubuntu (OpenJDK, Oracle)
- CentOS 6+, Red Hat 6+, Fedora
Used with: Centos (6.2, 6.5) and Ubuntu (14.04)
- java
- openssl
Download and install Vagrant: https://www.vagrantup.com/downloads.html
git clone https://github.com/freedev/vagrant-tomee.git
cd vagrant-tomee
vagrant up
Download chef from: https://downloads.chef.io/chef-dk/
For redhat execute:
wget https://opscode-omnibus-packages.s3.amazonaws.com/el/6/x86_64/chefdk-0.4.0-1.x86_64.rpm
rpm -i chefdk-0.4.0-1.x86_64.rpm
Then execute the following commands:
mkdir ~/install-tomee
mkdir -p /var/chef/cookbooks
mkdir -p /var/chef/data_bags/tomee_users
cd /var/chef/cookbooks/
git init
touch README.md
git add README.md
git commit -a -m "updates"
cd ~/install-tomee
knife cookbook site install tomee
cp /var/chef/cookbooks/tomee/templates/default/tomee.json .
cp /var/chef/cookbooks/tomee/templates/default/admin.json /var/chef/data_bags/tomee_users
chef-solo -j tomee.json
###Prerequisites
This cookbook cames with a dependency to java
and openssl
cookbooks.
common-packages
recipe has been added to fix the installation of
java
with debian/ubuntu platforms.
java
cookbook has a dependency with curl
package.
When java
cookbook is executed it doesn't check for apt-get repository update,
curl
package installation fails because of apt-get repository not is updated yet.
common-packages
has been executed as first just to update apt-get repository before.
Key | Type | Description | Default |
---|---|---|---|
['tomee']['deploy_multiple_instances'] | Boolean | If you want deploy multiple instances within the same node, you must also fill the 'instances' attribute with the list of instances, ports, etc. | false |
['tomee']['name'] | String | Service name, used only for base instance | tomee |
['tomee']['user'] | String | User name | tmuser |
['tomee']['group'] | String | Group name | tomee |
['tomee']['tomee_url'] | String | Tomee tar gz url | http://my.internal.server/apache-tomee-1.7.1-plume.tar.gz |
['tomee']['port'] | Integer | HTTP port number | 8080 |
['tomee']['proxy_port'] | Integer | HTTP proxy port number | nil |
['tomee']['ssl_port'] | Integer | HTTP port number | 8443 |
['tomee']['ssl_proxy_port'] | Integer | HTTP proxy port number | nil |
['tomee']['ajp_port'] | Integer | ajp port number | 8009 |
['tomee']['shutdown_port'] | Integer | Shutdown port | 8005 |
['tomee']['vhost_name'] | String | Host | localhost |
['tomee']['aliases'] | Array | List of domain aliases mapped | ["www.example.com", "example.com"] |
Include tomee
in your node's run_list
, if you want install Java you must prepend common-packages
and java::default
:
{
"run_list": [
"recipe[tomee::common-packages]",
"recipe[java::default]",
"recipe[tomee::default]"
]
}
Author:: Vincenzo D'Amore (v.damore@gmail.com)