Skip to content

occiware/cloud-automation-connector

Repository files navigation

Cloud-Automation Connector

Introduction

The purpose of the software is to support OCCI request in order to manage infrastructure through Cloud Automation. Cloud automation connector is an OCCI infrastructure implementation. The code was generated thanks to the OCCIware studio.

Build and run

In order to use Cloud Automation, the Cloud Automation must be deployed on a server and the service domain name must be specified in /org.occiware.cloudautomation.connector/src-gen/resources/config.properties.

To build the software you need to have maven installed. Then run the following command :

mvn clean install -DskipTests

The software was designed to run as a plugin inside Mart-Server.

To use the plugins indside Mart Server follow the steps below :

  1. Put .jar file from org.occiware.cloudautomation.connector/target/ in the martserver-plugins directory in MartServer home (if the directory doesn't exist, create it).
  2. In the pom from MartServer/org.occiware.mart.server, the following tags must be added in the "dependencies" section :
<dependency>
    <groupId>org.occiware</groupId>
    <artifactId>org.occiware.cloudautomation.connector</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <scope>runtime</scope>
</dependency>
  1. Then follow the MartServer administration guide to run MartServer.

Examples

Create an instance

curl -v -X PUT -d '{
    "title": "instanceName",
    "summary": "creation instance example",
    "kind": "http://org.occiware.cloudautomation#cloudautomationinstance",
    "mixins": ["http://org.occiware.cloudautomation#provider",
    "http://org.occiware.cloudautomation#credentials",
    "http://org.occiware.cloudautomation#instancetemplate",
    "http://schemas.ogf.org/occi/infrastructure/credentials#ssh_key",
    "http://schemas.ogf.org/occi/infrastructure/compute#user_data"],
    "attributes": {
        "cloudautomation.instancetemplate.imageName":"imageId",
	"cloudautomation.provider.username": "toto",
	"cloudautomation.provider.password": "tutu",
	"cloudautomation.provider.type":"openstack-nova",
	"cloudautomation.provider.endpoint":"localhost:8081",
	"cloudautomation.credentials.username":"user",
	"cloudautomation.credentials.password":"pwd",
	"occi.credentials.ssh.publickey":"myPublicKey",
	"occi.compute.userdata":"mkdir /tmp/testDirectoryCreation"
    }
}' http://localhost:8080/mycompute -H "Content-Type: application/json" -H "accept: application/json"

Get an instance

curl -v -X GET http://localhost:8080/mycompute -H "accept: application/json"

Delete an instance

curl -v -X DELETE -H 'accept: application/json' http://localhost:8080/mycompute

License

Copyright (c) 2015-2017 Obeo, Inria, Activeeon

All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html

Contributors:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages