updated README.md
This commit is contained in:
parent
8982353f0a
commit
75c3dcda61
2 changed files with 26 additions and 12 deletions
30
README.md
30
README.md
|
|
@ -3,21 +3,33 @@ Remote Procedure Calls over the protobuf API
|
||||||
|
|
||||||
# Requirements
|
# Requirements
|
||||||
- openssl
|
- openssl
|
||||||
|
- tar
|
||||||
|
|
||||||
# Building
|
# Building
|
||||||
Gradle will manage dependencies, generate code, compile the java, and package the code.
|
Gradle will manage dependencies, generate code, compile the java, and package the code.
|
||||||
Simply run the folllowing command:
|
Simply run the folllowing command:
|
||||||
```shell
|
```shell
|
||||||
$ gradle clean build
|
$ ./buildwrapper.sh
|
||||||
```
|
```
|
||||||
Gradle will package both the client and server into both a zip and a tarball.
|
buildwrapper will ask you for details about the client and server, if you are testing this software both CNs can be set to localhost.
|
||||||
The tarball is located in build/distributions. After extracting one of the archives on a target machine the following commands will run JobServ.
|
buildwrapper will then generate CAs for the Client and Server, and signed certs for the Client and Server. IN addition a seperate, third CA and cert will be generated for testing purposes.
|
||||||
Make sure you are in the directory you extracted the archive to.
|
Gradle will then generate protobuf source and compile it with the source for the client and server.
|
||||||
```shell
|
After gradle is completed buildwrapper will organize the sources with their respective certs in the staging folder. In addition to a server folder and a client folder, there will be a test folder which has a copy of all certs and both server and client functionality. The test CA is not trusted by the server or the client by default. As such, the test cert can be used to induce a mutual tls authentication failure.
|
||||||
$ ./bin/jobserv-server
|
|
||||||
$ ./bin/jobserv-client (host) (port)
|
# Running
|
||||||
|
After build, the programs can be found in the staging folder.
|
||||||
|
After changing directory to the 'staging/client' folder or the 'staging/server' folder, either program can be run as follows:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ ./JobServ/bin/jobserv-server (port) server.crt private.pem ca.crt
|
||||||
|
$ ./JobServ/bin/jobserv-client private.pem client.crt ca.crt (hostname) (port) (command) (arguments)
|
||||||
|
```
|
||||||
|
alternatively, for guidance:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ ./JobServ/bin/jobserv-server
|
||||||
|
$ ./JobServ/bin/jobserv-client help
|
||||||
```
|
```
|
||||||
(TODO: seperate archives for client and server)
|
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
(TODO: tests for mtls, job control module)
|
(TODO: job control module)
|
||||||
|
|
|
||||||
|
|
@ -211,14 +211,12 @@ public class JobServClient {
|
||||||
* Parses arguments and calls the correct function
|
* Parses arguments and calls the correct function
|
||||||
*/
|
*/
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
if (args.length == 1 && args[0] == "help"){
|
|
||||||
outputHelp();
|
|
||||||
}
|
|
||||||
|
|
||||||
// check args
|
// check args
|
||||||
if (args.length < 7) {
|
if (args.length < 7) {
|
||||||
System.out.println("Usage: $ ./jobserv-client privatekey, cert, truststore, host, port, command, args");
|
System.out.println("Usage: $ ./jobserv-client privatekey, cert, truststore, host, port, command, args");
|
||||||
System.out.println("Or try $ ./jobserv-client help");
|
System.out.println("Or try $ ./jobserv-client help");
|
||||||
|
outputHelp();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -342,6 +340,10 @@ public class JobServClient {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* outputHelp()
|
||||||
|
* writes help information about all commands in the shell to screen
|
||||||
|
*/
|
||||||
public static void outputHelp() {
|
public static void outputHelp() {
|
||||||
System.out.println("... new (command)");
|
System.out.println("... new (command)");
|
||||||
System.out.println("Starts a new process on the server");
|
System.out.println("Starts a new process on the server");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue