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


mule (9) Versions 0.6.0

Installs/Configures Mule ESB

cookbook 'mule', '= 0.6.0', :supermarket
cookbook 'mule', '= 0.6.0'
knife supermarket install mule
knife supermarket download mule
Quality 0%

Codeship Status for hoeggsoftware/mule-cookbook


Installs Mule Community or Enterprise Edition runtimes on a server.

Supported Platforms

  • Ubuntu 14.04 LTS


Mule should be run under a separate user with restricted permissions.

group `mule` do

user `mule` do
    supports manage_home: true
    shell '/bin/bash'
    home '/home/mule'
    comment 'Mule user'
    group 'mule'

Mule requires a Java Development Kit to run, and it is highly recommended you use Oracle JDK 8 to run Mule ESB.

include_recipe 'java'

Take note of the required node attributes required to download and install Oracle JDK

It is very easy to get started with the Mule LWRP:

mule_instance "mule-esb" do
    version '3.8.0'
    user 'mule'
    group 'mule'

The full syntax for all of the attributes in the Mule provider is:

mule_instance "name" do
    amc_setup           String
    archive_name        String
    enterprise_edition  TrueClass, FalseClass
    env                 String
    group               String
    home                String
    init_heap_size      String
    license             String
    max_heap_size       String
    name                String # defaults to 'name' if not specified
    source              String
    user                String
    version             String
    wrapper_additional  Array
    wrapper_defaults    TrueClass, FalseClass
    action              Symbol # defaults to :create if not specified

Anypoint Platform Integration

To register a server with the anypoint platform, the Chef recipe must get a token from Anypoint:

Chef::Recipe.send(:include, Mule::Helper)
regToken = amc_setup('Username','Password','Organization Name','Environment Name')

And use it to register the newly created runtime with the Anypoint Runtime Manager:

mule_instance 'mule-esb' do
    enterprise_edition true
    home '/usr/local/mule-esb'
    env 'test'
    user 'mule'
    group 'mule'
    action :create
    license 'muleLicense.lic'
    amc_setup regToken


This resource has the following actions:


Default. Creates a Mule Runtime and installs it as a service.



Ruby Types: String

The token used to register with Anypoint resource manager. Should be provided through the amc_setup helper method. See Usage. amc_setup does not run if enterprise_edition is false.


Ruby Types: String

The name of the archive containing the Mule runtime. Defaults to "mule-ee-distribution-standalone-" + version if enterprise_edition is true and "mule-standalone-" + version if enterprise_edition is false.


Ruby Types: TrueClass, FalseClass

Flag determining if this is an Enterprise runtime. Defaults to false.


Ruby Types: String

The MULE_ENV variable, as used by the Mule Runtime. Defaults to 'test'.


Ruby Types: String

The group that owns the mule runtime. Defaults to 'mule'.


Ruby Types: String

Path to the MULE_HOME directory. Defaults to '/usr/local/mule-esb'.


Ruby Types: String

The parameters in the Tanuki Java Service Wrapper. Defaults to '1024' (m). If set to '0', the Wrapper will expect you to set the -Xms argument in wrapper_additional. Otherwise, the JVM will use its own built in defaults.


Ruby Types: String

The name of the mule license file. Will not install a license if enterprise_edition is set to false. Defaults to empty string, which skips the license install.


Ruby Types: String

The parameters in the Tanuki Java Service Wrapper. Defaults to '1024' (m). If set to '0', the Wrapper will expect you to set the -Xmx argument in wrapper_additional. Otherwise, the JVM will use its own built in defaults.


Ruby Types: String

The name of the Mule ESB service to be installed. Defaults to the name of the resource block if not set.


Ruby Types: String

The path to the folder containing the mule archive and license. Defaults to '/tmp/mule'.


Ruby Types: String

The user that owns the mule runtime. Defaults to 'mule'.


Ruby Types: String

The version of Mule ESB to be installed. This is a required attribute.


Ruby Types: Array

An array of strings containing the arguments sent to the JVM through the settings in the Tanuki Java Service Wrapper. Recommended arguments to the JVM will have sane defaults for mule if not included:

  • -Dorg.glassfish.grizzly.nio.transport.TCPNIOTransport.max-receive-buffer-size=1048576
  • -Dorg.glassfish.grizzly.nio.transport.TCPNIOTransport.max-send-buffer-size=1048576
  • -XX:PermSize=256m
  • -XX:MaxPermSize=256m
  • -XX:NewSize=512m
  • -XX:MaxNewSize=512m
  • -XX:MaxTenuringThreshold=8

Arguments for the JVM that are set by default and do not need to be included:

  • -Dmule.home="%MULE_HOME%"
  • -Dmule.base="%MULE_HOME%"
  • -Dmvel2.disable.jit=TRUE
  • -XX:+HeapDumpOnOutOfMemoryError
  • -XX:+AlwaysPreTouch
  • -XX:+UseParNewGC

More info on the Tanuki Java Service Wrapper is available at:


Ruby Types: TrueClass, FalseClass

Set this attributes to false if you don't want defaults and will set everything yourself, but -Dmule.home="%MULE_HOME%" and -Dmule.base="%MULE_HOME%" will always be set by the cookbook. Defaults to true.

More info on the Tanuki Java Service Wrapper is available at:

License and Authors

Authors: Reed McCartney ( and Ryan Hoegg (

Copyright 2016 Hoegg Software Company

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

compat_resource >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.


  • Change Lightweight Resource Provider to Custom Resource.


  • Mule Enterprise Runtimes can now register with the Anypoint Platform.
  • Added helper module to fetch registration token for amc_setup.


  • User can now specify the archive_name of the runtime. (Archive containing the runtime to install)


  • Added whyrun support.
  • Fixed some Foodcritic complaints.


  • Changed Mule installation to a Chef Lightweight Resource Provider rather than a recipe.
  • Created a test cookbook and kitchen file for CI.


  • Remove variables setting uid and gid.


  • Added the ability to open both .tar.gz and .zip files depending on what is available.
  • Added the ability to set arguments to the JVM with a cookbook attribute through the wrapper.conf.


  • Rename cookbook, and make naming conventions consistent across cookbook.
  • Fix some Foodcritic complaints.


  • Initial release of mule cookbook.
  • Supports installing Java, multiple Mule ESB runtimes with Upstart scripts, and enterprise licenses.

Collaborator Number Metric

0.6.0 failed this metric

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

Foodcritic Metric

0.6.0 failed this metric

FC016: LWRP does not declare a default action: /tmp/e45e0db5f0a6e7fd967f9cee/mule/resources/ubuntu.rb:1