As the Dev Rel manager for Torque, Quali’s infrastructure automation solution, I’d like to address one of its most powerful features: blueprints.
Blueprints are the infrastructure/environment specifications for the environment users want to create. As an Environment as a Service tool, Torque applies the blueprint specs and applies it to a preferred cloud provider.
Creating a blueprint
The basic process for creating a blueprint is straightforward: Find a sample blueprint that comes closest to your end state, and then refine it until it resembles your environment. To illustrate the process, I’m choosing to build a Minecraft server with specific (and rather tedious) requirements. (The illustration instantly garners the attention of my kids, who are likely to boast of my Minecraft involvement to their friends. Go, Dad.)
While I’ve never made a public cloud Minecraft server, I’ve created local network instances. So, I decided to poc it quickly, coming up with the following configuration that I could connect to my outdated client, on my outdated system. The configuration is as follows:
- AMI: amzn-hvm-openjdk7-java-1.7.0-2021.05.18-06.45 – ami-05f9f04fdb3aeb80b
- Instance type: m4.xlarge
- Open port: 25565 (open to public),port 22 to manage the server.
- Minecraft server version 1.16.2 provided by net (it must be this version or earlier, because my kids’dated laptops remain stuck at this version).
After hammering out my simple infrastructure design, I create a blueprint, which is a great way to describe in simple yaml my infrastructure design in a cloud-agnostic way. Per my hacker MO, I forked a simple blueprint example while completing the AWS Torque workshop.
After forking, I copied an existing blueprint and named it minecraftserver.yaml. I also created the shell scripts that retrieves , install, and configure Minecraft server, placing those in the application folder named after the application referenced in the top-level blueprint yaml (minecraftserver.yaml).
Deploying blueprints in Torque
It’s time to introduce Torque, my personal environment creator, to the blueprint I just created. After launching my free Torque trial and linking my cloud account, I login to my Torque account, connecting my repo (which contains my blueprints) in the Settings section.
Next, I click on Blueprints in the left nav, which lists my blueprints
The blueprints listed above include all of the blueprints available from my repo. To enable the use of my new blueprint within Torque, I simply “publish” it.
After completing the setup, it’s time to launch an environment that my kiddos can connect to their Minecraft client. I click on “Sandbox” environment and click “New Sandbox.”
Next, I select the minecraftsever card:
I fill out the an environment name, incorporating inputs to affect environment behavior, such as gametype:
- 0 = Survival
- 1 = Creative
- 2 = Adventure
- 3 = Spectator
Next, I fill out ALLOWFLIGHT either true or false (wanna be able to fly?)
You can see that sandbox is now listed in the “Sandbox Environment” section.
I obtained the IP from clicking on the sandbox environment within the Quick Links area:
From there, I opened my Minecraft client, selected multi-player, and configured a new server to connect with the IP from above.
We’re not quite done, though. If the environment shuts down, the world that I created will be lost. In my next post, I’ll share how I save the Minecraft server.
If you have questions, our forum is open! Consider it the commons of the community, and it’s a great place to initiate discussions and provide product feedback.