Skip to content

Commit

Permalink
Merge pull request #11 from anyways/master
Browse files Browse the repository at this point in the history
update readme,travis
  • Loading branch information
Anyways authored Dec 6, 2016
2 parents a263cfd + f10d650 commit f1f6766
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 34 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
language: java

jdk:
- oraclejdk7
- openjdk7

script: mvn clean compile
install: true

install: mvn package -DskipTests
script:
- mvn package -DskipTests -Dgpg.skip=true

branches:
only:
Expand Down
95 changes: 67 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,83 @@
Providers of JClouds for Aliyun
## Providers of JClouds for Aliyun

[![Build Status](https://travis-ci.org/aliyun-beta/aliyun-jclouds.svg?branch=master)](https://travis-ci.org/aliyun-beta/aliyun-jclouds)

#### *modules*
* aliyun-ecs **jclouds-compute**
* aliyun-oss **jclouds-blobstore**
* aliyun-slb **jclouds-loadbalancer**
### Introduction

| Name | Type |
aliyun-jclouds adapt for jclouds to use cloud service of [aliyun](https://www.aliyun.com)

### Providers

| Provider | Service |
|------|------|
|aliyun-ecs|provider|
|aliyun-oss|provider|
|aliyun-slb|provider|
|aliyun-ecs|ComputeService|
|aliyun-oss|BlobStore|
|aliyun-slb|LoadBalancerService|

### Maven

<dependencies>
<dependency>
<groupId>io.github.aliyun-beta</groupId>
<artifactId>aliyun-ecs</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>io.github.aliyun-beta</groupId>
<artifactId>aliyun-oss</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>io.github.aliyun-beta</groupId>
<artifactId>aliyun-slb</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>

### Usage

Offical documents link [Apache-jclouds](http://jclouds.apache.org/start)

#### *compile*
Providers use **Google Auto** to generate services
###### ComputeService

**It is important to do like this**
> mvn clean compile
ComputeService computeService;
String provider = "aliyun-ecs";
String key = "Your AccessKey";
String secret = "Your AccessKeySecret";
ComputeServiceContext context = ContextBuilder
.newBuilder(provider)
.credentials(key, secret)
.buildView(ComputeServiceContext.class);
computeService = context.getComputeService();

Then you will find an folder named services from target\classes\META-INF in each modules
###### BlobStore

If you do not do the operation, an error will happends.
BlobStore blobStore;
String provider = "aliyun-oss";
String key = "Your AccessKey";
String secret = "Your AccessKeySecret";
BlobStoreContext context = ContextBuilder
.newBuilder(provider)
.credentials(key, secret)
.buildView(BlobStoreContext.class);
blobStore = context.getBlobStore();

key [aliyun-ecs] not in the list of providers or apis
###### LoadBalancerService

#### *test*
Please change the accessKey and secret witch generate by your own account of [Aliyun](http://www.aliyun.com) in each test classes before test
LoadBalancerService loadBalancerService;
String provider = "aliyun-slb";
String key = "Your AccessKey";
String secret = "Your AccessKeySecret";
LoadBalancerServiceContext context = ContextBuilder
.newBuilder(provider)
.credentials(key, secret)
.buildView(LoadBalancerServiceContext.class);
loadBalancerService = context.getLoadBalancerService();

private static final String key = "nyCUviU59zdxOIYJ";
private static final String secret = "VX99Yry885o0lpjFgzIpjibrVJIGgB";
### Build

Then run command
> mvn test
> mvn package -DskipTests
#### *changelog*
| Date | Message |
|------|---------|
|2016-01-17|push for checking|
|2016-01-25|fix some bugs|
### License

#### License
Licensed under the Apache License, Version 2.0
9 changes: 5 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -211,17 +211,17 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<quiet>true</quiet>
<encoding>utf-8</encoding>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<quiet>true</quiet>
<encoding>utf-8</encoding>
</configuration>
</execution>
</executions>
</plugin>
Expand All @@ -232,6 +232,7 @@
<executions>
<execution>
<id>sign-artifacts</id>
<phase>package</phase>
<goals>
<goal>sign</goal>
</goals>
Expand Down

0 comments on commit f1f6766

Please sign in to comment.