The backend repo for linucks.io ✨:sparkles:
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Check out a live demo here.
linucks.io is a web application where you can test out a range of Linux distros before actually installing in on your system.
Linux is a popular kernel which is used mainly by developers because of the many benefits. Since there are a number of flavours of GNU/Linux, there are many options to choose from, which can be quite confusing for the user.
linucks.io is a one-stop solution for distro-hopping. With this application, we try the user by simulating a virtual environment of the distro of the user's choice. This is the repository for the frontend of the web-application, you can check out the frontend on https://github.com/linucks-io/linucks.io-client/. Every time a user clicks on a distro, a request is sent to the backend, which allocates a docker image for that cluster and returns a SSL encrypted websocket URL for it, which can be accessed using noVNC on the browser.
Internally, the backend uses ECS (Elastic Container Service) provided by AWS. Therefore, the environment variables in sample.env
must be configured with the AWS secrets. Every time a request is made to /provision
, the backend requests a new task to run in the ECS cluster for the corresponding linux distribution. Once the task is running, the URL is sent back to the frontend, and then is displayed using the react-vnc
library, which uses the noVNC
protocol. Each docker image has a VNC server like x11vnc
or tigerVNC
running inside it. The ECS infrastructure can be set up using the terraform files provided in the deployment folder.
Once a task is provided, a dynamic reverse proxy is set up programmatically using redbird, which redirects all websocket requests from the backend to the correct private IP within the ECS cluster. The tasks are cleaned up every 30 minutes.
To get a local copy up and running follow these simple steps.
- npm
- node
- terraform (CLI)
- AWS Access Key ID and Secret Access Key
- Clone the repo
git clone https://github.com/linucks-io/linucks.io-service.git
- Install NPM packages
cd server
npm install
- The redbird server and the express server start up together using the following command.
npm start
- The infrastructure can be deployed on terraform using the following command.
# create a deployment/terraform.tfvars file with vars declared in deployment/variables.tf file
cd deployment
terraform apply --auto-approve
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. 😄
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'feat: Add some AmazingFeature'
) - Push to the Branch (
git push -u origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Thanks goes to these wonderful people (emoji key):
Rahil Kabani 💻 📖 |
AJ1479 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!