Skip to content

Commit 2e2046f

Browse files
author
Prasanna Santhanam
committed
marvin changes to do an pre-integration and integration test
Introducing the simulator spring context - simulatorComponentContext.xml.in. This separates the simulator beans so that production deployments don't have the simulator in them. Context is enabled with -Dsimulator as part of the developer profile. Also adding config files - Simulator Config for advanced zone and basic zone deployments under setup/dev. Signed-off-by: Prasanna Santhanam <tsp@apache.org>
1 parent fe48bbe commit 2e2046f

9 files changed

Lines changed: 626 additions & 135 deletions

File tree

client/pom.xml

Lines changed: 51 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@
218218
<groupId>org.apache.cloudstack</groupId>
219219
<artifactId>cloud-plugin-hypervisor-simulator</artifactId>
220220
<version>${project.version}</version>
221+
</dependency>
222+
<groupId>org.apache.cloudstack</groupId>
223+
<artifactId>cloud-plugin-storage-volume-default</artifactId>
224+
<version>${project.version}</version>
221225
</dependency>
222226
</dependencies>
223227
<build>
@@ -376,22 +380,38 @@
376380
</target>
377381
</configuration>
378382
</execution>
379-
<execution>
380-
<id>process-nonoss</id>
381-
<phase>process-resources</phase>
382-
<goals>
383-
<goal>run</goal>
384-
</goals>
385-
<configuration>
386-
<target if="${nonoss}">
387-
<echo>test</echo>
388-
<replaceregexp
389-
file="${basedir}/target/generated-webapp/WEB-INF/classes/environment.properties"
390-
match="cloud-stack-components-specification=.*"
391-
replace="cloud-stack-components-specification=components-nonoss.xml" byline="true" />
392-
</target>
393-
</configuration>
394-
</execution>
383+
<execution>
384+
<id>process-nonoss</id>
385+
<phase>process-resources</phase>
386+
<goals>
387+
<goal>run</goal>
388+
</goals>
389+
<configuration>
390+
<target if="${nonoss}">
391+
<echo>test</echo>
392+
<replaceregexp
393+
file="${basedir}/target/generated-webapp/WEB-INF/classes/environment.properties"
394+
match="cloud-stack-components-specification=.*"
395+
replace="cloud-stack-components-specification=components-nonoss.xml" byline="true"/>
396+
</target>
397+
</configuration>
398+
</execution>
399+
<execution>
400+
<id>process-simulator-context</id>
401+
<phase>process-resources</phase>
402+
<goals>
403+
<goal>run</goal>
404+
</goals>
405+
<configuration>
406+
<target if="${simulator}">
407+
<echo>test</echo>
408+
<replaceregexp
409+
file="${basedir}/target/generated-webapp/WEB-INF/web.xml"
410+
match="classpath:componentContext.xml"
411+
replace="classpath:simulatorComponentContext.xml" byline="true" />
412+
</target>
413+
</configuration>
414+
</execution>
395415
<execution>
396416
<id>process-nonoss-spring-context</id>
397417
<phase>process-resources</phase>
@@ -480,6 +500,21 @@
480500
</pluginManagement>
481501
</build>
482502
<profiles>
503+
<profile>
504+
<id>developer</id>
505+
<activation>
506+
<property>
507+
<name>simulator</name>
508+
</property>
509+
</activation>
510+
<dependencies>
511+
<dependency>
512+
<groupId>org.apache.cloudstack</groupId>
513+
<artifactId>cloud-plugin-hypervisor-simulator</artifactId>
514+
<version>${project.version}</version>
515+
</dependency>
516+
</dependencies>
517+
</profile>
483518
<profile>
484519
<id>netapp</id>
485520
<activation>

client/tomcatconf/componentContext.xml.in

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,6 @@
203203
<property name="name" value="KVM Agent"/>
204204
</bean>
205205

206-
<bean id="SimulatorDiscoverer" class="com.cloud.resource.SimulatorDiscoverer">
207-
<property name="name" value="Simulator Agent"/>
208-
</bean>
209-
210-
211206
<bean id="BareMetalDiscoverer" class="com.cloud.baremetal.manager.BareMetalDiscoverer">
212207
<property name="name" value="Bare Metal Agent"/>
213208
</bean>
@@ -304,10 +299,6 @@
304299
<property name="name" value="OvmGuru"/>
305300
</bean>
306301

