-
Notifications
You must be signed in to change notification settings - Fork 0
Crates Pro Development Workflow
This guide will help new developers set up their development environment for Crates Pro.
Crates Pro currently consists of four components:
- crates-pro
- performance-benchmark
- sensleak-rs
- crates-pro-frontend
This workflow applies to the first three components. The project uses remote development, where developers connect to an internal server via SSH.
We'll use the "crates-pro" component as an example to demonstrate the remote development process.
-
Edit your local SSH configuration file (~/.ssh/config). Please consult project maintainers for details.
-
Use Visual Studio Code to connect to the server.
-
On the remote host, clone the crates-pro-infra repository:
git clone https://github.com/crates-pro/crates-pro-infra.git
-
Clone the component you want to develop (e.g., crates-pro) on the remote host.
-
Replace the crates-pro submodule with the one you just cloned by adding a path mapping in the devcontainer.json file:
{ ... "workspaceFolder": "/workdir", "workspaceMount": "source=${localWorkspaceFolder},target=/workdir,type=bind", + "mounts": [ + "source=/path/to/your/crates-pro,target=/workdir/project/crates-pro,type=bind" + ] ... }
-
Reopen the crates-pro-infra project directory in the container (devcontainers).
-
In the container's command line, run:
./build.sh
This will build executables for all components and copy them to the
build
directory.
-
Outside the container, open a command line and navigate to the crates-pro-infra directory.
-
Run the following command to build a Docker image:
docker build ./build
This will use the executables in the
./build
directory to generate an image. The image description file is located at./build/Dockerfile
. -
Use
docker run
to run the image and complete the deployment.
If you encounter any issues or have questions, please reach out to the project maintainers for assistance.