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

RSS

mule (9) Versions 0.7.0

Installs/Configures Mule ESB

Policyfile
Berkshelf
Knife
cookbook 'mule', '~> 0.7.0', :supermarket
cookbook 'mule', '~> 0.7.0'
knife supermarket install mule
knife supermarket download mule
README
Dependencies
Changelog
Quality 33%

Codeship Status for hoeggsoftware/mule-cookbook

mule

Installs Mule Community or Enterprise Edition runtimes on a server.

Supported Platforms

  • Ubuntu 14.04 LTS
  • Centos 7.2

Usage

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

group 'mule' do
end

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

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'
end

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
end

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
end

Actions

This resource has the following actions:

:create

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

Attributes

amc_setup

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.

archive_name

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.

enterprise_edition

Ruby Types: TrueClass, FalseClass

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

env

Ruby Types: String

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

group

Ruby Types: String

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

home

Ruby Types: String

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

init_heap_size

Ruby Types: String

The wrapper.java.initmemory 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.

license

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.

max_heap_size

Ruby Types: String

The wrapper.java.maxmemory 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.

name

Ruby Types: String

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

source

Ruby Types: String

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

user

Ruby Types: String

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

version

Ruby Types: String

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

wrapper_additional

Ruby Types: Array

An array of strings containing the arguments sent to the JVM through the wrapper.java.additional.n 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%"
  • -Djava.net.preferIPv4Stack=TRUE
  • -Dmvel2.disable.jit=TRUE
  • -XX:+HeapDumpOnOutOfMemoryError
  • -XX:+AlwaysPreTouch
  • -XX:+UseParNewGC

More info on the Tanuki Java Service Wrapper is available at: http://wrapper.tanukisoftware.com/doc/english/introduction.html

wrapper_defaults

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: http://wrapper.tanukisoftware.com/doc/english/introduction.html

License and Authors

Authors: Reed McCartney (reed@hoegg.software) and Ryan Hoegg (ryan@hoegg.software)

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

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
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.

0.6.1

  • wrapper.conf template only runs once to avoid erasing ARM settings after amc_setup.

0.6.0

  • Change Lightweight Resource Provider to Custom Resource.

0.5.0

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

0.4.0

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

0.3.1

  • Added whyrun support.
  • Fixed some Foodcritic complaints.

0.3.0

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

0.2.1

  • Remove variables setting uid and gid.

0.2.0

  • 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.

0.1.1

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

0.1.0

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

Collaborator Number Metric
            

0.7.0 passed this metric

Contributing File Metric
            

0.7.0 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.7.0 failed this metric

FC066: Ensure chef_version is set in metadata: mule/metadata.rb:1
FC069: Ensure standardized license defined in metadata: mule/metadata.rb:1
FC108: Resource should not define a property named 'name': mule/resources/centos.rb:4
FC108: Resource should not define a property named 'name': mule/resources/ubuntu.rb:3
FC118: Resource property setting name_attribute vs. name_property: mule/resources/centos.rb:4
FC118: Resource property setting name_attribute vs. name_property: mule/resources/ubuntu.rb:3
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.7.0 passed this metric

Testing File Metric
            

0.7.0 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.7.0 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