Rancher Java SDK

SDK for interacting with Rancher Server using Java

License

License

Categories

Categories

Java Languages
GroupId

GroupId

br.com.basis
ArtifactId

ArtifactId

rancher-java-sdk
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

Rancher Java SDK
SDK for interacting with Rancher Server using Java
Project URL

Project URL

https://github.com/BasisTI/rancher-java-sdk/
Project Organization

Project Organization

Basis Tecnologia da Informação S.A.
Source Code Management

Source Code Management

https://github.com/BasisTI/rancher-java-sdk/tree/master

Download rancher-java-sdk

How to add to project

<!-- https://jarcasting.com/artifacts/br.com.basis/rancher-java-sdk/ -->
<dependency>
    <groupId>br.com.basis</groupId>
    <artifactId>rancher-java-sdk</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/br.com.basis/rancher-java-sdk/
implementation 'br.com.basis:rancher-java-sdk:1.0.0'
// https://jarcasting.com/artifacts/br.com.basis/rancher-java-sdk/
implementation ("br.com.basis:rancher-java-sdk:1.0.0")
'br.com.basis:rancher-java-sdk:jar:1.0.0'
<dependency org="br.com.basis" name="rancher-java-sdk" rev="1.0.0">
  <artifact name="rancher-java-sdk" type="jar" />
</dependency>
@Grapes(
@Grab(group='br.com.basis', module='rancher-java-sdk', version='1.0.0')
)
libraryDependencies += "br.com.basis" % "rancher-java-sdk" % "1.0.0"
[br.com.basis/rancher-java-sdk "1.0.0"]

Dependencies

compile (2)

Group / Artifact Type Version
com.squareup.retrofit2 : retrofit jar 2.3.0
com.squareup.retrofit2 : converter-jackson jar 2.3.0

Project Modules

There are no modules declared in this project.

SDK for interacting with Rancher Server using Java

This project is a autogenerated Java Client for Rancher

This project automatically generates the type definitions using a Go template generator and the Rancher provided API schema. It was originally derived from the Go-Rancher library.

There services definitions are built using Square's Retrofit2 library.

Rancher API version: v2-beta

Please see: https://github.com/objectpartners/rancher-java-sdk

Maven Dependency

<dependency>
  <groupId>br.com.basis</groupId>
  <artifactId>rancher-java-sdk</artifactId>
  <version>VERSION</version>
</dependency>

Example

That entry point for this library is the io.rancher.Rancher class. You must first create an API key in your Rancher installation for this library to use.

First, initialize your Rancher client:

Rancher.Config config = new Rancher.Config(new URL("https://rancher.mydomain.com"), "MyAPIAccessKey", "MyAPISecretKey");
Rancher rancher = new Rancher(config);

Once the client is created, you can interact with Rancher by having the client generate a proxy for one of the service interfaces for you.

StackService stackService = rancher.type(StackService.class);
Response<io.rancher.base.TypeCollection<Stack>> execute = stackService.list().execute();
List<Stack> stacks = execute.body().getData();

Releasing rancher-java-sdk to Maven Central

In order to release rancher-java-sdk to Maven Central, sources and javadoc jars should be generated, and all jars have to be signed with PGP. If you don't have a PGP key, you can install GPG and generate a new key, see: http://central.sonatype.org/pages/working-with-pgp-signatures.html for instance.

Before releasing the git repository should be tagged and the tag should be signed using the same PGP key that will be used during the relase. For instance you can use:

git tag -a -m 'Publishing version 1.0.0-RC3' -s 1.0.0-RC3

And if you have more than one PGP key:

git tag -a -m 'Publishing version 1.0.0-RC3' -s -u F680B22C  1.0.0-RC3

In order to help with the release process a release profile has been added to the project pom.xml automating the generation and signing of all jars. To deploy just run:

mvn clean deploy -P release

Note that if you have more than one key you can use the gpg.keyname option:

mvn clean deploy -Dgpg.keyname=F680B22C -P release
br.com.basis

Basis Tecnologia da Informação S.A.

Versions

Version
1.0.0
1.0.0-RC4
1.0.0-RC3