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


spring-boot (10) Versions 1.1.2

Installs/Configures spring-boot-app

cookbook 'spring-boot', '~> 1.1.2'
cookbook 'spring-boot', '~> 1.1.2', :supermarket
knife cookbook site install spring-boot
knife cookbook site download spring-boot
Quality 88%

Cookbook Version

Build Status

Spring Boot Chef Cookbook

This Chef cookbook provides a custom resource spring_boot_web_app to install and deploy Spring Boot Applications. Currently only supports Spring Boot Web Apps.

Also, will only work on systems with systemd or init.d (System V) based init systems.

For init.d, the Spring Boot App must be configured to be fully executable. Log location can also not be set for init.d and all console logs will be written to /var/log/<appname>.log

This custom resource does not install java. Java must be installed on the target node before using the custom resource spring_boot_web_app To use it you have to include depends 'spring-boot' in your metadata.rb.


This cookbook provides a custom resource named spring_boot_web_app. The simplest use of the spring_boot_web_app resource is: spring_boot_web_app 'name_of_webapp' do jar_remote_path '' end which will download your artifact from jar_remote_path and create a "systemd" service listening on port 8080 started by the user bootapp

The full syntax for all of the properties that are available to the spring_boot_web_app resource is: spring_boot_web_app 'name_of_webapp' do notifies # see description user String # defaults to bootapp group String # defaults to bootapp port Integer # defaults to 8080 jar_remote_path String java_opts String boot_opts String properties Hash repo_user String repo_password String init_system String # defaults to systemd wait_for_http [TrueClass, FalseClass] # defaults to true wait_for_http_retries Integer # defaults 24 wait_for_http_retry_delay Integer # defaults 5 subscribes # see description action Symbol # defaults to :install if not specified end where

  • user - the user that runs the webapp default: 'bootapp'
  • group - the group the user who runs the web_app belongs to default: 'bootapp'`
  • port - the port that the web_app listens on default: 8080
  • jar_remote_path - the location the jar_file is fetched from
  • java_opts - the JAVA_OPTS the application is started with
  • boot_opts - the BOOT_OPTS the application is started with
  • properties - a Hash that describes properties files
  • repo_user - the user if your jar_remote_path is protected by basic auth
  • repo_password - the password if your jar_remote_path is protected by basic auth
  • init_system - for now systemd and initd are valid options default: 'systemd'
  • wait_for_http - should chef wait for the webapp to answer default: true
  • wait_for_http_retries - how many times should chef-client retry   default: 24
  • wait_for_http_retry_delay - how long should chef-client wait before each request default: 5
  • jmx_credentials - a hash that describes jmx_credentials

See "Properties" section below for more information about all of the properties that may be used with this resource.


This resource has the following actions:

:install Default. Installs spring_boot_web_app from jar_remote_path

:uninstall Removes previosly installed spring_boot_web_app instances


notifies Ruby Type: Symbol, 'Chef::Resource[String]'

A resource may notify another resource to take action when its state changes. Specify a 'resource[name]', the :action that resource should take, and then the :timer for that action. A resource may notify more than one resource; use a notifies statement for each resource to be notified.

A timer specifies the point during the chef-client run at which a notification is run. The following timers are available:

:before Specifies that the action on a notified resource should be run before processing the resource block in which the notification is located.

:delayed Default. Specifies that a notification should be queued up, and then executed at the very end of the chef-client run.

:immediate, :immediately Specifies that a notification should be run immediately, per resource notified.

The syntax for notifies is:

notifies :action, 'resource[name]', :timer

properties Ruby Type: Hash

Optional. The keys on the toplevel of the hash are the filename of a properties file postfixed with .properties the values of the toplevel keys are hashes containing key, value pairs that are written out to the file - for example: { 'app_1_initd' => { 'a' => '5', 'b' => '10' }, 'other_properties' => { 'c' => '25'} }  would create two properties files:

file content     a=5 b=10 c=25

jmx_credentials Ruby Type: Hash

Optional. the keys on the toplevel are the usernames their values are hases containing a password and access key. - for example: { 'monitorRole' => { 'password' => 'monitor', 'access' => 'readonly'} } would create the two files jmxremote.access and jmxremote.password as follows: ```


monitorRole readonly


monitorRole monitor ```


Examples can be found in test/fixtures/cookbooks/fake/recipes/

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

spring-boot CHANGELOG


  • JonsJava
  • Cleaned up recipes, added new features that Chef now expects, broke example recipes into fake cookbook.
  • goblin23
  • Converted LWRP into a custom ressource
  • Removed dependency to the java cookbook ## 1.1.0
  • Khorchammar
  • Added jmx configuration


  • JonsJava
  • Very minor tweak to the to ensure that the Multi-Dimensional array is Cookstyle-compliant. (spaces before closing }) ## 1.1.2
  • [frank-carnovale] Set current working directory in service definition template

Collaborator Number Metric

1.1.2 failed this metric

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

Contributing File Metric

1.1.2 passed this metric

Foodcritic Metric

1.1.2 passed this metric

No Binaries Metric

1.1.2 passed this metric

Publish Metric

1.1.2 passed this metric

Supported Platforms Metric

1.1.2 passed this metric

Testing File Metric

1.1.2 passed this metric

Version Tag Metric

1.1.2 passed this metric