diff --git a/README.md b/README.md index a8b7be4..8b99316 100644 --- a/README.md +++ b/README.md @@ -24,55 +24,48 @@ Additionally, it is possible to define a custom processor if needed. ### Prerequisites * A **Java Virtual machine** (JVM) is required. -* Download the latest `provs.jar` from: https://gitlab.com/domaindrivenarchitecture/provs/-/releases -* For server functionality (such as install k3s) download the latest `provs-server.jar` from: https://gitlab.com/domaindrivenarchitecture/provs/-/releases +* Install `jarwrapper` (e.g. `sudo apt install jarwrapper`) +* Download the latest `provs-desktop.jar` from: https://gitlab.com/domaindrivenarchitecture/provs/-/releases +* Make the jar-file executable by `chmod +x provs-desktop.jar` +* For server functionality (e.g. k3s) download the latest `provs-server.jar` from: https://gitlab.com/domaindrivenarchitecture/provs/-/releases +### Usage format -### Show usage options +`provs-desktop.jar []` +**type** can be: +* basic - install some basic packages) +* office - install office software (LibreOffice), E-Mail (Thunderbird), etc +* ide - same as office with additionally ide-software (VSCode, IntelliJ, etc) -`java -jar provs.jar -h` +**target** can be: +* `local` +* `user123:mypassword@myhost.com` - general format is: - + * if password is omitted, then ssh-keys will be used for authentication + * if password is omitted but option `-p` is provided the password will be prompted interactively -### Provision a desktop workplace locally +**options** +* `-p` for interactive password question -Ensure a config file is in place (default config file name is "WorkplaceConfig.yaml") with at least the workplace type specified, e.g. -```type: MINIMAL``` -Possible types are currently: MINIMAL, OFFICE or IDE. +#### Show usage options -Run: +`provs-desktop.jar -h` -`java -jar provs.jar -l` +### Examples -### Provision a desktop workplace remotely +#### Provision a basic desktop workplace locally -`java -jar provs.jar -i -r -u ` +`provs-desktop.jar basic local` -You'll be prompted for the password of the remote user. +#### Provision an office desktop workplace remotely + +`provs-desktop.jar office myuser@myhost.com -p` + +You'll be prompted for the password of the remote user due to option `-p`. ### Provision k3s ```bash -java -jar provs-server.jar -i -r -u -# Example: -java -jar provs-server.jar -i -r 192.168.56.141 -u testuser +provs-server.jar k3s myuser@myhost.com ``` - -You'll be prompted for the password of the remote user. - - -## For developers - -### Build the jar-file yourself - -* Clone this repo -* Build the fatjar file by `./gradlew fatJarLatest` -* In folder build/libs you'll find the file `provs.jar` - -The fatjar is a Java jar-file incl. all required dependencies. - -### Sequence diagram - -Find below an example of a sequence diagram when provisioning a workplace: - -![img.png](doc/resources/provision-workplace-sequence.diagram.png) \ No newline at end of file diff --git a/src/test/resources/TestWorkplaceConfig.yaml b/src/test/resources/TestWorkplaceConfig.yaml index c113c30..454aad4 100644 --- a/src/test/resources/TestWorkplaceConfig.yaml +++ b/src/test/resources/TestWorkplaceConfig.yaml @@ -1,6 +1,3 @@ -# type is required -type: OFFICE # IDE, OFFICE or MINIMAL - # fields below are optional, either remove them or update them with your data ssh: sourceType: FILE # FILE or GOPASS diff --git a/src/test/resources/WorkplaceConfigExample.json b/src/test/resources/WorkplaceConfigExample.json index 5ea87e4..1ac697b 100644 --- a/src/test/resources/WorkplaceConfigExample.json +++ b/src/test/resources/WorkplaceConfigExample.json @@ -1,5 +1,4 @@ { - "type": "MINIMAL", "ssh": null, "gpg": null, "gitUserName": "mygitusername",