Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status


wildfly (31) Versions 2.5.1

Installs/Configures wildfly

cookbook 'wildfly', '~> 2.5.1', :supermarket
cookbook 'wildfly', '~> 2.5.1'
knife supermarket install wildfly
knife supermarket download wildfly
Quality 50%

Wildfly Cookbook

Cookbook to deploy the WildFly Java Application Server

Build Status
Gitter chat

Provides resources for installing/configuring WildFly and managing WildFly service instances for use in wrapper cookbooks. Installs WildFly from tarball and installs the appropriate configuration for your platform's init system.



  • RHEL and derivatives
  • Ubuntu


  • Chef 12.19+


This cookbook has recently been rewritten to be resource-driven. It was a large undertaking and breaks old behavior, hence the major version bump. The API-driven configuration and deployment resources are much faster to converge.

The old recipes were kept around for similar, legacy behavior, but using the resources directly in your wrapper cookbook will yield more flexibility.

Example wrapper cookbook scenarios are available in the test cookbook, under test/fixtures/cookbooks/test


  • node['wildfly']['version'] - Specify the version of Wildfly
  • node['wildfly']['url'] - URL to WildFly tarball
  • node['wildfly']['checksum'] - SHA256 hash of said tarball


  • ::default - Installs WildFly and any enabled connectors.
  • ::install - Installs WildFly using the wildfly resource
  • ::mysql_connector - Installs MySQL Connector/J
  • ::postgres_connector - Installs PostgreSQL Java connector

Resource Providers


  • Installs and configures WildFly.
wildfly_wildfly 'wildfly' do
  mode 'standalone' # => WildFly Mode
  config 'standalone-full.xml' # => The WildFly Configuration File
  base_dir '/opt/wildfly' # => Directory to install WildFly to
  service_user 'wildfly'
  service_group 'wildfly'
  provision_user true # => Whether to create the WildFly service user/group
  create_mgmt_user true # => Provision a random, secure user for API interactions
  url 'http://.../wildfly.tar.gz' # URL to WildFly tarball to download
  checksum 'SHA256_CHECKSUM' # WildFly Tarball Checksum
  version '1.2.3' # Version of WildFly (Should correspond to URL)
Accessor Properties
  • bind_management_http - the HTTP port for the Management Interface & API


  • A resource for deploying users to WildFly service instances.
wildfly_user 'my_wildfly_user' do
  password 'MySecretPassword' # The user's password, maybe pull it from Vault or ParameterStore
  roles ['Administrator', 'SuperUser'] # String or Array of groups/roles to map to the user: Default: []
  realm 'ManagementRealm' # ManagementRealm or ApplicationRealm
  instance 'wildfly' # Choose the WildFly service instance the user is associated with.  * wildcard can be used to deploy globally.


  • Flexible resource which allows provisioning of attributes and their parameters via the WildFly Management API. This should be used over other resources as it affords more flexibility.
wildfly_resource 'Syslog Handler' do
  path ['subsystem', 'logging', 'syslog-handler', 'SYSLOG']
  parameters 'app-name' => 'TEST',
             'enabled'  => true,
             'hostname' => 'localhost',
             'level'    => 'ALL',
             'port'     => 514,
             'server-address' => 'test.syslog.local',
             'syslog-format'  => 'RFC5424'
  action :create

Deploy API

  • Resource to deploy applications via the API
# => URL-Based Deployment
wildfly_deploy_api 'Sample' do
  deploy_name 'sample-v1'
  runtime_name 'sample.war'
  parameters 'url' => ''
# => File-Based Deployment
myapp = remote_file 'helloworld' do
  source ''
  path ::File.join(Chef::Config[:file_cache_path], 'hello-world.war')
  mode '0644'
  action :create

wildfly_deploy_api 'HelloWorld File Deployment' do
  deploy_name "HelloWorld-file-V1"
  runtime_name 'helloworld-file.war'
  parameters 'url' => 'file://' + myapp.path

Legacy Resources

  • These will be deprecated in the future. The wildfly_resource resource can do everything these can, and via the much faster Management API. The deploy_api resource will replace the deploy resource as well.


wildfly_datasource 'example' do
  jndiname 'java:jboss/datasource/example'
  drivername 'some-jdbc-driver'
  connectionurl 'jdbc:some://'
  username 'db_username'
  password 'db_password'
  sensitive false


Allows you to deploy JARs and WARs via chef

From a URL

wildfly_deploy 'jboss.jdbc-driver.sqljdbc4_jar' do
      url ''

From File

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

With Automated Update

Requires a common runtime_name and version-specific name
wildfly_deploy 'my-app-1.0.war' do
url ''
runtime_name 'my-app.war'


Use :disable to keep the contents, and :enable to re-deploy previously kept contents
wildfly_deploy 'jboss.jdbc-driver.sqljdbc4_jar' do
action :remove

Attribute LWRP

Allows you to set an attribute in the server config


<server name="default-server">
  <http-listener name="default" socket-binding="http" max-post-size="20971520"/>
  <host name="default-host" alias="localhost">

Adjust max-post-size

wildfly_attribute 'max-post-size' do
   path '/subsystem=undertow/server=default-server/http-listener=default'
   parameter 'max-post-size'
   value '20971520L'
   notifies :restart, 'wildfly[wildfly]', :delayed

Add Attribute

wildfly_attribute 'max-post-size' do
   path '/subsystem=mail/mail-session="postbox"'
   parameter 'jndi-name="java:/mail/postbox",debug=true'
   action :add

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://'
   action :set
   notifies :restart, 'wildfly[wildfly]', :delayed


Author:: Brian Dwyer - Intelligent Digital Services


Contributor:: Hugo Trippaers

Contributor:: Ian Southam

Collaborator Number Metric

2.5.1 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric

2.5.1 passed this metric

Foodcritic Metric

2.5.1 passed this metric

No Binaries Metric

2.5.1 passed this metric

Testing File Metric

2.5.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, and your repo must contain a file

Version Tag Metric

2.5.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, and your repo must include a tag that matches this cookbook version number