VDP is built with the microservice architecture. To develop each service independently, we assign profiles to each service in the
docker-compose-dev.yml file in VDP.
This allows us to selectively enabling services for various usages, e.g., debugging or development.
Services are associated with profiles through the
profiles attribute, which takes an array of profile names.
A service will be started only if one of its profile names is activated. A service without
profiles will always be started.
VDP assigns five different profile names:
console- start all the dependent services for
mgmt- start all the dependent services for
connector- start all the dependent services for
model- start all the dependent services for
pipeline- start all the dependent services for
all- start all services
Use one of the profile name to develop the corresponding service:
# In VDP projectmake build PROFILE=<valid-profile-name>make dev PROFILE=<valid-profile-name>
The following guideline shows detailed guideline about how to develop the
#Start dependent VDP services for
On the local machine, clone
vdp repository in your workspace, move to the repository folder, and launch all dependent microservices:
# Clone VDP projectcd <your-workspace>git clone https://github.com/instill-ai/vdp.git && cd vdp# Use profile `connector` to launch all dependent services for `connector-backend`make build PROFILE=connectormake dev PROFILE=connector
connector-backend repository in your workspace and move to the repository folder:
cd <your-workspace>git clone https://github.com/instill-ai/connector-backend.gitcd connector-backend
Build & run the dev image
make buildmake dev
Now, you have the Go project set up in the container, in which you can compile and run the binaries together with the integration test in each container shell.
docker exec -it connector-backend /bin/bashgo run ./cmd/migrationgo run ./cmd/initgo run ./cmd/main
Start the Temporal worker
docker exec -it connector-backend /bin/bashgo run ./cmd/worker
Run the integration test
During development, you can run the integration test to make sure the updated
connector-backend works as intended:
docker exec -it connector-backend /bin/bashmake integration-test
#Stop the dev container