Skip to content

Commit 11a2118

Browse files
committed
Merge pull request #190 from fogbow/develop
Tests for VMCatcherStoragePlugin
2 parents 2c275e2 + c34b651 commit 11a2118

File tree

57 files changed

+2569
-459
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2569
-459
lines changed

bin/fogbow-cloud-config.cfg

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#cloud-config
2+
users:
3+
- name: #TOKEN_MANAGER_SSH_USER#
4+
chpasswd: {expire: False}
5+
ssh_pwauth: True
6+
shell: /bin/bash
7+
sudo: ALL=(ALL) NOPASSWD:ALL
8+
ssh_authorized_keys:
9+
- #TOKEN_MANAGER_SSH_PUBLIC_KEY#

manager.conf.example

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,20 @@ xmpp_port=5347
66
rendezvous_jid=rendezvous.test.com
77
greensitter_jid=greensitter.test.com
88

9+
# That flavor specification will be transformed into requirements.
10+
flavor_fogbow_small={mem=512, cpu=1}
11+
flavor_fogbow_medium={mem=1024, cpu=2}
12+
flavor_fogbow_large={mem=2048, cpu=4}
13+
14+
# Compute Opennebula
915
compute_class=org.fogbowcloud.manager.core.plugins.opennebula.OpenNebulaComputePlugin
1016
compute_one_url=http://localhost:2633/RPC2
11-
compute_one_flavor_small={mem=128, cpu=1}
12-
compute_one_flavor_medium={mem=256, cpu=2}
13-
compute_one_flavor_large={mem=512, cpu=4}
1417
compute_one_network_id=1
1518

19+
# Setting used to find the correct flavor according to informed templates.
20+
# types :all or specific templates(template1,template2)
21+
compute_one_templates=all
22+
1623
# Settings used by ONE compute plugin to register new images in the cloud
1724
# ID of datastore to register the image
1825
compute_one_datastore_id=1
@@ -27,17 +34,25 @@ compute_one_ssh_key_file=/home/fogbow/.ssh/id_rsa
2734
# Set the directory to copy images in remote host
2835
compute_one_ssh_target_temp_folder=/tmp/images
2936

37+
# Compute Openstack OCCI
3038
compute_class=org.fogbowcloud.manager.core.plugins.openstack.OpenStackOCCIComputePlugin
3139
compute_openstack_v2api_url=http://localhost:8182
3240
compute_occi_url=http://localhost:8182
33-
compute_occi_flavor_small=m1-small
34-
compute_occi_flavor_medium=m1-medium
35-
compute_occi_flavor_large=m1-large
3641
compute_occi_os_scheme=http://schemas.openstack.org/template/os#
3742
compute_occi_instance_scheme=http://schemas.openstack.org/compute/instance#
3843
compute_occi_resource_scheme=http://schemas.openstack.org/template/resource#
3944
compute_occi_network_id=ea51ed0c-0e8a-448d-8202-c79777109ffe
4045

46+
# Compute Opennebula OCCI
47+
compute_class=org.fogbowcloud.manager.core.plugins.opennebula.OpenNebulaOCCIComputePlugin
48+
compute_one_url=http://localhost:2633/RPC2
49+
compute_occi_url=http://localhost:3000
50+
compute_occi_template_scheme=http://occi.localhost/occi/infrastructure/os_tpl#
51+
compute_occi_resource_scheme=http://schema.fedcloud.egi.eu/occi/infrastructure/resource_tpl#
52+
compute_occi_flavors_small={cpu=1,mem=512}
53+
compute_occi_flavors_medium={cpu=2,mem=1024}
54+
compute_occi_flavors_large={cpu=4,mem=2048}
55+
4156
# If you are using the EgiImageStoragePlugin
4257
image_storage_class=org.fogbowcloud.manager.core.plugins.imagestorage.egi.EgiImageStoragePlugin
4358
image_storage_egi_base_url=http://lsd.ufcg.edu.br/~user/vm/
@@ -61,21 +76,22 @@ image_storage_static_fogbow-ubuntu-1204=81765250-a4e4-440d-a215-43c9c0849120
6176
member_picker_class=org.fogbowcloud.manager.core.RoundRobinMemberPicker
6277
#If you are using NoFMemberPicker or NoFPrioritizationPlugin classes
6378
nof_trustworthy=false
79+
nof_prioritize_local=true
6480

6581
local_prioritization_plugin_class=org.fogbowcloud.manager.core.plugins.prioritization.FCFSPrioritizationPlugin
6682
remote_prioritization_plugin_class=org.fogbowcloud.manager.core.plugins.prioritization.nof.NoFPrioritizationPlugin
6783

84+
# Compute Openstack
6885
compute_class=org.fogbowcloud.manager.core.plugins.openstack.OpenStackNovaV2ComputePlugin
6986
compute_novav2_url=http://localhost:8774
7087
compute_glancev2_url=http://localhost:9292
71-
compute_novav2_flavor_small=1
72-
compute_novav2_flavor_medium=2
73-
compute_novav2_flavor_large=3
7488
compute_novav2_network_id=ea51ed0c-0e8a-448d-8202-c79777109ffe
7589

90+
# Local identity
7691
local_identity_class=org.fogbowcloud.manager.core.plugins.openstack.KeystoneIdentityPlugin
7792
local_identity_url=http://localhost:5000
7893

94+
# Federation identity
7995
federation_authorization_class=org.fogbowcloud.manager.core.plugins.common.AllowAllAuthorizationPlugin
8096
federation_identity_class=org.fogbowcloud.manager.core.plugins.openstack.KeystoneIdentityPlugin
8197
federation_identity_url=http://localhost:5000

pom.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,16 @@
210210
<artifactId>sshj</artifactId>
211211
<version>0.8.1</version>
212212
</dependency>
213+
<dependency>
214+
<groupId>javax.mail</groupId>
215+
<artifactId>mail</artifactId>
216+
<version>1.4</version>
217+
</dependency>
218+
<dependency>
219+
<groupId>com.google.guava</groupId>
220+
<artifactId>guava</artifactId>
221+
<version>r09</version>
222+
</dependency>
213223
<dependency>
214224
<groupId>com.h2database</groupId>
215225
<artifactId>h2</artifactId>
@@ -220,7 +230,6 @@
220230
<artifactId>mail</artifactId>
221231
<version>1.4</version>
222232
</dependency>
223-
224233
</dependencies>
225234

226235
</project>

src/main/java/org/fogbowcloud/manager/Main.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
import org.fogbowcloud.manager.core.plugins.ImageStoragePlugin;
2020
import org.fogbowcloud.manager.core.plugins.PrioritizationPlugin;
2121
import org.fogbowcloud.manager.core.plugins.accounting.FCUAccountingPlugin;
22-
import org.fogbowcloud.manager.core.plugins.benchmarking.FCUStaticBenchmarkingPlugin;
23-
import org.fogbowcloud.manager.core.plugins.prioritization.TwoFoldPrioritizationPlugin;
22+
import org.fogbowcloud.manager.core.plugins.benchmarking.VanillaBenchmarkingPlugin;
2423
import org.fogbowcloud.manager.core.plugins.imagestorage.egi.EgiImageStoragePlugin;
24+
import org.fogbowcloud.manager.core.plugins.prioritization.TwoFoldPrioritizationPlugin;
2525
import org.fogbowcloud.manager.occi.OCCIApplication;
2626
import org.fogbowcloud.manager.occi.core.ResourceRepository;
2727
import org.fogbowcloud.manager.xmpp.ManagerXmppComponent;
@@ -109,7 +109,7 @@ public static void main(String[] args) throws Exception {
109109
benchmarkingPlugin = (BenchmarkingPlugin) createInstance(
110110
ConfigurationConstants.BENCHMARKING_PLUGIN_CLASS_KEY, properties);
111111
} catch (Exception e) {
112-
benchmarkingPlugin = new FCUStaticBenchmarkingPlugin(properties);
112+
benchmarkingPlugin = new VanillaBenchmarkingPlugin(properties);
113113
LOGGER.warn("Benchmarking plugin not specified in properties. Using the default one.", e);
114114
}
115115

src/main/java/org/fogbowcloud/manager/core/ConfigurationConstants.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ public class ConfigurationConstants {
4141
public static final String ASYNC_REQUEST_WAITING_INTERVAL_KEY = "asyn_request_waiting_interval";
4242

4343
//ssh properties TODO change these properties names to TOKEN_HOST_...
44-
public static final String SSH_PRIVATE_HOST_KEY = "ssh_tunnel_private_host";
45-
public static final String SSH_PUBLIC_HOST_KEY = "ssh_tunnel_public_host";
46-
public static final String SSH_HOST_PORT_KEY = "ssh_tunnel_host_port";
47-
public static final String SSH_HOST_HTTP_PORT_KEY = "ssh_tunnel_host_http_port";
44+
public static final String TUNNEL_SSH_PRIVATE_HOST_KEY = "ssh_tunnel_private_host";
45+
public static final String TUNNEL_SSH_PUBLIC_HOST_KEY = "ssh_tunnel_public_host";
46+
public static final String TUNNEL_SSH_HOST_PORT_KEY = "ssh_tunnel_host_port";
47+
public static final String TUNNEL_SSH_HOST_HTTP_PORT_KEY = "ssh_tunnel_host_http_port";
4848

4949
//voms
5050
public static final String VOMS_PATH_VOMSES = "path_vomses";
@@ -59,6 +59,10 @@ public class ConfigurationConstants {
5959
public static final String MAX_WHOISALIVE_MANAGER_COUNT = "max_whoisalive_manager_count";
6060
public static final String IMAGE_STORAGE_PLUGIN_CLASS = "image_storage_class";
6161

62+
public static final String SSH_PUBLIC_KEY_PATH = "ssh_public_key";
63+
public static final String SSH_PRIVATE_KEY_PATH = "ssh_private_key";
64+
public static final String SSH_COMMON_USER = "ssh_common_user";
65+
6266
//benchmarking
6367
public static final String BENCHMARKING_PLUGIN_CLASS_KEY = "benchmarking_class";
6468

0 commit comments

Comments
 (0)