https://github.com/inversoft/barista
Java 8 Chef Client
https://github.com/inversoft/barista
chef chef-client chef-java-client java java-client java8
Last synced: about 2 months ago
JSON representation
Java 8 Chef Client
- Host: GitHub
- URL: https://github.com/inversoft/barista
- Owner: inversoft
- License: apache-2.0
- Created: 2016-10-11T16:36:56.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2025-04-02T20:43:11.000Z (11 months ago)
- Last Synced: 2025-07-09T08:12:04.398Z (8 months ago)
- Topics: chef, chef-client, chef-java-client, java, java-client, java8
- Language: Java
- Homepage: https://www.chef.io/chef/
- Size: 55.7 KB
- Stars: 2
- Watchers: 13
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Barista - Chef Java Client 
Java 8 [Chef](https://www.chef.io/chef/) Java Client written using [Restify](https://github.com/inversoft/restify) REST Client
I've only added methods that I'm using, open an issue if you'd like a method added, or feel free to submit a pull request, the pattern should be very easy to follow.
### Code Examples
```java
// Construct a new Chef Client
ChefClient client = new ChefClient(
"vandelay", // userId used in header X-Ops-UserId
"https://chef.acme.com", // Server URL
"vandelayIndustries", // Organization Name
"/usr/local/acme/vandelay.pem"); // Path to PEM file
// Delete a Node by Name
ClientResponse response = client.deleteNode("node-name");
// Delete a Client by Name
ClientResponse response = client.deleteClient("client-name");
// Retrieve All Nodes
ClientResponse response = client.retrieveNodes();
// Retrieve a Node by Name, print the node name if successful, else print the status code.
ClientResponse response = client.retrieveNode("fooBar");
if (response.wasSuccessful()) {
System.out.println(response.successResponse.name); // --> fooBar
} else {
System.out.println("Request failed. Status code : [" + response.status + "]");
}
```
### Download from Maven
```xml
com.inversoft
barista
1.0.0
```
### Building in Maven
```bash
$ mvn install
```
### Building in Savant
**Note:** This project uses the Savant build tool. To compile using using Savant, follow these instructions:
```bash
$ mkdir ~/savant
$ cd ~/savant
$ wget http://savant.inversoft.org/org/savantbuild/savant-core/1.0.0/savant-1.0.0.tar.gz
$ tar xvfz savant-1.0.0.tar.gz
$ ln -s ./savant-1.0.0 current
$ export PATH=$PATH:~/savant/current/bin/
```
Then, perform an integration build of the project by running:
```bash
$ sb int
```
### Downloading from Savant
Released versions can be downloaded from the Savant Repository.
* http://savant.inversoft.org/com/inversoft/barista/
For more information, checkout [savantbuild.org](http://savantbuild.org/).