Skip to content

Commit dc3266b

Browse files
author
Auri Munoz
committed
Add Stork registration quickstarts
1 parent e9b476c commit dc3266b

File tree

21 files changed

+898
-45
lines changed

21 files changed

+898
-45
lines changed

pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@
109109
<module>stork-quickstart</module>
110110
<module>stork-kubernetes-quickstart</module>
111111
<module>stork-dns-quickstart</module>
112-
<module>stork-registration-quickstart</module>
112+
<module>stork-automatic-consul-registration-quickstart</module>
113+
<module>stork-programmatic-custom-registration-quickstart</module>
113114
<module>tests-with-coverage-quickstart</module>
114115
<module>tika-quickstart</module>
115116
<module>validation-quickstart</module>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Quarkus guide: https://quarkus.io/guides/stork-registration
2+
3+
This example describes how Stork can registers automatically service instances using Consul.
4+
5+
You can start the Consul instance using:
6+
7+
8+
```shell
9+
docker run \
10+
-d \
11+
-p 8500:8500 \
12+
-p 8600:8600/udp \
13+
consul agent -server -ui -node=server-1 -bootstrap-expect=1 -client=0.0.0.0
14+
```
15+
Registering services in command line:
16+
17+
```bash
18+
curl -X PUT -d '{"ID": "red", "Name": "red-service", "Address": "localhost", "Port": 9000, "Tags": ["color"]}' http://127.0.0.1:8500/v1/agent/service/register
19+
```
20+
21+
Deleting a service instance
22+
23+
```bash
24+
curl -X PUT http://127.0.0.1:8500/v1/agent/service/deregister/red
25+
```
26+
27+
Getting a service by name
28+
29+
```bash
30+
curl -X GET http://127.0.0.1:8500/v1/agent/service/red
31+
```

stork-registration-quickstart/pom.xml renamed to stork-automatic-consul-registration-quickstart/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>org.acme</groupId>
7-
<artifactId>stork-registration-quickstart</artifactId>
7+
<artifactId>stork-automatic-consul-registration-quickstart</artifactId>
88
<version>1.0.0-SNAPSHOT</version>
99
<properties>
1010
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>

0 commit comments

Comments
 (0)