add apidocs/devcloud projects

This commit is contained in:
Edison Su 2012-10-20 20:18:29 -07:00
parent 38578bf27d
commit b57be3389e
32 changed files with 235 additions and 59 deletions

View File

@ -159,7 +159,7 @@
</fileset>
</copy>
<copy
todir="${basedir}/target/generated-webapp/WEB-INF/classes/scripts">
todir="${basedir}/target/generated-webapp/WEB-INF/lib/scripts">
<fileset dir="${basedir}/../scripts" />
</copy>
<copy
@ -186,6 +186,7 @@
</filterreader>
</filterchain>
</copy>
<copy overwrite="true" file="../console-proxy/dist/systemvm.iso" todir="${basedir}/target/generated-webapp/WEB-INF/lib/vms"/>
</target>
</configuration>
</execution>

View File

@ -160,6 +160,8 @@ stopRouter=com.cloud.api.commands.StopRouterCmd;7
destroyRouter=com.cloud.api.commands.DestroyRouterCmd;7
changeServiceForRouter=com.cloud.api.commands.UpgradeRouterCmd;7
listRouters=com.cloud.api.commands.ListRoutersCmd;7
listVirtualRouterElements=com.cloud.api.commands.ListVirtualRouterElementsCmd;7
configureVirtualRouterElement=com.cloud.api.commands.ConfigureVirtualRouterElementCmd;7
#### system vm commands
startSystemVm=com.cloud.api.commands.StartSystemVMCmd;1

View File

@ -120,12 +120,6 @@
<include>systemvm.zip</include>
</includes>
</resource>
<resource>
<directory>../patches/target/</directory>
<includes>
<include>cloud-scripts.tar.gz</include>
</includes>
</resource>
<resource>
<directory>../patches/systemvm/debian/config/root/.ssh</directory>
<includes>
@ -137,6 +131,50 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>generate-resource</id>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<copy overwrite="true" file="../patches/target/cloud-scripts.tar.gz" tofile="${basedir}/dist/cloud-scripts.tgz"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>mkisofs</executable>
<workingDirectory>dist</workingDirectory>
<arguments>
<argument>-quiet</argument>
<argument>-r</argument>
<argument>-o</argument>
<argument>systemvm.iso</argument>
<argument>systemvm.zip</argument>
<argument>cloud-scripts.tgz</argument>
<argument>authorized_keys</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
@ -162,11 +200,6 @@
</profile>
<profile>
<id>systemvm</id>
<activation>
<property>
<name>systemvm</name>
</property>
</activation>
<build>
<plugins>
<plugin>
@ -190,7 +223,7 @@
<argument>-o</argument>
<argument>systemvm.iso</argument>
<argument>systemvm.zip</argument>
<argument>cloud-scripts.tar.gz</argument>
<argument>cloud-scripts.tgz</argument>
<argument>authorized_keys</argument>
</arguments>
</configuration>

View File

@ -56,6 +56,7 @@
<includes>
<include>log4j-cloud.xml</include>
<include>consoleproxy.properties</include>
<include>agent.properties</include>
</includes>
</fileSet>
<fileSet>

View File

@ -160,6 +160,7 @@
<module>client</module>
<module>test</module>
<module>tools/devcloud</module>
<module>tools/apidoc</module>
</modules>
<dependencies>

View File

