(User-PC Computing System)
This system is designed to easily execute the same tasks on different hosts. By leveraging Docker's capabilities, it allows users with no Docker knowledge to use it effortlessly.
This system is divided into three parts:
UPC
├── backend
│ ├── UPC-Node
│ └── UPC-GO
├── frontend
│ └── upc-react
└── register-server
- React Frontend: Provides a user interface that allows users to interact with the system intuitively.
- Go or Node Backend: Connects to the host's Docker daemon, receives requests from the frontend, and handles operations on files and Docker.
- Register Server: Functions as a central server, managing all frontends and backends, aggregating information, and enabling the frontend to switch between different backends easily.
curl -sSL https://raw.githubusercontent.com/comevback/UPC-node/main/start-docker.sh -o start-docker.sh &&
chmod +x start-docker.sh &&
./start-docker.sh
- Start the React(frontend) API(backend) servers and Register-Server.
- Compress the directory of the task in to .zip file,
- Upload the compressed file on React website,
- Generate a image for this kind of task,
- Upload files and process,
- Download the results.
This system allows users to easily operate Docker through a web browser. Here are its main features:
- File Management: Upload and delete files.
- Docker Image Creation: Create Docker images from uploaded files.
- Task Processing: Perform various tasks on the backend.
- Terminal Access: Execute commands directly from the web browser.
- Server Management: Register and manage local or cloud servers.
- Docker Deployment: Deploy the entire system with a single command.
In short, this system allows users to operate Docker from the web interface to create, pull, and delete Docker images. Additionally, through a panel, it helps users utilize Docker containers more quickly and easily.
The UPC system consisted three main components:
- UPC-Worker (backend server)
- User Interface (React frontend)
- Register Server (A cloud or local central server to manage the system)
Frp is a fast reverse proxy that allows you to expose a server(service) from a local network.
Frp forwards requests to internal services via a server with a Public IP.
The order to generate a Docker image in UPC system:
- Whole UPC system:
curl -sSL https://raw.githubusercontent.com/comevback/UPC-node/main/start-docker.sh -o start-docker.sh &&
chmod +x start-docker.sh &&
./start-docker.sh
- Go-Server :
curl -sSL https://raw.githubusercontent.com/comevback/UPC-node/main/start-go-docker.sh -o start-go-docker.sh &&
chmod +x start-go-docker.sh &&
./start-go-docker.sh
- Node-Server (deprecated):
curl -sSL https://raw.githubusercontent.com/comevback/UPC-node/main/start-api-docker.sh -o start-api-docker.sh &&
chmod +x start-api-docker.sh &&
./start-api-docker.sh
- Frontend-service:
curl -sSL https://raw.githubusercontent.com/comevback/UPC-node/main/start-react-docker.sh -o start-react-docker.sh &&
chmod +x start-react-docker.sh &&
./start-react-docker.sh
- Register-service:
curl -sSL https://raw.githubusercontent.com/comevback/UPC-node/main/start-register-docker.sh -o start-register-docker.sh &&
chmod +x start-register-docker.sh &&
./start-register-docker.sh
These instructions will get you a copy of the project up and running on your local machine for development.
- Node.js: https://nodejs.org/en/download
- Docker: https://www.docker.com
- buildpack: https://buildpacks.io/docs/tools/pack
- MongoDB(optional): https://www.mongodb.com
- Clone the repository:
git clone https://github.com/comevback/UPC-node.git
cd UPC-node
- Install dependencies for the all:
- Linux/MacOS:
npm run install-all
or
chmod +x install.sh
./install.sh
- Windows: (If you are using Windows, please use git bash or other kinds of bash)
chmod +x install.sh
./install.sh
- Run the setup scripts to change the ip address of backend server to your host ip address
chmod +x setArgs.sh
./setArgs.sh
If you want to use Database to store the registered service, create a .env file on register-server folder, and add a line as:
MongoURL={your-mongoDB-RUL}
otherwise the data will be loacl.
Run Frontend-Server Backend-Server and Register-Server at the same time:
npm start
Or run individual part:
- Register-Server:
cd register-server
npm start
- Backend-Server:
cd backend/UPC-nodejs
npm start
- Frontend-Server:
cd frontend/upc-react
npm start
Xu Xiang
This project is licensed under the MIT License - see the LICENSE file for details.