307-
<bean id="SimulatorGuru" class="com.cloud.simulator.SimulatorGuru">
308-
<property name="name" value="SimulatorGuru"/>
309-
</bean>
310-
311302
<bean id="BaremetalGuru" class="com.cloud.baremetal.manager.BareMetalGuru">
312303
<property name="name" value="BaremetalGuru"/>
313304
</bean>
Lines changed: 270 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,270 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
-->
19+
<beans xmlns="http://www.springframework.org/schema/beans"
20+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21+
xmlns:context="http://www.springframework.org/schema/context"
22+
xmlns:tx="http://www.springframework.org/schema/tx"
23+
xmlns:aop="http://www.springframework.org/schema/aop"
24+
xsi:schemaLocation="http://www.springframework.org/schema/beans
25+
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
26+
http://www.springframework.org/schema/tx
27+
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
28+
http://www.springframework.org/schema/aop
29+
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
30+
http://www.springframework.org/schema/context
31+
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
32+
33+
34+
<!--
35+
Compose a CloudStack deployment with selected components here
36+
-->
37+
<bean id="databaseUpgradeChecker" class="com.cloud.upgrade.DatabaseUpgradeChecker" />
38+
<bean id="encryptionSecretKeyChecker" class="com.cloud.utils.crypt.EncryptionSecretKeyChecker" />
39+
<bean id="configurationServerImpl" class="com.cloud.server.ConfigurationServerImpl" />
40+
41+
<bean id="managementServerImpl" class ="com.cloud.server.ManagementServerImpl" >
42+
<property name="UserAuthenticators">
43+
<list>
44+
<ref bean="MD5UserAuthenticator"/>
45+
<ref bean="LDAPUserAuthenticator"/>
46+
</list>
47+
</property>
48+
</bean>
49+
50+
<bean id ="AccountManagerImpl" class="com.cloud.user.AccountManagerImpl">
51+
<property name="UserAuthenticators">
52+
<list>
53+
<ref bean="MD5UserAuthenticator"/>
54+
<ref bean="LDAPUserAuthenticator"/>
55+
</list>
56+
</property>
57+
</bean>
58+
59+
<bean id="clusterManagerImpl" class="com.cloud.cluster.ClusterManagerImpl" />
60+
<bean id="clusteredAgentManagerImpl" class="com.cloud.agent.manager.ClusteredAgentManagerImpl" />
61+
<bean id="clusteredVirtualMachineManagerImpl" class="com.cloud.vm.ClusteredVirtualMachineManagerImpl" />
62+
<bean id="highAvailabilityManagerExtImpl" class="com.cloud.ha.HighAvailabilityManagerExtImpl" />
63+
<bean id="userVmManagerImpl" class="com.cloud.vm.UserVmManagerImpl" />
64+
<bean id="consoleProxyManagerImpl" class="com.cloud.consoleproxy.ConsoleProxyManagerImpl" />
65+
<bean id="securityGroupManagerImpl2" class="com.cloud.network.security.SecurityGroupManagerImpl2" />
66+
<bean id="premiumSecondaryStorageManagerImpl" class="com.cloud.secstorage.PremiumSecondaryStorageManagerImpl" />
67+
<bean id="userVmDaoImpl" class="com.cloud.vm.dao.UserVmDaoImpl" />
68+
<bean id="ipv6AddressManagerImpl" class="com.cloud.network.Ipv6AddressManagerImpl" />
69+
70+
<bean id="apiRateLimitServiceImpl" class="org.apache.cloudstack.ratelimit.ApiRateLimitServiceImpl"/>
71+
72+
<!--
73+
Network Elements
74+
-->
75+
<bean id="Ovs" class="com.cloud.network.element.OvsElement">
76+
<property name="name" value="Ovs"/>
77+
</bean>
78+
<bean id="SecurityGroupProvider" class="com.cloud.network.element.SecurityGroupElement">
79+
<property name="name" value="SecurityGroupProvider"/>
80+
</bean>
81+
<bean id="VirtualRouter" class="com.cloud.network.element.VirtualRouterElement">
82+
<property name="name" value="VirtualRouter"/>
83+
</bean>
84+
<bean id="VpcVirtualRouter" class="com.cloud.network.element.VpcVirtualRouterElement">
85+
<property name="name" value="VpcVirtualRouter"/>
86+
</bean>
87+
88+
<!--
89+
Adapters
90+
-->
91+
<bean id="FirstFitRouting" class="com.cloud.agent.manager.allocator.impl.FirstFitRoutingAllocator">
92+
<property name="name" value="FirstFitRouting"/>
93+
</bean>
94+
95+
<bean id="hypervisorTemplateAdapter" class="com.cloud.template.HypervisorTemplateAdapter">
96+
<property name="name" value="HypervisorAdapter"/>
97+
</bean>
98+
99+
<!--
100+
Storage pool allocators
101+
-->
102+
103+
<bean id="LocalStoragePoolAllocator" class="org.apache.cloudstack.storage.allocator.LocalStoragePoolAllocator">
104+
<property name="name" value="LocalStorage"/>
105+
</bean>
106+
107+
<bean id="UserConcentratedAllocator" class="com.cloud.agent.manager.allocator.impl.UserConcentratedAllocator">
108+
<property name="name" value="User First"/>
109+
</bean>
110+
111+
<bean id="ConsoleProxyAllocator" class="com.cloud.consoleproxy.ConsoleProxyBalanceAllocator">
112+
<property name="name" value="Balance"/>
113+
</bean>
114+
115+
<bean id="StaticRoleBasedAPIAccessChecker" class="org.apache.cloudstack.acl.StaticRoleBasedAPIAccessChecker"/>
116+
117+
<bean id="ExteralIpAddressAllocator" class="com.cloud.network.ExteralIpAddressAllocator">
118+
<property name="name" value="Basic"/>
119+
</bean>
120+
121+
<bean id="HypervisorTemplateAdapter" class="com.cloud.template.HypervisorTemplateAdapter">
122+
<property name="name" value="HypervisorAdapter"/>
123+
</bean>
124+
125+
<!--
126+
Authenticators
127+
-->
128+
<bean id="MD5UserAuthenticator" class="com.cloud.server.auth.MD5UserAuthenticator">
129+
<property name="name" value="MD5"/>
130+
</bean>
131+
132+
<bean id="LDAPUserAuthenticator" class="com.cloud.server.auth.LDAPUserAuthenticator">
133+
<property name="name" value="LDAP"/>
134+
</bean>
135+
136+
<!--
137+
Investigators
138+
-->
139+
<bean id="CheckOnAgentInvestigator" class="com.cloud.ha.CheckOnAgentInvestigator">
140+
<property name="name" value="SimpleInvestigator"/>
141+
</bean>
142+
143+
<bean id="XenServerInvestigator" class="com.cloud.ha.XenServerInvestigator">
144+
<property name="name" value="XenServerInvestigator"/>
145+
</bean>
146+
147+
<bean id="UserVmDomRInvestigator" class="com.cloud.ha.UserVmDomRInvestigator">
148+
<property name="name" value="PingInvestigator"/>
149+
</bean>
150+
151+
<bean id="ManagementIPSystemVMInvestigator" class="com.cloud.ha.ManagementIPSystemVMInvestigator">
152+
<property name="name" value="ManagementIPSysVMInvestigator"/>
153+
</bean>
154+
155+
<!--
156+
Fencers
157+
-->
158+
<bean id="XenServerFencer" class="com.cloud.ha.XenServerFencer">
159+
<property name="name" value="XenServerFenceBuilder"/>
160+
</bean>
161+
<bean id="KVMFencer" class="com.cloud.ha.KVMFencer">
162+
<property name="name" value="KVMFenceBuilder"/>
163+
</bean>
164+
<bean id="OvmFencer" class="com.cloud.ovm.hypervisor.OvmFencer">
165+
<property name="name" value="OvmFenceBuilder"/>
166+
</bean>
167+
168+
<bean id="XcpServerDiscoverer" class="com.cloud.hypervisor.xen.discoverer.XcpServerDiscoverer">
169+
<property name="name" value="XCP Agent"/>
170+
</bean>
171+
172+
<bean id="SimulatorSecondaryStorageDiscoverer" class="com.cloud.resource.SimulatorSecondaryDiscoverer">
173+
<property name="name" value="SecondaryStorage"/>
174+
</bean>
175+
176+
<bean id="SecondaryStorageDiscoverer" class="com.cloud.storage.secondary.SecondaryStorageDiscoverer">
177+
<property name="name" value="SecondaryStorage"/>
178+
</bean>
179+
180+
<bean id="KvmServerDiscoverer" class="com.cloud.hypervisor.kvm.discoverer.KvmServerDiscoverer">
181+
<property name="name" value="KVM Agent"/>
182+
</bean>
183+
184+
<bean id="SimulatorDiscoverer" class="com.cloud.resource.SimulatorDiscoverer">
185+
<property name="name" value="Simulator Agent"/>
186+
</bean>
187+
188+
<bean id="HypervServerDiscoverer" class="com.cloud.hypervisor.hyperv.HypervServerDiscoverer">
189+
<property name="name" value="SCVMMServer"/>
190+
</bean>
191+
192+
<bean id="OvmDiscoverer" class="com.cloud.ovm.hypervisor.OvmDiscoverer">
193+
<property name="name" value="Ovm Discover"/>
194+
</bean>
195+
196+
<bean id="FirstFitPlanner" class="com.cloud.deploy.FirstFitPlanner">
197+
<property name="name" value="First Fit"/>
198+
</bean>
199+
200+
<bean id="UserDispersingPlanner" class="com.cloud.deploy.UserDispersingPlanner">
201+
<property name="name" value="UserDispersing"/>
202+
</bean>
203+
204+
<bean id="UserConcentratedPodPlanner" class="com.cloud.deploy.UserConcentratedPodPlanner">
205+
<property name="name" value="UserConcentratedPod"/>
206+
</bean>
207+
208+
<bean id="HypervisorPlannerSelector" class="com.cloud.deploy.HypervisorVmPlannerSelector">
209+
<property name="name" value="HypervisorPlannerSelector"/>
210+
</bean>
211+
212+
213+
<!--
214+
Network Gurus
215+
-->
216+
<bean id="StorageNetworkGuru" class="com.cloud.network.guru.StorageNetworkGuru">
217+
<property name="name" value="StorageNetworkGuru"/>
218+
</bean>
219+
<bean id="ExternalGuestNetworkGuru" class="com.cloud.network.guru.ExternalGuestNetworkGuru">
220+
<property name="name" value="ExternalGuestNetworkGuru"/>
221+
</bean>
222+
<bean id="PublicNetworkGuru" class="com.cloud.network.guru.PublicNetworkGuru">
223+
<property name="name" value="PublicNetworkGuru"/>
224+
</bean>
225+
<bean id="PodBasedNetworkGuru" class="com.cloud.network.guru.PodBasedNetworkGuru">
226+
<property name="name" value="PodBasedNetworkGuru"/>
227+
</bean>
228+
<bean id="ControlNetworkGuru" class="com.cloud.network.guru.ControlNetworkGuru">
229+
<property name="name" value="ControlNetworkGuru"/>
230+
</bean>
231+
<bean id="DirectNetworkGuru" class="com.cloud.network.guru.DirectNetworkGuru">
232+
<property name="name" value="DirectNetworkGuru"/>
233+
</bean>
234+
<bean id="DirectPodBasedNetworkGuru" class="com.cloud.network.guru.DirectPodBasedNetworkGuru">
235+
<property name="name" value="DirectPodBasedNetworkGuru"/>
236+
</bean>
237+
<bean id="OvsGuestNetworkGuru" class="com.cloud.network.guru.OvsGuestNetworkGuru">
238+
<property name="name" value="OvsGuestNetworkGuru"/>
239+
</bean>
240+
<bean id="PrivateNetworkGuru" class="com.cloud.network.guru.PrivateNetworkGuru">
241+
<property name="name" value="PrivateNetworkGuru"/>
242+
</bean>
243+
244+
<!--
245+
Hypervisor Gurus
246+
-->
247+
<bean id="XenServerGuru" class="com.cloud.hypervisor.XenServerGuru">
248+
<property name="name" value="XenServerGuru"/>
249+
</bean>
250+
251+
<bean id="KVMGuru" class="com.cloud.hypervisor.KVMGuru">
252+
<property name="name" value="KVMGuru"/>
253+
</bean>
254+
255+
<bean id="HypervGuru" class="com.cloud.hypervisor.guru.HypervGuru">
256+
<property name="name" value="HypervGuru"/>
257+
</bean>
258+
259+
<bean id="OvmGuru" class="com.cloud.ovm.hypervisor.OvmGuru">
260+
<property name="name" value="OvmGuru"/>
261+
</bean>
262+
263+
<bean id="SimulatorGuru" class="com.cloud.simulator.SimulatorGuru">
264+
<property name="name" value="SimulatorGuru"/>
265+
</bean>
266+
267+
<bean id="ClassicalPrimaryDataStoreProvider" class="org.apache.cloudstack.storage.datastore.provider.CloudStackPrimaryDataStoreProviderImpl">
268+
</bean>
269+
270+
</beans>

setup/db/templates.simulator.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type, image_data_store_id)
2020
VALUES (10, UUID(), 'simulator-domR', 'SystemVM Template (simulator)', 0, now(), 'SYSTEM', 0, 64, 1, 'http://nfs1.lab.vmops.com/templates/routing/debian/latest/systemvm.vhd.bz2', '', 0, 'SystemVM Template (simulator)', 'VHD', 15, 0, 1, 'Simulator', 1);
2121
INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type, image_data_store_id)
22-
VALUES (11, UUID(), 'simulator-Centos', 'CentOS 5.3(64-bit) no GUI (Simulator)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://nfs1.lab.vmops.com/templates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2', '', 0, 'CentOS 5.3(64-bit) no GUI (Simulator)', 'VHD', 11, 1, 1, 'Simulator', 1);
22+
VALUES (11, UUID(), 'simulator-Centos', 'CentOS 5.3(64-bit) no GUI (Simulator)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://nfs1.lab.vmops.com/templates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2', '', 0, 'CentOS 5.3(64-bit) no GUI (Simulator)', 'VHD', 12, 1, 1, 'Simulator', 1);

0 commit comments

Comments
 (0)