You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This endpoints returns a new token and refresh token with the provide refresh token. It ensures that the user do not need to login frequently if the token got expired, system can generate new token with the refresh token. Refresh token will be valid for more time then normal token.
89
+
operationId: refreshToken
90
+
parameters:
91
+
- in: header
92
+
name: Authorization
93
+
description: Valid JWT refresh token.
94
+
type: string
95
+
required: true
96
+
responses:
97
+
'200':
98
+
description: 'Supplied data is valid, a Token object is returned'
99
+
schema:
100
+
$ref: '#/definitions/Token'
101
+
'401':
102
+
description: 'The supplied authentication is invalid'
84
103
/users/add:
85
104
post:
86
105
tags:
@@ -217,7 +236,7 @@ paths:
217
236
summary: Get all instances of the specified type
218
237
description: >-
219
238
This command retrieves a list of all instances that are registered at
220
-
the registry and that have the specified type. If no type is specified,
239
+
the registry and that have the specified type. If no type is specified,
221
240
all instances are being returned.
222
241
operationId: instanceOfType
223
242
parameters:
@@ -423,6 +442,21 @@ paths:
423
442
required: true
424
443
type: integer
425
444
format: int64
445
+
- name: StartPage
446
+
in: query
447
+
description: Page number
448
+
type: integer
449
+
format: int64
450
+
- name: PageItems
451
+
in: query
452
+
description: Number of items in a page
453
+
type: integer
454
+
format: int64
455
+
- name: LimitItems
456
+
in: query
457
+
description: Number of item need to provide
458
+
type: integer
459
+
format: int64
426
460
responses:
427
461
'200':
428
462
description: List of events for the specified instance
@@ -530,6 +564,37 @@ paths:
530
564
description: 'Bad request, your label exceeded the character limit'
531
565
'404':
532
566
description: 'Not found, the id you specified could not be found'
567
+
568
+
'/instances/{Id}/label/{Label}/delete':
569
+
post:
570
+
tags:
571
+
- Basic Operations
572
+
consumes:
573
+
- application/json
574
+
summary: Removes a label from the instance with the specified id
575
+
description: >-
576
+
This command will remove the specified label from the instance with the
577
+
specified id.
578
+
operationId: removeLabel
579
+
parameters:
580
+
- name: Id
581
+
in: path
582
+
description: Id of the instance
583
+
required: true
584
+
type: integer
585
+
format: int64
586
+
- name: Label
587
+
in: path
588
+
description: Label that need to be deleted
589
+
required: true
590
+
type: string
591
+
responses:
592
+
'200':
593
+
description: Label successfully deleted
594
+
'400':
595
+
description: 'Bad request, your label exceeded the character limit'
596
+
'404':
597
+
description: 'Not found, the id you specified could not be found'
533
598
'/instances/{Id}/logs':
534
599
get:
535
600
tags:
@@ -676,7 +741,7 @@ paths:
676
741
This command informs the registry about an instance that was stopped
677
742
manually, meaning not via calling /stop on the instance registry. This
678
743
is only applicable to instances running inside a docker container, as
679
-
non-container instances would deregister themselves when stopped.
744
+
non-container instances would deregister themselves when stopped.
680
745
operationId: reportStop
681
746
parameters:
682
747
- name: Id
@@ -875,7 +940,7 @@ paths:
875
940
description: >-
876
941
This command assignes a new dependency to the instance with the
877
942
specified id. Internally, this will stop the instance, assign the new
878
-
dependency and start the instance again. This is why this is only
943
+
dependency and start the instance again. This is why this is only
*[Run the registry directly](#run-the-registry-directly)
35
+
*[Run the registry in Docker](#run-the-registry-in-docker)
36
+
*[Authorization](#authorization)
37
+
38
+
# Quick Setup (Linux)
39
+
22
40
Potentially there two different machines involved in the registry setup, the Docker host machine (*Docker Host*) and the machine the registry is hosted at (*Registry Host*). However, you can also use the same machine for hosting both applications.
23
41
42
+
## Docker Host Setup
24
43
On the *Docker Host*, execute the following steps:
25
44
26
45
1) Clone this repository to your machine
@@ -32,7 +51,7 @@ On the *Docker Host*, execute the following steps:
32
51
* Save your changes and execute ```systemctl daemon-reload``` and ```sudo service docker restart```
33
52
5) Note down the IP address of your machine in the LAN ( execute ```ifconfig``` )
34
53
35
-
54
+
## Registry Host Setup
36
55
On the *Registry Host*, execute the following steps:
37
56
38
57
1) Clone this repository to your local machine
@@ -54,22 +73,22 @@ The Delphi registry requires a docker host to deploy containers. The following i
54
73
* The Delphi Crawler ( ```delphi-crawler:1.0.0-SNAPSHOT``` )
55
74
* The Delphi WebApi ( ```delphi-webapi:1.0.0-SNAPSHOT``` )
56
75
* The Delphi WebApp ( ```delphi-webapp:1.0.0-SNAPSHOT``` )
57
-
76
+
### Windows
58
77
For Windows users, to obtain these images, checkout the respective repositories ([here](https://github.com/delphi-hub/delphi-crawler), [here](https://github.com/delphi-hub/delphi-webapi) and [here](https://github.com/delphi-hub/delphi-webapp)) and execute the command
59
78
60
79
```
61
80
sbt docker:publishLocal
62
81
```
63
82
inside their root directory. This will build the docker images and register them directly at the local docker registry. <br />
64
-
83
+
### Linux
65
84
For Linux users, checkout Delphi Registry repository and execute the command
66
85
67
86
```
68
87
sudo bash ./Delphi_install.sh
69
88
```
70
89
inside the ```/Setup``` directory. This installation script will create the required repositories, build the docker images, and register them directly at the local docker registry.
71
90
The registry requires an initial instance of ElasticSearch to be running.
72
-
91
+
### Configuration of Traefik
73
92
To allow access to Delphi components deployed via Docker, the registry supports the reverse-proxy [Traefik](https://traefik.io/). While it is running, it will automatically detected containers deployed by the registry, and provide access to them using the host specified in each instances' ```Host``` attribute.
74
93
Windows users can install Traefik (using Docker) based on [this tutorial](https://docs.traefik.io/#the-traefik-quickstart-using-docker). For Linux users, Traefik will be installed and started by the installation script mentioned above.
75
94
@@ -127,7 +146,7 @@ Before you can start the application, you have to make sure your configuration f
127
146
## Docker configuration
128
147
By default, Docker is expected to be reachable at ```http://localhost:9095``` (see configuration attribute ```defaultDockerUri``` above), but you can override this setting by specifying the docker host URI in the environment variable *DELPHI_DOCKER_HOST*. You can also change the port that your Docker HTTP service is hosted on by executing the steps below on the Docker host machine.
129
148
130
-
### Linux
149
+
### Docker configuration for Linux
131
150
To change the port to 9095, go to the docker service file:
132
151
133
152
```
@@ -147,14 +166,14 @@ systemctl daemon-reload
147
166
sudo service docker restart
148
167
```
149
168
150
-
### OSX
169
+
### Docker configuration for OSX
151
170
Docker does not expose it's HTTP api on OSX for security reasons (as described [here](https://github.com/docker/for-mac/issues/770#issuecomment-252560286)), but you can run a docker container to redirect the API calls. To accept calls on your local machine's port 9095, execute:
152
171
153
172
```
154
173
docker run -d -v /var/run/docker.sock:/var/run/docker.sock -p 127.0.0.1:9095:1234 bobrik/socat TCP-LISTEN:1234,fork UNIX-CONNECT:/var/run/docker.sock
155
174
```
156
175
157
-
## Run the application
176
+
## Running Registry application
158
177
There are two ways of running the registry application. You can either run the application directly, or build a docker image defined by the *build.sbt* file, and run a container based on this image. Either way, you have to set the correct configuration values before starting the application (see section **Adapt the configuration file** above for more information). Make sure the Docker images of all Delphi components are present at the host's registry, as described in the **Requirements** section.
159
178
160
179
**Note:** For OSX you have to set Java's ```prefereIPv4Stack``` option to ```true``` before executing any of the steps below. In order to do so, execute ```export _JAVA_OPTIONS="-Djava.net.preferIPv4Stack=true"``` in the terminal before calling ```sbt```.
0 commit comments