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

RSS

minecraft (5) Versions 0.5.2

Installs/Configures minecraft server

Berkshelf/Librarian
Policyfile
Knife
cookbook 'minecraft', '~> 0.5.2'
cookbook 'minecraft', '~> 0.5.2', :supermarket
knife cookbook site install minecraft
knife cookbook site download minecraft
README
Dependencies
Changelog
Quality 44%

This cookbook is no longer maintained. Please take a look at @webframp's fork

Minecraft

Build Status Cookbook Version

Description

Installs and configures a Minecraft server.

Requirements

Chef

Tested on chef 11

Cookbooks

Platforms

  • Debian 6+
  • Ubuntu 12.04+
  • Centos 6.4+

Recipes

default

The default recipe ensures a vanilla minecraft is installed, and configured based on attributes you have specified.

user

The user recipe is called by default, and creates a new user/group mcserver for the server to run as.

service

The service recipe enables the runit service for minecraft.

Attributes

Default

  • minecraft['user']

    • The user the minecraft server runs under, default mcserver
  • minecraft['group']

    • The group the minecraft server runs under, default mcserver
  • minecraft['install_dir']

    • The default location minecraft is installed to, default /srv/minecraft
  • minecraft['install_type']

    • Supports 'vanilla' and 'bukkit', default 'vanilla'
  • minecraft['url']

    • The url to fetch minecarft releases from, default https://s3.amazonaws.com/Minecraft.Download/versions
  • minecraft['checksum']

    • The sha256 checksum of minecraft_server.jar
  • minecraft['xms']

    • The minimum ammount of ram java allow minecraft to consume, defaults to %40 of your total memory.
  • minecraft['xmx']

    • The maximum ammount of ram java allow minecraft to consume, defaults to %60 of your total memory.
  • minecraft['java-options']

    • You can use this to pass additional options to java, default blank
  • minecraft['init_style']

    • Currently only runit is support. default runit
  • minecraft['banned-ips']

    • An array of ips you would like banned, default blank
  • minecraft['banned-players']

    • An array of players you would like banned, default blank
  • minecraft['white-list]

    • An array of users you would like to white-list, default blank
  • minecraft['ops']

    • An array of admins, default blank
  • minecraft['accept_eula']

    • Boolean whether to accept the EULA, required for Minecraft 1.7.10 (a Reddit thread with more information is here). The default is false. It must be set to true (meaning you are consciously acknowledging and accepting the agreement) for the server to start.

Properties

You can can customize any of the settings from server.properties. They are kept up to date with upstream and you can read about each setting in more detail here

Known issues

Minecraft internally regenerates all of its configuration files every startup. The order of server.properties sometimes changes, timestamps are and headers are injected into all the configuration files.

This in turn causes chef to notice configuration files have been changed and will automatically restart the server again to pick up those changes. This may cause your server to restart frequently, without notice.

This leaves you with two work arounds for now.

  1. Only run chef-client once a day or manually as you need to.
  2. Set minecraft['autorestart'] = false and restart minecraft manually when you make configuration changes.

I am hoping I can get this changed upstream. I will attempt to come up with a better work around in the mean time.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

Author: Greg Fitzgerald greg@gregf.org Author: Sean Escriva sean.escriva@gmail.com

Copyright 2013, Greg Fitzgerald.

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

yum >= 0.0.0
apt >= 0.0.0
ohai >= 0.0.0
runit >= 0.0.0
java >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Changelog

0.5.0 (March 12, 2013)

  • ChefSpec goodness
  • @webframp [PR #28] Minor changes for minecraft 1.7.5
  • @jtimberman [PR #27] Remove timestamps from templates
  • Removed support for Mark2. See this commit for more information.

0.4 (September 30, 2013)

Breaking Changes There has been a lot of changes in this release, make sure you read everything carefully.

  • Big rewrite of the Readme
  • Split recipes up
  • Properties are split into a seperate attribute file
  • Added a minecraft group attribute
  • Removed ipv6 attribute, it was never used
  • new init_style attribute defaults to mark2. It can be set to runit to get the old behavior.
  • java-options attribute to specify additional runtime options when using runit only
  • New cookbook dependencies on python and sudo.
  • Better test coverage

Features: * @webframp [PR #17] Mark2 support. New recipe, attributes and template. Fixes #14 * @webframp [PR #16] Specify version via attributes and allow upgrading

Workaround: * Work around #11 by adding a autorestart attribute, defaults to true.

0.3 (June 06, 2013)

Features: * Changed the default settings to work with 1GB by default * Integration tests with test-kitchen

Bugfixes: * @benjaminws [PR #3] Refactor minecraft.properties template * @benjaminws [PR #2] Fix template output

0.2 (Nov 18, 2012)

  • Initial public release

Collaborator Number Metric
            

0.5.2 failed this metric

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

Contributing File Metric
            

0.5.2 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.5.2 failed this metric

FC059: LWRP provider does not declare use_inline_resources: minecraft/providers/plugin.rb:1
Run with Foodcritic Version 12.2.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

0.5.2 failed this metric

minecraft does not have a valid open source license.
Acceptable licenses include Apache-2.0, apachev2, Apache 2.0, MIT, mit, GPL-2.0, gplv2, GNU Public License 2.0, GPL-3.0, gplv3, GNU Public License 3.0.

No Binaries Metric
            

0.5.2 passed this metric

Publish Metric
            

0.5.2 passed this metric

Supported Platforms Metric
            

0.5.2 passed this metric

Testing File Metric
            

0.5.2 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.5.2 passed this metric