Skip to content

Commit 137fb91

Browse files
gm2552claude
andcommitted
Split DNS deployment guide into Cloud Native and Legacy sections
Cloud Native is now the only supported deployment model as of 9.0.0, so it is documented first: create a `dns` directory, download dns-sboot-9.0.0.jar, and run it with the shared service.sh/service.ps1 scripts described in the Cloud Native HISP Deployment Model guide, with a note on binding privileged port 53 and a pointer to the DNS Service configuration table. The previous instructions are retained under a Legacy Deployment section, marked as applicable only to version 8.1.x and earlier. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SVtD9ut1zV4eMWd7tKg8TU
1 parent aa5a7fb commit 137fb91

1 file changed

Lines changed: 38 additions & 7 deletions

File tree

‎docs/dep-guide.md‎

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,40 @@ title: DNS Service Deployment
44

55
# DNS Service Deployment
66

7-
The DNS server is deployable on a number of different operating environments and can be launched either interactively (for debugging) or as a background service.
7+
The DNS server is a standalone, authoritative-only DNS service. It answers DNS queries — most importantly the CERT record queries used for Direct certificate discovery — from the records managed in the Direct Project configuration service. It is assembled and packaged as a Spring Boot jar application and can be launched either interactively (for debugging) or as a background service.
88

9-
The DNS server are assembled and packaged as a SpringBoot jar application. In the Java RI stock assembly, the services are bundled using in the following directory structure.
9+
Two deployment models exist:
10+
11+
* **Cloud Native deployment** — the only supported model starting with version 9.0.0. The DNS server is deployed as an individual Spring Boot micro-service alongside the other Direct micro-services.
12+
* **Legacy deployment** — supported only for version 8.1.x and earlier. The DNS server is deployed from the Direct Project stock assembly as a self-contained `DirectDNSServer` directory with its own `dnsServer` control script.
13+
14+
## Cloud Native Deployment
15+
16+
Starting with version 9.0.0, the DNS server is deployed the same way as every other Direct micro-service, as described in the [Cloud Native HISP Deployment Model](https://directprojectjavari.github.io/docs/direct-project-stock/cloud-native-deployment) guide. Refer to that guide for the full walkthrough — deploying binaries, the `service.sh` / `service.ps1` control scripts, the `conf/logback.xml` logging file, and overriding configuration with an `application.yml`. This section covers only what is specific to the DNS service.
17+
18+
1. Create a directory named `dns` for the service, following the [Download Micro-service Binaries](https://directprojectjavari.github.io/docs/direct-project-stock/cloud-native-deployment#download-micro-service-binaries) step of the Cloud Native guide.
19+
2. Download [dns-sboot-9.0.0.jar](https://repo.maven.apache.org/maven2/org/nhind/dns-sboot/9.0.0/dns-sboot-9.0.0.jar) from Maven Central into that directory.
20+
3. Copy the `service.sh` (Unix/Linux/macOS) or `service.ps1` (Windows) template from the Cloud Native guide into the `dns` directory and replace the `<binary>` placeholder with `dns-sboot-9.0.0.jar`. Add a `conf/logback.xml` file as described in that guide.
21+
4. Start the service with `./service.sh start` (or `.\service.ps1 start`). Use `./service.sh console` to run it interactively for troubleshooting, and `./service.sh stop` to stop it.
22+
23+
**Binding to port 53:** the DNS server listens on UDP/TCP port 53 by default, which is a privileged port on most operating systems. Either start the service with sufficient privileges to bind low ports (run as `root`, or grant the Java executable the `CAP_NET_BIND_SERVICE` capability on Linux), or set `direct.dns.binding.port` to a non-privileged port and forward port 53 to it.
24+
25+
### Configuration
26+
27+
The DNS service is configured with an `application.yml` file placed in the `dns` directory, the same as the other micro-services. The full set of configurable properties is documented in the [DNS Service configuration table](https://directprojectjavari.github.io/docs/direct-project-stock/cloud-native-deployment#dns-service) of the Cloud Native guide. The settings you are most likely to change are:
28+
29+
* `direct.config.service.url` — URL of the configuration service API. Default `http://localhost:8082/`.
30+
* `direct.webservices.security.basic.user.name` / `direct.webservices.security.basic.user.password` — credentials used to authenticate to the configuration service. Defaults `admin` / `d1r3ct;`.
31+
* `direct.dns.binding.port` — the port the DNS server binds to for listening for DNS requests. Default `53`.
32+
* `direct.dns.binding.address` — the local IP address the DNS server binds to. Default `0.0.0.0` (all interfaces).
33+
* `direct.dns.binding.maxReconnectAttempts` — number of times the server attempts to re-bind its listener socket after an I/O failure before giving up. Default `10`.
34+
* `direct.dns.certPolicyName` — the name of a policy used to filter certificate query responses. This is generally used for configuring single-use certificates. Default is empty (no filtering).
35+
36+
## Legacy Deployment (version 8.1.x and earlier)
37+
38+
> **Note:** This deployment model applies only to version 8.1.x and earlier. For version 9.0.0 and later, use the Cloud Native deployment described above.
39+
40+
The DNS server is deployable on a number of different operating environments and can be launched either interactively (for debugging) or as a background service. In the Java RI stock assembly, the service is bundled using the following directory structure:
1041

1142
```
1243
+-- DirectDNSServer
@@ -15,7 +46,7 @@ The DNS server are assembled and packaged as a SpringBoot jar application. In th
1546

1647
The conf directory contains a logback xml file used for configuring logging options.
1748

18-
## Service Installation
49+
### Service Installation
1950

2051
To install, first download the Direct Project stock assembly and unpack the contents into the desired location using your archiver of choice (tar, WinZip, WinRar, File Roller, etc).
2152

@@ -73,7 +104,7 @@ Conversely you can stop the service by running the command:
73104
service DirectDNSServer stop
74105
```
75106

76-
**Running Interactively**
107+
### Running Interactively
77108

78109
For debugging or troubleshooting purposes, you may need to run the service interactively. Running interactively is the same across all platforms.
79110

@@ -82,7 +113,7 @@ For debugging or troubleshooting purposes, you may need to run the service inter
82113

83114
The service will output all logging to the current console and the log file. To terminate the interactive service, simply press CTRL+C (Control C).
84115

85-
** Service Deployment Configuration
116+
### Service Deployment Configuration
86117

87118
The DNS server uses an internal properties file to bootstrap its default settings. Settings can be overridden by externalizing the properties using SpringBoot [external configuration](https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html) options. The simplest way is to create an file named *application.properties* in the DirectDNSServer directory and set the necessary properties that you wish to override. The sever also supports connecting to a SpringCloud configuration server which can be configured either using an application.properties file or environment parameters.
88119

@@ -95,6 +126,6 @@ The configuration in most cases does not need a lot of modification, however the
95126
* direct.dns.binding.address - The local IP address that the DNS server binds to for listening for DNS requests. Default value is *0.0.0.0*
96127
* direct.dns.certPolicyName - The name of a policy used to filter certificate query responses. This is generally used for configuring single use certificates. Default value is empty.
97128

98-
## Service Logging
129+
### Service Logging
99130

100-
Logging is configured in the DirectDNSServer/conf/logback.xml file and by default are written to the file DirectDNSServer/log/dns-server.log; by default the file uses a rolling log scheme. Changes can be made by updating the logback.xml file.
131+
Logging is configured in the DirectDNSServer/conf/logback.xml file and by default are written to the file DirectDNSServer/log/dns-server.log; by default the file uses a rolling log scheme. Changes can be made by updating the logback.xml file.

0 commit comments

Comments
 (0)