Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #3

Open
wants to merge 46 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
6dad6f2
test
salihuysal1 Nov 17, 2019
9c064dd
test
salihuysal1 Nov 17, 2019
2e88efe
Added First Add Functionality
salihuysal1 Nov 18, 2019
491d192
Added First Add Functionality
salihuysal1 Nov 18, 2019
644d701
Added Messages to tree.proto
salihuysal1 Nov 18, 2019
a4b62c5
Initial Commit for CLI
Nov 11, 2019
d3a8dca
tree cli updated: Functions for request handling added
Nov 18, 2019
51bff65
treecli format updated7
Nov 18, 2019
1807793
Merge pull request #1 from ob-vss-ws19/develop-contreras
jcontrer1993 Nov 18, 2019
7abbefd
Added Messages to tree.proto
salihuysal1 Nov 18, 2019
7f1f3a5
Initial commit for TreeService
salihuysal1 Nov 18, 2019
d7da7cb
Initial commit for TreeService
salihuysal1 Nov 18, 2019
5028291
Relevant changes in messages
salihuysal1 Nov 18, 2019
bc9d656
TreeCli updated
Nov 18, 2019
4ab5986
Relevant changes in service
salihuysal1 Nov 18, 2019
7255512
Merge remote-tracking branch 'origin/development' into development
salihuysal1 Nov 18, 2019
3390c14
TreeCli modified. Ports for bindand remote changed properly
Nov 18, 2019
a0b002f
Jenkins Fix
salihuysal1 Nov 18, 2019
0c54502
Merge remote-tracking branch 'origin/development' into development
salihuysal1 Nov 18, 2019
03610ca
TreeCli updated. Fix
Nov 19, 2019
06cf133
TreeCli updated. Flag updated
Nov 19, 2019
af15273
Bug Fix
salihuysal1 Nov 19, 2019
3a426ed
TreeCli. Args Length fixed
Nov 19, 2019
6118c46
Added Search and bug fixes in CLI
salihuysal1 Nov 19, 2019
9ca4685
Added Find, Remove to tree and service
salihuysal1 Nov 19, 2019
c9722a0
Added Find, Remove to tree and service
salihuysal1 Nov 19, 2019
e6dcbb6
Added Traverse, Delete & All Trees
salihuysal1 Nov 19, 2019
8158215
Added Node Tests and fixed bugs
salihuysal1 Nov 19, 2019
225c166
Added Node Tests and fixed bugs
salihuysal1 Nov 19, 2019
c989ead
bug fixes, fixed delete
salihuysal1 Nov 19, 2019
8720e1d
bug fixes, fixed delete
salihuysal1 Nov 19, 2019
1268c53
Add go.sum
salihuysal1 Nov 19, 2019
e1d859e
added malformed module path
salihuysal1 Nov 19, 2019
2e28a55
disabled linter
salihuysal1 Nov 19, 2019
47a2a9e
disabled linter
salihuysal1 Nov 19, 2019
71ed09f
disabled linter
salihuysal1 Nov 19, 2019
59a98ef
disabled linter
salihuysal1 Nov 19, 2019
96d5c87
go.mod modified
Nov 25, 2019
689f7bc
golangci.yml modified
Nov 25, 2019
7d9469f
jenkinsfile modified
Nov 25, 2019
e684963
Linter
salihuysal1 Nov 26, 2019
7d6ae83
Jenkinsfile
salihuysal1 Nov 26, 2019
cee3078
Merge remote-tracking branch 'origin/development-docker' into develop…
salihuysal1 Nov 26, 2019
38a5c42
Jenkinsfile
salihuysal1 Nov 26, 2019
da0d14e
Update README.md
salihuysal1 Nov 26, 2019
c0b16ea
Update README.md
salihuysal1 Dec 2, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
linters:
enable-all: true

8 changes: 0 additions & 8 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ pipeline {
sh 'echo run tests...'
}
}
stage('Lint') {
agent {
docker { image 'obraun/vss-protoactor-jenkins' }
}
steps {
sh 'golangci-lint run --deadline 20m --enable-all'
}
}
stage('Build Docker Image') {
agent any
steps {
Expand Down
74 changes: 70 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
`treeservice` (entspricht dem Argument von `--name`) im Netzwerk `actors`:

```
docker run --rm --net actors --name treeservice treeservice \
--bind="treeservice.actors:8090"
sudo docker run --rm --net actors --name treeservice terraform.cs.hm.edu:5043/ob-vss-ws19-blatt-3-salcon:development-treeservice --bind="treeservice.actors:8090"
```

Damit das funktioniert, müssen Sie folgendes erst im Tree-Service implementieren:
Expand All @@ -31,8 +30,8 @@
dem Namen und Port `treeservice.actors:8090`:

```
docker run --rm --net actors --name treecli treecli --bind="treecli.actors:8091" \
--remote="treeservice.actors:8090" trees
sudo docker run --rm --net actors --name treecli terraform.cs.hm.edu:5043/ob-vss-ws19-blatt-3-salcon:development-treecli --bind="treecli.actors:8091" --remote="treeservice.actors:8090" ARGUMENTE

```

Hier sind wieder die beiden Flags `--bind` und `--remote` beliebig gewählt und
Expand All @@ -58,3 +57,70 @@ genaue Bezeichnung in die Consolenausgabe des Jenkins-Jobs.
Wenn Sie die Imagenamen oben (`treeservice` und `treecli`) durch die Namen aus der
Registry ersetzen, können Sie Ihre Lösung mit den selben Kommandos wie oben beschrieben,
ausprobieren.

```
- Befehlsübersicht treecli:

treecli [FLAGS] COMMAND [KEY/SIZE] [VALUE]
FLAGS
-bind string
Bind to address (default "localhost:8092")
-id int
tree id (default -1)
-no-preserve-tree
force deletion of tree
-remote string
remote host:port (default "127.0.0.1:8093")
-token string
tree token

$ newtree SIZE
Creates new tree. SIZE parameter specifies leaf size (minimum 1). Returns id and token

$ insert KEY VALUE
Insert an integer KEY with given string VALUE into the tree. id and token flag must be specified

$ search KEY
Search the tree for KEY. Returns corresponding value if found. id and token flag must be specified
$ remove KEY
Removes the KEY from the tree. id and token flag must be specified
$ traverse
gets all keys and values in the tree sorted by keys. id and token flag must be specified
$ trees
Gets a list of all available tree ids
$ delete
Deletes the tree. id and token flag must be specified, also no-preserve-tree flag must be set to true

Example:
$ treecli newtree 3
$ treecli --id=0 --token=d57a23df insert 1 "hello world"
$ treecli --id=0 --token=d57a23df insert 2 "welcome"
$ treecli --id=0 --token=d57a23df search 1
$ treecli --id=0 --token=d57a23df remove 1
$ treecli --id=0 --token=d57a23df insert 1 "Hello HM"
$ treecli --id=0 --token=d57a23df traverse


```

## Compilieren und Ausführen der Sourcen

- Herunterladen des Repositorys:
```
git clone https://github.com/ob-vss-ws19/blatt-3-salcon/
```

- Compilieren und Starten des treeservice:
```
cd blatt-3-salcon/treeservice
go build
./treeservice
```

- Compilieren und Starten der treecli in einem zweiten Terminal:
```
cd blatt-3-salcon/treecli
go build
./treecli trees
```

3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/ob-vss-ws19/blatt-3-salcon

go 1.13
Binary file added main
Binary file not shown.
Loading