-
Notifications
You must be signed in to change notification settings - Fork 1
Updating Minecraft versions
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.
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:
# 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/
We define the versions in Salt pillar files in the following locations:
- Minecraft Forge Server: saltstack/pillar/minecraft/forge/
- ComputerCraft: saltstack/pillar/minecraft/mods/computercraft/
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>
-
Windows: Run the following command
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.
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.