teuton-server 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d9853aa98d950aa4f90e783c40779982b7f63b3478289b9c1f70b9bf47d1170
4
- data.tar.gz: f8a893026600c7b750048bed1a6e9d06364a0975cbb91b9940477e53dd1d271d
3
+ metadata.gz: 2fd879eee2bf63ef26afa1016d1af68e5d33b3e557254c47be155559ce805198
4
+ data.tar.gz: 40066f255f49452b719411ed344f9952199a9599da78bfd6d5be7a21c42cab2a
5
5
  SHA512:
6
- metadata.gz: 733b1cfcf1d3dae9a3e8159069635030eeb08075546228c4e82ed0e0274fd793fefa0e719a5761143896e3f8c5edd0e7377be6c9c32229ea607e57c0bdb27430
7
- data.tar.gz: 4921d39dd197c385d9be7389eea473a8cfe817f965ab8334232e17003c2a48fab211f2592325a4b4bba0542d9b4c58c5fc64a0f48ec8a787d42b564708fa73fc
6
+ metadata.gz: a8b17ecfa70d9c2698370baf660ebbae01308ae8240ed71d76c9a32d4a2a048f1aec9161fd0e5018e706a3efbbe20e19e68ce72c5709440735dcacf4ebf0a49b
7
+ data.tar.gz: e897f556df76afd1226aad91ae513f8b19dd600da296fe6e0ced96c34769c4d8e0130c5489b10456977ca44ab3475b239a462215aed479cce180a706866e0045
data/README.md ADDED
@@ -0,0 +1,27 @@
1
+
2
+ # Teuton Server
3
+
4
+ [Teuton Software](https://github.com/teuton-software/teuton) is an infrastructure test application, that is installed into host called T-NODE. T-NODE user monitorize remote S-NODE users machines using [Teuton Software](https://github.com/teuton-software/teuton).
5
+
6
+ When a S-NODE user wants to be tested, must wait until T-NODE user launch manually Teuton test units.
7
+
8
+ But with TeutonServer, T-NODE host listen to evaluation requests from S-NODE hosts directly.
9
+
10
+ ## Installation
11
+
12
+ * Then `gem install teuton-server`, to install TeutonServer.
13
+
14
+ > Ensure [Teuton Software](https://github.com/teuton-software/teuton) is installed too.
15
+
16
+ ## Running
17
+
18
+ 1. `teuton-server init`, create Teuton Server configuration file on T-NODE host. Personalize `teuton-server.yaml` configurations (server IP, testunits names, clients IP, etc).
19
+ 1. `teuton-server` runs Teuton Server into T-NODE host.
20
+
21
+ > Now we can send requests to TeutonServer from S-NODE hosts, using [Teuton Client](https://github.com/dvarrui/teuton-client).
22
+
23
+ ## Documentation
24
+
25
+ * [Installation](docs/installation.md)
26
+ * [Start TeutonServer](docs/start.md)
27
+ * [Configuration file](docs/configfile.md)
@@ -0,0 +1,46 @@
1
+
2
+ # Config file
3
+
4
+ When TeutonServer starts need to read a configuration file.
5
+
6
+ ## Creating config file
7
+
8
+ * `teuton-server init`, create TeutonServer configuration file in current directory, called `teuton-server.yaml`
9
+
10
+ Let's see its content:
11
+
12
+ ```
13
+ ---
14
+ :server:
15
+ :ip: 127.0.0.1
16
+ :port: 16000
17
+ :testunits:
18
+ - testname01
19
+ :clients:
20
+ - :members: client01
21
+ :ip: 127.0.0.1
22
+ ```
23
+
24
+ * It's posible create this file by hand.
25
+
26
+ ## Config file params
27
+
28
+ | Section | Param | Description |
29
+ | ------- | --------- | ------------------------- |
30
+ | server | ip | Server listening IP |
31
+ | | port | Server listen on PORT+1, PORT+2, etc. |
32
+ | | testunits | List of Teuton test units names |
33
+ | clients | | List of clients: 1, 2, etc. |
34
+ | | members | Client name |
35
+ | | ip | CLient IP |
36
+
37
+ ## Param description
38
+
39
+ * **server/port**: Base port for services.
40
+ * `:port: 16000`, client 1 is asigned port 16001, client 2 is assigned 16002 port, and so on.
41
+ * **clients**: TeutonServer will attend only the specified clients.
42
+ * **clients/members**: Client name or names
43
+ * **client/ip**: Server only accepts client request from this IP.
44
+ * `:ip: :allow`, client request are allowed always.
45
+ * `:ip: :deny`, client request are denied always.
46
+ * `:ip: 192.168.1.200`, client request are only accepted from 192.168.1.200 IP.
@@ -0,0 +1,6 @@
1
+
2
+ ## Installation
3
+
4
+ * WARNING: Install [Teuton Software](https://github.com/teuton-software/teuton)
5
+ * `gem install teuton-server`, to install TeutonServer.
6
+ * `teuton-server version`, wil display TeutonServer version.
data/docs/start.md ADDED
@@ -0,0 +1,74 @@
1
+ [<<back](../README.md)
2
+
3
+ # Starting TeutonServer
4
+
5
+ Resume:
6
+
7
+ | Command | Configfile | Location |
8
+ | ------------- | ----------------- | ----------------------------- |
9
+ | teuton-server | teuton-sever.yaml | Config into current directory |
10
+ | teuton-server foo | teuton-server.yaml | Config into foo directory |
11
+ | teuton-server foo/config.yaml | config.yaml | Config into foo directory |
12
+ | teuton-server foo/config.yaml X.X.X.X | config.yaml | Config into foo directory and server liste IP=X.X.X.X |
13
+
14
+ ## Default config file
15
+
16
+ By default, TeutonServer use `teuton-server.yaml` config file.
17
+
18
+ * Command `teuton-server`
19
+ * Example:
20
+
21
+ ```
22
+ teuton-server => Starting...
23
+ Configfile : teuton-server.yaml
24
+ Listen on : 127.0.0.1:16000
25
+ Test list : testname01
26
+ (CTRL+C to exit)
27
+ teuton-server => service [1] listening on '16001'...
28
+ ```
29
+
30
+ When default config file is not into our current directory, we specify that folder.
31
+
32
+ * Command `teuton-server projects`
33
+ * Example:
34
+
35
+ ```
36
+ teuton-server => Starting...
37
+ Configfile : projects/teuton-server.yaml
38
+ Listen on : 127.0.0.1:16000
39
+ Test list : testname01
40
+ (CTRL+C to exit)
41
+ teuton-server => service [1] listening on '16001'..
42
+ ```
43
+
44
+ ## Select config file
45
+
46
+ Also, it's posible choose your own TeutonServer config file.
47
+
48
+ * Command `teuton-server PATH/TO/CONFIGFILE.yaml`
49
+ * Example:
50
+
51
+ ```
52
+ teuton-server => Starting...
53
+ Configfile : projects/server.yaml
54
+ Listen on : 127.0.0.1:16000
55
+ Test list : testname01
56
+ (CTRL+C to exit)
57
+ teuton-server => service [1] listening on '16001'...
58
+ ```
59
+
60
+ ## Change listen IP on fly
61
+
62
+ TeutonServer reads params from config file, but it's posible to overwrite listen IP server on fly.
63
+
64
+ * Command `teuton-server projects/server.yaml 192.168.1.16`
65
+ * Example:
66
+
67
+ ```
68
+ teuton-server => Starting...
69
+ Configfile : projects/server.yaml
70
+ Listen on : 192.168.1.16:16000
71
+ Test list : testname01
72
+ (CTRL+C to exit)
73
+ teuton-server => service [1] listening on '16001'...
74
+ ```
@@ -1,6 +1,6 @@
1
1
  module Application
2
2
  NAME = 'teuton-server'
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.3'
4
4
  CONFIGFILE = 'teuton-server.yaml'
5
5
  PORT = 16000
6
6
  end
@@ -25,6 +25,8 @@ class Service
25
25
  end
26
26
 
27
27
  def authorized_request?(client, param)
28
+ return true if param[:client][:ip] == :allow
29
+ return false if param[:client][:ip] == :deny
28
30
  return param[:client][:ip] == client.peeraddr[2]
29
31
  end
30
32
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teuton-server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Vargas Ruiz
@@ -43,9 +43,17 @@ email: teuton.software@protonmail.com
43
43
  executables:
44
44
  - teuton-server
45
45
  extensions: []
46
- extra_rdoc_files: []
46
+ extra_rdoc_files:
47
+ - README.md
48
+ - docs/configfile.md
49
+ - docs/installation.md
50
+ - docs/start.md
47
51
  files:
52
+ - README.md
48
53
  - bin/teuton-server
54
+ - docs/configfile.md
55
+ - docs/installation.md
56
+ - docs/start.md
49
57
  - lib/teuton-server.rb
50
58
  - lib/teuton-server/application.rb
51
59
  - lib/teuton-server/files/teuton-server.yaml
@@ -55,7 +63,8 @@ files:
55
63
  homepage: https://github.com/dvarrui/teuton-server
56
64
  licenses:
57
65
  - GPL-3.0
58
- metadata: {}
66
+ metadata:
67
+ yard.run: yri
59
68
  post_install_message:
60
69
  rdoc_options: []
61
70
  require_paths: