Skip to content

Commit 0f3bb68

Browse files
committed
Merge pull request #226 from fogbow/Azure
Azure
2 parents ab1535a + fe0652c commit 0f3bb68

File tree

18 files changed

+1617
-27
lines changed

18 files changed

+1617
-27
lines changed

manager.conf.example

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ compute_novav2_network_id=ea51ed0c-0e8a-448d-8202-c79777109ffe
5959
# compute_cloudstack_hypervisor=KVM
6060
# compute_cloudstack_image_download_os_type_id=ea51ed0c-0e8a-448d-8202-c79777109ffe
6161

62+
##Compute Plugin (Azure)
63+
# compute_class=org.fogbowcloud.manager.core.plugins.compute.cloudstack.AzureComputePlugin
64+
# compute_azure_max_vcpu=10
65+
# compute_azure_max_ram=10240
66+
# compute_azure_region=East US
67+
# compute_azure_storage_account_name=storage1
68+
# compute_azure_storage_key=abcd12345
69+
6270
## Compute Plugin (EC2)
6371
# compute_ec2_region=us-east-1
6472
# compute_ec2_security_group_id=sg-12345678
@@ -158,6 +166,12 @@ federation_identity_url=http://localhost:5000
158166
# path_trust_anchors=/etc/grid-security/certificates
159167
# path_vomsdir=/etc/grid-security/vomsdir
160168

169+
## Identity (Azure)
170+
# federation_identity_class=org.fogbowcloud.manager.core.plugins.identity.azure.AzureIdentityPlugin
171+
# proxy_account_subscription_id=subscription_id
172+
# proxy_account_keystore_path=/etc/keystore/azure
173+
# proxy_account_keystore_password=test123
174+
161175
## Member Validator
162176
member_validator_class=org.fogbowcloud.manager.core.plugins.memberauthorization.DefaultMemberAuthorizationPlugin
163177
member_validator_ca_dir=

pom.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,21 @@
236236
<version>1.10.11</version>
237237
</dependency>
238238
<dependency>
239+
<groupId>com.microsoft.azure</groupId>
240+
<artifactId>azure-management-compute</artifactId>
241+
<version>0.8.0</version>
242+
</dependency>
243+
<dependency>
244+
<groupId>com.microsoft.azure</groupId>
245+
<artifactId>azure-storage</artifactId>
246+
<version>3.0.0</version>
247+
</dependency>
248+
<dependency>
249+
<groupId>com.microsoft.azure</groupId>
250+
<artifactId>azure-management</artifactId>
251+
<version>0.8.0</version>
252+
</dependency>
253+
<dependency>
239254
<groupId>org.opensaml</groupId>
240255
<artifactId>opensaml</artifactId>
241256
<version>2.6.4</version>

src/main/java/org/fogbowcloud/manager/core/model/Flavor.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,20 @@ public class Flavor {
55
private Integer capacity;
66
private String name;
77
private String id;
8+
9+
/**
10+
* Number of cores of the CPU.
11+
*/
812
private String cpu;
13+
14+
/**
15+
* RAM memory in MB.
16+
*/
917
private String memInMB;
18+
19+
/**
20+
* Disk in GB.
21+
*/
1022
private String disk;
1123

1224
public Flavor(String name, String cpu, String memInMB, String disk) {

src/main/java/org/fogbowcloud/manager/core/plugins/ComputePlugin.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313

1414
public interface ComputePlugin {
1515

16+
/**
17+
* @param token
18+
* @param categories, list of categories.
19+
* @param xOCCIAtt
20+
* @param imageId
21+
* @return the instance ID
22+
*/
1623
public String requestInstance(Token token,List<Category> categories,
1724
Map<String, String> xOCCIAtt, String imageId);
1825

@@ -24,6 +31,10 @@ public String requestInstance(Token token,List<Category> categories,
2431

2532
public void removeInstances(Token token);
2633

34+
/**
35+
* @param token
36+
* @return the amount of resources still available in the cloud.
37+
*/
2738
public ResourcesInfo getResourcesInfo(Token token);
2839

2940
/**
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package org.fogbowcloud.manager.core.plugins.common.azure;
2+
3+
public class AzureAttributes {
4+
public static final String SUBSCRIPTION_ID_KEY = "subscriptionID";
5+
public static final String KEYSTORE_PATH_KEY = "keystorePath";
6+
public static final String KEYSTORE_PASSWORD_KEY = "keystorePassword";
7+
}

src/main/java/org/fogbowcloud/manager/core/plugins/identity/cloudstack/CloudStackHelper.java renamed to src/main/java/org/fogbowcloud/manager/core/plugins/common/cloudstack/CloudStackHelper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.fogbowcloud.manager.core.plugins.identity.cloudstack;
1+
package org.fogbowcloud.manager.core.plugins.common.cloudstack;
22

33
import java.security.Key;
44
import java.util.Map.Entry;
@@ -11,6 +11,7 @@
1111
import org.apache.commons.io.Charsets;
1212
import org.apache.http.client.utils.URIBuilder;
1313
import org.apache.log4j.Logger;
14+
import org.fogbowcloud.manager.core.plugins.identity.cloudstack.CloudStackIdentityPlugin;
1415
import org.fogbowcloud.manager.occi.model.ErrorType;
1516
import org.fogbowcloud.manager.occi.model.OCCIException;
1617
import org.fogbowcloud.manager.occi.model.ResponseConstants;

0 commit comments

Comments
 (0)