-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docs for building and running the CLI
- Loading branch information
Boris Burtin
committed
Jun 9, 2015
1 parent
db79b17
commit 4a8f7ae
Showing
2 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,5 +47,46 @@ <h2>Components</h2> | |
<li><p>{@link com.brkt.client.BrktService} contains high-level methods for | ||
interacting with the Bracket service.</p></li> | ||
</ul> | ||
|
||
<h2>Installing</h2> | ||
|
||
<p>To install the Java SDK, clone the git repo and run the Maven build. The | ||
build places the JAR and Javadoc in the <code>target</code> directory. <strong>Note that | ||
the git URL will change once we move the SDK to a public repo.</strong></p> | ||
|
||
<pre><code>~/test$ git clone [email protected]:boris/brkt-java-sdk.git | ||
Cloning into 'brkt-java-sdk'... | ||
remote: Counting objects: 917, done. | ||
remote: Compressing objects: 100% (428/428), done. | ||
remote: Total 917 (delta 532), reused 717 (delta 333) | ||
Receiving objects: 100% (917/917), 300.17 KiB | 0 bytes/s, done. | ||
Resolving deltas: 100% (532/532), done. | ||
Checking connectivity... done. | ||
|
||
~/test$ cd brkt-java-sdk/ | ||
|
||
~/test/brkt-java-sdk (master)$ mvn install | ||
... | ||
[INFO] Building brkt-java-sdk 1.0-SNAPSHOT | ||
... | ||
[INFO] BUILD SUCCESS | ||
[INFO] ------------------------------------------------------------------------ | ||
[INFO] Total time: 7.048 s | ||
[INFO] Finished at: 2015-06-09T11:33:58-07:00 | ||
[INFO] Final Memory: 17M/81M | ||
[INFO] ------------------------------------------------------------------------ | ||
</code></pre> | ||
|
||
<h2>Command line interface</h2> | ||
|
||
<p>The Bracket Java SDK JAR file is executable. This allows you | ||
to exercise the code in {@link com.brkt.client.BrktService} from the command | ||
line. You can find the CLI code in {@link com.brkt.client.util.Main}.</p> | ||
|
||
<pre><code>~/test/brkt-java-sdk (master)$ java -jar ./target/brkt-java-sdk-1.0-SNAPSHOT.jar --token 60435a8b84104e25bbe13ad7b63f8695 --key 6e08558938f346038c61716ccb98dacf --root-uri http://10.95.0.10 getAllWorkloads | ||
Workload{id=828196b0675f4ef78f858a51321040a9, name=NUC-7407b, requestedState=AVAILABLE} | ||
Workload{id=9d1bbef921b5486a9bf991b4460131b5, name=NUC-7407c, requestedState=AVAILABLE} | ||
Workload{id=442c8ad633994ee28fbf998a175cf5b9, name=NUC-7461a, requestedState=AVAILABLE} | ||
</code></pre> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,44 @@ deserialize the server response to a plain Java object. | |
|
||
* {@link com.brkt.client.BrktService} contains high-level methods for | ||
interacting with the Bracket service. | ||
|
||
Installing | ||
---------- | ||
|
||
To install the Java SDK, clone the git repo and run the Maven build. The | ||
build places the JAR and Javadoc in the `target` directory. **Note that | ||
the git URL will change once we move the SDK to a public repo.** | ||
|
||
~/test$ git clone [email protected]:boris/brkt-java-sdk.git | ||
Cloning into 'brkt-java-sdk'... | ||
remote: Counting objects: 917, done. | ||
remote: Compressing objects: 100% (428/428), done. | ||
remote: Total 917 (delta 532), reused 717 (delta 333) | ||
Receiving objects: 100% (917/917), 300.17 KiB | 0 bytes/s, done. | ||
Resolving deltas: 100% (532/532), done. | ||
Checking connectivity... done. | ||
|
||
~/test$ cd brkt-java-sdk/ | ||
|
||
~/test/brkt-java-sdk (master)$ mvn install | ||
... | ||
[INFO] Building brkt-java-sdk 1.0-SNAPSHOT | ||
... | ||
[INFO] BUILD SUCCESS | ||
[INFO] ------------------------------------------------------------------------ | ||
[INFO] Total time: 7.048 s | ||
[INFO] Finished at: 2015-06-09T11:33:58-07:00 | ||
[INFO] Final Memory: 17M/81M | ||
[INFO] ------------------------------------------------------------------------ | ||
|
||
Command line interface | ||
---------------------- | ||
|
||
The Bracket Java SDK JAR file is executable. This allows you | ||
to exercise the code in {@link com.brkt.client.BrktService} from the command | ||
line. You can find the CLI code in {@link com.brkt.client.util.Main}. | ||
|
||
~/test/brkt-java-sdk (master)$ java -jar ./target/brkt-java-sdk-1.0-SNAPSHOT.jar --token 60435a8b84104e25bbe13ad7b63f8695 --key 6e08558938f346038c61716ccb98dacf --root-uri http://10.95.0.10 getAllWorkloads | ||
Workload{id=828196b0675f4ef78f858a51321040a9, name=NUC-7407b, requestedState=AVAILABLE} | ||
Workload{id=9d1bbef921b5486a9bf991b4460131b5, name=NUC-7407c, requestedState=AVAILABLE} | ||
Workload{id=442c8ad633994ee28fbf998a175cf5b9, name=NUC-7461a, requestedState=AVAILABLE} |