Config service Overview
This service handles communication with the Storage Adapter microservice to complete tasks.
The microservice provides a RESTful endpoint to make CRUD operations for "devicegroups", "solution-settings", and "user-settings". The data will be stored by the Storage Adapter microservice.
Dependencies
- [Storage adapter microservice] used to store data
How to use the microservice
Local Setup
1. Environment Variables
Run scripts\env-vars-setup.cmd
on Windows or source scripts/env-vars-setup
on Mac/Linux to set up the environment variables needed to run the service locally.
If using environment variables, this service requires the following environment
variables to be set:
PCS_STORAGEADAPTER_WEBSERVICE_URL
- the url for the Storage Adapter Webservice used for key value storage
Quickstart - Running the service with Docker
You can quickly start the Config service and its dependencies in one simple step, using Docker Compose with the docker-compose.yml file in the project:
cd scripts/docker
docker-compose up
The Docker compose configuration requires the PCS_STORAGEADAPTER_WEBSERVICE_URL
environment variable.
Build and Run from the command line
The scripts folder contains scripts for many frequent tasks:
compile
: compile the projects.build
: compile the projects and run the tests.run
: compile the projects and run the service. This will prompt for elevated privileges in Windows to run the web service.
The scripts check for the environment variables setup. You can set the environment variables globally in your OS, or use the "env-vars-setup" script in the scripts folder.
Updating the Docker image
The scripts
folder includes a docker subfolder with the
files required to package the service into a Docker image:
build
: build a Docker container and store the image in the local registryrun
: run the Docker container from the image stored in the local registry
Contributing to the solution
Please follow our contribution guildelines and code style conventions.
Feedback
Please enter issues, bugs, or suggestions as GitHub Issues here: https://github.com/Azure/pcs-config-dotnet/issues.