Adoptable Cookbooks List

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.

Description

SonarQube requires Java but this cookbook does not install Java. If you do not
already have a Java cookbook, look at the
Java cookbook.

Currently only supports Red Hat-based distributions. Support for Debian-based
distributions is in the plans.

Usage

To install a stock Sonarqube server, create a recipe such as the following:

include_recipe 'java'
# Install the latest version of SonarQube with default properties
# including H2 database (not recommended for production installation)
sonarqube_server 'sonar' do
notifies :restart, 'service[sonar]'
end
# Create a Sonar service. This is required if you want Sonar to start.
service 'sonar' do
action [:enable, :start]
supports status: true, restart: true, reload: true
end

The following snippet shows how to customize the installation including
configuration properties. The properties attribute under config_options
should be created as a Ruby hash where the nested hashes represent the dot-notated
property key. For example, the property key for database username is
sonar.jdbc.username and is represented in the Ruby hash as seen below. Any
configuration property Sonar supports will work.

Development

Generating Documentation

DO NOT EDIT THIS README.md file directly. This file is generated using knife-cookbook-doc plugin.
Install this plugin with gem install knife-cookbook-doc.
Documentation is compiled from the following sources:

Derived for attributes/recipes either by scanning the source code or by explicit declaration
in metadata.rb

Markdown files in the doc/ directory (overview is always the first to be compiled)

To edit this README:

Change relevant sections within the markdown files in the doc/ directory

Edit metadata.rb or use inline annotated comments within the source code.
For more info on inline comments
click here

Generate new README using knife-cookbook-doc plugin and push changes to remote branch.
For more info on using the knife-cookbook-doc plugin
click here.

Testing

Code Style

To run style tests (Rubocop and Foodcritic):
rake style

If you want to run either Rubocop or Foodcritic separately, specify the style
test type (Rubocop = ruby, Foodcritic = chef)
rake style:chef
or
rake style:ruby

RSpec tests

Test Kitchen

Forking

If you choose to fork this cookbook here are some good tips to keep things in
order

Fork the cookbook before cloning.

Clone the forked repo, not the original.

Once the fork is cloned, go to the repo directory and add an upstream
remote
git remote add upstream git@gitlab.example.com:cookbooks/this_cookbook.git

Now you can pull upstream changes (things merged into the main cookbook repo).
Note that you will also need to push to your fork's master to keep it updated.
The alias below will help you. After adding the alias you will simply be able to
run git-reup and it will pull the upstream changes and push them to
your fork. Then checkout a branch and work as normal.