OpenStack4j

Fluent OpenStack SDK for Java

Take Control of Your Cloud
OpenStack4j is an open source OpenStack client which allows provisioning and control of an OpenStack system.

Identity V2

The Identity (Keystone) V2 service provides the central directory of users, tenants, service endpoints and authorization.

Identity V2 Guide

Identity V3

The Identity (Keystone) V3 service provides the central directory of users, groups, regions, service, endpoints, role management and authorization.

Identity V3 Guide

Compute

The Compute (Nova) service provides management to Servers (running virtual machines), VM Management, Flavors and diagnostics. The API makes day to day management tasks breeze.

Compute Guide

Image

The Image (Glance) service provides discovery, registration and delivery services for disk and server images. Stored images can be used as a template for quickly booting new instances.

Image Guide

Network

The Network (Neutron) service provides "network connectivity as a service". The OpenStack4j implementation supports Routers, Ports, Subnets and Interface management.

Network Guide

Block Storage

Block Storage (Cinder) Service is a block-level storage solution that enables you to mount drives to scale storage. OpenStack4j implementation fully supports all major operations.

Block Storage Guide

Object Storage

Object Storage (Swift) provides online object storage for files and media which can be shared globally or kept private for adhoc storage.

Object Storage Guide

Telemetry

Telemetry (Ceilometer) delivers metering and statistic measurements against OpenStack core components. This is ideal for customer billing, account and reporting of resources.

Block Storage Guide

Orchestration

Orchestration (Heat) is a service that you can use to orchestrate multiple composite cloud applications. Using OpenStack4j you can control Stacks, Templates, Resources and Events.

Orchestration Guide

DNS

DNS (Designate) is a multi-tenant DNSaaS service for OpenStack. Using OpenStack4j you can control Zones and Recordsets.

DNS Guide

Growing User Community
  • Great Software Lab
  • IBM Research Labs
  • Dorado Software
  • Oracle
  • Samsung
  • SAP
  • And More!

100% Fluent API
Identity
// V2 authentication
OSClientV2 os = OSFactory.builderV2()
        .endpoint("http://127.0.0.1:5000/v2.0")
        .credentials("admin", "secret")
        .tenantName("admin")
        .authenticate();

// V3 authentication
OSClientV3 os = OSFactory.builderV3()
        .endpoint("http://127.0.0.1:5000/v3")
        .credentials("admin", "secret", Identifier.byName("Default"))
        .scopeToProject(Identifier.byName("admin"))
        .authenticate();
Compute
// Create a Server Model Object
Server server = Builders.server()
        .name("Ubuntu 2")
        .flavor("large")
        .image("imageId")
        .build();

// Boot the Server
Server server = os.compute().servers().boot(server);

// Create a Snapshot
os.compute().servers().createSnapshot("id", "name");
Image
// Create an Image
Image image = os.images().create(Builders.image()
        .name("Cirros 0.3.0 x64")
        .isPublic(true)
        .containerFormat(ContainerFormat.BARE)
        .diskFormat(DiskFormat.QCOW2)
        .build()
        ), Payloads.create(new File("cirros.img")));
Network
// Create a Port
Port port = os.networking().port()
        .create(Builders.port()
        .name("port1")
        .networkId("networkId")
        .fixedIp("52.51.1.253", "subnetId")
        .build());