Skip to main content

juneau-sc

The juneau-sc group provides a Git-backed configuration server that exposes juneau-config files stored in a remote Git repository over REST, enabling centralised configuration management across a fleet of microservices.

ModuleRole
juneau-sc-serverA standalone Juneau/Jetty microservice that clones a remote Git repo and serves .cfg files as JSON over a REST API.

Architecture​

  Git Remote Repository
(e.g. GitHub / GitLab)
│
│ clone / pull
▼
┌─────────────────────────────┐
│ juneau-sc-server │
│ │
│ GET /configs/{proj}/{br} │
│ → JSON (APPLICATION + │
│ PROJECT config items) │
└────────────┬────────────────┘
│ HTTP GET
▼
┌─────────────────────────────┐
│ Consuming microservice │
│ (manual REST call via │
│ juneau-rest-client) │
└─────────────────────────────┘

Motivation​

Juneau's file-based Config API is powerful for single-service deployments, but managing dozens of config files across many pods or VMs becomes error-prone. juneau-sc solves this by:

  1. Centralising storage — a single Git repository holds the canonical copy of every config file.
  2. Version-controlled config — all changes are tracked with full Git history and branch support.
  3. Layered defaults — an application.cfg file provides shared defaults; each project's .cfg file supplies project-specific overrides. Both are returned together in a single request.

Config Repository Layout​

The Git repository served by juneau-sc-server is expected to follow this flat structure:

<git-repo-root>/
application.cfg ← shared defaults (key APPLICATION in the response)
my-project.cfg ← project-specific overrides (key PROJECT in the response)
other-project.cfg
...

Files use the standard Juneau INI-style .cfg format.

REST API Summary​

The server exposes a single endpoint:

GET /configs/{project}/{branch}
ParameterDescription
{project}Project name — the server loads {project}.cfg from the repo.
{branch}Git branch to check out before reading files.

Example response (GET /configs/my-app/main):

{
"APPLICATION": {
"value": "[Section1]\nkey1 = val1\n..."
},
"PROJECT": {
"value": "[Section1]\nkey1 = override\n..."
}
}

Each value field contains the raw text of the corresponding .cfg file.

Getting Started​

See juneau-sc-server for setup instructions.

See Also​