From 472dc7cb9e5957b88ba1a4429e321f68fbb829fa Mon Sep 17 00:00:00 2001 From: softwarenoob Date: Sun, 14 Aug 2022 15:31:43 +0300 Subject: [PATCH 1/2] docs: update contribution guidelines --- CONTRIBUTING.md | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 67d02ffe..f2586b1c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,39 +1,51 @@ -# So you want to make an Egg +# How to contribute -## General rules +You can contribute by either creating a new pull request or testing [existing pull requests](https://github.com/parkervcp/eggs/pulls) and commenting on whether the egg works for you or not. Testing is very important and helpful! +## General rules for eggs 1. Keep it simple. - We don't need 8 miles of install script. + We don't need 8 miles of the install script. -2. Keep it Small. - Only use what is absolutely needed. +2. Keep it small. + Only use what is absolutely needed. The [Yolks install images](https://github.com/parkervcp/yolks#installation-images) already contain the most basic packages that speeds up the installation process. -3. Try to stay in the stock containers. - If you need something in a container, open a PR in [my yolks repo](https://github.com/parkervcp/yolks) where I can review and pull it up to the main repo. In addition, there is a larger quantity of [images here](https://github.com/parkervcp/images) for you to use that have not been migrated to Yolks yet. +3. Stay in the stock containers. + If you need something in a container, open a PR in [my yolks repo](https://github.com/parkervcp/yolks) where it can reviewed and built. Self-hosted or third-party images won't be accepted for security reasons. 4. Don't be afraid to submit PR's to the egg repo. - I don't bite. I will work with you on the egg and the required things to run it. + I don't bite. I will work with you on the egg and the required things to run it. Feel free to open a draft PR if you don't quite have the egg finished yet by yourself. + +### Sources for working on a new egg + +Look at existing eggs to see how they work. In most cases, you can take the existing egg as your new template. There's a brief documentation on how to [create eggs](https://pterodactyl.io/community/config/eggs/creating_a_custom_egg.html) and [Docker images](https://pterodactyl.io/community/config/eggs/creating_a_custom_image.html). + +Use existing Docker images for your egg. You can find them in [Parkers Yolks fork](https://github.com/parkervcp/yolks) and [Pterodactyl Yolks](https://github.com/pterodactyl/yolks). + +We have a collection of [existing install script snippets](https://github.com/parkervcp/eggs/tree/master/scripts) that you can use. ## Step 1 ### Be aware of the pterodactyl install process -The Pterodactyl install process is fairly simple once you know. +The Pterodactyl install process is fairly simple once you know it. ```md 1. Spin up install container - This uses a volume mount on /mnt/server for the server files. - This can pull or set up all that is needed to run the server. + Creates a new container using an install image that's run as root. + Uses a volume mount on `/mnt/server` for the server files, which is the working directory during installation. + The volume will be later mounted as `/home/container` for the server container. Any files outside of `/mnt/server` will be gone after installation. + Install script can pull files or set up all that is needed to run the server, such as writing files, directories or compiling apps. It is regularly used to just download the files required. Such as server files and configs. - 2. Stop install container + 2. Stop and destroy install container 3. Start a new container with the server files in /home/container - This is where the server is actually run. + This is where the server is actually run. No root privileges. Any dependencies installed during the install process are gone. The container that is started should have everything you need. + No packages can be installed. Any required dependencies must exist in the used Docker image. ``` ## Step 2 @@ -49,4 +61,8 @@ This is to maintain a clean repo that others can pull and be fully aware of what ### Make a branch and do your work in there -I have been getting messy PR's due to people always PRing from their master branch. Please make a seperate branch and PR from there. +I have been getting messy PR's due to people always PRing from their master branch. Please make a separate branch and PR from there. + +## Step 4 + +Open a new pull request and fill in the template. Make sure that the readme files have been updated to include the new egg. From 225d5c29113ea18faa5f684acf25ab834ee267c2 Mon Sep 17 00:00:00 2001 From: softwarenoob Date: Sun, 14 Aug 2022 15:54:30 +0300 Subject: [PATCH 2/2] docs(contributing): change wording for a general rule --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f2586b1c..783aad05 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,8 +10,8 @@ You can contribute by either creating a new pull request or testing [existing pu 2. Keep it small. Only use what is absolutely needed. The [Yolks install images](https://github.com/parkervcp/yolks#installation-images) already contain the most basic packages that speeds up the installation process. -3. Stay in the stock containers. - If you need something in a container, open a PR in [my yolks repo](https://github.com/parkervcp/yolks) where it can reviewed and built. Self-hosted or third-party images won't be accepted for security reasons. +3. Use the stock images. + If you need something in an image, open a PR in [my yolks repo](https://github.com/parkervcp/yolks) where it can be reviewed and built. Self-hosted or third-party images won't be accepted for security reasons. 4. Don't be afraid to submit PR's to the egg repo. I don't bite. I will work with you on the egg and the required things to run it. Feel free to open a draft PR if you don't quite have the egg finished yet by yourself.