@ -69,7 +69,6 @@ import com.cloud.utils.ssh.SSHCmdHelper;
public class KvmServerDiscoverer extends DiscovererBase implements Discoverer,
Listener, ResourceStateAdapter {
private static final Logger s_logger = Logger.getLogger(KvmServerDiscoverer.class);
private String _setupAgentPath;
private ConfigurationDao _configDao;
private String _hostIp;
private int _waitTime = 5; /*wait for 5 minutes*/
@ -288,7 +287,6 @@ public class KvmServerDiscoverer extends DiscovererBase implements Discoverer,
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
ComponentLocator locator = ComponentLocator.getCurrentLocator();
_configDao = locator.getDao(ConfigurationDao.class);
_setupAgentPath = Script.findScript(getPatchPath(), "setup_agent.sh");
_kvmPrivateNic = _configDao.getValue(Config.KvmPrivateNetwork.key());
if (_kvmPrivateNic == null) {
_kvmPrivateNic = "cloudbr0";
@ -304,9 +302,6 @@ public class KvmServerDiscoverer extends DiscovererBase implements Discoverer,
_kvmGuestNic = _kvmPrivateNic;
}
if (_setupAgentPath == null) {
throw new ConfigurationException("Can't find setup_agent.sh");
}
_hostIp = _configDao.getValue("host");
if (_hostIp == null) {
throw new ConfigurationException("Can't get host IP");

View File

View File

Before

Width:  |  Height:  |  Size: 45 B

After

Width:  |  Height:  |  Size: 45 B

View File

Before

Width:  |  Height:  |  Size: 870 B

After

Width:  |  Height:  |  Size: 870 B

View File

Before

Width:  |  Height:  |  Size: 868 B

After

Width:  |  Height:  |  Size: 868 B

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

67
tools/apidoc/pom.xml Normal file
View File

@ -0,0 +1,67 @@
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for additional
information regarding copyright ownership. The ASF licenses this file to
you under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied. See the License for the specific
language governing permissions and limitations under the License. -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>cloud-apidoc</artifactId>
<name>Apache CloudStack apidoc Tools</name>
<packaging>pom</packaging>
<parent>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloudstack</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-client-ui</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
</dependencies>
<properties>
<client.config.base>../../client/target/cloud-client-ui-4.1.0-SNAPSHOT/WEB-INF/</client.config.base>
<client.config.jars>${client.config.base}/lib</client.config.jars>
<client.config.conf>${client.config.base}/classes</client.config.conf>
</properties>
<build>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>bash</executable>
<arguments>
<argument>-x</argument>
<argument>./build-apidoc.sh</argument>
<argument>${client.config.jars}</argument>
<argument>${client.config.jars}</argument>
<argument>./target</argument>
<argument>-f</argument>
<argument>${client.config.conf}/commands.properties, ${client.config.conf}/commands-ext.properties,${client.config.conf}/virtualrouter_commands.properties, ${client.config.conf}/nicira-nvp_commands.properties </argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -33,15 +33,15 @@
"networktype": "Basic",
"pods": [
{
"endip": "10.0.2.220",
"endip": "192.168.56.220",
"name": "test00",
"startip": "10.0.2.200",
"startip": "192.168.56.200",
"guestIpRanges": [
{
"startip": "10.0.2.100",
"endip": "10.0.2.199",
"startip": "192.168.56.100",
"endip": "192.168.56.199",
"netmask": "255.255.255.0",
"gateway": "10.0.2.2"
"gateway": "192.168.56.1"
}
],
"netmask": "255.255.255.0",
@ -52,21 +52,20 @@
"hosts": [
{
"username": "root",
"url": "http://10.0.2.15/",
"url": "http://192.168.56.2/",
"password": "password"
}
],
"clustertype": "CloudManaged"
}
],
"gateway": "10.0.2.2"
"gateway": "192.168.56.1"
}
],
"internaldns1": "10.0.2.3",
"internaldns2": "10.0.2.3",
"internaldns1": "192.168.56.1",
"secondaryStorages": [
{
"url": "nfs://10.0.2.15:/opt/storage/secondary"
"url": "nfs://192.168.56.2:/opt/storage/secondary"
}
]
}
@ -105,6 +104,10 @@
{
"name":"enable.s3.api",
"value":"true"
},
{
"name":"host",
"value":"192.168.56.1"
}
],
"mgtSvr": [
@ -112,5 +115,13 @@
"mgtSvrIp": "127.0.0.1",
"port": 8096
}
]
],
"dbSvr":
{
"dbSvr": "127.0.0.1",
"port": 3306,
"user": "cloud",
"passwd": "cloud",
"db": "cloud"
}
}

View File

