diff --git a/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/OCI_change_shape.png b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/OCI_change_shape.png new file mode 100644 index 0000000000..4892595d6d Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/OCI_change_shape.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/OCI_compute_dashboard.png b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/OCI_compute_dashboard.png new file mode 100644 index 0000000000..cd3d54d1a8 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/OCI_compute_dashboard.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/OCI_compute_dashboard_orig.png b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/OCI_compute_dashboard_orig.png new file mode 100644 index 0000000000..7aee3b3ead Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/OCI_compute_dashboard_orig.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/OCI_instance_networking.png b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/OCI_instance_networking.png new file mode 100644 index 0000000000..9ca953f6d7 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/OCI_instance_networking.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/OCI_network_IP_management.png b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/OCI_network_IP_management.png new file mode 100644 index 0000000000..5ed9e6d98f Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/OCI_network_IP_management.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/_index.md b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/_index.md new file mode 100644 index 0000000000..1a7abfd136 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/_index.md @@ -0,0 +1,51 @@ +--- +title: Running a Minecraft server on OCI A1 Arm64 instances + +minutes_to_complete: 10 + +who_is_this_for: Learners who are new to OCI and want a guided path from “provisioning an instance” to “running a persistent Minecraft server”. + +learning_objectives: + - Provision an OCI A1 Arm64 virtual machine instance suitable for running a Minecraft server + - Deploy and configure Minecraft server software + - Expose the Minecraft service from OCI by editing the network policy for the instance + - Connect to the running Minecraft server from the Minecraft client application + +prerequisites: + - Complete the [Get started with Oracle Cloud Infrastructure](../csp/oci/) learning path + - Install software that allows you to connect to a running instance over SSH + - Install the Minecraft client on your local laptop, and ensure that you have a Microsoft + or Mojang account to log in (it will help if you know the basics of playing Minecraft too) + +author: Dave Neary + +### Tags +skilllevels: Introductory +subjects: Web +armips: + - Neoverse +tools_software_languages: + - Java + - Minecraft +operatingsystems: + - Linux + + +further_reading: + - resource: + title: How To Setup And Run A Free Minecraft Server In The Cloud + link: https://blogs.oracle.com/developers/how-to-setup-and-run-a-free-minecraft-server-in-the-cloud + type: blog + - resource: + title: How to create a powerful Minecraft Server for free using Oracle Cloud + link: https://www.youtube.com/watch?v=0kFjEUDJexI + type: video + + + +### FIXED, DO NOT MODIFY +# ================================================================================ +weight: 1 # _index.md always has weight of 1 to order correctly +layout: "learningpathall" # All files under learning paths have this same wrapper +learning_path_main_page: "yes" # This should be surfaced when looking for related content. Only set for _index.md of learning path content. +--- diff --git a/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/_next-steps.md b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/_next-steps.md new file mode 100644 index 0000000000..727b395ddd --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/_next-steps.md @@ -0,0 +1,8 @@ +--- +# ================================================================================ +# FIXED, DO NOT MODIFY THIS FILE +# ================================================================================ +weight: 21 # The weight controls the order of the pages. _index.md always has weight 1. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. +--- diff --git a/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/configuring_new_minecraft_server.png b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/configuring_new_minecraft_server.png new file mode 100644 index 0000000000..ab852d77d5 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/configuring_new_minecraft_server.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/connecting_to_server.png b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/connecting_to_server.png new file mode 100644 index 0000000000..ab1170a26e Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/connecting_to_server.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/minecraft-client-connect.md b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/minecraft-client-connect.md new file mode 100644 index 0000000000..37a45f8d68 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/minecraft-client-connect.md @@ -0,0 +1,59 @@ +--- +title: Connecting the Minecraft client to the server +weight: 4 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Connecting the Minecraft client to the server + +### Opening the port for the Minecraft server + +Before we connect to the Minecraft server, we will change the network policy to allow clients to +connect to the Minecraft server over TCP port number 25565. To do this, we need to modify the +networking settings for our instance in the OCI dashboard. + +1. On the OCI Instances page, choose your Minecraft server instance. +2. In the Networking tab, click on the subnet name: + ![OCI instance networking](OCI_instance_networking.png) +3. On the Security tab of the subnet page, choose the security list which is active for the instance + (by default, this is called "Default Security List for vcn-xxxxxxxx") + ![Default Security List for subnet](subnet_security_list.png) +4. Under "Security rules", add a new Ingress rule (this means the rule applies to incoming traffic + from outside the instance). Set "Source CIDR" to "0.0.0.0/0" (this means all IP addresses can + connect), and set the "Destination Port Range" field to 25565. + ![Open port 25565 for Minecraft server](open_minecraft_port.png) + +You will also need to update your local firewall to allow connections to port 25565 on your instance. +Reconnect to your instance with SSH, and run the following commands on Oracle Linux: +``` +sudo firewall-cmd --permanent --add-port=25565/tcp +sudo firewall-cmd --reload +``` +or the following commands on Ubuntu: +``` +sudo ufw allow 25565/tcp +sudo ufw reload +``` + +You should now be able to run your Minecraft server on the OCI instance, then start your client, log in as +usual, and connect to your brand new server! + +### Connecting to the server from the Minecraft client + +1. Start your Minecraft client and log in as usual. +2. Choose "Multiplayer" mode - read and click through the warning that third party servers are not operated +by Mojang. +3. To add your server to the menu of available servers, choose "Add server", name your server +something meaningful ("My OCI server" for example) and put the IP address of your instance into the +"Server Address" field: + ![Configuring new server](configuring_new_minecraft_server.png) + +You can now join the server and start building! + ![Connecting to your new server running on OCI](connecting_to_server.png) + +You can also share the address with your friends to start building a shared world. Have fun! + + + diff --git a/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/minecraft-server-install.md b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/minecraft-server-install.md new file mode 100644 index 0000000000..44ef7ea3d7 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/minecraft-server-install.md @@ -0,0 +1,84 @@ +--- +title: Installing the Minecraft server +weight: 3 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Installing the Minecraft server + +### Installing the Java Runtime Environment + +Before we install the Minecraft server, we need to make sure that there are some prerequisites +installed. For the Minecraft 26 server or earlier, we will need Java 25. + +Connect to your instance using SSH as described in the previous step. We can install Java 25 on +Oracle Linux with: +``` +sudo dnf install java-25-openjdk +``` +and on Ubuntu or similar distributions, with +``` +sudo apt install openjdk-25-jre +``` +Since the Minecraft server starts on the command line, you may also want to install the `screen` or +`tmux` utilities which allows commands to keep running after you disconnect from the server. +These commands are not strictly necessary, but you will need them to be running if you want to keep +the server running when you disconnect from your SSH session. + +Running the Minecraft server at start-up, or keeping it running when you are not connected, will +not be covered in this learning path. + +### Downloading and installing the Minecraft server + +You can find the link for the latest version of the Minecraft server +[on the Minecraft website](https://www.minecraft.net/en-us/download/server). Copy the link to +`server.jar` from this page, and run the following command on your OCI instance to download it: +``` +wget +``` + +This will download server.jar from the Mojang website, and we will have a server.jar file on our OCI +instance. To make it easier to keep track of different server versions, rename the server.jar file +with a more meaningful name: `mv server.jar minecraft_server.26.2.jar` + +To start the Minecraft server, run the command: +``` +java -Xmx8G -Xms8G -jar minecraft_server.26.2.jar nogui +``` + +This runs the server withough a graphical user interface, and allocates 8GB of memory to it. If you +allocated less than this amount of memory to your instance, set this number to 3/4 of the memory that +you allocated to the instance - the other operating system services need some memory too. + +The first time you do this, the start-up will fail expectedly - a file called `eula.txt` is created +in the local folder, and before you start the server, you first need to accept its terms of use. Open +this file and follow the instructions to accept the terms and conditions. Running the server again +after doing this will succeed, and you should see the following messages on the terminal, showing +that the process has completed successfully (timestamps will be different at the start of the lines): + +``` +[00:40:50] [Server thread/INFO]: Starting minecraft server version 26.2 +[00:40:50] [Server thread/INFO]: Loading properties +[00:40:50] [Server thread/INFO]: Default game type: SURVIVAL +[00:40:50] [Server thread/INFO]: Generating keypair +[00:40:51] [Server thread/INFO]: Starting Minecraft server on *:25565 +[00:40:51] [Server thread/INFO]: Preparing level "world" +[00:40:51] [Server thread/INFO]: Selecting global world spawn... +[00:41:04] [Server thread/INFO]: Loading 0 persistent chunks... +[00:41:04] [Server thread/INFO]: Preparing spawn area: 100% +[00:41:04] [Server thread/INFO]: Time elapsed: 13099 ms +[00:41:04] [Server thread/INFO]: Done (13.448s)! For help, type "help" +[00:41:04] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld +[00:41:04] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether +[00:41:04] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end +[00:41:04] [Server thread/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved +[00:41:04] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved +[00:41:04] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved +[00:41:04] [Server thread/INFO]: ThreadedAnvilChunkStorage: All dimensions are saved +``` + +Your Minecraft server is now running - you can connect to it with the Minecraft client. Congratulations! + + diff --git a/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/oci-instance-start.md b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/oci-instance-start.md new file mode 100644 index 0000000000..4a112de0e8 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/oci-instance-start.md @@ -0,0 +1,57 @@ +--- +title: Starting an OCI A1 or A4 instance on OCI +weight: 2 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Starting an OCI A4 or A1 instance + +Once you have [created an OCI account](../csp/oci) and verified that you can start an +instance, we will create an AmpereOne powered A4 instance and connect to it with SSH to +install the Minecraft Java server. + +1. Log on to [Oracle Cloud](https://cloud.oracle.com) +2. On the$ OCI dashboard, navigate to Compute -> Instances to start a new instance: + ![Instances on OCI Compute](OCI_compute_dashboard.png) +3. Click "Create instance", then: + * Choose one of the availability domains offered to you with A4 instances available + * Select "Change shape", and set the instance type to Ampere VM.Standard.A4.Flex - if the + A4.Flex instance type is not available in your preferred + AD, try another, or choose VM.Standard.A1.Flex: + ![Change shape](OCI_change_shape.png) + * Beside the instance type, click the small black arrow to open options. Allocate 2 OCPUs + and 12 GB of memory to your instance + * Choose "Oracle Linux 9" or one of the other available images of your choice under "Change + image", then click Next +4. Use the default security options, click "Next" to get to networking options +5. Configure networking as follows: + * When prompted, create a new Virtual Cloud Network (VCN) and public subnet if you do not + have one already, or choose an existing VCN configuration + * Select "Automatically assign public IPv4 address" to to allow you to access the instance + remotely from your Minecraft server + * Create an SSH key pair if you do not have one (and download both private and public keys), + or upload the public key for an existing key pair so that you can connect to your instance + over SSH once it is created +5. Use default Storage options +6. After verifying that the instance is correctly configured, choose "Create" to provision a new + instance +7. It can take up to 2 minutes for your instance to be created. Once created, we need to ensure + that there is a public IP address to connect to by going to the "Networking" tab for the instance: + ![Instance networking]{OCI_instance_networking.png) +8. Scroll down and click on the VNIC name - `instance-yyyymmdd-HHmm` by default - then on the IP + administration tab, and click on the three dots on the primary IP row to edit the IP address type + associated with the instance to set its type to "Ephemeral public IP": + ![IP administration for instances](OCI_network_IP_management.png) + +Take note of the IP address under "Public IP address". You should now be able to SSH into your +instance with the command +``` +ssh -i opc@ +``` + +Congratulations - you are connected to your OCI instance. Next we will install some prerequisites and +download and start the Minecraft server. + + diff --git a/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/open_minecraft_port.png b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/open_minecraft_port.png new file mode 100644 index 0000000000..360275d19f Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/open_minecraft_port.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/subnet_security_list.png b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/subnet_security_list.png new file mode 100644 index 0000000000..84c4239d23 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/subnet_security_list.png differ