Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
9
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
glngn
glngn-server-examples
Commits
bf30a210
Commit
bf30a210
authored
Oct 01, 2019
by
Corey O'Connor
Browse files
~
parent
66dcb024
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
7 deletions
+37
-7
README.md
README.md
+37
-7
No files found.
README.md
View file @
bf30a210
...
...
@@ -7,11 +7,10 @@ kubernetes cluster should those advantages be required.
The implementation and APIs should be familiar to Scala service developers. To a large degree, glngn
server is a nice, pre-configured typed akka plus ZIO server.
-
clustering and coordination is provided by typed Akka
-
both a typed akka and zio runtime are provided. Use whichever suites your domain.
-
both typed akka and zio runtimes are provided. Use whichever suites your domain
-
simplified persistence configuration
-
simplified kubernetes cluster deployments. In addition to some custom automation, the akka
management tools are included
.
management tools are included
-
OpenAPI support (provided by tapir)
-
commercial support from the
[
Dog Head Bone
](
mailto:support@dogheadbone.com
)
company
...
...
@@ -69,7 +68,7 @@ Let's run the server configured to store data at `./starter.state`. In a termina
```
bash
$
java
-jar
./glngn-server-assembly.jar
--port
10000 run
--state-dir
./starter.state
...
[
lo
gging
output]
[
lo
ts of
output]
...
INFO glngn.server.app.ServerApp
$
- application is listening at http://localhost:10000
```
...
...
@@ -77,25 +76,56 @@ INFO glngn.server.app.ServerApp$ - application is listening at http://localhos
For consistency with the docs, the port 10000 is requested using
`--port 10000`
. If this option is
not provided a free port will automatically be selected.
Hit control-C, or TERM the process (there is only one), to shut down the server. This will take a bit
for a nice, coordinated shutdown. Which is preferred. That said, the server is configured to attempt
recovery from sudden terminations. Such as killing a container in a kubernetes cluster.
## Examining a Running Server
Even in this default configuration the server provides a few useful routes:
### Health
### Health
Check
```
bash
$
curl http://localhost:10000/healthz
OK
```
This will
always
return status 200 OK if the server is able to handle requests.
If
t
h
er
e is a issue
this will not return OK
.
This will
only
return status 200 OK if the server is able to handle requests.
Not
ter
ribly
interesting so far, but we haven't done much! Nice to verify the server health before proceeding tho
.
### OpenAPI schema
Let's query for the (current) API schema to see what else there is:
```
bash
$
curl http://localhost:10000/openapi.json
...
```
### A Brief Tour
(go over the general types of default routes)
### Service Fragments
(instantiate a service fragment)
# Customization
# Kubernetes Deployment
We've designed glngn server to be nice to deploy and operate using kubernetes. The priority has been
on the standalone use, this is even more of a work in progress. The usage we are targetting is small
to medium deployments.
Current features:
-
bootstrapping and lookup, using akka management, is preconfigured
-
memory and threadpools tuned for containers
-
provided routes for liveness and readiness probes
-
separate port for internal cluster operations
-
automatic removal nodes from the cluster for terminated containers
Internally, we build containers using nix and deploy to OpenShift. How would you'd like container
builds supported? Let us know at
[
support@dogheadbone.com
](
mailto:support@dogheadbone.com
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment