Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
workspace
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gaia-X
Trust Services API
workspace
Commits
48c39113
Commit
48c39113
authored
3 years ago
by
Lyuben Penkovski
Browse files
Options
Downloads
Patches
Plain Diff
Policy service definition
parent
ddbcb278
Branches
policy-service
Branches containing commit
No related tags found
1 merge request
!5
Policy service definition
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
README.md
+59
-29
59 additions, 29 deletions
README.md
docker-compose.yml
+16
-33
16 additions, 33 deletions
docker-compose.yml
env/policy.env
+10
-0
10 additions, 0 deletions
env/policy.env
env/resolver.env
+0
-4
0 additions, 4 deletions
env/resolver.env
setup.sh
+6
-5
6 additions, 5 deletions
setup.sh
with
91 additions
and
71 deletions
README.md
+
59
−
29
View file @
48c39113
...
...
@@ -12,44 +12,74 @@ with environment variables which will be injected in its container.
*
[
Install Go
](
https://golang.org/doc/install
)
and set the
[
`$GOPATH` variable
](
https://github.com/golang/go/wiki/SettingGOPATH
)
.
## Setup Workspace
*
create directory:
```
mkdir -p $GOPATH/src/code.vereign.com/gaiax/tsa/
```
*
move in the previously created directory:
```
cd $GOPATH/src/code.vereign.com/gaiax/tsa/
```
*
clone the repository:
```
git clone git@code.vereign.com:gaiax/tsa/workspace.git
```
*
run the setup.sh script:
```
./setup.sh
```
*
set the services you would like to use in the docker-compose.yml file, defaults is
**infohub**
*
run docker compose:
```
docker-compose up
```
## Setup
Clone the workspace repository into
`$GOPATH/src/code.vereign.com/gaiax/tsa/workspace`
. Using GOPATH is important
because it's the way the workspace will know where to find you Go source code.
```
sh
# create the backend directory where the workspace will be checked out
mkdir
-p
$GOPATH
/src/code.vereign.com/gaiax/tsa/workspace
# change to the created directory
cd
$GOPATH
/src/code.vereign.com/gaiax/tsa/workspace
# clone the workspace repo
git clone git@code.vereign.com:gaiax/tsa/workspace.git .
```
### Checkout services repos
This step is optional because you may already have the repos checked out
or you may want to do this step manually. But the workspace provides you
with a
`setup.sh`
script which will go and checkout the TSA backend
services at their correct locations, ready for use with
`docker-compose`
.
```
shell
./setup.sh
```
> Note: If you have already checked out a repository, and it's not on the main branch or
> is not in a clean state, the script will give you a warning and won't override the
> state of your repo. You will have to checkout/update it manually.
### Usage
Now you're ready to start using the workspace environment.
```
shell
# start all services
docker-compose up
-d
# see the state of the containers and their exposed ports
docker-compose ps
# follow the logs of all services in the workspace
docker-compose logs
-f
# follow the logs of specified services only
docker-compose logs
-f
gateway infohub
# restart a service
docker-compose restart gateway
# restart a service and reload its environment variables
docker-compose up
-d
gateway
# rebuild the docker image of a service
docker-compose build gateway
```
## 3rd Party Services
### DID Resolver
service
###
#
DID Resolver
The DID Resolver service can be reached at
`localhost:9090`
from your
local machine.
The DID Resolver service can be reached at
`localhost:9090`
from your local machine.
Example usage:
```
curl -X GET http://localhost:9090/1.0/identifiers/did:indy:idunion:BDrEcHc8Tb4Lb2VyQZWEDE
curl -X GET http://localhost:9090/1.0/identifiers/did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6
curl -X GET http://localhost:9090/1.0/identifiers/did:schema:public-ipfs:json-schema:Qma2beXKwZeiUXcaRaQKwbBV1TqyiJnsMTYExUTdQue43J
curl -X GET http://localhost:9090/1.0/identifiers/did:web:did.actor:alice
curl -X GET http://localhost:9090/1.0/identifiers/did:sov:WRfXPg8dantKVubE3HX8pw
```
In order to support more DID methods refer to currently supported ones here:
```
...
...
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
16
−
33
View file @
48c39113
version
:
'
3.4'
services
:
infohub
:
container_name
:
infohub
policy
:
container_name
:
policy
build
:
context
:
$GOPATH/src/code.vereign.com/gaiax/tsa/
infohub
context
:
$GOPATH/src/code.vereign.com/gaiax/tsa/
policy
dockerfile
:
deployment/compose/Dockerfile
volumes
:
-
"
$GOPATH/src/code.vereign.com/gaiax/tsa/
infohub
:/go/src/code.vereign.com/gaiax/tsa/
infohub
"
-
"
$GOPATH/src/code.vereign.com/gaiax/tsa/
policy
:/go/src/code.vereign.com/gaiax/tsa/
policy
"
env_file
:
./env/
infohub
.env
-
./env/
policy
.env
ports
:
-
"
808
0
:8080"
-
"
808
1
:8080"
redis
:
image
:
"
redis:alpine"
container_name
:
redis
ports
:
-
"
6379:6379"
uni-resolver-web
:
didresolver
:
image
:
universalresolver/uni-resolver-web:latest
ports
:
-
"
9090:8080"
uni-resolver-driver-did-uport
:
image
:
uport/uni-resolver-driver-did-uport:2.3.0
ports
:
-
"
9091:8081"
driver-did-sov
:
image
:
universalresolver/driver-did-sov:latest
env_file
:
./env/resolver.env
ports
:
-
"
9092:8080"
driver-did-key
:
didresolver-driver-did-key
:
image
:
universalresolver/driver-did-key:latest
ports
:
-
"
9093:8080"
schema-registry-did-resolver
:
image
:
51nodes/schema-registry-did-resolver:0.1.1
ports
:
-
"
9094:8080"
-
"
9091:8080"
indy-did-driver
:
image
:
ghcr.io/idunion/indy-did-resolver/indy-did-driver:latest
ports
:
-
"
9095:8080"
\ No newline at end of file
-
"
9092:8080"
redis
:
image
:
"
redis:alpine"
container_name
:
redis
ports
:
-
"
6379:6379"
This diff is collapsed.
Click to expand it.
env/
infohub
.env
→
env/
policy
.env
+
10
−
0
View file @
48c39113
HTTP_HOST=""
HTTP_PORT="8080"
HTTP_IDLE_TIMEOUT="
6
0s"
HTTP_IDLE_TIMEOUT="
12
0s"
HTTP_READ_TIMEOUT="10s"
HTTP_WRITE_TIMEOUT="10s"
HTTP_MAX_REQUEST_SIZE="1000000"
REDIS_HOST="redis"
\ No newline at end of file
REDIS_ADDR="redis:6379"
REDIS_USER=""
REDIS_PASS=""
REDIS_DB=1
REDIS_EXPIRATION="1h"
\ No newline at end of file
This diff is collapsed.
Click to expand it.
env/resolver.env
deleted
100644 → 0
+
0
−
4
View file @
ddbcb278
uniresolver_driver_did_sov_libIndyPath=
uniresolver_driver_did_sov_poolConfigs=_;./sovrin/_.txn;staging;./sovrin/staging.txn;builder;./sovrin/builder.txn;danube;./sovrin/danube.txn;idu;./sovrin/idu.txn;eesdi;./sovrin/eesdi.txn;indicio;./sovrin/indicio.txn;indicio:test;./sovrin/indicio-test.txn;indicio:demo;./sovrin/indicio-demo.txn;bbu;./sovrin/bbu.txn
uniresolver_driver_did_sov_poolVersions=_;2;staging;2;builder;2;danube;2;idu;2;eesdi;2;indicio;2;indicio:test;2;indicio:demo;2;bbu;2
uniresolver_driver_did_sov_walletName=default
This diff is collapsed.
Click to expand it.
setup.sh
+
6
−
5
View file @
48c39113
...
...
@@ -11,7 +11,7 @@
# export email="lyuben.penkovski@vereign.com"
# ------------
# pull the ma
ster
branch of a given git repository.
# pull the ma
in
branch of a given git repository.
# User will be prompted for manual action if another branch is checked out or a problem occurs.
# $1 - name of the repo to pull.
function
pull
()
{
...
...
@@ -20,9 +20,9 @@ function pull() {
pushd
"
${
repo
}
"
local
branch
=
`
git rev-parse
--abbrev-ref
HEAD
`
if
[
$branch
==
"ma
ster
"
]
;
then
echo
"Pulling
${
repo
}
/ma
ster
..."
git pull origin ma
ster
||
read
-p
"Could not pull
${
repo
}
/ma
ster
. Fix the issue and press ENTER to continue:"
if
[
$branch
==
"ma
in
"
]
;
then
echo
"Pulling
${
repo
}
/ma
in
..."
git pull origin ma
in
||
read
-p
"Could not pull
${
repo
}
/ma
in
. Fix the issue and press ENTER to continue:"
else
echo
"
${
repo
}
/
${
branch
}
is checked out"
read
-p
"Pull
${
repo
}
manually now or press ENTER to skip:"
...
...
@@ -38,7 +38,8 @@ function getServices() {
mkdir
-p
"
${
GAIAX_TSA_DIR
}
"
&&
cd
"
$_
"
local
services
=(
"infohub"
"policy"
"task"
)
for
repo
in
${
services
[@]
}
;
do
...
...
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