Code Monkey home page Code Monkey logo

rancher-java-sdk's Introduction

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

rancher-java-sdk's People

Contributors

cedric-lamalle avatar gabrielfeitosa avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.