This guide provides step-by-step instructions for setting up the Credential Constructor and Datastore services. You will learn how to make the API accessible from your host for seamless interaction, explore the API using the Swagger UI, and enable tracing with Jaeger. This setup is part of the VC Project, a suite of services designed to manage verifiable credentials.
Before starting, ensure that you have the following tools installed:
VC stands for Verifiable Credential, a set of services that provide functionalities for handling verifiable credentials, including:
ApiGW (API Gateway): Acts as the frontend for backend services, handling external connections and distributing messages to other VC services. It’s stateless, so it can run across multiple servers or data centers.
Datastore: An integration point for storing documents (e.g., PDA1, EHIC) with metadata. It aims to be flexible for various use cases.
Issuer: Issues verifiable credentials based on documents from the Datastore or an authentic source, currently focused on Selective Disclosure JWT (SDJWT).
Verifier: Verifies credentials issued by the system.
Persistent: Stores persistent data, such as authentic source documents, in MongoDB.
Registry: Manages credential registration (still under development).
To begin, clone the vc_up_and_running repository from GitHub. This contains all the necessary files to set up the VC services.
git clone git@github.com:dc4eu/vc_up_and_running.git |
This will create a local copy of the repository on your machine.
Once the repository is cloned, navigate to the base directory where all the service configurations are located.
cd vc_up_and_running |
Ensure that all subsequent commands are run from this directory.
To interact with the API from your host machine, you need to expose the relevant service ports. We'll create a Docker Compose override file that maps the necessary ports.
Create a docker-compose.override.yaml
file in the base directory.
Add the following configuration to expose the apigw
and Jaeger
ports:
version: "3" services: apigw: ports: - "8080:8080" jaeger: ports: - "16686:16686" |
This will expose:
apigw
service on port 8080
.Jaeger
tracing UI on port 16686
.With the ports configured, start the Docker containers using the following command:
docker compose up
Docker Compose will start the services, combining both docker-compose.yaml
and docker-compose.override.yaml
configurations, and apply the port mappings for apigw
and Jaeger
.
Once the containers are running, you can explore the API using Swagger, which provides an interactive interface for testing the API.
Open your web browser and navigate to:
http://127.0.0.1:8080/swagger/index.html
Here, you can view the available API endpoints, test them, and explore the documentation.
Jaeger is used to trace the flow of requests across the VC services, enabling you to monitor distributed transactions.
To access the Jaeger tracing UI, open:
This will allow you to monitor the internal communications between the services in real-time.
curl
or Postman.By following these steps, you'll have the VC up and running services fully set up, with the Datastore API exposed to your host, accessible via Swagger, and Jaeger tracing enabled for real-time monitoring.