Chef cookbook to install and deploy Spring Boot Applications. Currently only supports Spring Boot Web Apps.
Also, will only work on systems with systemd
(default)
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 cookbook provides a custom resource named spring_boot_web_app
.
To use it you have to include depends 'spring-boot'
in your metadata.rb
.
to create an spring_boot_web_app
ressource you have to include the following code in your recipe:
spring_boot_web_app 'name_of_webapp' do
jar_remote_path 'http://example.com/path/to/your/jar/your_jar.jar'
end
install
- installs spring_boot_web_app fromjar_remote_path
(default)uninstall
- removes previosly installed spring_boot_web_app instances
name
- the name of the web_appuser
- the user that runs the webappdefault: 'bootapp'
group
- the group the user who runs the web_app belongs to `default: 'bootapp'``port
- the port that the web_app listens ondefault: 8080
jar_remote_path
- the location the jar_file is fetched fromjava_opts
- theJAVA_OPTS
the application is started withboot_opts
- theBOOT_OPTS
the application is started withproperties
- a Hash that describes properties filesrepo_user
- the user if yourjar_remote_path
is protected by basic authrepo_password
- the password if yourjar_remote_path
is protected by basic authinit_system
- for nowsystemd
andinitd
are valid optionsdefault: 'systemd'
wait_for_http
- should chef wait for the webapp to answerdefault: true
wait_for_http_retries
- how many times should chef-client retrydefault: 24
wait_for_http_retry_delay
- how long should chef-client wait before each requestdefault: 5
e.g.:
{ 'app_1_initd' => { 'a' => '5', 'b' => '10' }, 'other_properties' => { 'c' => '25'}}
would create two properties files:
file | content |
---|---|
app_1_initd.properties |
a=5 b=10 |
other_properties.properties |
c=25 |
Make sure you have the following installed on your local PC:
Run the following command in the root directory of this project (directory where this README.md file is located):
$ kitchen test