@ -16,17 +16,17 @@
-- under the License.
UPDATE `cloud`.`configuration` SET value = 'true' where name = 'use.local.storage';
UPDATE `cloud`.`configuration` SET value = 'true' where name = 'system.vm.use.local.storage';
INSERT INTO `cloud`.`disk_offering` (id, name, uuid, display_text, created, use_local_storage, type) VALUES (17, 'tinyOffering', UUID(), 'tinyOffering', NOW(), 1, 'Service');
INSERT INTO `cloud`.`disk_offering` (id, name, uuid, display_text, created, use_local_storage, type, disk_size) VALUES (17, 'tinyOffering', UUID(), 'tinyOffering', NOW(), 1, 'Service', 0);
INSERT INTO `cloud`.`service_offering` (id, cpu, speed, ram_size) VALUES (17, 1, 100, 100);
INSERT INTO `cloud`.`disk_offering` (id, name, uuid, display_text, created, type, disk_size) VALUES (18, 'tinyDiskOffering', UUID(), 'tinyDiskOffering', NOW(), 'Disk', 1073741824);
INSERT INTO `cloud`.`configuration` (name,value) VALUE('router.ram.size', '100');
INSERT INTO `cloud`.`configuration` (name,value) VALUE('router.cpu.mhz','100');
INSERT INTO `cloud`.`configuration` (name,value) VALUE('console.ram.size','100');
INSERT INTO `cloud`.`configuration` (name,value) VALUE('console.cpu.mhz', '100');
INSERT INTO `cloud`.`configuration` (name,value) VALUE('ssvm.ram.size','100');
INSERT INTO `cloud`.`configuration` (name,value) VALUE('ssvm.cpu.mhz','100');
INSERT INTO `cloud`.`configuration` (instance, name,value) VALUE('DEFAULT','router.ram.size', '100');
INSERT INTO `cloud`.`configuration` (instance, name,value) VALUE('DEFAULT','router.cpu.mhz','100');
INSERT INTO `cloud`.`configuration` (instance, name,value) VALUE('DEFAULT','console.ram.size','100');
INSERT INTO `cloud`.`configuration` (instance, name,value) VALUE('DEFAULT','console.cpu.mhz', '100');
INSERT INTO `cloud`.`configuration` (instance, name,value) VALUE('DEFAULT','ssvm.ram.size','100');
INSERT INTO `cloud`.`configuration` (instance, name,value) VALUE('DEFAULT','ssvm.cpu.mhz','100');
INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT', 'system.vm.use.local.storage', 'true');
INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT', 'integration.api.port', '8096');
UPDATE `cloud`.`configuration` SET value='10' where name = 'storage.overprovisioning.factor';
UPDATE `cloud`.`configuration` SET value='10' where name = 'cpu.overprovisioning.factor';
UPDATE `cloud`.`configuration` SET value='10' where name = 'mem.overprovisioning.factor';

View File

@ -20,51 +20,116 @@
<version>4.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.21</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>install</defaultGoal>
</build>
<profiles>
<profile>
<id>clean</id>
<id>deploydb</id>
<activation>
<property>
<name>clean</name>
<name>deploydb</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<executions>
<execution>
<phase>integration-test</phase>
<phase>initialize</phase>
<goals>
<goal>run</goal>
<goal>read-project-properties</goal>
</goals>
<configuration>
<target>
<sshexec host="localhost" username="root"
password="password" port="2222" command="touch /tmp/x"
trust="true" />
</target>
<files>
<file>${project.parent.basedir}/utils/conf/db.properties</file>
<file>${project.parent.basedir}/utils/conf/db.properties.override</file>
</files>
<quiet>true</quiet>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
<version>1.5</version>
<dependencies>
<!-- specify the dependent jdbc driver here -->
<dependency>
<groupId>ant</groupId>
<artifactId>ant-jsch</artifactId>
<version>1.6.5</version>
</dependency>
<dependency>
<groupId>jsch</groupId>
<artifactId>jsch</artifactId>
<version>0.1.29</version>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${cs.mysql.version}</version>
</dependency>
</dependencies>
<configuration>
<driver>org.gjt.mm.mysql.Driver</driver>
<url>jdbc:mysql://${db.cloud.host}:${db.cloud.port}/cloud</url>
<username>${db.cloud.username}</username>
<password>${db.cloud.password}</password>
<!--all executions are ignored if -Dmaven.test.skip=true -->
<skip>${maven.test.skip}</skip>
<forceMojoExecution>true</forceMojoExecution>
</configuration>
<executions>
<execution>
<id>create-schema</id>
<phase>process-test-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<srcFiles>
<srcFile>${basedir}/devcloud.sql</srcFile>
</srcFiles>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>deploysvr</id>
<activation>
<property>
<name>deploysvr</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>python</executable>
<arguments>
<argument>../marvin/marvin/deployDataCenter.py</argument>
<argument>-i</argument>
<argument>devcloud.cfg</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>