Coder Social home page Coder Social logo

yinzara / chef-wildfly Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bdwyertech/chef-wildfly

0.0 2.0 1.0 203 KB

Chef Cookbook to deploy Wildfly Java Application Server

Home Page: https://supermarket.chef.io/cookbooks/wildfly

License: Other

Ruby 23.71% HTML 68.89% Shell 7.40%

chef-wildfly's Introduction

Wildfly Cookbook

Cookbook to deploy Wildfly Java Application Server

Cookbook Build Status Gitter chat

Requirements

  • Chef Client 11+
  • Java Cookbook (ignored if node['wildfly']['install_java'] is false)

Platform

  • CentOS, Red Hat

Tested on:

  • CentOS 6.6

Usage

You can add users in the proper format to attributes\users.rb

You can customize the Java version, and the Connector/J if you'd like.

If running in production, I STRONGLY recommend you use a wrapper cookbook, and manually specify the Wildfly version, Java version (if node['wildfly']['install_java'] is true), and cookbook version as well.
This cookbook and configuration templates will continually be updated to support the latest stable release of Wildfly.
Currently, version upgrades will trigger configuration enforcement, meaning any changes made outside of Chef will be wiped out.

Attributes

  • node['wildfly']['install_java'] - Install Java using Java Cookbook. Default true

  • node['wildfly']['base'] - Base directory to run Wildfly from

  • node['wildfly']['version'] - Specify the version of Wildfly

  • node['wildfly']['url'] - URL to Wildfly tarball

  • node['wildfly']['checksum'] - SHA256 hash of said tarball

  • node['wildfly']['user'] - User to run Wildfly as. DO NOT MODIFY AFTER INSTALLATION!!!

  • node['wildfly']['group'] - Group which owns Wildfly directories

  • node['wildfly']['server'] - Name of service and init.d script for daemonizing

  • node['wildfly']['mysql']['enabled'] - Boolean indicating Connector/J support

  • node['wildfly']['int'][*] - Various hashes for setting interface & port bindings

  • node['wildfly']['smtp']['host'] - SMTP Destination host

  • node['wildfly']['smtp']['port'] - SMTP Destination port

Recipes

  • ::default - Installs Java (if node['wildfly']['install_java'] is true) & Wildfly.
    Also installs Connector/J if you've got it enabled.
  • ::install - Installs Wildfly.
  • ::mysql_connector - Installs Connector/J into appropriate Wildfly directory.

Providers

Datasource LWRP

wildfly_datasource 'example' do
  jndiname "java:jboss/datasource/example"
  drivername "some-jdbc-driver"
  connectionurl "jdbc:some://127.0.0.1/example"
end

Deploy LWRP

Allows you to deploy JARs and WARs via chef

Example 1 (from a url)

wildfly_deploy 'jboss.jdbc-driver.sqljdbc4_jar' do
      url "http://artifacts.company.com/artifacts/mssql-java-driver/sqljdbc4.jar"
end

Example 2 (from disk)

wildfly_deploy 'jboss.jdbc-driver.sqljdbc4_jar' do
      path "/opt/resources/sqljdb4.jar"
end

Example 3 with automated update (requires a common runtime_name and version specific name)

wildfly_deploy 'my-app-1.0.war' do
      url "http://artifacts.company.com/artifacts/my-app.1.0.war"
      runtime_name "my-app.war"
end

Example 4 undeploy (use :disable to keep the contents, and :enable to re-deploy previously kept contents)

wildfly_deploy 'jboss.jdbc-driver.sqljdbc4_jar' do
      action :remove
end

Attribute LWRP

Allows you to set an attribute in the server config

To change the max-post-size parameter

            <server name="default-server">
			       <http-listener name="default" socket-binding="http" max-post-size="20971520"/>
				   <host name="default-host" alias="localhost">
wildfly_attribute "max-post-size" do
   path "/subsystem=undertow/server=default-server/http-listener=default"
   parameter "max-post-size"
   value "20971520L"
   notifies :restart, "service[wildfly]"
end

If the attribute restart is set to false, the wildfly will never restart

wildfly_attribute "max-post-size" do
   path "/subsystem=undertow/server=default-server/http-listener=default"
   parameter "max-post-size"
   value "20971520L"
   restart false
end

Property LWRP

Allows you to set or delete system properties in the server config. (Supported Actions: :set, :delete)

wildfly_property "Database URL" do
   property "JdbcUrl"
   value "jdbc:mysql://1.2.3.4:3306/testdb"
   action :set
   notifies :restart, "service[wildfly]", :delayed
end

Authors

Author:: Brian Dwyer - Intelligent Digital Services

Contributors

Contributor:: Hugo Trippaers

Contributor:: Ian Southam

chef-wildfly's People

Contributors

atoulme avatar bdwyertech avatar dprytula avatar isoutham avatar rdoorn avatar snkutlu avatar spark404 avatar yinzara avatar

Watchers

 avatar  avatar

Forkers

paulyasi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.