Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
Test Handle System
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fdo
Test Handle System
Commits
e3797e21
Verified
Commit
e3797e21
authored
4 months ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
ENH: more flexible docker container naming
parent
dc745405
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.env
+5
-3
5 additions, 3 deletions
.env
Makefile
+5
-5
5 additions, 5 deletions
Makefile
README.md
+32
-16
32 additions, 16 deletions
README.md
docker-compose.yml
+8
-7
8 additions, 7 deletions
docker-compose.yml
with
50 additions
and
31 deletions
.env
+
5
−
3
View file @
e3797e21
DOCKER_SUBNET=172.27.0.0/16
DOCKER_SUBNET_GATEWAY=172.27.0.1
HANDLE_SERVER_IPV4_ADDRESS=172.27.0.2
COMPOSE_PROJECT_NAME=${COMPOSE_PROJECT_NAME:-test-handle-system}
DOCKER_SUBNET_PREFIX=${DOCKER_SUBNET_PREFIX:-172.27}
DOCKER_SUBNET=${DOCKER_SUBNET_PREFIX}.0.0/16
DOCKER_SUBNET_GATEWAY=${DOCKER_SUBNET_PREFIX}.0.1
HANDLE_SERVER_IPV4_ADDRESS=${DOCKER_SUBNET_PREFIX}.0.2
This diff is collapsed.
Click to expand it.
Makefile
+
5
−
5
View file @
e3797e21
start
:
.handle
@
echo
"Start Handle System"
docker compose up
--build
--detach
.
./.env
&&
docker
exec
test-handle-net-hs_
server
-1
/hs/templates/wait-for-it.sh
$${
HANDLE_SERVER_IPV4_ADDRESS
}
:8000
-t
500
--
echo
"HANDLE SERVICE ONLINE"
docker
exec
test-handle-net-hs_
server
-1
bin/hdl-genericbatch /hs/setup.batch.hdl
.
./.env
&&
docker
exec
$${
COMPOSE_PROJECT_NAME
}
-hs-
server
/hs/templates/wait-for-it.sh
$${
HANDLE_SERVER_IPV4_ADDRESS
}
:8000
-t
500
--
echo
"HANDLE SERVICE ONLINE"
.
./.env
&&
docker
exec
$${
COMPOSE_PROJECT_NAME
}
-hs-
server
bin/hdl-genericbatch /hs/setup.batch.hdl
.handle
:
mkdir
$@
stop
:
@
echo
"Stop Handle System"
docker compose down
.
./.env
&&
docker compose down
clean
:
stop
@
echo
"Clean-up Handle System"
rm
-rf
.handle
docker compose down
-v
--rmi
all
docker compose
rm
-vsf
.
./.env
&&
docker compose down
-v
--rmi
all
.
./.env
&&
docker compose
rm
-vsf
This diff is collapsed.
Click to expand it.
README.md
+
32
−
16
View file @
e3797e21
...
...
@@ -13,18 +13,18 @@ this setup is intended for **testing purposes only**. In other words:
## Run the HANDLE.NET server
```
docker compose up --build
make start
```
## Test Web-based Handle Resolution
Open
`https://172.2
8
.0.2:8000`
in your browser. You should see the HANDLE.NET
Open
`https://172.2
7
.0.2:8000`
in your browser. You should see the HANDLE.NET
landing page where you can resolve a handle.
## Test Web-based Admin Tool
Open "https://172.2
8
.0.2:8000/admin to see the admin tool.
Open "https://172.2
7
.0.2:8000/admin to see the admin tool.
### Authenticate
...
...
@@ -32,8 +32,9 @@ Open "https://172.28.0.2:8000/admin to see the admin tool.
*
Uncheck
`Get ID from Global`
*
Insert fields:
*
Index: 300
*
Handle: 0.TEST/ADMIN
*
Click
`Select private key`
and select the
`handle_server/templates/admpriv.bin`
file.
*
Handle: TEST/ADMIN
*
Click
`Select private key`
and select the
`handle_server/templates/admpriv.bin`
file.
*
Click
`Authenticate`
at the bottom of the form.
Now you can use the
`Tools`
from the menu to do stuff.
...
...
@@ -48,9 +49,9 @@ During start-up, the docker container outputs two configuration files to the
client and override the default behaviour which would connect the clients to
the global handle system.
*
The
`
resolver_site`
. Handle clients use this file to build a local (non-default) resolver.
*
The
`local_nas`
file is used by the java client to determine which handles
are to be resolved with the locally defined resolver
.
*
The
`
bootstrap_handles`
. This contains the root connection to handle
service(s).
*
The
`config.dct`
contains basic configuration for the handle.net client
.
### Option 1 (recommended)
...
...
@@ -59,8 +60,9 @@ export JAVA_TOOL_OPTIONS="-Dnet.handle.configDir=${PATH_TO}/.handle"
```
You can just configure the client by passing the java system property
"net.handle.configDir" pointing to the
`.handle`
directory by path. This can be achieved by passing
`-Dnet.handle.configDir=${PATH_TO}/.handle`
to the java executable or by exporting it they way shown above.
"net.handle.configDir" pointing to the
`.handle`
directory by path. This can be
achieved by passing
`-Dnet.handle.configDir=${PATH_TO}/.handle`
to the java
executable or by exporting it they way shown above.
### Option 2
...
...
@@ -70,24 +72,38 @@ handle network.
## Change IP Address of the Server
By default, the IP address of the server is configured to be
`172.2
8
.0.2`
. The
By default, the IP address of the server is configured to be
`172.2
7
.0.2`
. The
server is only available in from your host machine because docker is creating
the network for you that way.
> Server does not start: failed to create network local-fdo-testbed-hs-network:
> Error response from daemon: invalid pool request: Pool overlaps with other
> one on this address space
Should there be a problem, e.g. the address range is also used by your LAN or
by other docker networks, you can change the
`.env`
file. E.g. try
`172.27`
instead of
`172.28`
.
by other docker networks, you can change the
`.env`
file. E.g. try
`172.26`
instead of
`172.26`
as the
`DOCKER_SUBNET_PREFIX`
or run
```
DOCKER_SUBNET_PREFIX=172.26 make start
Note: If you have started the server in the past you might need to remove the
docker network by hand before you can start the server with the new
IP address configuration:
`docker network rm test-handle-
net_
hs
_
network`
IP address configuration: `docker network rm test-handle-
system-
hs
-
network`
## Wipe Database
The database is preserved when your stop the server with
```
make stop
```
You can remove all persistent data by removing the container and the volume:
1.
`docker container rm test-handle-net_hs_server-1`
2.
`docker volume rm test-handle-net_hs_srv1`
```
make clean
```
## Licence
...
...
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
8
−
7
View file @
e3797e21
name
:
test-handle-net
services
:
hs_server
:
hs-server
:
container_name
:
"
${COMPOSE_PROJECT_NAME}-hs-server"
build
:
context
:
./handle_server
env_file
:
.env
networks
:
hs
_
network
:
hs
-
network
:
ipv4_address
:
${HANDLE_SERVER_IPV4_ADDRESS}
volumes
:
-
hs
_
srv1:/hs/srv_1
-
hs
-
srv1:/hs/srv_1
-
type
:
bind
source
:
./.handle/
target
:
/root/.handle/
networks
:
hs_network
:
hs-network
:
name
:
"
${COMPOSE_PROJECT_NAME}-hs-network"
driver
:
bridge
ipam
:
config
:
-
subnet
:
${DOCKER_SUBNET}
gateway
:
${DOCKER_SUBNET_GATEWAY}
volumes
:
hs_srv1
:
hs-srv1
:
name
:
"
${COMPOSE_PROJECT_NAME}-hs-volume"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment