Skip to content

Updating Minecraft versions

Sandor Zeestraten edited this page May 29, 2016 · 4 revisions

Minecraft and its mods get new releases fairly often so we need to keep up with new versions in the project as well.

As we use Salt, a configuration management tool, updating to new versions is pretty easy to do.

How are Minecraft versions defined?

We use Salt Grains and Salt Pillar data to determine what version to install.

Salt Grains by default contains system information, however we add some extra information there which can be seen in the example below:

Grain example for a Minecraft minion

# The role of this machine.
role: minecraft

# Minecraft Forge server version. See /pillar/minecraft/forge/
forge_version: 189

# ComputerCraft mod version. See /pillar/minecraft/mods/computercraft/
computercraft_version: 179

# Determines how much memory Minecraft uses. See /pillar/minecraft/sizes/
size: verysmall

These values map to Salt Pillar data located in saltstack/pillar/minecraft/

How to update for a new version

Step 1: Create a new Salt pillar data file

We define the versions in Salt pillar files in the following locations:

Here is an example for Minecraft Forger Server version 1.8.9:

minecraft:
  forge:
    jar_name: forge-1.8.9-11.15.1.1722-universal.jar
    link: http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.8.9-11.15.1.1722/forge-1.8.9-11.15.1.1722-installer.jar
    checksum: sha1=49e4e6a9509e77c8649c95c01b29e8e120db3c70

When you want to add a new versions do the following:

  • Copy one of the earlier versions of the same package
  • Update the link URL to the new version
  • Download the .jar file and generate the SHA1 checksum of the file
    • Windows: Run the following command certutil -hashfile <filename> SHA1
    • Linux: Simply run sha1sum <filename>

Step 2: Update the grains file for Vagrant

The mc machine in the development environment uses a grains file defined in the Vagrantfile.

You can change the versions in saltstack/vagrant/grains/mc.

Note: Make sure to test new versions in the development environment first.

Step 3: Update the grains file for Salt Cloud minions

Salt Cloud minions define their grains in the Salt Cloud profiles.

You can change the versions or create new profiles in saltstack/pillar/cloud.sls.