cookbook 'wildfly-clu', '~> 0.0.1'
wildfly-clu (1) Versions 0.0.1 Follow1
install and configure Wildfly 8 in domain mode (use vagrant to set up quickly a cluster)
cookbook 'wildfly-clu', '~> 0.0.1', :supermarket
knife supermarket install wildfly-clu
knife supermarket download wildfly-clu
wildfly-clu cookbook
Requirements
Centos 6.x
Chef >= 10.12
Vagrant 1.4.3
Virtualbox
Usage
With Vagrant: "cd wildfly-clu && vagrant up"
With Chef: add [ wildfly-clu:default ,wildfly-clu:logs, wildfly:domain ] in your run list:
"recipe[java]",
"recipe[wildfly-clu::default]",
"recipe[wildfly-clu::logs]",
"recipe[wildfly-clu::domain]"
Put these in yout hosts file:
33.33.33.11 myserver1
33.33.33.12 myserver2
33.33.33.13 myserver3
After the installation connect to:
http://myserver1:9990/console (WildFly admin console)
http://myserver1:22002 (Haproxy admin console)
Point directly to the back-ends
DEFINE EASILY YOUR CLUSTER SCHEMA
default['wildfly-clu']['cluster_schema'] = {
"myserver1" => { :role => "domain-controller" , :ip => "33.33.33.13", :port_offset => "0" },
"myserver2" => { :role => "slave" , :ip => "33.33.33.11" , :master => "myserver1" , :port_offset => "0"},
"myserver3" => { :role => "slave" , :ip => "33.33.33.12" , :master => "myserver1" , :port_offset => "0" }
}
Attributes
User, group and application name ( app name will be /usr/local/myapplication and /etc/init.d/myapplication )
#username
default['wildfly-clu']['user']
#group name
default['wildfly-clu']['group'] = "wildfly"
#app name
default['wildfly-clu']['name'] = "wildfly" ##/usr/local/SYMBOLIC_LINK => /usr/local/wildfly-8.8.8-Final
#Linux service name
default['wildfly-clu']['wildfly']['service'] = "wildfly" (/etc/init.d/SERVICE_NAME)
default['wildfly-clu']['wildfly']['version']
default['wildfly-clu']['wildfly']['url']
default['wildfly-clu']['wildfly']['checksum']
default['wildfly-clu']['wildfly']['targz']
default['wildfly-clu']['wildfly']['home']
default['wildfly-clu']['wildfly']['base']
default['wildfly-clu']['wildfly']['logs']
#Set true to deploy the HelloWorld.war
default['wildfly-clu']['wildfly']['deploy_hello_world'] = true
#set this to true in order to configure an haproxy for the slaves declared in the cluster schema
default['wildfly-clu']['wildfly']['haproxy'] = true
#password for the slave realm.. use encrypted databag for increase security
default['wildfly-clu']['wildfly']['ManagementRealm'] = "a2VybmVscGFuaWMhMTIz"
Default credential for Wildfly console:
username: admin
password: admin
Default username for slave-master communication:
username: slave
password: kernelpanic!123
In order to configure different user with a different password:
1. launch on the domain controller server add-user.sh
2. create and user
3. Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no? yes
4. Replace mgmt-users.properties mgmt-groups.properties with new new ones in the template dir of this cookbook.
THE CLUSTER DEFINITION
default['wildfly-clu']['cluster_schema'] = {
"myserver1" => { :role => "domain-controller" , :ip => "33.33.33.13", :port_offset => "0" },
"myserver2" => { :role => "slave" , :ip => "33.33.33.11" , :master => "myserver1" , :port_offset => "0"},
"myserver3" => { :role => "slave" , :ip => "33.33.33.12" , :master => "myserver1" , :port_offset => "0" }
}
DEFAULT java options to use in all slaves and the master for run your deployed the applications.
default['wildfly-clu']['java_opts'] = {
"heap-size" => "128m",
"max-heap-size" => "128m",
"permgen-size" => "128m",
"max-permgen-size" => "128m" }
Recipes
default => install Wildfly
domain => configure your cluster
haproxy => install haproxy to see quickly the cluster works
logs => configure log rotation
Author
Author:: Eugenio Marzo (eugenio.marzo@yahoo.it)
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
0.0.1 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.0.1 failed this metric
FC064: Ensure issues_url is set in metadata: wildfly-clu/metadata.rb:1
FC065: Ensure source_url is set in metadata: wildfly-clu/metadata.rb:1
FC066: Ensure chef_version is set in metadata: wildfly-clu/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: wildfly-clu/metadata.rb:1
FC069: Ensure standardized license defined in metadata: wildfly-clu/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.0.1 failed this metric
Failure: Cookbook should not contain binaries. Found:
wildfly-clu/files/default/hostname.war
wildfly-clu/files/default/helloworld.war
wildfly-clu/wildfly-clu.tar
Testing File Metric
0.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.0.1 failed this metric
0.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.0.1 failed this metric
FC064: Ensure issues_url is set in metadata: wildfly-clu/metadata.rb:1
FC065: Ensure source_url is set in metadata: wildfly-clu/metadata.rb:1
FC066: Ensure chef_version is set in metadata: wildfly-clu/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: wildfly-clu/metadata.rb:1
FC069: Ensure standardized license defined in metadata: wildfly-clu/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.0.1 failed this metric
Failure: Cookbook should not contain binaries. Found:
wildfly-clu/files/default/hostname.war
wildfly-clu/files/default/helloworld.war
wildfly-clu/wildfly-clu.tar
Testing File Metric
0.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.0.1 failed this metric
FC065: Ensure source_url is set in metadata: wildfly-clu/metadata.rb:1
FC066: Ensure chef_version is set in metadata: wildfly-clu/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: wildfly-clu/metadata.rb:1
FC069: Ensure standardized license defined in metadata: wildfly-clu/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.0.1 failed this metric
Failure: Cookbook should not contain binaries. Found:
wildfly-clu/files/default/hostname.war
wildfly-clu/files/default/helloworld.war
wildfly-clu/wildfly-clu.tar
Testing File Metric
0.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.0.1 failed this metric
0.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number