Merge branch 'master' into regions

Conflicts:
	api/src/com/cloud/api/ApiConstants.java
	api/src/com/cloud/api/ResponseGenerator.java
	client/tomcatconf/commands.properties.in
	core/src/com/cloud/user/UserVO.java
	server/src/com/cloud/api/ApiResponseHelper.java
	server/src/com/cloud/configuration/DefaultComponentLibrary.java
	server/src/com/cloud/user/AccountManagerImpl.java
	setup/db/create-schema.sql
This commit is contained in:
Kishan Kavala 2012-10-03 14:09:01 +05:30
commit 89779cceb8
3401 changed files with 129146 additions and 269224 deletions

34
.gitignore vendored
View File

@ -1,3 +1,20 @@
# 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.
build/replace.properties
build/build.number
bin/
@ -16,13 +33,28 @@ dist/
cloud-*.tar.bz2
*.log
*.pyc
*.cfg
build.number
api.log.*.gz
cloud.log.*.*
unittest
deps/cloud.userlibraries
deps/awsapi-lib/
.DS_Store
.idea
*.iml
git-remote-https.exe.stackdump
*.swp
tools/devcloud/devcloudbox/.vagrant
*.jar
*.war
*.mar
*.zip
*.iso
*.tar.gz
*.tgz
awsapi/modules/*
!.gitignore
.classpath
.project
.settings.xml
.settings/

7
DISCLAIMER Normal file
View File

@ -0,0 +1,7 @@
Apache CloudStack is an effort undergoing incubation at The Apache Software Foundation (ASF),
sponsored by the Apache Incubator. Incubation is required of all newly accepted
projects until a further review indicates that the infrastructure, communications, and
decision making process have stabilized in a manner consistent with other successful ASF
projects. While incubation status is not necessarily a reflection of the completeness or
stability of the code, it does indicate that the project has yet to be fully endorsed by
the ASF.

143
INSTALL.md Normal file
View File

@ -0,0 +1,143 @@
This document describes how to set up and configure a single server CloudStack
development environment. If you aren't looking for a development environment,
the easiest way to deploy CloudStack is by using RPM or DEB packages from:
- http://cloudstack.org/download.html
- http://jenkins.cloudstack.org (CI/Build server)
- http://cloudstack.apt-get.eu (Debian repository)
CloudStack developers use various platforms for development, this guide will
focus on CentOS and was tested against a CentOS 6.2 x86_64 setup.
Refer to the [wiki](http://cwiki.apache.org/confluence/display/CLOUDSTACK/Index)
for the latest information, especially:
- [Setting up development environment](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Setting+up+CloudStack+Development+Environment) for CloudStack.
- [Building](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Building+with+Maven) CloudStack.
## Setting up Development Environment
### Installing Tools and Dependencies
Install tools and dependencies used for development:
$ yum install git ant ant-devel java-1.6.0-openjdk java-1.6.0-openjdk-devel
mysql mysql-server tomcat6 mkisofs gcc python MySQL-python openssh-clients wget
Set up Maven (3.0.4):
$ wget http://www.us.apache.org/dist/maven/maven-3/3.0.4/binaries/apache-maven-3.0.4-bin.tar.gz
$ cd /usr/local/ # or any path
$ tar -zxvf apache-maven-3.0.4-bin.tar.gz
$ echo export M2_HOME=/usr/local/apache-maven-3.0.4 >> ~/.bashrc # or .zshrc or .profile
$ echo export PATH=${M2_HOME}/bin:${PATH} >> ~/.bashrc # or .zshrc or .profile
Note: Tomcat 6.0.35 has some known issue with CloudStack, please use Tomcat
6.0.33 from http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.33/bin
### Configure Environment
Set CATALINA_HOME to path where you extract/install tomcat, put them in your
.bashrc or .zshrc or .profile:
$ echo export CATALINA_HOME=/usr/share/tomcat6/ >> ~/.bashrc
Fix permissions on CATALINA_HOME:
$ chown -R <you>:<your-group> $CATALINA_HOME
Generate you ssh keys, useful for ssh-ing to your hosts and vm etc.:
$ ssh-keygen -t rsa -q
CloudStack uses some ports, make sure at least those used by the management
server are available and not blocked by any local firewall. Following ports are
used by CloudStack and its entities:
8787: CloudStack (Tomcat) debug socket
9090, 8250: CloudStack Management Server, User/Client API
8096: User/Client to CloudStack Management Server (unauthenticated)
3306: MySQL Server
3922, 8250, 80/443, 111/2049, 53: Secondary Storage VM
3922, 8250, 53: Console Proxy VM
3922, 8250, 53: Virtual Router
22, 80, 443: XenServer, XAPI
22: KVM
443: vCenter
DNS: 53
NFS: 111/2049
### Configuring MySQL Server
Start the MySQL service:
$ service mysqld start
### Getting the Source Code
You may get the source code from the repository hosted on Apache:
$ git clone https://git-wip-us.apache.org/repos/asf/incubator-cloudstack.git
Or, you may fork a repository from the official Apache CloudStack mirror by
Apache on [Github](https://github.com/apache/incubator-cloudstack)
To keep yourself updated on a branch, do:
$ git pull <origin> <branch>
For example, for master:
$ git pull origin master
## Building
Populate the dependencies using Maven:
$ mvn -P deps
Clean previous build, if needed:
$ mvn clean
$ ant clean-all
$ ant clean-tomcat
Build all sub-modules:
$ ant build-all
Deploy the built project on tomcat:
$ ant deploy-server
Clear old database (if any) and deploy the database schema:
$ ant deploydb
Start the management server in debug mode:
$ ant debug
If this works, you've successfully setup a single server CloudStack installation.
Open the following URL on your browser to access the Management Server UI:
http://localhost:8080/client/
Or,
http://management-server-ip-address:8080/client
The default credentials are; user: admin, password: password and the domain
field should be left blank which is defaulted to the ROOT domain.
## Packaging
To create rpms:
$ mvn -P deps && ./waf rpm
To create debs:
$ mvn -P deps && dpkg-buildpackage

View File

@ -1,70 +0,0 @@
This document describes how to set up and configure a single server CloudStack development environment. If you aren't looking for a development environment The easiest way is to deploy CloudStack from RPM package, building CloudStack from source is for developers. This guide is all about building CloudStack from the source and installing directly from there . This guide is suitable for you if you want to develop the CloudStack.
I have tested this procedure on Fedora Core 14
Step 1: Install the tools and dependencies:
For fedora the package names are ant ant-devel, openjdk, openjdk-devel
Tools:
yum install ant ant-devel openjdk openjdk-devel mysql mysql-server tomcat
Dependencies:
yum install jakarta-commons-collections jakarta-commons-dbcp.noarch apache-commons-logging.noarch jakarta-commons-pool jakarta-commons-httpclient.noarch ws-commons-util.noarch glibc-devel gcc python MySQL-python openssh-clients
Tomcat:
Download tomcat6.0.33 from http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.33/bin/ instead of using distribution's default tomcat. Set CATALINA_HOME and CATALINA_BASE to path where you extract tomcat in environment variable, it would be better off setting them in .bashrc as it will take effect every time you log in.
Note: Tomcat6.0.35 has some known issue with CloudStack, please avoid it
SSHKEY:
Run:
sh-keygen -t rsa -q
to create sshkey for your account if you don't have one
Step 2: Configuration
Start the MySQL service :
# service mysqld start
Step 3: Get the source
$ git clone https://github.com/CloudStack/CloudStack.git
For subsequent pulls, do:
$ git pull
Step 4: Building, testing, and deploying CloudStack using Ant :
Ant is a Java-based build tool designed to be cross-platform, easy to use, extensible, and scalable. Ant is controlled by providing a text file that tells how to perform all the stages of building, testing, and deploying a project. These files are build files, and every project that uses Ant must have at least one named as build.xml. You can see build.xml in your CloudStack source.
Type to build CloudStack :
$ ant clean-all build-all
Type to deploy mgt server :
$ ant deploy-server
Type to deploy database :
$ ant deploydb
Type to run mgt server:
$ ant debug
If all of the above process is successful. You are done the single server CloudStack installation.Now your CloudStack Management Server is running.
Open your browser and type the bellow url in address bar:
http://localhost:8080/client/
OR
http://management-server-ip-address:8080/client
You can see CloudStack Management Console page via a web browser. It will show you management consle login page. You can use the default username and password and leave domain as blank.
The default credentials are “admin” for user and “password” for password. The domain field should be left blank. A blank
domain field is defaulted to the ROOT domain.
NOTE : This document is very basic CloudStack development installation. If you are very new to CloudStack and want to feel the power of CloudStack very quickly in RPM based distro, this document will guide very clear step to get it done. Since I am new to CloudStack, I doing this documentation by learning from community. I will keet update new information in this guide to make it more valuable resource.

288
KEYS Normal file
View File

@ -0,0 +1,288 @@
This file contains the PGP keys of various developers.
Users: pgp < KEYS
gpg --import KEYS
Developers:
pgp -kxa <your name> and append it to this file.
(pgpk -ll <your name> && pgpk -xa <your name>)
>> this file.
(gpg --list-sigs <your name>
&& gpg --armor --export <your name>) >>
this file.
Type Bits/KeyID Date User ID
pub 4096R/CC56CEA8 2012-08-06 [expires: 2016-08-06]
uid Chip Childers <chipchilders@apache.org>
sig 3 CC56CEA8 2012-08-06 Chip Childers <chipchilders@apache.org>
sub 4096R/A99A5D58 2012-08-06 [expires: 2016-08-06]
sig CC56CEA8 2012-08-06 Chip Childers <chipchilders@apache.org>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG/MacGPG2 v2.0.18 (Darwin)
Comment: GPGTools - http://gpgtools.org
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
=eCNG
-----END PGP PUBLIC KEY BLOCK-----
Type Bits/KeyID Date User ID
pub 4096R/DB3ECA42 2012-08-07 [expires: 2017-08-06]
uid Wido den Hollander <wido@widodh.nl>
sig 3 DB3ECA42 2012-08-07 Wido den Hollander <wido@widodh.nl>
sub 4096R/50E9D98F 2012-08-07
sig DB3ECA42 2012-08-07 Wido den Hollander <wido@widodh.nl>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.11 (GNU/Linux)
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
HpWraBFdP78=
=I9dG
-----END PGP PUBLIC KEY BLOCK-----
pub 4096R/2908DED2 2012-06-29
uid John Kinsella <jlk@stratosec.co>
sig 3 2908DED2 2012-08-07 John Kinsella <jlk@stratosec.co>
sub 4096R/26F845B7 2012-06-29
sig 2908DED2 2012-08-07 John Kinsella <jlk@stratosec.co>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
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
=BzOC
-----END PGP PUBLIC KEY BLOCK-----
pub 4096R/6FE50F1C 2012-05-11 [expires: 2017-05-10]
uid David Nalley (Code signing key) <ke4qqq@apache.org>
sig 3 6FE50F1C 2012-05-11 David Nalley (Code signing key) <ke4qqq@apache.org>
sig F2EFD0F0 2012-05-21 Christopher David Schultz (Christopher David Schultz) <chris@christopherschultz.net>
sig A67F707E 2012-05-21 Christopher Schultz <chris@christopherschultz.net>
sig 4C75EA05 2012-05-31 Kevin A. McGrail (CODE SIGNING KEY) <kmcgrail@apache.org>
sig E70D2357 2012-08-09 David Nalley <david@gnsa.us>
sub 4096R/1E5F6D9D 2012-05-11 [expires: 2017-05-10]
sig 6FE50F1C 2012-05-11 David Nalley (Code signing key) <ke4qqq@apache.org>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.12 (GNU/Linux)
mQINBE+tml4BEADjjxemcIdmFj4CuJYCpHBldoot3oF0Dqvez8ok7KnmNc/jrbgH
rZ6/DYq8SzebTbQSel4bCkLLnaI4Yu3C4Rd2uYPF6EHjs+kM4etKJLOiwfv5/EA9
l0TYwNldkZaE7Y/B+XDrzQIxCWiWeH8O01EKJxZhjtcmeZYS3n1/gozQmDxNcbaW
QJJn6Vktqek6n30fPGsQl7tZyfnoSTvjDblze/dFSmyJaCeGDfljlwhXfNBFhJct
LxjmbiD21kRZvs9dWJZRFDQhw6g2HZIQ8MXAC6PUhoJgvqeBDUGUr6B7lb1IfTrl
CKBQLKAURZXKmLlRzh3IMTEyKpmV2D80erRf39S3CiRNEYlnn1fHovmnkiV9QLvG
rgjwDcvuw3Y2lBNaQRuSLm55sBmPBVDSU3aABbZfupOntlnV/oIyl32fiF7MAHT9
8mV4c58urjbJKkq9R/0U/pZxqWOQfnnt/t66hdOe1p5O29c7nW5V0rlNDFAm2GXL
OKhvS/crBfz4gpI7U7KAq5aMA1F0ZgGJwGVs7Lv6uvl9O/4M7/3g5b390yuRzJzw
ZXF41wJC8Zwlw+KJcrcTkzbUjpGoNoblfAOV/YV3WNnJGOs3hL12vktsgADcjl2R
T6x7QAayZQyfaSD1UwXSHBHi7Lh6ABj6zQnlcan/8/j0mEVMe+q/5CkGPQARAQAB
tDNEYXZpZCBOYWxsZXkgKENvZGUgc2lnbmluZyBrZXkpIDxrZTRxcXFAYXBhY2hl
Lm9yZz6JAj4EEwECACgFAk+tml4CGwMFCQlmAYAGCwkIBwMCBhUIAgkKCwQWAgMB
Ah4BAheAAAoJEExw8Ghv5Q8c2kEP/RhSY6cuypHNTFsVWYm6eaxHR5z1duPvwAhf
7LG4QoqaEJwGJSlrDScQA/sAJZli0eswsIDho8e9iywrREWCrsUKnNcZNaw1y36q
vCTwuAvtfW1H6/fNFwErzYHSIOUxYwRoylxVhYSW5renheeHmxsLtKqLavo+MDV+
Shr/CGcnVypbW8MrcL0q6OWb+eCJUsB0JIotXRitTGrCV6ulyOWSnq0CXT3EkrT4
rkXf9dINoAKzqoF5UE+9oGFJxQFFEY3ppgh9p1qaDHTzoKwrVxp+ssBNm7N1CAff
JIb4b2MoWeNuK6lZPR24dGhsxBIZPn9Nlxzczuvbb+lUDvvA8gedYcSTOe5x/7k8
J3Niu7S50HP7Y2II2RS5zqTMbJJRVu7nZKQYXjM8pItuTiZqaEwl1QyIfuSfXTbf
i35IWO+ZHpMYqUGeAlugIquFRmF50YBMnqm104Gft1DUm92eb5si3gXRNxrH2t0Z
+yHb1iD2873WrhMatgSmpcRYZyWsYTUEUhGT2P2+oo3c7YjfqyJ1rx6ilIhvRLao
ooJ83iobbaDGy0C+jQMvIh9jgJ8Ca9Fy6m3jPjxDke9DlSh4P4o0yct8JGHF334Y
6AMk84+FvFh5AiZHqnP/sXdp8NW59sNJPUWSunjrQ1iRSJv0goMso6sjks6w1Hfs
JxpmWXjJiEYEEBEIAAYFAk+6TxgACgkQ9CaO5/Lv0PAGTQCgjR9jnKgClMp5lhY+
vmeOWrAmTlEAn3aJ/RWKj9OfO98ERRJ/HGcKL010iQIcBBABCAAGBQJPuk86AAoJ
EPOtXJSmf3B+p3MP+wSU/CeCdXuvKTEBj6JtB+GAi7zSFNrBkuu5s7wCnEhr1BQ8
u6LcP9beLFZstMbouyz6EZU0CdSkxURXZtsVJrDR1hJYuZ8uPSA+gldCmvoU6ECj
xIUIsq2W2fTG5UTSwQ3JXa+mZS+bRByFeCBCSrMxgqlRooRJ9PDOfJyZ6N/RUTpZ
SzhhgSKFs/Uv8xu/as4b2Ec32jpOmZcF5RiKMkp3zYenW01l/E1KM1PRfKTZRv4j
tTqqJELVqoBRM1Z/H/in7VIdSBDoI4K3W9BbDyvaUh5GgzLgwRkc94PTJ2mMEgA/
EBsKi2VDWU4AZ/CLjlqunqqLfEzdekHF9HC4iZsqjuodWOYzc/ECLE07w1/WAxOG
wR0Kevyf+GdQ6Nq4DfhwGRzNwhsGJBoqLu785kUZ9w9wbv6aGq9/AYtGVAt7g3IA
S/5H6QQZLic3MswAZHDg1dtBgO6Q32UTl0AcZ7qRBRfnhrhqC71rhMAhlGdzld82
MzFPQbCqAM8dUqIY67Hoyn0c0P+kw73QGcG/MDyIvYrBuu7fmCEq8V4fHaY38awJ
ydlIyhZhrrpW+o10BlbEuoBgDgFkDeynK0lUbusqrhCE/oAUHXfqXfzZ0Chx5EKK
jAcM1Q2/t3WnIPkXn3CAJRTnz7WJ0dN/OETJEvlDAhulUVzRbGCPXJBaxBKMiQIc
BBABAgAGBQJPx/i4AAoJECFN/YxMdeoFCywP/3AmFE+8tDj0VGrosKO7oRXCP6Dk
krfhezVQjDHAuvTMCJpYc71uvBOLOf6jSrSWcmJJXz89LBWRjLl5QpuHpYOLgn7j
90NXmW5tJY3lladQovMhmbnJehgK6POj8glq8jn8fAeKMM3npHxNcvoQ2ivXB0IL
1B0foM/RdyBgFjjFiISZwkDQRXcfaK9lQgQlIWu5Wts+YCMTR5aBrvVYchZAdKaB
q/gtmFjeCGy/d8Pch/hgevQLngap3X4pkldpHy1NtRNg/MqzTP7FjiinNJYUBga8
rTSeBLhk+X8bfL6FttiruVNTr8oX5RBNJlceV4l06vvvczJtTH/ROj8Vr/Lw4xTB
RKCWmAEzEYwITjpVDK/4U6NeZbIp1Srbi8IHPKHq9IYWiSZLP/fbtBSK418AiECw
A88CS3MA64f3X5i8AkDHV9fMccftTSzt4ovkTm3wrbDiqjfNzi6tfl9wt1Mc1fYh
krIO+OMZoQrI3+7kw52HHoXWs2w28CGYlH16foo/PdylSVTf09MV1uLmYOS/6A8l
1AYAxI6DDORz9qMIvj+jlHeJKDsUrIs2n2OEWnbe1jCJFsVlEHUWLqqBbfdIne8P
T9NX+mJzWhrxfm8XVHQpK8KxITej8Uuigj8W3Od1J/OJ3FfQ2Xzm8pOn0764cSKB
Deu05Hw2S4WgZ82DiEYEEBECAAYFAlAjB7oACgkQkZOYj+cNI1eTIgCfSPvYLhnh
CQXpYDeWn5QsUKO44eEAni3xVhrnCOrpBGWHu5QUX9cJx0yduQINBE+tml4BEADV
omhZSUujC2B/e6ghmTM7p9W4xVkP/OQVWzrNe7JaCkw1KOHeU5pWyQsxYV20jA6g
LZLIDbH3Wf2wWpyOMrvRR8T2ChxLe3IuFY3qMTGeldU5cYDrBRgQ8XDeVGp5qHee
2cbqWTxmSCgf+ux8vdAfw+d1LtyFQT08E7Q3fLLlZ5t1MxfwCl58SqwjyF7IwMvh
vLqDkqS0lcAj7uK8CspUQur7xnfZhB77mjAayPZyZxkZXcJ6ujJzwH1VRoslzQw0
RjSEOCewQ082PdEcZ/TxRMKKbheKsIRlMmJlP5bQd+bICivGR6JDOyRXNhx8BPhX
jeSiaYjdgLx+LqVzRFkMhQzzD4TdB6EuBgAUo+Qz8hMvXqw64NH2kXA9OsEq2yQn
+RLRTX3Eo9KwNMIwlmqRip+l6MUH+7zHILFohkBDgFAKyL6ExMbNOKts/kmsVQlk
5pznm3+ofZ1zDGeF5072JMLPJQn0cyg3UfGR+raSnn1+Zal6yGwqgZkfm5aGvEzG
jC2hj+Jfl1oGy5cnCk5Jia1wboG3wkxwNRN8sNLjSmv7sdJ87LyHYollvNGUayzt
PwdAlDHQqPEurzO0uy2WSjdEc6ZdBNYNJzDBJhHIy4kET1TxPWpfaHt35slT6tTK
7hvQ7VC1VwwSnqlDcw5VJTjIb9ue5KM5c4XhUgPXsQARAQABiQIlBBgBAgAPBQJP
rZpeAhsMBQkJZgGAAAoJEExw8Ghv5Q8cIAMP/jzbOVGNz/Uuzf/GKCQ4CudS5Ada
RjNHI4ATAcdGqXCKMzPGVVFDdxJF6yGPyq3wQD0FIwmpJGppjNuHk5eJ8UafqAHe
oynr7izB80o2CdYVMoMVa9Um0lALdCigAJQbu6sjQm5mN3qDVBpEcRzffchb/de8
GcbH2I/iEZ7L+Og73bw3yFXKwGS/vZ/8ZLEh20cqHzwB/4JjnnCLASgpPsaCGrXF
y0NW+Yo0HrN5deEMexYADDGPE2MQAWC5QjEvxm24yiO2q//xAtUUNVrKDXXbnwaN
BvlNzqNc1iCKcXghV8euwNyTF++UwDCT1x5bcAntl3wYHSHKasae3omvmja+Wdfs
iFZHQtzZXgFjPm0C1Y5v1uG+YmzLa0gDX3Lol0n+ANzZNKFSw/zXacyl9wavnUjh
ITiT9WbmXiEc575jUIlkqxP0Sqg8Afpk/tB5PGyan8GbsTVX7EE/l6724ZLyvH4/
Zuvhhqa4HA6hYwiNuXxoUBmabiMULIBZYdsn9znjRKeh6oeoqRa2C2El46o05sy+
woXtbjtbPIeSV1o7KUax0tkg2VqeKBW/qXBkyzLbRSC+vsYVpnO5pPqjaBPoqgIw
vWtDEroKvHDVC+T76U+BlKTooOU0sdWGS8x25HbFVUaxOOFEybkZiFZ2cOlADgcj
R5fTvoVeebaUFoTe
=d4EI
-----END PGP PUBLIC KEY BLOCK-----

4264
LICENSE Normal file

File diff suppressed because it is too large Load Diff

674
NOTICE Normal file
View File

@ -0,0 +1,674 @@
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
This distribution contains third party resources requiring the following notices:
For
cloud-ejb-api-3.0.jar
cloud-email.jar
cloud-jstl-1.2.jar
jaxb-api-2.1.jar
jaxb-impl-2.1.7.jar
jaxb-xjc-2.1.7.jar
jta-1.1.jar
mail-1.4.jar
NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE
(CDDL)
The code released under the CDDL shall be governed by the laws of the State of
California (excluding conflict-of-law provisions). Any litigation relating to
this License shall be subject to the jurisdiction of the Federal Courts of the
Northern District of California and the state courts of the State of California,
with venue lying in Santa Clara County, California.
For
cloud-javax.persistence-2.0.0.jar
EclipseLink 2.0.0
Dec 10th, 2009
About
The EclipseLink project's goal is to provide a complete persistence framework
that is both comprehensive and universal. It will run in any Java environment
and read and write objects to virtually any type of data source, including
relational databases, and XML. EclipseLink will focus on providing leading edge
support, including advanced feature extensions, for the dominant persistence
standards for each target data source; Java Persistence API (JPA) for relational
databases, Java API for XML Binding (JAXB) for XML, Service Data Objects (SDO),
and Database Web services (DBWS).
For tips on getting started with EclipseLink, please see the following
resources:
EclipseLink 2.0.0 Release Notes Documentation Examples and How To License
The Eclipse Foundation makes available all content in this plug-in ("Content").
Unless otherwise indicated below, the Content is provided to you under the terms
and conditions of the Eclipse Public License Version 1.0 ("EPL") and Eclipse
Distribution License Version 1.0 ("EDL"). A copy of the EPL is available at
http://www.eclipse.org/legal/epl-v10.html and a copy of the EDL is available at
http://www.eclipse.org/org/documents/edl-v10.php. For purposes of the EPL,
"Program" will mean the Content.
If you did not receive this Content directly from the Eclipse Foundation, the
Content is being redistributed by another party ("Redistributor") and different
terms and conditions may apply to your use of any object code in the Content.
Check the Redistributor's license that was provided with the Content. If no such
license exists, contact the Redistributor. Unless otherwise indicated below, the
terms and conditions of the EPL and EDL still apply to any source code in the
Content and such source code may be obtained at http://www.eclipse.org.
Third Party Content
The Content includes items that have been sourced from third parties as set out
below. If you did not receive this Content directly from the Eclipse Foundation,
the following is provided for informational purposes only, and you should look
to the Redistributor's license for terms and conditions of use.
Foundation Dependencies ASM EclipseLink JPA ANTLR Java Persistence API (JPA) 1.0
- EJB 3.0 Java Persistence API (JPA) 2.0 EARLY ACCESS EclipseLink MOXy Java
Architecture for XML Binding (JAXB) Java Mail Java Activation Framework
Streaming API for XML (StAX) EclipseLink SDO Service Data Objects (SDO)
Utilities Java Connector Xerces WSDL4J 1.6.2 ASM v1.5.3
The EclipseLink Project includes ASM for the purpose of byte code weaving. The
AMS library is re-packaged within the source of the project
(org.persistence.eclipse.internal.libraries.asm.*) to avoid version collisions
with other usage of ASM. A custom patch has been added to the ASM 1.5.3 source
to handle an issue with other usages. This fix has also been contributed back to
the ASM project for inclusion in later projects.
The source code is available within the project's subversion repository. The
binaries are distributed within the eclipselink.jar and in the
org.eclipse.persistence.asm_2.0.0.v*.jar bundle.
http://asm.objectweb.org/license.html
Copyright (c) 2000-2005 INRIA, France Telecom, All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer. Redistributions in binary form must
reproduce the above copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with the
distribution. Neither the name of the copyright holders nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY
THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THEIMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSEARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BELIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, ORCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OFSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER INCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE)ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OFTHE POSSIBILITY OF SUCH DAMAGE.
ANTLR v3.0
The ANTLR library (license) is included within EclipseLink Project to enable
parsing of the Java Persistence Query language (JP QL). The ANTLR library is re-
packaged within the project in the
org.eclipse.persistence.internal.libraries.antlr.* packages.
The source is available with the project's subversion repository. The binaries
are distributed within the eclipselink.jar and in the
org.eclipse.persistence.antlr_2.0.0.v*.jar bundle.
Java Architecture for XML Binding (JAXB) v2.0.5
The JAXB libraries distributed under CDDL v1.0 are included within the
EclipseLink Project to enable the MOXY component's implementation of JAXB.
JAXB Libraries:
/jlib/moxy/javax.xml.bind_2.1.12.v20090708-1500.jar /jlib/moxy/jaxb-impl.jar
/jlib/moxy/jaxb.xjc.jar Java Persistence (JPA) 1.0 - EJB 3.0
The Java Persistence API, included with EJB 3.0, is available for download from
the ejb-api directory in the glassfish CVS repository.It is distributed under
CDDLv1.0 . The jar is being shipped as an OSGi bundle and is required for
compilation of some container based fuctionality.
Java Persistence (JPA) 2.0.
EclipseLink is the Java Persistence (JPA) 2.0 Reference Implementation (JSR
317). The JPA 2.0 specification API is included in EclipseLink under the EPL and
EDL licenses.
Java Mail v1.4
The Java Mail library (mail.jar) is distributed with the JAXB v2.0.5 under CDDL
v1.0 and is included within the EclipseLink Project distribution to support Web
Services attachment handling in the MOXy component. It is only required when
using Java SE 5 (Java Mail is included in Java SE 6).
Java Activation Framework v1.1
The Java Activation Framework (activation.jar) is distributed with the JAXB
v2.0.5 under CDDL v1.0 and is included within the EclipseLink Project
distribution to support Web Services attachment handling in the MOXy component.
It is only required when using Java SE 5 (The Java Activation Framework is
included in Java SE 6).
Streaming API for XML (StAX) v1.0
The Streaming API for XML (StAX) library (jsr173_1.0_api.jar) is distributed
with the JAXB v2.0.5 under CDDL v1.0 and is included within the EclipseLink
Project distribution as an optional XML processing approach in the MOXy
component.
Service Data Objects (SDO) v2.1.1
The Service Data Objects (SDO) API is distributed under a CDDLv1.0 and custom
license. It provides the standard API implemented by the EclipseLink Project's
SDO component.
Java Connector v1.5
The JCA 1.5 API is available for download from the connector-api directory in
the glassfish CVS repository. It is distributed under CDDLv1.0 .
This jar is being shipped and required by the Workbench only. When using
EclipseLink in a container where JCA integration is required that container will
provide the necessary API libraries.
Xerces v2.9.0
Xerces 2.9.0 is available from the Xerces home page. It is distributed under
Apache 2.0.
This jar is shipped for the Workbench's use only in the reading and writing of
XML configuration files.
WSDL4j v1.6.2
WSDL4J 1.6.2 is available for download from the wsdl4j project. It distributed
under CPLv1.0 .
This jar is being shipped as a OSGi bundle and is only required for the DBWS
Builder utility.
For
cloud-commons-logging-1.1.1.jar
commons-logging-1.1.1.jar
// ------------------------------------------------------------------
// NOTICE file corresponding to the section 4d of The Apache License,
// Version 2.0, in this case for Commons Logging
// ------------------------------------------------------------------
Commons Logging
Copyright 2001-2007 The Apache Software Foundation
This product includes/uses software(s) developed by 'an unknown organization'
- Unnamed - avalon-framework:avalon-framework:jar:4.1.3
- Unnamed - log4j:log4j:jar:1.2.12
- Unnamed - logkit:logkit:jar:1.0.1
For
neethi-2.0.4.jar
=========================================================================
== NOTICE file corresponding to the section 4 d of ==
== the Apache License, Version 2.0, ==
== in this case for the Apache AXIOM distribution. ==
=========================================================================
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
Portions Copyright 2006 International Business Machines Corp.
Please read the different LICENSE files present in the licenses directory of
this distribution.
For
cloud-jasypt-1.9.jar
Copyright (c) 2007-2010, The JASYPT team (http://www.jasypt.org)
Licensed 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.
---------------------------------
This distribution includes cryptographic software. The country in
which you currently reside may have restrictions on the import,
possession, use, and/or re-export to another country, of
encryption software. BEFORE using any encryption software, please
check your country's laws, regulations and policies concerning the
import, possession, or use, and re-export of encryption software, to
see if this is permitted. See http://www.wassenaar.org/ for more
information.
The U.S. Government Department of Commerce, Bureau of Industry and
Security (BIS), has classified this software as Export Commodity
Control Number (ECCN) 5D002.C.1, which includes information security
software using or performing cryptographic functions with asymmetric
algorithms. The form and manner of this distribution makes it
eligible for export under the License Exception ENC Technology
Software Unrestricted (TSU) exception (see the BIS Export
Administration Regulations, Section 740.13) for both object code and
source code.
The following provides more details on the cryptographic software
used (note that this software is not included in the distribution):
* The PBE Encryption facilities require the Java Cryptography
extensions: http://java.sun.com/javase/technologies/security/.
---------------------------------
Distributions of this software may include software developed by
The Apache Software Foundation (http://www.apache.org/).
---------------------------------
ICU License - ICU 1.8.1 and later
COPYRIGHT AND PERMISSION NOTICE
Copyright (c) 1995-2006 International Business Machines
Corporation and others
All rights reserved.
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish,
distribute, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so,
provided that the above copyright notice(s) and this
permission notice appear in all copies of the Software and
that both the above copyright notice(s) and this
permission notice appear in supporting documentation.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO
EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN
THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
USE OR PERFORMANCE OF THIS SOFTWARE.
Except as contained in this notice, the name of a copyright
holder shall not be used in advertising or otherwise to
promote the sale, use or other dealings in this Software
without prior written authorization of the copyright holder.
For
jquery.md5.js
jQuery MD5 Plugin 1.2.1
https://github.com/blueimp/jQuery-MD5
Copyright 2010, Sebastian Tschan
https://blueimp.net
Licensed under the MIT license:
http://creativecommons.org/licenses/MIT/
Based on
A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
Digest Algorithm, as defined in RFC 1321.
Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
Distributed under the BSD License
See http://pajhome.org.uk/crypt/md5 for more info.
For
XmlSchema-1.4.3.jar
Portions Copyright 2006 International Business Machines Corp.
For
cloud-trilead-ssh2-build213.jar
Trilead SSH-2 for Java includes code that was written by Dr. Christian Plattner
during his PhD at ETH Zurich. The license states the following:
Copyright (c) 2005 - 2006 Swiss Federal Institute of Technology (ETH Zurich),
Department of Computer Science (http://www.inf.ethz.ch),
Christian Plattner. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
a.) Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
b.) Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
c.) Neither the name of ETH Zurich nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
The Java implementations of the AES, Blowfish and 3DES ciphers have been
taken (and slightly modified) from the cryptography package released by
"The Legion Of The Bouncy Castle".
Their license states the following:
Copyright (c) 2000 - 2004 The Legion Of The Bouncy Castle
(http://www.bouncycastle.org)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
For
jquery.js
jQuery JavaScript Library v1.3.2
http://jquery.com/
Copyright (c) 2009 John Resig
Dual licensed under the MIT and GPL licenses.
http://docs.jquery.com/License
Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
Revision: 6246
For
axis2-1.5.1.jar
axis2-adb-1.5.1.jar
axis2-ant-plugin-1.5.1.jar
axis2-jaxbri-1.5.1.jar
axis2-jaxws-1.5.1.jar
axis2-jibx-1.5.1.jar
axis2-json-1.5.1.jar
axis2-kernel-1.5.1.jar
axis2-transport-http-1.5.1.jar
axis2-transport-local-1.5.1.jar
axis2-webapp-1.5.1.war
cloud-axis.jar
=========================================================================
== NOTICE file corresponding to the section 4 d of ==
== the Apache License, Version 2.0, ==
== in this case for the Apache Axis2 distribution. ==
=========================================================================
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
Portions Copyright 2006 International Business Machines Corp.
Portions Copyright 2005-2007 WSO2, Inc.
This product also includes schemas and specification developed by:
- the W3C consortium (http://www.w3c.org)
This product also includes WS-* schemas developed by International
Business Machines Corporation, Microsoft Corporation, BEA Systems,
TIBCO Software, SAP AG, Sonic Software, and VeriSign
This product also includes a WSDL developed by salesforce.com
- Copyright 1999-2006 salesforce.com, inc.
Portions of the included xmlbeans library were originally based on the following:
- software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.
Please read the different LICENSE files present in the lib directory of
this distribution.
For
xml-apis.jar
=========================================================================
== NOTICE file corresponding to section 4(d) of the Apache License, ==
== Version 2.0, in this case for the Apache xml-commons xml-apis ==
== distribution. ==
=========================================================================
Apache XML Commons XML APIs
Copyright 2006 The Apache Software Foundation.
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
Portions of this software were originally based on the following:
- software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
- software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
- software copyright (c) 2000 World Wide Web Consortium, http://www.w3.org
For
cloud-commons-codec-1.5.jar
commons-codec-1.4.jar
Apache Commons Codec
Copyright 2002-2011 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
--------------------------------------------------------------------------------
src/test/org/apache/commons/codec/language/DoubleMetaphoneTest.java contains
test data from http://aspell.sourceforge.net/test/batch0.tab.
Copyright (C) 2002 Kevin Atkinson (kevina@gnu.org). Verbatim copying
and distribution of this entire article is permitted in any medium,
provided this notice is preserved.
--------------------------------------------------------------------------------
For
jquery.js
jQuery JavaScript Library v1.6.1
http://jquery.com/
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license
Includes Sizzle.js
http://sizzlejs.com/
Copyright 2011, The Dojo Foundation
Released under the MIT, BSD, and GPL Licenses.
Date: Thu May 12 15:04:36 2011 -0400
For
rampart-lib
Apache Rampart
Copyright 2010 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
Please read the different LICENSE files present in the lib directory of
this distribution.
For
xercesImpl.jar
=========================================================================
== NOTICE file corresponding to section 4(d) of the Apache License, ==
== Version 2.0, in this case for the Apache Xerces Java distribution. ==
=========================================================================
Apache Xerces Java
Copyright 1999-2012 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
Portions of this software were originally based on the following:
- software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
- software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
- voluntary contributions made by Paul Eng on behalf of the
Apache Software Foundation that were originally developed at iClick, Inc.,
software copyright (c) 1999.
For
jquery.colorhelpers.js
Plugin for jQuery for working with colors.
Version 1.1.
Inspiration from jQuery color animation plugin by John Resig.
Released under the MIT license by Ole Laursen, October 2009.
For
woden-api-1.0M8.jar
woden-impl-dom-1.0M8.jar
=========================================================================
== NOTICE file corresponding to the section 4 d of ==
== the Apache License, Version 2.0, ==
== in this case for the Apache Woden distribution. ==
=========================================================================
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
This product also includes software developed by :
- IBM Corporation (http://www.ibm.com),
WSDL4J was the initial code contribution for the Apache Woden
project and some of the WSDL4J design and code has been reused.
- The W3C Consortium (http://www.w3c.org),
Common W3C XML Schema and DTD files are packaged with Apache Woden.
Please read the different LICENSE files present in the root directory of
this distribution.
For
axiom-api-1.2.8.jar
axiom-impl-1.2.8.jar
Axiom includes software from other projects, as follows:
This software includes the Woodstox High-performance XML processor
http://woodstox.codehaus.org/
licensed under the Apache License, Version 2.0
This software includes the Jaxen XPath library
http://jaxen.codehaus.org/
licensed under the following BSD 3 Clause license:
================================================================================
Copyright 2003-2006 The Werken Company. All Rights Reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Jaxen Project nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================================================

View File

@ -1,11 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<body>
<a href="http://cloud.com"><img src="docs/images/logo_cloud.jpg"></a>
<p>Welcome to CloudStack. Here's where you can find more information:</p>
<ul>
<li><a href="http://www.cloudstack.org">Community</a> - forums, code, bugbase, blog, events, links to outside resources, IRC, and more</li>
<li><a href="http://cloud.mindtouch.us">Documentation and Knowledge Base</a> - installation steps, guides, references, troubleshooting tips</li>
</ul>
</body>
</html>

140
README.md
View File

@ -1,26 +1,130 @@
# CloudStack
Apache CloudStack (Incubating) Version 4.0.0
CloudStack is a massively scalable free/libre open source Infrastructure as a Service cloud platform.
# About Apache CloudStack (Incubating)
Visit us at [cloudstack.org](http://cloudstack.org) or join #cloudstack on irc.freenode.net
Apache CloudStack (Incubating) is software designed to deploy
and manage large networks of virtual machines, as a highly
available, highly scalable Infrastructure as a Service (IaaS)
cloud computing platform. CloudStack is used by a number of
service providers to offer public cloud services, and by many
companies to provide an on-premises (private) cloud offering.
## Binary Downloads
Apache CloudStack currently supports the most popular hypervisors:
VMware, Oracle VM, KVM, XenServer and Xen Cloud Platform.
CloudStack also offers bare metal management of servers,
using PXE to provision OS images and IPMI to manage the server.
Apache CloudStack offers three methods for managing cloud
computing environments: an easy to use Web interface, command
line tools, and a full-featured RESTful API.
Downloads are available from:
http://cloudstack.org/download.html
## Supported Hypervisors
* XenServer
* KVM
* VMware ESX/ESXi (via vCenter)
* Oracle VM
* XCP
Visit us at [cloudstack.org](http://incubator.apache.org/cloudstack).
## Mailing lists
[Announcement Mailing List](https://lists.sourceforge.net/lists/listinfo/cloudstack-announce)
[Development Mailing List](https://lists.sourceforge.net/mailman/listinfo/cloudstack-devel)
[Users Mailing list](https://lists.sourceforge.net/mailman/listinfo/cloudstack-users)
[Commits mailing list](https://lists.sourceforge.net/mailman/listinfo/cloudstack-commits)
[Development Mailing List](mailto:cloudstack-dev-subscribe@incubator.apache.org)
[Users Mailing list](mailto:cloudstack-users-subscribe@incubator.apache.org)
[Commits mailing list](mailto:cloudstack-commits-subscribe@incubator.apache.org)
# License
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.
# Building CloudStack
By default, CloudStack will only build with supporting packages
that are appropved by the ASF as being compatible with the Apache
Software License Version 2.
## Default build
To build the default build target, use maven3 and execute:
mvn install
## Including optional third party libraries in your build
If you want to build this software against one of the optional
third party libraries, follow the instructions below:
These third parties jars are non available in Maven central, and
need to be located and downloaded by the developer themselves.
The libraries to download are listed below, by the feature that
they support.
For F5 load balancing support:
cloud-iControl.jar
For Netscaler support:
cloud-netscaler.jar
cloud-netscaler-sdx.jar
For NetApp Storage Support:
cloud-manageontap.jar
For VMware Support:
vmware-vim.jar
vmware-vim25.jar
vmware-apputils.jar
Once downloaded (and named the same as listed above), they can be
installed into your local maven repository with the following command:
cd deps&&sh ./install-non-oss.sh
To perform the build, run the following command:
mvn -Dnonoss install
## Running a developer environment
To run the webapp client:
mvn org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-beta-1:run -pl :cloud-client-ui -am -Pclient
Then hit: http://localhost:8080/cloud-client-ui/
or add in your ~/.m2/settings.xml
<pluginGroups>
<pluginGroup>org.apache.tomcat.maven</pluginGroup>
</pluginGroups>
and save your fingers with mvn tomcat7:run -pl :cloud-client-ui -am -Pclient
Optionally add -Dnonoss to either of the commands above.
If you want to use ide debug: replace mvn with mvnDebug and attach your ide debugger to port 8000
# Notice of Cryptographic Software
This distribution includes cryptographic software. The country in which you currently
reside may have restrictions on the import, possession, use, and/or re-export to another
country, of encryption software. BEFORE using any encryption software, please check your
country's laws, regulations and policies concerning the import, possession, or use, and
re-export of encryption software, to see if this is permitted. See http://www.wassenaar.org/
for more information.
The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has
classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which
includes information security software using or performing cryptographic functions with
asymmetric algorithms. The form and manner of this Apache Software Foundation distribution
makes it eligible for export under the License Exception ENC Technology Software
Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section
740.13) for both object code and source code.
The following provides more details on the included cryptographic software:
TODO

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/deps/cloud-log4j.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/core"/>
<classpathentry combineaccessrules="false" kind="src" path="/api"/>
<classpathentry combineaccessrules="false" kind="src" path="/server"/>
<classpathentry combineaccessrules="false" kind="src" path="/utils"/>
<classpathentry combineaccessrules="false" kind="src" path="/agent"/>
<classpathentry combineaccessrules="false" kind="src" path="/console"/>
<classpathentry combineaccessrules="false" kind="src" path="/console-proxy"/>
<classpathentry combineaccessrules="false" kind="src" path="/console-viewer"/>
<classpathentry combineaccessrules="false" kind="src" path="/deps"/>
<classpathentry combineaccessrules="false" kind="src" path="/setup"/>
<classpathentry combineaccessrules="false" kind="src" path="/test"/>
<classpathentry combineaccessrules="false" kind="src" path="/tools"/>
<classpathentry combineaccessrules="false" kind="src" path="/ui"/>
<classpathentry combineaccessrules="false" kind="src" path="/usage"/>
<classpathentry combineaccessrules="false" kind="src" path="/client"/>
<classpathentry combineaccessrules="false" kind="src" path="/vmware-base"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>agent-simulator</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -1,85 +0,0 @@
# Copyright 2012 Citrix Systems, Inc. Licensed under the
# Apache License, Version 2.0 (the "License"); you may not use this
# file except in compliance with the License. Citrix Systems, Inc.
# reserves all rights not expressly granted by 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.
#
# Automatically generated by addcopyright.py at 04/03/2012
DROP TABLE IF EXISTS `cloud`.`mockhost`;
DROP TABLE IF EXISTS `cloud`.`mocksecstorage`;
DROP TABLE IF EXISTS `cloud`.`mockstoragepool`;
DROP TABLE IF EXISTS `cloud`.`mockvm`;
DROP TABLE IF EXISTS `cloud`.`mockvolume`;
CREATE TABLE `cloud`.`mockhost` (
`id` bigint unsigned NOT NULL auto_increment,
`name` varchar(255) NOT NULL,
`private_ip_address` char(40),
`private_mac_address` varchar(17),
`private_netmask` varchar(15),
`storage_ip_address` char(40),
`storage_netmask` varchar(15),
`storage_mac_address` varchar(17),
`public_ip_address` char(40),
`public_netmask` varchar(15),
`public_mac_address` varchar(17),
`guid` varchar(255) UNIQUE,
`version` varchar(40) NOT NULL,
`data_center_id` bigint unsigned NOT NULL,
`pod_id` bigint unsigned,
`cluster_id` bigint unsigned COMMENT 'foreign key to cluster',
`cpus` int(10) unsigned,
`speed` int(10) unsigned,
`ram` bigint unsigned,
`capabilities` varchar(255) COMMENT 'host capabilities in comma separated list',
`vm_id` bigint unsigned,
`resource` varchar(255) DEFAULT NULL COMMENT 'If it is a local resource, this is the class name',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `cloud`.`mocksecstorage` (
`id` bigint unsigned NOT NULL auto_increment,
`url` varchar(255),
`capacity` bigint unsigned,
`mount_point` varchar(255),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `cloud`.`mockstoragepool` (
`id` bigint unsigned NOT NULL auto_increment,
`guid` varchar(255),
`mount_point` varchar(255),
`capacity` bigint,
`pool_type` varchar(40),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `cloud`.`mockvm` (
`id` bigint unsigned NOT NULL auto_increment,
`name` varchar(255),
`host_id` bigint unsigned,
`type` varchar(40),
`state` varchar(40),
`vnc_port` bigint unsigned,
`memory` bigint unsigned,
`cpu` bigint unsigned,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `cloud`.`mockvolume` (
`id` bigint unsigned NOT NULL auto_increment,
`name` varchar(255),
`size` bigint unsigned,
`path` varchar(255),
`pool_id` bigint unsigned,
`type` varchar(40),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@ -1,26 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
pod_query="GET http://10.91.30.226:8096/client/?command=deletePod&id=$x HTTP/1.0\n\n"
echo -e $pod_query | nc -v -q 20 10.91.30.226 8096

View File

@ -1,25 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
delete_so="GET http://10.91.30.226:8096/client/?command=deleteServiceOffering&id=$x HTTP/1.0\n\n"
echo -e $delete_so | nc -v -q 20 10.91.30.226 8096

View File

@ -1,26 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
vlan_query="GET http://10.91.30.226:8096/client/?command=deleteVlanIpRange&id=$x HTTP/1.0\n\n"
echo -e $vlan_query | nc -v -q 20 10.91.30.226 8096

View File

@ -1,26 +0,0 @@
#!/usr/bin/env bash
# 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.
zoneid=$1
templateId=$2
serviceOfferingId=$3
query="GET http://10.91.30.226:8096/client/?command=deployVirtualMachine&zoneId=$1&templateId=$2&serviceOfferingId=$3&account=admin&domainid=1 HTTP/1.0\n\n"
echo -e $query | nc -v -q 20 10.91.30.226 8096

View File

@ -1,22 +0,0 @@
#!/usr/bin/env bash
# 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.
query="GET http://10.91.30.226:8096/client/?command=listRouters&zoneId=$1&account=admin&domainid=1 HTTP/1.0\n\n"
echo -e $query | nc -v 10.91.30.226 8096

View File

@ -1,22 +0,0 @@
#!/usr/bin/env bash
# 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.
query="GET http://10.91.28.33:8096/client/?command=listVirtualMachines&zoneId=$1&account=admin&domainid=1 HTTP/1.0\n\n"
echo -e $query | nc -v -q 20 10.91.28.33 8096

View File

@ -1,53 +0,0 @@
#!/usr/bin/env bash
# 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.
usage() {
printf "Query job result Usage: %s: -h management-server -j jobid\n" $(basename $0) >&2
}
#options
jflag=
hflag=
jobid=
host="127.0.0.1" #defaults to localhost
while getopts 'h:j:' OPTION
do
case $OPTION in
h) hflag=1
host="$OPTARG"
;;
j) jflag=1
jobid="$OPTARG"
;;
?) usage
exit 2
;;
esac
done
if [ $jflag != "1" ]
then
usage
exit 2
fi
job_query="GET http://$host:8096/client/?command=queryAsyncJobResult&jobid=$jobid HTTP/1.0\n\n"
echo -e $job_query | nc -v -w 60 $host 8096

View File

@ -1,25 +0,0 @@
#!/usr/bin/env bash
# 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.
#run.sh runs the agent simulator client.
java -cp cloud-utils.jar:agent-simulator.jar:log4j-1.2.15.jar:apache-log4j-extras-1.0.jar:ws-commons-util-1.0.2.jar:xmlrpc-client-3.1.3.jar:cloud-agent.jar:cloud-core.jar:xmlrpc-common-3.1.3.jar:javaee-api-5.0-1.jar:gson-1.3.jar:commons-httpclient-3.1.jar:commons-logging-1.1.1.jar:commons-codec-1.4.jar:commons-collections-3.2.1.jar:commons-pool-1.4.jar:.:./conf com.cloud.agent.AgentSimulator $@

View File

@ -1,31 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
y=$2
name=$3
pod_query="GET http://10.91.30.226:8096/client/?command=createPod&zoneId=1&name=SSP$name&cidr=182.$x.$y.0%2F24&startIp=182.$x.$y.2&endIp=182.$x.$y.252&gateway=182.$x.$y.1
HTTP/1.0\n\n"
echo -e $pod_query | nc -v -q 20 10.91.30.226 8096
#vlan_query="GET http://10.91.30.226/client/?command=createVlanIpRange&vlan=untagged&zoneid=1&podId=$name&forVirtualNetwork=false&gateway=172.$y.$x.1&netmask=255.255.255.0&startip=172.$y.$x.2&endip=172.$y.$x.252 HTTP/1.0\n\n"
#echo -e $vlan_query | nc -v -q 20 10.91.30.226 8096

View File

@ -1,23 +0,0 @@
#!/usr/bin/env bash
# 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.
name=$1
host_query="GET http://10.91.30.226:8096/client/?command=addHost&zoneId=1&podId=$((name+250))&username=sim&password=sim&clustername=simulator-$name&hosttags=RP$name&url=http%3A%2F%2Fsim HTTP/1.0\n\n"
echo -e $host_query | nc -v -w 60 10.91.30.226 8096

View File

@ -1,39 +0,0 @@
#!/usr/bin/env bash
# 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.
workers=$1
x=$2 #CIDR - 16bytes
y=$3 #CIDR - 8 bytes
for name in `seq 1 $workers`
do
pod_query="GET http://10.91.30.226:8096/client/?command=createPod&zoneId=1&name=RP$name&cidr=182.$x.$y.0%2F24&startIp=182.$x.$y.2&endIp=182.$x.$y.252&gateway=182.$x.$y.1 HTTP/1.0\n\n"
vlan_query="GET http://10.91.30.226:8096/client/?command=createVlanIpRange&vlan=untagged&zoneid=1&podId=$((name+250))&forVirtualNetwork=false&gateway=182.$y.$x.1&netmask=255.255.255.0&startip=182.$y.$x.2&endip=182.$y.$x.252 HTTP/1.0\n\n"
so_query="GET http://10.91.30.226:8096/client/?command=createServiceOffering&name=RP$name&displayText=RP$name&storageType=local&cpuNumber=1&cpuSpeed=1000&memory=512&offerha=false&usevirtualnetwork=false&hosttags=RP$name HTTP/1.0\n\n"
echo -e $pod_query | nc -v -w 20 10.91.30.226 8096
echo -e $vlan_query | nc -v -w 20 10.91.30.226 8096
echo -e $so_query | nc -v -w 20 10.91.30.226 8096
let x+=1
let y+=1
done

View File

@ -1,24 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
so_query="GET http://10.91.30.226:8096/client/?command=createServiceOffering&name=SO$x&displayText=SO$x&storageType=local&cpuNumber=1&cpuSpeed=1000&memory=512&offerha=false&usevirtualnetwork=false&hosttags=SP$x HTTP/1.0\n\n"
echo -e $so_query | nc -v -q 20 10.91.30.226 8096

View File

@ -1,26 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
y=$2
name=$3
vlan_query="GET http://10.91.30.226/client/?command=createVlanIpRange&vlan=untagged&zoneid=1&podId=$name&forVirtualNetwork=false&gateway=172.$x.$y.1&netmask=255.255.255.0&startip=172.$x.$y.2&endip=172.$x.$y.252 HTTP/1.0\n\n"
echo -e $vlan_query | nc -v -q 20 10.91.30.226 8096

View File

@ -1,55 +0,0 @@
#!/usr/bin/env bash
# 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.
a=$1 #CIDR - 16bytes
b=$2 #CIDR - 8 bytes
host=$3
zoneid=$4
zone_query="GET http://$host/client/?command=createZone&networktype=Advanced&securitygroupenabled=false&name=SimulatorAdvanced&dns1=4.2.2.2&internaldns1=4.2.2.2&vlan=10-4000&guestcidraddress=10.1.1.0%2F24 HTTP/1.0\n\n"
echo -e $zone_query | nc -v -w 120 $host 8096
let x=a
let y=b
for name in `seq 1 1`
do
pod_query="GET http://$host/client/?command=createPod&zoneid=$zoneid&name=POD$name&netmask=255.255.0.0&startIp=172.$x.$y.2&endIp=172.$x.$y.252&gateway=172.$x.$y.1 HTTP/1.0\n\n"
vlan_query="GET http://$host/client/?command=createVlanIpRange&forVirtualNetwork=true&vlan=untagged&zoneid=$zoneid&podId=$name&gateway=172.$y.$x.1&netmask=255.255.255.0&startip=172.$y.$x.2&endip=172.$y.$x.252 HTTP/1.0\n\n"
echo -e $pod_query | nc -v -w 20 $host 8096
echo -e $vlan_query | nc -v -w 20 $host 8096
done
let x+=1
let y+=1
name=1
clusterid=1
for cluster in `seq 1 1`
do
cluster_query="GET http://$host/client/?command=addCluster&hypervisor=Simulator&clustertype=CloudManaged&zoneid=$zoneid&podId=1&clustername=POD$name-CLUSTER$cluster HTTP/1.0\n\n"
echo -e $cluster_query | nc -v -w 120 $host 8096
host_query="GET http://$host/client/?command=addHost&zoneid=$zoneid&podId=1&username=sim&password=sim&clusterid=$cluster&hypervisor=Simulator&clustertype=CloudManaged&url=http%3A%2F%2Fsim HTTP/1.0\n\n"
echo -e $host_query | nc -v -w 6000 $host 8096
spool_query="GET http://$host/client/?command=createStoragePool&zoneid=$zoneid&podId=1&clusterid=$cluster&name=SPOOL$cluster&url=nfs://172.1.25.$((cluster+1))/export/share/$cluster HTTP/1.0\n\n"
echo -e $spool_query | nc -v -w 6000 $host 8096
let clusterid+=1
done
sstorquery="GET http://$host/client/?command=addSecondaryStorage&zoneid=$zoneid&url=nfs://172.1.25.32/export/share/ HTTP/1.0\n\n"
echo -e $sstorquery | nc -v -w 6000 $host 8096

View File

@ -1,53 +0,0 @@
#!/usr/bin/env bash
# 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.
a=$1 #CIDR - 16bytes
b=$2 #CIDR - 8 bytes
host=$3 #MSHOST
zoneid=$4
zone_query="GET http://$host/client/?command=createZone&networktype=Basic&securitygroupenabled=false&name=SimulatorBasic&dns1=4.2.2.2&internaldns1=4.2.2.2&vlan=10-4000 HTTP/1.0\n\n"
echo -e $zone_query | nc -v -w 120 $host 8096
let x=a
let y=b
for name in `seq $zoneid 1`
do
pod_query="GET http://$host/client/?command=createPod&zoneId=$zoneid&name=POD$name&netmask=255.255.255.0&startIp=172.$x.$y.2&endIp=172.$x.$y.252&gateway=172.$x.$y.1 HTTP/1.0\n\n"
vlan_query="GET http://$host/client/?command=createVlanIpRange&vlan=untagged&zoneid=$zoneid&podId=$name&forVirtualNetwork=false&gateway=172.$y.$x.1&netmask=255.255.255.0&startip=172.$y.$x.2&endip=172.$y.$x.252 HTTP/1.0\n\n"
echo -e $pod_query | nc -v -w 20 $host 8096
echo -e $vlan_query | nc -v -w 20 $host 8096
let x+=1
let y+=1
done
clusterid=1
for podid in `seq $zoneid 1`
do
cluster_query="GET http://$host/client/?command=addCluster&hypervisor=Simulator&clustertype=CloudManaged&zoneid=$zoneid&podId=$podid&clustername=POD$name-CLUSTER$cluster HTTP/1.0\n\n"
echo -e $cluster_query | nc -v -w 120 $host 8096
host_query="GET http://$host/client/?command=addHost&zoneId=$zoneid&podId=$podid&username=sim&password=sim&clusterid=$clusterid&url=http%3A%2F%2Fsim&hypervisor=Simulator&clustertype=CloudManaged HTTP/1.0\n\n"
echo -e $host_query | nc -v -w 6000 $host 8096
let clusterid+=1
done
sstorquery="GET http://$host/client/?command=addSecondaryStorage&zoneid=$zoneid&url=nfs://172.1.25.32/export/share/ HTTP/1.0\n\n"
echo -e $sstorquery | nc -v -w 6000 $host 8096

View File

@ -1,26 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
start_router="GET http://10.91.30.226:8096/client/?command=startRouter&id=$x HTTP/1.0\n\n"
echo -e $start_router | nc -v -q 60 10.91.30.226 8096

View File

@ -1,22 +0,0 @@
#!/usr/bin/env bash
# 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.
test="GET http://10.91.30.226:8096/?command=listEvents&page=1 HTTP/1.0\n\n"
echo -e $test | nc -v -q 20 10.91.30.226 8096

View File

@ -1,52 +0,0 @@
#!/usr/bin/env python
# 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.
from datetime import datetime
import sys
import matplotlib.cbook as cbook
import matplotlib.image as image
import matplotlib.pyplot as plt
def formGraph(list_timedelta):
""" Draw a graph of the performance of host add response """
plt.plot(list(map(lambda x:x.seconds, list_timedelta)))
plt.ylabel("time(s) to add host")
plt.xlabel("number of hosts")
plt.title("Add Host Performance")
plt.grid(True)
plt.show()
if __name__=='__main__':
time_file=open(sys.argv[1], 'r')
timelist=[]
diffs=[]
for line in time_file.readlines():
try:
timelist.append(datetime.strptime(line.strip(), "%d %b %Y %H:%M:%S"))
except ValueError:
print "Unable to parse:",line
stime=timelist[:-1]
btime=timelist[1:]
diffs=list(map(lambda x,y: y - x,stime,btime))
formGraph(diffs)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

View File

@ -1,37 +0,0 @@
#!/usr/bin/env bash
# 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.
zoneid=$1
templateId=$2
serviceOfferingId=$3
for j in `seq 1 100`
do
let add=0
for i in `seq 1 10`
do
let account=$(($i+$add))
echo Account Name: , $account
query="GET http://127.0.0.1/client/?command=deployVirtualMachine&zoneId=$1&hypervisor=Simulator&templateId=$2&serviceOfferingId=$3&account=DummyAccount$account&domainid=1 HTTP/1.0\n\n"
echo -e $query | nc -v -q 20 127.0.0.1 8096
done
let add=add+10
sleep 60s
done

View File

@ -1,24 +0,0 @@
#!/usr/bin/env bash
# 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.
name=$1
account_query="GET http://127.0.0.1/client/?command=createAccount&accounttype=1&email=simulator%40simulator.com&username=$name&firstname=first$name&lastname=last$name&password=5f4dcc3b5aa765d61d8327deb882cf99&account=$name&domainid=1 HTTP/1.1\n\n"
echo -e $account_query | nc -v -q 120 127.0.0.1 8096

View File

@ -1,20 +0,0 @@
#!/usr/bin/env bash
# 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.
spool_query="GET http://127.0.0.1/client/?command=createStoragePool&zoneId=1&podId=1&clusterid=1&name=SPOOL&url=nfs://10.91.25.6/export/share/1 HTTP/1.0\n\n"
echo -e $spool_query | nc -v -q 60 127.0.0.1 8096

View File

@ -1,24 +0,0 @@
#!/usr/bin/env bash
# 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.
name=$1
account_query="GET http://127.0.0.1/client/?command=createAccount&accounttype=0&email=simulator%40simulator.com&username=$name&firstname=first$name&lastname=last$name&password=5f4dcc3b5aa765d61d8327deb882cf99&account=$name&domainid=1 HTTP/1.1\n\n"
echo -e $account_query | nc -v -q 120 127.0.0.1 8096

View File

@ -1,25 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
delete="GET http://127.0.0.1/client/?command=deleteAccount&id=$x HTTP/1.0\n\n"
echo -e $delete | nc -v -q 60 127.0.0.1 8096

View File

@ -1,26 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
pod_query="GET http://10.91.30.219:8096/client/?command=deletePod&id=$x HTTP/1.0\n\n"
echo -e $pod_query | nc -v -q 20 10.91.30.219 8096

View File

@ -1,25 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
delete_so="GET http://10.91.30.219:8096/client/?command=deleteServiceOffering&id=$x HTTP/1.0\n\n"
echo -e $delete_so | nc -v -q 20 10.91.30.219 8096

View File

@ -1,26 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
vlan_query="GET http://10.91.30.219:8096/client/?command=deleteVlanIpRange&id=$x HTTP/1.0\n\n"
echo -e $vlan_query | nc -v -q 20 10.91.30.219 8096

View File

@ -1,27 +0,0 @@
#!/usr/bin/env bash
# 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.
zoneid=$1
templateId=$2
serviceOfferingId=$3
networkIds=$4
query="GET http://10.91.30.219/client/?command=deployVirtualMachine&zoneId=$1&hypervisor=Simulator&templateId=$2&serviceOfferingId=$3&networkIds=$4&account=admin&domainid=1 HTTP/1.0\n\n"
echo -e $query | nc -v -q 20 10.91.30.219 8096

View File

@ -1,25 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
destroy="GET http://10.91.30.219:8096/client/?command=destroyVirtualMachine&id=$x HTTP/1.0\n\n"
echo -e $destroy | nc -v -q 60 10.91.30.219 8096

View File

@ -1,22 +0,0 @@
#!/usr/bin/env bash
# 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.
query="GET http://10.91.30.219:8096/client/?command=listCapacity&zoneId=$1&podid=$2&response=json HTTP/1.0\n\n"
echo -e $query | nc -v -q 120 10.91.30.219 8096

View File

@ -1,22 +0,0 @@
#!/usr/bin/env bash
# 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.
test="GET http://10.91.30.219:8096/?command=listEvents HTTP/1.0\n\n"
echo -e $test | nc -v -q 120 10.91.30.219 8096

View File

@ -1,22 +0,0 @@
#!/usr/bin/env bash
# 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.
query="GET http://10.91.30.219:8096/client/?command=listHosts&zoneId=$1&account=admin&domainid=1&page=$2 HTTP/1.0\n\n"
echo -e $query | nc -v -q 120 10.91.30.219 8096

View File

@ -1,22 +0,0 @@
#!/usr/bin/env bash
# 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.
query="GET http://10.91.30.219:8096/client/?command=listRouters&zoneId=$1&account=admin&domainid=1 HTTP/1.0\n\n"
echo -e $query | nc -v -q 120 10.91.30.219 8096

View File

@ -1,22 +0,0 @@
#!/usr/bin/env bash
# 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.
query="GET http://10.91.30.219:8096/client/?command=listTemplates&templatefilter=featured&zoneid=$1 HTTP/1.0\n\n"
echo -e $query | nc -v -q 120 10.91.30.219 8096

View File

@ -1,22 +0,0 @@
#!/usr/bin/env bash
# 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.
query="GET http://10.91.30.219:8096/client/?command=listVirtualMachines&zoneId=$1&account=admin&domainid=1 HTTP/1.0\n\n"
echo -e $query | nc -v -q 120 10.91.30.219 8096

View File

@ -1,31 +0,0 @@
#!/usr/bin/env bash
# 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.
do
start_vm="GET http://127.0.0.1:8096/client/?command=startVirtualMachine&id=$x HTTP/1.0\n\n"
echo -e $start_vm | nc -v -q 60 127.0.0.1 8096
done
sleep 60s
for x in `seq 3 1102`
do
stop_vm="GET http://127.0.0.1/client/?command=stopVirtualMachine&id=$x HTTP/1.0\n\n"
echo -e $stop_vm | nc -v -q 60 127.0.0.1 8096
done
sleep 60s

View File

@ -1,24 +0,0 @@
#!/usr/bin/env bash
# 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.
y=$2
for i in `seq $x $y`
do
stop_vm="GET http://127.0.0.1/client/?command=stopVirtualMachine&id=$i HTTP/1.0\n\n"
echo -e $stop_vm | nc -v -q 60 127.0.0.1 8096
done

View File

@ -1,24 +0,0 @@
#!/usr/bin/env bash
# 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.
y=$2
for i in `seq $x $y`
do
start_vm="GET http://127.0.0.1:8096/client/?command=startVirtualMachine&id=$i HTTP/1.0\n\n"
echo -e $start_vm | nc -v -q 60 127.0.0.1 8096
done

View File

@ -1,28 +0,0 @@
#!/usr/bin/env bash
# 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.
name=$1
while [ 1 ]
do
mysql -s -r -uroot -Dcloud -h10.1.1.215 -e"select count(id),now(),max(disconnected),mgmt_server_id,status from host group by mgmt_server_id,status;" >> $1
sleep 5
echo --------------------------------------------------------------------------------------------------------------------- >> $1
done

View File

@ -1,44 +0,0 @@
#!/usr/bin/env bash
# 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.
#1. 1 host per cluster
zone_query="GET http://10.91.30.219/client/?command=createZone&networktype=Advanced&securitygroupenabled=false&name=Go&dns1=4.2.2.2&internaldns1=4.2.2.2&vlan=500-1000&guestcidraddress=10.1.1.0%2F24 HTTP/1.0\n\n"
echo -e $zone_query | nc -v -q 120 10.91.30.219 8096
pod_query="GET http://10.91.30.219/client/?command=createPod&zoneId=1&name=Guava&netmask=255.255.0.0&startIp=172.1.2.2&endIp=172.1.255.252&gateway=172.1.2.1 HTTP/1.0\n\n"
echo -e $pod_query | nc -v -q 120 10.91.30.219 8096
vlan_query="GET http://10.91.30.219/client/?command=createVlanIpRange&forVirtualNetwork=true&zoneId=1&vlan=untagged&gateway=172.2.1.1&netmask=255.255.0.0&startip=172.2.1.2&endip=172.2.255.254 HTTP/1.0\n\n"
echo -e $vlan_query | nc -v -q 120 10.91.30.219 8096
for name in `seq 1 100`
do
cluster_query="GET http://10.91.30.219/client/?command=addCluster&hypervisor=Simulator&clustertype=CloudManaged&zoneId=1&podId=1&clustername=CS$name HTTP/1.0\n\n"
echo -e $cluster_query | nc -v -q 120 10.91.30.219 8096
host_query="GET http://10.91.30.219/client/api?_=1302625706202&command=addHost&zoneId=1&podId=1&clusterid=$name&hypervisor=Simulator&clustertype=CloudManaged&hosttags=&username=sim&password=sim&url=http%3A%2F%2Fsim HTTP/1.0\n\n"
echo -e $host_query | nc -v -q 60 10.91.30.219 8096
spool_query="GET http://10.91.30.219/client/?command=createStoragePool&zoneId=1&podId=1&clusterid=$name&name=SPOOL$name&url=nfs://172.1.25.$name/export/share/$name HTTP/1.0\n\n"
echo -e $spool_query | nc -v -q 60 10.91.30.219 8096
done

View File

@ -1,31 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
y=$2
name=$3
pod_query="GET http://10.91.30.219:8096/client/?command=createPod&zoneId=1&name=SSP$name&cidr=182.$x.$y.0%2F24&startIp=182.$x.$y.2&endIp=182.$x.$y.252&gateway=182.$x.$y.1
HTTP/1.0\n\n"
echo -e $pod_query | nc -v -q 20 10.91.30.219 8096
#vlan_query="GET http://10.91.30.219/client/?command=createVlanIpRange&vlan=untagged&zoneid=1&podId=$name&forVirtualNetwork=false&gateway=172.$y.$x.1&netmask=255.255.255.0&startip=172.$y.$x.2&endip=172.$y.$x.252 HTTP/1.0\n\n"
#echo -e $vlan_query | nc -v -q 20 10.91.30.219 8096

View File

@ -1,23 +0,0 @@
#!/usr/bin/env bash
# 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.
name=$1
host_query="GET http://10.91.30.219:8096/client/?command=addHost&zoneId=1&podId=$((name+250))&username=sim&password=sim&clustername=simulator-$name&hosttags=RP$name&url=http%3A%2F%2Fsim HTTP/1.0\n\n"
echo -e $host_query | nc -v -q 60 10.91.30.219 8096

View File

@ -1,39 +0,0 @@
#!/usr/bin/env bash
# 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.
workers=$1
x=$2 #CIDR - 16bytes
y=$3 #CIDR - 8 bytes
for name in `seq 1 $workers`
do
pod_query="GET http://10.91.30.219:8096/client/?command=createPod&zoneId=1&name=RP$name&cidr=182.$x.$y.0%2F24&startIp=182.$x.$y.2&endIp=182.$x.$y.252&gateway=182.$x.$y.1 HTTP/1.0\n\n"
vlan_query="GET http://10.91.30.219:8096/client/?command=createVlanIpRange&vlan=untagged&zoneid=1&podId=$((name+250))&forVirtualNetwork=false&gateway=182.$y.$x.1&netmask=255.255.255.0&startip=182.$y.$x.2&endip=182.$y.$x.252 HTTP/1.0\n\n"
so_query="GET http://10.91.30.219:8096/client/?command=createServiceOffering&name=RP$name&displayText=RP$name&storageType=local&cpuNumber=1&cpuSpeed=1000&memory=512&offerha=false&usevirtualnetwork=false&hosttags=RP$name HTTP/1.0\n\n"
echo -e $pod_query | nc -v -q 20 10.91.30.219 8096
echo -e $vlan_query | nc -v -q 20 10.91.30.219 8096
echo -e $so_query | nc -v -q 20 10.91.30.219 8096
let x+=1
let y+=1
done

View File

@ -1,24 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
so_query="GET http://10.91.30.219:8096/client/?command=createServiceOffering&name=SO$x&displayText=SO$x&storageType=local&cpuNumber=1&cpuSpeed=1000&memory=512&offerha=false&usevirtualnetwork=false&hosttags=SP$x HTTP/1.0\n\n"
echo -e $so_query | nc -v -q 20 10.91.30.219 8096

View File

@ -1,26 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
y=$2
name=$3
vlan_query="GET http://10.91.30.219/client/?command=createVlanIpRange&vlan=untagged&zoneid=1&podId=$name&forVirtualNetwork=false&gateway=172.$x.$y.1&netmask=255.255.255.0&startip=172.$x.$y.2&endip=172.$x.$y.252 HTTP/1.0\n\n"
echo -e $vlan_query | nc -v -q 20 10.91.30.219 8096

View File

@ -1,26 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
start_router="GET http://10.91.30.219:8096/client/?command=startRouter&id=$x HTTP/1.0\n\n"
echo -e $start_router | nc -v -q 60 10.91.30.219 8096

View File

@ -1,26 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
start_vm="GET http://10.91.30.219:8096/client/?command=startVirtualMachine&id=$x HTTP/1.0\n\n"
echo -e $start_vm | nc -v -q 60 10.91.30.219 8096

View File

@ -1,26 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
stop_vm="GET http://127.0.0.1/client/?command=stopVirtualMachine&id=$x HTTP/1.0\n\n"
echo -e $stop_vm | nc -v -q 60 127.0.0.1 8096

View File

@ -1,55 +0,0 @@
#!/usr/bin/env bash
# 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.
templateid=3
account="u"
x=$1
y=$2
p=$3
q=$4
for i in `seq 1 3`
do
serviceOfferingId=10
query="GET http://127.0.0.1/client/?command=deployVirtualMachine&zoneId=$zoneid&hypervisor=Simulator&templateId=$templateid&serviceOfferingId=$serviceOfferingId&account=$account&domainid=1 HTTP/1.0\n\n"
echo -e $query | nc -v -q 20 127.0.0.1 8096
done
sleep 15s
for x in `seq $x $y`
do
destroy="GET http://127.0.0.1:8096/client/?command=destroyVirtualMachine&id=$x HTTP/1.0\n\n"
echo -e $destroy | nc -v -q 60 127.0.0.1 8096
done
sleep 240s
for i in `seq 1 30`
do
serviceOfferingId=9
query="GET http://127.0.0.1/client/?command=deployVirtualMachine&zoneId=$zoneid&hypervisor=Simulator&templateId=$templateid&serviceOfferingId=$serviceOfferingId&account=$account&domainid=1 HTTP/1.0\n\n"
echo -e $query | nc -v -q 20 127.0.0.1 8096
done
sleep 150s
for x in `seq $p $q`
do
destroy="GET http://127.0.0.1:8096/client/?command=destroyVirtualMachine&id=$x HTTP/1.0\n\n"
echo -e $destroy | nc -v -q 60 127.0.0.1 8096
done

View File

@ -1,127 +0,0 @@
#!/usr/bin/env bash
# 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.
# Setup Stress. Destroy and Deploy Virtual Machines on
# Guava like environment
#Environment
#1. 1 host per cluster
# Create 300 Accounts
# Deploy 300 VMs
# Destroy 300 VMs
# Repeat
usage() {
printf "Setup Stress\nUsage: %s: -h management-server -z zoneid [-d delay] [-t templateid] -s service-offering-id [-n number of accounts]\n" $(basename $0) >&2
}
create_account() {
seq=$1
account_query="GET http://$host/client/?command=createAccount&accounttype=0&email=simulator%40simulator.com&username=$account_prefix$seq&firstname=first$seq&lastname=last$seq&password=5f4dcc3b5aa765d61d8327deb882cf99&account=$account_prefix$seq&domainid=1 HTTP/1.1\n\n"
echo -e $account_query | nc -v -q 120 $host 8096
}
stress() {
#Deploy 300 VMs in these accounts
for ((i=1;i<=$numberofaccounts;i++))
do
out=$(./deployVirtualMachine.sh -h $host -z $zoneid -t $template -s $service -a $account_prefix$i)
id=$(echo $out | sed 's/\(.*<id>\)\([0-9]*\)\(.*\)/\2/g')
echo "deployed vm with id: " $id
VmArray[$i]=$id
done
sleep $delay
rindex=$(($RANDOM%$numberofaccounts))
#Stop/Start 300 VMs at random
for ((i=1;i<=$numberofaccounts;i++))
do
./stopVirtualMachine.sh -h $host -i ${VmArray:$rindex}
rindex=$(($RANDOM%$numberofaccounts))
echo "stopped vm with id: " ${VmArray:$rindex}
./startVirtualMachine.sh -h $host -i ${VmArray:$rindex}
rindex=$(($RANDOM%$numberofaccounts))
echo "started vm with id: " ${VmArray:$rindex}
done
sleep $delay
}
#options
hflag=1
zflag=
dflag=1
tflag=1
sflag=
nflag=1
declare -a VmArray
host="127.0.0.1" #default localhost
zoneid=
delay=300 #default 5 minutes
template=2 #default centos
service=
account_prefix="USER"
numberofaccounts=300
while getopts 'h:z:d:t:s:n:' OPTION
do
case $OPTION in
h) hflag=1
host="$OPTARG"
;;
z) zflag=1
zoneid="$OPTARG"
;;
d) dflag=1
delay="$OPTARG"
;;
t) tflag=1
template="$OPTARG"
;;
s) sflag=1
service="$OPTARG"
;;
n) nflag=1
numberofaccounts="$OPTARG"
;;
?) usage
exit 2
;;
esac
done
if [ $hflag$zflag$dflag$tflag$sflag$nflag != "111111" ]
then
usage
exit 2
fi
#Create 300 Accounts
#for ((i=1;i<=$numberofaccounts;i++))
#do
# create_account $i
#done
for i in {1..5}
do
#Do the stress test
stress
done

View File

@ -1,147 +0,0 @@
#!/usr/bin/env python
# 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.
'''
# guava uses nfs storage, before setting up make sure
# * optionally turn off stats collectors
# * expunge.delay and expunge.interval are 60s
'''
from optparse import OptionParser
from configGenerator import *
import random
def getGlobalSettings():
global_settings = {'expunge.delay': '60',
'expunge.interval': '60',
'expunge.workers': '3',
'workers': '10',
'use.user.concentrated.pod.allocation': 'true',
'vm.allocation.algorithm': 'random',
'vm.op.wait.interval': '5',
'guest.domain.suffix': 'guava.simulator',
'instance.name': 'TEST',
'direct.agent.load.size': '1000',
'default.page.size': '10000',
'linkLocalIp.nums': '10',
'check.pod.cidrs': 'false',
}
for k, v in global_settings.iteritems():
cfg = configuration()
cfg.name = k
cfg.value = v
yield cfg
def describeGuavaResources(dbnode='localhost', mshost='localhost'):
zs = cloudstackConfiguration()
numberofpods = 1
clustersPerPod = 100
hostsPerCluster = 10
z = zone()
z.dns1 = '4.2.2.2'
z.dns2 = '192.168.110.254'
z.internaldns1 = '10.91.28.6'
z.internaldns2 = '192.168.110.254'
z.name = 'Guava'
z.networktype = 'Advanced'
z.guestcidraddress = '10.1.1.0/24'
z.vlan='100-3000'
p = pod()
p.name = 'POD1'
p.gateway = '172.1.2.1'
p.startip = '172.1.2.2'
p.endip = '172.1.255.252'
p.netmask = '255.255.0.0'
v = iprange()
v.vlan = 'untagged'
v.startip = '172.2.1.2'
v.endip = '172.2.255.252'
v.gateway = '172.2.1.1'
v.netmask = '255.255.0.0'
curhost = 1
for i in range(1, clustersPerPod + 1):
c = cluster()
c.clustername = 'POD1-CLUSTER' + str(i)
c.hypervisor = 'Simulator'
c.clustertype = 'CloudManaged'
for j in range(1, hostsPerCluster + 1):
h = host()
h.username = 'root'
h.password = 'password'
h.url = 'http://sim/test-%d'%(curhost)
c.hosts.append(h)
curhost = curhost + 1
ps = primaryStorage()
ps.name = 'spool'+str(i)
ps.url = 'nfs://172.16.24.32/export/path/'+str(i)
c.primaryStorages.append(ps)
p.clusters.append(c)
secondary = secondaryStorage()
secondary.url = 'nfs://172.16.25.32/secondary/path'
z.pods.append(p)
z.ipranges.append(v)
z.secondaryStorages.append(secondary)
zs.zones.append(z)
'''Add mgt server'''
mgt = managementServer()
mgt.mgtSvrIp = mshost
zs.mgtSvr.append(mgt)
'''Add a database'''
db = dbServer()
db.dbSvr = opts.dbnode
zs.dbSvr = db
'''Add some configuration'''
[zs.globalConfig.append(cfg) for cfg in getGlobalSettings()]
''''add loggers'''
testClientLogger = logger()
testClientLogger.name = 'TestClient'
testClientLogger.file = '/var/log/testclient.log'
testCaseLogger = logger()
testCaseLogger.name = 'TestCase'
testCaseLogger.file = '/var/log/testcase.log'
zs.logger.append(testClientLogger)
zs.logger.append(testCaseLogger)
return zs
if __name__ == '__main__':
parser = OptionParser()
parser.add_option('-o', '--output', action='store', default='./guavaCfg', dest='output', help='the path where the json config file generated')
parser.add_option('-d', '--dbnode', dest='dbnode', help='hostname/ip of the database node', action='store')
parser.add_option('-m', '--mshost', dest='mshost', help='hostname/ip of management server', action='store')
(opts, args) = parser.parse_args()
cfg = describeGuavaResources(opts.dbnode, opts.mshost)
generate_setup_config(cfg, opts.output)

View File

@ -1,139 +0,0 @@
#!/usr/bin/env python
# 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.
import unittest2 as unittest
except ImportError:
import unittest
import random
import hashlib
from cloudstackTestCase import *
class Provision(cloudstackTestCase):
'''
'''
def setUp(self):
pass
def tearDown(self):
pass
def test_1_createAccounts(self, numberOfAccounts=5):
'''
Create a bunch of user accounts
'''
mdf = hashlib.md5()
mdf.update('password')
mdf_pass = mdf.hexdigest()
api = self.testClient.getApiClient()
for i in range(1, numberOfAccounts + 1):
acct = createAccount.createAccountCmd()
acct.accounttype = 0
acct.firstname = 'user' + str(i)
acct.lastname = 'user' + str(i)
acct.password = mdf_pass
acct.username = 'user' + str(i)
acct.email = 'user@example.com'
acct.account = 'user' + str(i)
acct.domainid = 1
acctResponse = api.createAccount(acct)
self.debug("successfully created account: %s, user: %s, id: %s"%(acctResponse.account, acctResponse.username, acctResponse.id))
def test_2_createServiceOffering(self):
apiClient = self.testClient.getApiClient()
createSOcmd=createServiceOffering.createServiceOfferingCmd()
createSOcmd.name='Sample SO'
createSOcmd.displaytext='Sample SO'
createSOcmd.storagetype='shared'
createSOcmd.cpunumber=1
createSOcmd.cpuspeed=100
createSOcmd.memory=128
createSOcmd.offerha='false'
createSOresponse = apiClient.createServiceOffering(createSOcmd)
return createSOresponse.id
def deployCmd(self, account, service):
deployVmCmd = deployVirtualMachine.deployVirtualMachineCmd()
deployVmCmd.zoneid = 1
deployVmCmd.hypervisor='Simulator'
deployVmCmd.account=account
deployVmCmd.domainid=1
deployVmCmd.templateid=10
deployVmCmd.serviceofferingid=service
return deployVmCmd
def listVmsInAccountCmd(self, acct):
api = self.testClient.getApiClient()
listVmCmd = listVirtualMachines.listVirtualMachinesCmd()
listVmCmd.account = acct
listVmCmd.zoneid = 1
listVmCmd.domainid = 1
listVmResponse = api.listVirtualMachines(listVmCmd)
return listVmResponse
def destroyVmCmd(self, key):
api = self.testClient.getApiClient()
destroyVmCmd = destroyVirtualMachine.destroyVirtualMachineCmd()
destroyVmCmd.id = key
api.destroyVirtualMachine(destroyVmCmd)
def test_3_stressDeploy(self):
'''
Deploy 20 Vms in each account
'''
service_id = self.test_2_createServiceOffering()
api = self.testClient.getApiClient()
for acct in range(1, 5):
[api.deployVirtualMachine(self.deployCmd('user'+str(acct), service_id)) for x in range(0,20)]
def test_4_stressDestroy(self):
'''
Cleanup all Vms in every account
'''
api = self.testClient.getApiClient()
for acct in range(1, 6):
for vm in self.listVmsInAccountCmd('user'+str(acct)):
if vm is not None:
self.destroyVmCmd(vm.id)
def test_5_combineStress(self):
for i in range(0, 5):
self.test_3_stressDeploy()
self.test_4_stressDestroy()
def deployN(self,nargs=300,batchsize=0):
'''
Deploy Nargs number of VMs concurrently in batches of size {batchsize}.
When batchsize is 0 all Vms are deployed in one batch
VMs will be deployed in 5:2:6 ratio
'''
cmds = []
if batchsize == 0:
self.testClient.submitCmdsAndWait(cmds)
else:
while len(z) > 0:
try:
newbatch = [cmds.pop() for b in range(batchsize)] #pop batchsize items
self.testClient.submitCmdsAndWait(newbatch)
except IndexError:
break

View File

@ -1,194 +0,0 @@
#!/usr/bin/env python
# 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.
'''
# Kumquat uses nfs storage, before setting up make sure
# * optionally turn off stats collectors
# * expunge.delay and expunge.interval are 60s
'''
from optparse import OptionParser
from configGenerator import *
import random
def getGlobalSettings():
global_settings = {'expunge.delay': '60',
'expunge.interval': '60',
'capacity.skipcounting.hours': '2',
'cpu.overprovisioning.factor': '1.5',
'expunge.workers': '3',
'workers': '10',
'use.user.concentrated.pod.allocation': 'true',
'vm.allocation.algorithm': 'random',
'vm.op.wait.interval': '5',
'guest.domain.suffix': 'kumquat.simulator',
'instance.name': 'KIM',
'direct.agent.load.size': '16',
'default.page.size': '500',
'linkLocalIp.nums': '10',
'check.pod.cidrs': 'false',
'max.account.public.ips': '10000',
'max.account.snapshots': '10000',
'max.account.templates': '10000',
'max.account.user.vms': '10000',
'max.account.volumes': '10000',
}
for k, v in global_settings.iteritems():
cfg = configuration()
cfg.name = k
cfg.value = v
yield cfg
def podIpRangeGenerator():
x=1
y=2
while 1:
if y == 255:
x=x+1
if x == 255:
x=1
break
y=1
y=y+1
#pod mangement network
yield ('172.'+str(x)+'.'+str(y)+'.129', '172.'+str(x)+'.'+str(y)+'.130', '172.'+str(x)+'.'+str(y)+'.189')
def vlanIpRangeGenerator():
x=1
y=2
while 1:
if y == 255:
x=x+1
if x==255:
x=1
break
y=1
y=y+1
#vlan ip range
yield ('172.'+str(x)+'.'+str(y)+'.129', '172.'+str(x)+'.'+str(y)+'.190', '172.'+str(x)+'.'+str(y)+'.249')
def describeKumquatResources(dbnode='localhost', mshost='localhost'):
zs = cloudstackConfiguration()
numberofpods = 5
clustersPerPod = 2
hostsPerCluster = 8
curpod = 0
curhost = 0
z = zone()
z.dns1 = '4.2.2.2'
z.dns2 = '192.168.110.254'
z.internaldns1 = '10.91.28.6'
z.internaldns2 = '192.168.110.254'
z.name = 'Kumquat'
z.networktype = 'Advanced'
z.guestcidraddress = '10.1.1.0/24'
z.vlan='100-3000'
for podRange,vlanRange in zip(podIpRangeGenerator(), vlanIpRangeGenerator()):
p = pod()
curpod=curpod+1
p.name = 'POD'+str(curpod)
p.gateway=podRange[0]
p.startip=podRange[1]
p.endip=podRange[2]
p.netmask='255.255.255.128'
for i in range(1,clustersPerPod+1):
c = cluster()
c.clustername = 'POD'+str(curpod)+'-CLUSTER'+str(i)
c.hypervisor = 'Simulator'
c.clustertype = 'CloudManaged'
ps = primaryStorage()
ps.name = 'spool'+str(i)
ps.url = 'nfs://172.16.24.32/export/path/'+str(curpod)+'/'+str(i)
c.primaryStorages.append(ps)
for i in range(1, hostsPerCluster + 1):
h = host()
h.username = 'root'
h.password = 'password'
h.url = "http://sim/test-%d"%(curhost)
c.hosts.append(h)
curhost=curhost+1
p.clusters.append(c)
z.pods.append(p)
if curpod == numberofpods:
break
v = iprange()
v.vlan = 'untagged'
v.gateway='172.2.1.1'
v.startip='172.2.1.2'
v.endip='172.2.255.252'
v.netmask="255.255.0.0"
z.ipranges.append(v)
secondary = secondaryStorage()
secondary.url = 'nfs://172.16.25.32/secondary/path'
z.secondaryStorages.append(secondary)
zs.zones.append(z)
'''Add mgt server'''
mgt = managementServer()
mgt.mgtSvrIp = mshost
zs.mgtSvr.append(mgt)
'''Add a database'''
db = dbServer()
db.dbSvr = opts.dbnode
zs.dbSvr = db
'''Add some configuration'''
[zs.globalConfig.append(cfg) for cfg in getGlobalSettings()]
''''add loggers'''
testClientLogger = logger()
testClientLogger.name = 'TestClient'
testClientLogger.file = '/var/log/testclient.log'
testCaseLogger = logger()
testCaseLogger.name = 'TestCase'
testCaseLogger.file = '/var/log/testcase.log'
zs.logger.append(testClientLogger)
zs.logger.append(testCaseLogger)
return zs
if __name__ == '__main__':
parser = OptionParser()
parser.add_option('-o', '--output', action='store', default='./KumquatCfg', dest='output', help='the path where the json config file generated')
parser.add_option('-d', '--dbnode', dest='dbnode', help='hostname/ip of the database node', action='store')
parser.add_option('-m', '--mshost', dest='mshost', help='hostname/ip of management server', action='store')
(opts, args) = parser.parse_args()
cfg = describeKumquatResources(opts.dbnode, opts.mshost)
generate_setup_config(cfg, opts.output)

View File

@ -1,259 +0,0 @@
#!/usr/bin/env python
# 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.
import unittest2 as unittest
except ImportError:
import unittest
import random
import hashlib
from cloudstackTestCase import *
import string
import time
import pdb
class Provision(cloudstackTestCase):
numberOfAccounts = 5
accounts = []
def setUp(self):
pass
def tearDown(self):
pass
def setupServiceOffering(self):
socreate = createServiceOffering.createServiceOfferingCmd()
socreate.cpunumber = 1
socreate.cpuspeed = 100
socreate.displaytext = 'Sample SO'
socreate.memory = 128
socreate.name = 'Sample SO'
api = self.testClient.getApiClient()
soresponse = api.createServiceOffering(socreate)
return soresponse.id
def test_1_createAccounts(self):
'''
Create a bunch of user accounts
'''
mdf = hashlib.md5()
mdf.update('password')
mdf_pass = mdf.hexdigest()
api = self.testClient.getApiClient()
for i in range(1, self.numberOfAccounts + 1):
acct = createAccount.createAccountCmd()
acct.accounttype = 0
name = ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(10))
acct.firstname = name
acct.lastname = name
acct.password = mdf_pass
acct.username = name
acct.email = 'user@example.com'
acct.account = name
acct.domainid = 1
acctResponse = api.createAccount(acct)
self.accounts.append(acctResponse.account.name)
self.debug("created account %s with id %d:"%(acctResponse.account.name, acctResponse.account.id))
def deployCmd(self, acct):
deployVmCmd = deployVirtualMachine.deployVirtualMachineCmd()
deployVmCmd.zoneid = 1
deployVmCmd.hypervisor='Simulator'
deployVmCmd.account=acct
deployVmCmd.domainid=1
deployVmCmd.templateid=10
deployVmCmd.serviceofferingid=self.setupServiceOffering()
return deployVmCmd
def destroyCmd(self, vmid):
destroyVmCmd = destroyVirtualMachine.destroyVirtualMachineCmd()
destroyVmCmd.zoneid = 1
destroyVmCmd.id = vmid
return destroyVmCmd
def startCmd(self, vmid):
startVmCmd = startVirtualMachine.startVirtualMachineCmd()
startVmCmd.id = vmid
return startVmCmd
def listVmsInAccount(self, acct):
listVm = listVirtualMachines.listVirtualMachinesCmd()
listVm.account = acct
listVm.zoneid = 1
listVm.domainid = 1
return self.testClient.getApiClient().listVirtualMachines(listVm)
def listAccounts(self, acct):
listacct = listAccounts.listAccountsCmd()
listacct.name = acct
listacct.accounttype = 0
return self.testClient.getApiClient().listAccounts(listacct)
def test_2_stressDeploy(self):
api = self.testClient.getApiClient()
for acct in self.accounts:
[api.deployVirtualMachine(self.deployCmd(acct)) for x in range(0, 25)]
def test_3_parallelDeployAndDestroy(self):
p_accts = []
#create 3 user accounts
mdf = hashlib.md5()
mdf.update('password')
mdf_pass = mdf.hexdigest()
api = self.testClient.getApiClient()
for i in range(1, 3):
acct = createAccount.createAccountCmd()
acct.accounttype = 0
name = ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(10))
acct.firstname = name
acct.lastname = name
acct.password = mdf_pass
acct.username = name
acct.email = 'puser@example.com'
acct.account = name
acct.domainid = 1
acctResponse = api.createAccount(acct)
p_accts.append(acctResponse.account.name)
self.debug("created account %s under root"%name)
#deploy VMs each parallely in all three accounts
deployCmds = []
for acct in p_accts:
for i in range(0, 50):
deployCmds.append(self.deployCmd(acct))
random.shuffle(deployCmds)
self.execCmds(deployCmds)
#destroy VMs each parallely in all three accounts
destroyCmds = []
for acct in p_accts:
acctVms = self.listVmsInAccount(acct)
self.debug("%d vms deployed in account: %s. Destroying them"%(len(acctVms),acct))
for vm in acctVms[:45]:
destroyCmds.append(self.destroyCmd(vm.id))
random.shuffle(destroyCmds)
self.execCmds(destroyCmds)
for acct in p_accts:
acctVms = self.listVmsInAccount(acct)
self.assertEqual(len(acctVms), 5)
listacct = self.listAccounts(acct)
self.assertEqual(int(listacct[0].vmrunning) + int(listacct[0].vmstopped),\
int(listacct[0].vmtotal))
self.debug("%d vms found left in account: %s. Finishing Test"%(len(acctVms),acct))
def test_4_listVm(self):
allVms = self.listVmsInAccount(None)
self.debug("%d vms in all"%len(allVms))
def test_5_multipleStartRequests(self):
'''
Start a few Vms, start them again before they reach running state,
make sure the resource count remains consistent
'''
mdf = hashlib.md5()
mdf.update('password')
mdf_pass = mdf.hexdigest()
api = self.testClient.getApiClient()
acct = createAccount.createAccountCmd()
acct.accounttype = 0
name = ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(10))
acct.firstname = name
acct.lastname = name
acct.password = mdf_pass
acct.username = name
acct.email = 'puser@example.com'
acct.account = name
acct.domainid = 1
acctResponse = api.createAccount(acct)
for i in range(0, 5):
resp = api.deployVirtualMachine(self.deployCmd(name))
api.startVirtualMachine(self.startCmd(resp.id))
acctVms = self.listVmsInAccount(name)
self.debug("%d vms found in account: %s."%(len(acctVms),name))
self.assertEqual(5, len(acctVms))
listacctresponse = self.listAccounts(name)
self.assertEqual(int(listacctresponse[0].vmrunning) +\
int(listacctresponse[0].vmstopped),\
int(listacctresponse[0].vmtotal))
def test_6_multipleDestroyRequests(self):
'''
Start a few Vms, destroy them, destroy them again before they reach
expunging state, make sure the resource count remains consistent
'''
mdf = hashlib.md5()
mdf.update('password')
mdf_pass = mdf.hexdigest()
api = self.testClient.getApiClient()
acct = createAccount.createAccountCmd()
acct.accounttype = 0
name = ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(10))
acct.firstname = name
acct.lastname = name
acct.password = mdf_pass
acct.username = name
acct.email = 'puser@example.com'
acct.account = name
acct.domainid = 1
acctResponse = api.createAccount(acct)
vmlist = []
for i in range(0, 5):
resp = api.deployVirtualMachine(self.deployCmd(name))
vmlist.append(resp.id)
for vm in vmlist:
api.destroyVirtualMachine(self.destroyCmd(vm))
time.sleep(1)
api.destroyVirtualMachine(self.destroyCmd(vm))
acctVms = self.listVmsInAccount(name)
if acctVms is not None:
self.debug("%d vms found in account: %s."%(len(acctVms),name))
self.assertEqual(5, len(acctVms))
listacctresponse = self.listAccounts(name)
self.assertEqual(int(listacctresponse[0].vmrunning) +\
int(listacctresponse[0].vmstopped),\
int(listacctresponse[0].vmtotal))
def execCmds(self,cmds=[],batchsize=0):
'''
When batchsize is 0 all Vms are deployed in one batch
'''
if batchsize == 0:
self.testClient.submitCmdsAndWait(cmds)
else:
while len(cmds) > 0:
try:
newbatch = [cmds.pop() for b in range(batchsize)] #pop batchsize items
self.testClient.submitCmdsAndWait(newbatch)
except IndexError:
break

View File

@ -1,2 +0,0 @@
java -cp cloud-utils.jar;agent-simulator.jar;log4j-1.2.15.jar;apache-log4j-extras-1.0.jar;ws-commons-util-1.0.2.jar;xmlrpc-client-3.1.3.jar;cloud-agent.jar;cloud-core.jar;xmlrpc-common-3.1.3.jar;javaee-api-5.0-1.jar;gson-1.3.jar;commons-httpclient-3.1.jar;commons-logging-1.1.1.jar;commons-codec-1.3.jar;commons-collections-3.2.1.jar;commons-pool-1.4.jar;.\;.\conf com.cloud.agent.AgentSimulator %*

View File

@ -1,26 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
pod_query="GET http://10.91.30.226:8096/client/?command=deletePod&id=$x HTTP/1.0\n\n"
echo -e $pod_query | nc -v -q 20 10.91.30.226 8096

View File

@ -1,25 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
delete_so="GET http://10.91.30.226:8096/client/?command=deleteServiceOffering&id=$x HTTP/1.0\n\n"
echo -e $delete_so | nc -v -q 20 10.91.30.226 8096

View File

@ -1,26 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
vlan_query="GET http://10.91.30.226:8096/client/?command=deleteVlanIpRange&id=$x HTTP/1.0\n\n"
echo -e $vlan_query | nc -v -q 20 10.91.30.226 8096

View File

@ -1,206 +0,0 @@
#!/usr/bin/env bash
# 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.
usage() {
printf "Deploy many VMs: %s: -h management-server -n numberofvms [[-b batchsize] [-w wait for success] [-d db-node]]\n" $(basename $0) >&2
printf "-w option when specifed waits for successful deployment of batchsize (specifed by -b option) number of VMs. default batchsize =100\n"
}
getSgListRandom() {
num_groups=$((RANDOM%groups_per_vm))
if [[ $num_groups -eq 0 ]]; then
num_groups=1 #set back to default
fi
#form sg list string
local sg_list=""
for ((i=0;i<$num_groups;i++))
do
sgid=$((RANDOM%numberofgroups))
if [[ $sgid -eq 0 || $sgid -eq 1 ]]; then
sgid=1 #set back to default security group
sg_list=$sgid","$sg_list
continue
fi
sg_exists="GET http://$host/client/?command=listSecurityGroups&id=$sgid HTTP/1.0\n\n"
sg_out=$(echo -e $sg_exists | nc -v -q 60 $host 8096)
count=$(echo $sg_out | sed 's/\(.*<count>\)\([0-9]*\)\(.*\)/\2/g')
if [[ $count != "1" ]]; then #FAIL: Invalid security group was randomly selected
continue
fi
sg_list=$sgid","$sg_list
done
echo "$sg_list"
}
waitDeploy() {
local dbnode=$1
local batchsize=$2
while [ 1 ]
do
donecount=$(mysql -uroot -Dcloud -h$dbnode -s -r --skip-column-names -e"select count(*) from async_job where job_cmd like '%DeployVM%' and last_updated is null")
echo "[DEBUG] " $(date) " " $donecount " VMs still deploying"
if [[ $donecount == "0" || $donecount -eq 0 ]]
then
break
fi
sleep $(($donecount*2))s #2 seconds per VM
done
}
hflag=
nflag=1
wflag=
bflag=
dflag=
iterator=0
declare -a sg_array=('79' '79' '79' '79' '79' '79' '79' '79' '79')
#declare -a sg_array=('72' '73' '74' '75' '76' '77' '78' '79' '80')
host="127.0.0.1" #defaults to locahost
numberofvms=1040 #defaults
batchsize=100 #default
dbnode=
waitSuccess=false
while getopts 'h:n:b:d:w' OPTION
do
case $OPTION in
h) hflag=1
host="$OPTARG"
;;
n) nflag=1
numberofvms="$OPTARG"
;;
w) wflag=1
waitSuccess=true
;;
b) bflag=1
batchsize="$OPTARG"
;;
d) dflag=1
dbnode="$OPTARG"
;;
?) usage
exit 2
;;
esac
done
if [ $hflag$nflag != "11" ]
then
usage
exit 2
fi
if [[ $wflag == "1" && $dflag != "1" ]]
then
echo "please specify dbnode -d option"
usage
exit 2
fi
if [[ $bflag == "1" && $wflag != "1" ]]
then
echo "-w option mandatory when -b is given"
usage
exit 2
fi
tag1=$(($numberofvms*5/13))
tag2=$(($numberofvms*2/13))
tag3=$(($numberofvms*6/13))
tag1_so=9 #defaults from a regular installation
tag2_so=10
tag3_so=11
vmcount=0
echo -n "Service Offering ID with TAG1 hosttag: "
read tag1_so
echo -n "Service Offering ID with TAG2 hosttag: "
read tag2_so
echo -n "Service Offering ID with TAG3 hosttag: "
read tag3_so
echo "Deploying TAG1 VMs with Service Offering: " $tag1_so
for ((c=1;c<$tag1;c++))
do
if [[ $vmcount -eq $batchsize && waitSuccess ]]
then
waitDeploy $dbnode $batchsize
vmcount=0
fi
sglist=${sg_array[$((iterator % 9))]}
iterator=$((iterator+1))
job_out=$(./deployVirtualMachine.sh -h $host -z 1 -t 2 -s $tag1_so -u -g $sglist)
job_id=$(echo $job_out | sed 's/\(.*<jobid>\)\([0-9]*\)\(.*\)/\2/g')
vmid=$(echo $job_out | sed 's/\(.*<id>\)\([0-9]*\)\(.*\)/\2/g')
echo "[DEBUG] $(date) deployed vm: " $vmid " in job: " $job_id
vmcount=$((vmcount+1))
done
sleep 60s
echo "Deploying TAG2 VMs with Service Offering: " $tag2_so
for ((c=1;c<$tag2;c++))
do
if [[ $vmcount -eq $batchsize && wflag == "1" ]]
then
waitDeploy $dbnode $batchsize
vmcount=0
fi
sglist=${sg_array[$((iterator % 9))]}
iterator=$((iterator+1))
job_out=$(./deployVirtualMachine.sh -h $host -z 1 -t 2 -s $tag2_so -u -g $sglist)
job_id=$(echo $job_out | sed 's/\(.*<jobid>\)\([0-9]*\)\(.*\)/\2/g')
vmid=$(echo $job_out | sed 's/\(.*<id>\)\([0-9]*\)\(.*\)/\2/g')
echo "[DEBUG] $(date) deployed vm: " $vmid " in job: " $job_id
vmcount=$((vmcount+1))
done
sleep 60s
echo "Deploying TAG3 VMs with Service Offering: " $tag3_so
for ((c=1;c<$tag3;c++))
do
if [[ $vmcount -eq $batchsize && wflag == "1" ]]
then
waitDeploy $dbnode $batchsize
vmcount=0
fi
sglist=${sg_array[$((iterator % 9))]}
iterator=$((iterator+1))
job_out=$(./deployVirtualMachine.sh -h $host -z 1 -t 2 -s $tag3_so -u -g $sglist)
job_id=$(echo $job_out | sed 's/\(.*<jobid>\)\([0-9]*\)\(.*\)/\2/g')
vmid=$(echo $job_out | sed 's/\(.*<id>\)\([0-9]*\)\(.*\)/\2/g')
echo "[DEBUG] $(date) deployed vm: " $vmid " in job: " $job_id
vmcount=$((vmcount+1))
done

View File

@ -1,159 +0,0 @@
#!/usr/bin/env bash
# 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.
usage() {
printf "Deploy many VMs: %s: -h management-server -n numberofvms [[-b batchsize] [-w wait for success] [-d db-node]]\n" $(basename $0) >&2
}
waitDeploy() {
local dbnode=$1
local batchsize=$2
while [ 1 ]
do
donecount=$(mysql -uroot -Dcloud -h$dbnode -s -r --skip-column-names -e"select count(*) from async_job where job_cmd like '%DeployVM%' and last_updated is null")
echo "[DEBUG] " $(date) " " $donecount " VMs still deploying"
if [[ $donecount == "0" || $donecount -eq 0 ]]
then
break
fi
sleep $(($donecount*2))s #2 seconds per VM
done
}
hflag=
nflag=1
wflag=
bflag=
dflag=
iterator=0
host="127.0.0.1" #defaults to locahost
numberofvms=1040 #defaults
numberofgroups=
groups_per_vm=1 #default one group per vm
batchsize=100
waitSuccess=false
while getopts 'h:n:b:d:w' OPTION
do
case $OPTION in
h) hflag=1
host="$OPTARG"
;;
n) nflag=1
numberofvms="$OPTARG"
;;
w) wflag=1
waitSuccess=true
;;
b) bflag=1
batchsize="$OPTARG"
;;
d) dflag=1
dbnode="$OPTARG"
;;
?) usage
exit 2
;;
esac
done
if [ $hflag$nflag != "11" ]
then
usage
exit 2
fi
if [[ $wflag == "1" && $dflag != "1" ]]
then
echo "please specify dbnode -d option"
usage
exit 2
fi
if [[ $bflag == "1" && $wflag != "1" ]]
then
echo "-w option mandatory when -b is given"
usage
exit 2
fi
tag1=$(($numberofvms*5/13))
tag2=$(($numberofvms*2/13))
tag3=$(($numberofvms*6/13))
tag1_so=9 #defaults from a regular installation
tag2_so=10
tag3_so=11
vmcount=0
echo -n "Service Offering ID with TAG1 hosttag: "
read tag1_so
echo -n "Service Offering ID with TAG2 hosttag: "
read tag2_so
echo -n "Service Offering ID with TAG3 hosttag: "
read tag3_so
echo "Deploying TAG1 VMs with Service Offering: " $tag1_so
for ((c=1;c<$tag1;c++))
do
if [[ $vmcount -eq $batchsize && waitSuccess ]]
then
waitDeploy $dbnode $batchsize
vmcount=0
fi
job_out=$(./deployVirtualMachine.sh -h $host -z 1 -t 2 -s $tag1_so -u)
job_id=$(echo $job_out | sed 's/\(.*<jobid>\)\([0-9]*\)\(.*\)/\2/g')
vmid=$(echo $job_out | sed 's/\(.*<id>\)\([0-9]*\)\(.*\)/\2/g')
echo "[DEBUG] $(date) deployed vm: " $vmid " in job: " $job_id
vmcount=$((vmcount+1))
done
echo "Deploying TAG2 VMs with Service Offering: " $tag2_so
for ((c=1;c<$tag2;c++))
do
if [[ $vmcount -eq $batchsize && waitSuccess ]]
then
waitDeploy $dbnode $batchsize
vmcount=0
fi
job_out=$(./deployVirtualMachine.sh -h $host -z 1 -t 2 -s $tag2_so -u)
job_id=$(echo $job_out | sed 's/\(.*<jobid>\)\([0-9]*\)\(.*\)/\2/g')
vmid=$(echo $job_out | sed 's/\(.*<id>\)\([0-9]*\)\(.*\)/\2/g')
echo "[DEBUG] $(date) deployed vm: " $vmid " in job: " $job_id
vmcount=$((vmcount+1))
done
echo "Deploying TAG3 VMs with Service Offering: " $tag3_so
for ((c=1;c<$tag3;c++))
do
if [[ $vmcount -eq $batchsize && waitSuccess ]]
then
waitDeploy $dbnode $batchsize
vmcount=0
fi
job_out=$(./deployVirtualMachine.sh -h $host -z 1 -t 2 -s $tag3_so -u)
job_id=$(echo $job_out | sed 's/\(.*<jobid>\)\([0-9]*\)\(.*\)/\2/g')
vmid=$(echo $job_out | sed 's/\(.*<id>\)\([0-9]*\)\(.*\)/\2/g')
echo "[DEBUG] $(date) deployed vm: " $vmid " in job: " $job_id
vmcount=$((vmcount+1))
done

View File

@ -1,26 +0,0 @@
#!/usr/bin/env bash
# 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.
zoneid=$1
templateId=$2
serviceOfferingId=$3
query="GET http://10.91.30.226:8096/client/?command=deployVirtualMachine&zoneId=$1&templateId=$2&serviceOfferingId=$3&account=admin&domainid=1 HTTP/1.0\n\n"
echo -e $query | nc -v -q 20 10.91.30.226 8096

View File

@ -1,52 +0,0 @@
#!/usr/bin/env bash
# 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.
usage() {
printf "Destroy System Virtual Machine\nUsage: %s: -h management-server-ip -i vmid\n" $(basename $0) >&2
}
hflag=
iflag=
vmid=
host="127.0.0.1" #defaults to localhost
while getopts 'h:i:' OPTION
do
case $OPTION in
h) hflag=1
host="$OPTARG"
;;
i) iflag=1
vmid="$OPTARG"
;;
?) usage
exit 2
;;
esac
done
if [[ $iflag != "1" ]]
then
usage
exit 2
fi
destroy="GET http://$host:8096/client/?command=destroySystemVm&id=$vmid HTTP/1.0\n\n"
echo -e $destroy | nc -v -w 60 $host 8096

View File

@ -1,25 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
destroy="GET http://10.91.30.226:8096/client/?command=destroyVirtualMachine&id=$x HTTP/1.0\n\n"
echo -e $destroy | nc -v -q 60 10.91.30.226 8096

View File

@ -1,22 +0,0 @@
#!/usr/bin/env bash
# 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.
query="GET http://10.91.30.226:8096/client/?command=listCapacity&zoneId=$1&podid=$2&response=json HTTP/1.0\n\n"
echo -e $query | nc -v -q 120 10.91.30.226 8096

View File

@ -1,22 +0,0 @@
#!/usr/bin/env bash
# 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.
test="GET http://10.91.30.226:8096/?command=listEvents&page=1 HTTP/1.0\n\n"
echo -e $test | nc -v -q 120 10.91.30.226 8096

View File

@ -1,22 +0,0 @@
#!/usr/bin/env bash
# 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.
query="GET http://10.91.30.226:8096/client/?command=listHosts&zoneId=$1&account=admin&domainid=1&page=$2 HTTP/1.0\n\n"
echo -e $query | nc -v -q 120 10.91.30.226 8096

View File

@ -1,22 +0,0 @@
#!/usr/bin/env bash
# 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.
query="GET http://10.91.30.226:8096/client/?command=listRouters&zoneId=$1&account=admin&domainid=1 HTTP/1.0\n\n"
echo -e $query | nc -v -q 120 10.91.30.226 8096

View File

@ -1,22 +0,0 @@
#!/usr/bin/env bash
# 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.
query="GET http://10.91.30.212:8096/client/?command=listTemplates&templatefilter=featured&zoneid=$1 HTTP/1.0\n\n"
echo -e $query | nc -v -w 120 10.91.30.212 8096

View File

@ -1,22 +0,0 @@
#!/usr/bin/env bash
# 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.
query="GET http://10.91.30.226:8096/client/?command=listVirtualMachines&zoneId=$1&account=admin&domainid=1 HTTP/1.0\n\n"
echo -e $query | nc -v -q 120 10.91.30.226 8096

View File

@ -1,36 +0,0 @@
#!/usr/bin/env bash
# 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.
while [ 1 ]
do
echo ==== $(date) ====
# mysql -uroot -Dcloud -h$host -e"select count(*), status, mgmt_server_id from host group by status, mgmt_server_id;"
mysql -uroot -Dcloud -h$host -e"select count(*), state, type from vm_instance group by state, type;"
mysql -uroot -Dcloud -h$host -e"select avg(timestampdiff(second,created,last_updated)),count(id),job_cmd,job_status,job_result_code from async_job where last_updated is not null group by job_cmd,job_status,job_result_code;"
mysql -uroot -Dcloud -h$host -e "select count(*) as locks from op_lock;"
echo === last 5 successful DeployVM ===
mysql -uroot -Dcloud -h$host -e"select created,last_updated,id, timestampdiff(second,created,last_updated) from async_job where job_cmd like '%DeployVM%' and job_result_code=0 and last_updated is not null order by id desc limit 5;"
echo === nwgroup status ===
mysql -uroot -Dcloud -h$host -e"select step, count(*) from op_nwgrp_work group by step;"
mysql -uroot -Dcloud -h$host -e"select avg(timestampdiff(second,created,taken)), count(id),mgmt_server_id from op_nwgrp_work where step='Done' and taken is not null and created < taken group by mgmt_server_id;"
mysql -uroot -Dcloud -h$host -e"select id,mgmt_server_id,instance_id,created,taken,timestampdiff(second,created,taken) from op_nwgrp_work where taken is not null and created!=taken order by id desc limit 5;"
echo
echo
echo
sleep 30s
done

View File

@ -1,228 +0,0 @@
#!/usr/bin/env bash
# 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.
# zucchini uses local storage, before setting up make sure
# * xen.public.network.device is set
# * use.local.storage and systemvm.use.local.storage are true
# * optionally turn off stats collectors
# * expunge.delay and expunge.interval are 60s
# * ping.interval is around 3m
# * turn off dns updates to entire zone, network.dns.basiczone.update=pod
# * capacity.skipcounting.hours=0
# * direct.agent.load.size=1000
# This script will only setup an approximate number of hosts. To achieve the ratio
# by 13. So if 4000 hosts are added, you might see only 3900 come up
# 10 hosts per pod @ 1 host per cluster in a single zone
# Each pod has a /25, so 128 addresses. I think we reserved 5 IP addresses for system VMs in each pod.
# Then we had something like 60 addresses for hosts and 60 addresses for VMs.
#Environment
#1. Approximately 10 hosts per pod.
#2. Only 3 host tags.
#3. With in each pod, the host tags are the same. Homogenous Pods
#5. In simulator.properties, workers=1
usage() {
printf "Setup Zucchini Like Environment\nUsage: %s: -h management-server -z zoneid [-d delay] -n numberofhosts\n" $(basename $0) >&2
}
a=1 #CIDR - 16bytes
b=2 #CIDR - 8 bytes
#options
hflag=1
zflag=
dflag=1
nflag=1
host="127.0.0.1" #default localhost
zoneid=
delay=300 #default 5 minutes
numberofhosts=1300 #default 1300 hosts
tag1="TAG1"
tag2="TAG2"
tag3="TAG3"
while getopts 'h:z:d:n:' OPTION
do
case $OPTION in
h) hflag=1
host="$OPTARG"
;;
z) zflag=1
zoneid="$OPTARG"
;;
d) dflag=1
delay="$OPTARG"
;;
n) nflag=1
numberofhosts="$OPTARG"
;;
?) usage
exit 2
;;
esac
done
if [ $zflag$nflag != "11" ]
then
usage
exit 2
fi
numberofpods=$(($numberofhosts/10)) #10 hosts per pod
tag_one_range=$(($numberofpods*5/13))
tag_two_range=$(($numberofpods*2/13))
tag_three_range=$(($numberofpods-$tag_one_range-$tag_two_range))
clusters_per_pod=10 #each cluster has one host
hosts_per_pod=10
declare -a pod_array
declare -a cluster_array
echo "Split Ratio :: " $tag_one_range":"$tag_two_range":"$tag_three_range
#create the zone
zone_query="GET http://$host/client/?command=createZone&networktype=Basic&securitygroupenabled=false&name=Zucchini&dns1=4.2.2.2&internaldns1=4.2.2.2 HTTP/1.0\n\n"
echo -e $zone_query | nc -v -w $delay $host 8096
#Add Secondary Storage
sstor_query="GET http://$host/client/?command=addSecondaryStorage&zoneid=$zoneid&url=nfs://172.16.15.32/export/share/secondary HTTP/1.0\n\n"
echo -e $sstor_query | nc -v -w $delay $host 8096
let x=a
let y=b
echo "[DEBUG] $(date) Starting Creation of $numberofpods Pods"
for ((name=1;name<=$numberofpods;name++))
do
echo "[DEBUG] $(date) Creating pod[POD$name]"
pod_query="GET http://$host/client/?command=createPod&zoneId=$zoneid&name=POD$name&netmask=255.255.255.128&startIp=172.$x.$y.130&endIp=172.$x.$y.189&gateway=172.$x.$y.129 HTTP/1.0\n\n"
pod_out=$(echo -e $pod_query | nc -v -w $delay $host 8096)
pod_id=$(echo $pod_out | sed 's/\(.*<id>\)\([0-9]*\)\(.*\)/\2/g')
if ! [[ "$pod_id" =~ ^[0-9]+$ ]] ; then
exec >&2; echo "[ERROR] $(date) pod [POD$name] creation failed"; continue
fi
echo "[DEBUG] $(date) Created pod["$pod_id":POD"$name"]"
pod_array[$name]=$pod_id
echo "[DEBUG] $(date) Creating vlan for pod[POD$name]"
vlan_query="GET http://$host/client/?command=createVlanIpRange&vlan=untagged&zoneid=$zoneid&podId=$pod_id&forVirtualNetwork=false&gateway=172.$x.$y.129&netmask=255.255.255.128&startip=172.$x.$y.190&endip=172.$x.$y.249 HTTP/1.0\n\n"
vlan_out=$(echo -e $vlan_query | nc -v -w $delay $host 8096)
vlan_id=$(echo $vlan_out | sed 's/\(.*<id>\)\([0-9]*\)\(.*\)/\2/g')
if ! [[ "$vlan_id" =~ ^[0-9]+$ ]] ; then
let y+=1
if [ "$y" -eq 256 ]
then
let x+=1
y=1
fi
exec >&2; echo "[ERROR] $(date) vlan creation for pod[POD$name] failed"; continue
fi
echo "[DEBUG] $(date) Created vlan for pod[POD$name]"
#add clusters
echo "[DEBUG] $(date) Starting Creation of $clusters_per_pod clusters for pod[POD$name]"
for ((cluster=1;cluster<=$clusters_per_pod;cluster++))
do
echo "[DEBUG] $(date) Creating cluster[POD$name-CLUSTER$cluster] for pod[POD$name]"
cluster_query="GET http://$host/client/?command=addCluster&hypervisor=Simulator&clustertype=CloudManaged&zoneId=$zoneid&podId=$pod_id&clustername=POD$name-CLUSTER$cluster HTTP/1.0\n\n"
cluster_out=$(echo -e $cluster_query | nc -v -w $delay $host 8096)
cluster_id=$(echo $cluster_out | sed 's/\(.*<id>\)\([0-9]*\)\(.*\)/\2/g')
if ! [[ "$cluster_id" =~ ^[0-9]+$ ]] ; then
exec >&2; echo "[ERROR] $(date) cluster[POD$name-CLUSTER$cluster] creation for pod[POD$name] failed"; continue
fi
echo "[DEBUG] $(date) Created cluster["$cluster_id":POD"$name"-CLUSTER"$cluster"]"
cluster_array[$(($name*$clusters_per_pod + $cluster))]=$cluster_id
done
echo "[DEBUG] $(date) Finished Creating clusters for pod[POD$name]"
let y+=1
if [ "$y" -eq 256 ]
then
let x+=1
y=1
fi
done
echo "[DEBUG] $(date) Finished Creating $numberofpods Pods"
#echo "DEBUG:Pods and Clusters"
#echo "PODS:("${#pod_array[@]}")" ${pod_array[@]}
#echo "CLUSTERS:("${#cluster_array[@]}")" ${cluster_array[@]}
echo
echo
#Add hosts
#TAG1
for ((i=1;i<=$tag_one_range;i++))
do
podid=${pod_array[$i]}
for ((j=1;j<=$hosts_per_pod;j++))
do
clusterid=${cluster_array[$(($i*$clusters_per_pod + $j))]}
host_query="GET http://$host/client/?command=addHost&zoneId=$zoneid&podId=$podid&username=sim&password=sim&clusterid=$clusterid&url=http%3A%2F%2Fsim&hypervisor=Simulator&clustertype=CloudManaged&hosttags=$tag1 HTTP/1.0\n\n"
host_out=$(echo -e $host_query | nc -v -w $delay $host 8096)
host_id=$(echo $host_out | sed 's/\(.*<id>\)\([0-9]*\)\(.*\)/\2/g')
if ! [[ "$host_id" =~ ^[0-9]+$ ]] ; then
exec >&2; echo "[ERROR] $(date) host addition failed in [pod:$podid,cluster:$clusterid]"; continue
fi
host_name=$(echo $host_out | sed 's/\(.*<name>\)\(SimulatedAgent.[-0-9a-zA-Z]*\)\(.*\)/\2/g')
echo "[DEBUG] $date added host [$host_id:$host_name] to [pod:$podid,cluster:$clusterid] for TAG1"
done
done
#TAG2
for ((i=$(($tag_one_range + 1));i<=$(($tag_one_range + $tag_two_range));i++))
do
podid=${pod_array[$i]}
for ((j=1;j<=$hosts_per_pod;j++))
do
clusterid=${cluster_array[$(($i*$clusters_per_pod + $j))]}
host_query="GET http://$host/client/?command=addHost&zoneId=$zoneid&podId=$podid&username=sim&password=sim&clusterid=$clusterid&url=http%3A%2F%2Fsim&hypervisor=Simulator&clustertype=CloudManaged&hosttags=$tag2 HTTP/1.0\n\n"
host_out=$(echo -e $host_query | nc -v -w $delay $host 8096)
host_id=$(echo $host_out | sed 's/\(.*<id>\)\([0-9]*\)\(.*\)/\2/g')
if ! [[ "$host_id" =~ ^[0-9]+$ ]] ; then
exec >&2; echo "[ERROR] $(date) host addition failed in [pod:$podid,cluster:$clusterid]"; continue
fi
host_name=$(echo $host_out | sed 's/\(.*<name>\)\(SimulatedAgent.[-0-9a-zA-Z]*\)\(.*\)/\2/g')
echo "[DEBUG] $date added host [$host_id:$host_name] to [pod:$podid,cluster:$clusterid] for TAG2"
done
done
#TAG3
for ((i=$(($tag_two_range + $tag_one_range + 1));i<=$(($tag_three_range + $tag_two_range + $tag_one_range));i++))
do
podid=${pod_array[$i]}
for ((j=1;j<=$hosts_per_pod;j++))
do
clusterid=${cluster_array[$(($i*$clusters_per_pod + $j))]}
host_query="GET http://$host/client/?command=addHost&zoneId=$zoneid&podId=$podid&username=sim&password=sim&clusterid=$clusterid&url=http%3A%2F%2Fsim&hypervisor=Simulator&clustertype=CloudManaged&hosttags=$tag3 HTTP/1.0\n\n"
host_out=$(echo -e $host_query | nc -v -w $delay $host 8096)
host_id=$(echo $host_out | sed 's/\(.*<id>\)\([0-9]*\)\(.*\)/\2/g')
if ! [[ "$host_id" =~ ^[0-9]+$ ]] ; then
exec >&2; echo "[ERROR] $(date) host addition failed in [pod:$podid,cluster:$clusterid]"; continue
fi
host_name=$(echo $host_out | sed 's/\(.*<name>\)\(SimulatedAgent.[-0-9a-zA-Z]*\)\(.*\)/\2/g')
echo "[DEBUG] $date added host [$host_id:$host_name] to [pod:$podid,cluster:$clusterid] for TAG3"
done
done
echo "Setup complete"
exit 0

View File

@ -1,28 +0,0 @@
#!/usr/bin/env bash
# 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.
name=$1
while [ 1 ]
do
mysql -s -r -uroot -Dcloud -h10.1.1.215 -e"select count(id),now(),max(disconnected),mgmt_server_id,status from host group by mgmt_server_id,status;" >> $1
sleep 5
echo --------------------------------------------------------------------------------------------------------------------- >> $1
done

View File

@ -1,90 +0,0 @@
#!/usr/bin/env bash
# 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.
#1. Approximately 10 hosts per pod.
#2. Only 3 host tags.
a=$1 #CIDR - 16bytes
b=$2 #CIDR - 8 bytes
zone_query="GET http://10.91.30.219/client/?command=createZone&name=Zucchini&dns1=4.2.2.2&internaldns1=4.2.2.2&vlan=10-4000&guestcidraddress=10.1.1.0%2F24 HTTP/1.0\n\n"
echo -e $zone_query | nc -v -q 120 10.91.30.219 8096
# Pod Ratio: 38:15:47 @ 10 hosts per pod
let x=a
let y=b
for name in `seq 1 152`
do
pod_query="GET http://10.91.30.219:8096/client/?command=createPod&zoneId=1&name=POD$name&cidr=172.$x.$y.0%2F24&startIp=172.$x.$y.2&endIp=172.$x.$y.252&gateway=172.$x.$y.1 HTTP/1.0\n\n"
vlan_query="GET http://10.91.30.219:8096/client/?command=createVlanIpRange&vlan=untagged&zoneid=1&podId=$name&forVirtualNetwork=false&gateway=172.$y.$x.1&netmask=255.255.255.0&startip=172.$y.$x.2&endip=172.$y.$x.252 HTTP/1.0\n\n"
echo -e $pod_query | nc -v -q 20 10.91.30.219 8096
echo -e $vlan_query | nc -v -q 20 10.91.30.219 8096
for cluster in `seq 1 10`
do
host_query="GET http://10.91.30.219:8096/client/?command=addHost&zoneId=1&podId=$name&username=sim&password=sim&clustername=simulator-POD$name-CLUSTER$cluster&hosttags=TAG1&url=http%3A%2F%2Fsim HTTP/1.0\n\n"
echo -e $host_query | nc -v -q 6000 10.91.30.219 8096
done
let x+=1
let y+=1
done
#reset for tag2
let x=a
let y=b
for name in `seq 153 212`
do
pod_query="GET http://10.91.30.219:8096/client/?command=createPod&zoneId=1&name=POD$name&cidr=182.$x.$y.0%2F24&startIp=182.$x.$y.2&endIp=182.$x.$y.252&gateway=182.$x.$y.1 HTTP/1.0\n\n"
vlan_query="GET http://10.91.30.219:8096/client/?command=createVlanIpRange&vlan=untagged&zoneid=1&podId=$name&forVirtualNetwork=false&gateway=182.$y.$x.1&netmask=255.255.255.0&startip=182.$y.$x.2&endip=182.$y.$x.252 HTTP/1.0\n\n"
echo -e $pod_query | nc -v -q 20 10.91.30.219 8096
echo -e $vlan_query | nc -v -q 20 10.91.30.219 8096
for cluster in `seq 1 10`
do
host_query="GET http://10.91.30.219:8096/client/?command=addHost&zoneId=1&podId=$name&username=sim&password=sim&clustername=simulator-POD$name-CLUSTER$cluster&hosttags=TAG2&url=http%3A%2F%2Fsim HTTP/1.0\n\n"
echo -e $host_query | nc -v -q 6000 10.91.30.219 8096
done
let x+=1
let y+=1
done
#reset for TAG3
let x=a
let y=b
for name in `seq 213 400`
do
pod_query="GET http://10.91.30.219:8096/client/?command=createPod&zoneId=1&name=POD$name&cidr=192.$x.$y.0%2F24&startIp=192.$x.$y.2&endIp=192.$x.$y.252&gateway=192.$x.$y.1 HTTP/1.0\n\n"
vlan_query="GET http://10.91.30.219:8096/client/?command=createVlanIpRange&vlan=untagged&zoneid=1&podId=$name&forVirtualNetwork=false&gateway=192.$y.$x.1&netmask=255.255.255.0&startip=192.$y.$x.2&endip=192.$y.$x.252 HTTP/1.0\n\n"
echo -e $pod_query | nc -v -q 20 10.91.30.219 8096
echo -e $vlan_query | nc -v -q 20 10.91.30.219 8096
for cluster in `seq 1 10`
do
host_query="GET http://10.91.30.219:8096/client/?command=addHost&zoneId=1&podId=$name&username=sim&password=sim&clustername=simulator-POD$name-CLUSTER$cluster&hosttags=TAG3&url=http%3A%2F%2Fsim HTTP/1.0\n\n"
echo -e $host_query | nc -v -q 6000 10.91.30.219 8096
done
let x+=1
let y+=1
done

View File

@ -1,31 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
y=$2
name=$3
pod_query="GET http://10.91.30.212:8096/client/?command=createPod&zoneId=1&name=SSP$name&cidr=182.$x.$y.0%2F24&startIp=182.$x.$y.2&endIp=182.$x.$y.252&gateway=182.$x.$y.1
HTTP/1.0\n\n"
echo -e $pod_query | nc -v -w 20 10.91.30.212 8096
#vlan_query="GET http://10.91.30.212/client/?command=createVlanIpRange&vlan=untagged&zoneid=1&podId=$name&forVirtualNetwork=false&gateway=172.$y.$x.1&netmask=255.255.255.0&startip=172.$y.$x.2&endip=172.$y.$x.252 HTTP/1.0\n\n"
#echo -e $vlan_query | nc -v -w 20 10.91.30.212 8096

View File

@ -1,23 +0,0 @@
#!/usr/bin/env bash
# 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.
name=$1
host_query="GET http://10.91.30.226:8096/client/?command=addHost&zoneId=1&podId=$((name+250))&username=sim&password=sim&clustername=simulator-$name&hosttags=RP$name&url=http%3A%2F%2Fsim HTTP/1.0\n\n"
echo -e $host_query | nc -v -q 60 10.91.30.226 8096

View File

@ -1,39 +0,0 @@
#!/usr/bin/env bash
# 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.
workers=$1
x=$2 #CIDR - 16bytes
y=$3 #CIDR - 8 bytes
for name in `seq 1 $workers`
do
pod_query="GET http://10.91.30.226:8096/client/?command=createPod&zoneId=1&name=RP$name&cidr=182.$x.$y.0%2F24&startIp=182.$x.$y.2&endIp=182.$x.$y.252&gateway=182.$x.$y.1 HTTP/1.0\n\n"
vlan_query="GET http://10.91.30.226:8096/client/?command=createVlanIpRange&vlan=untagged&zoneid=1&podId=$((name+250))&forVirtualNetwork=false&gateway=182.$y.$x.1&netmask=255.255.255.0&startip=182.$y.$x.2&endip=182.$y.$x.252 HTTP/1.0\n\n"
so_query="GET http://10.91.30.226:8096/client/?command=createServiceOffering&name=RP$name&displayText=RP$name&storageType=local&cpuNumber=1&cpuSpeed=1000&memory=512&offerha=false&usevirtualnetwork=false&hosttags=RP$name HTTP/1.0\n\n"
echo -e $pod_query | nc -v -q 20 10.91.30.226 8096
echo -e $vlan_query | nc -v -q 20 10.91.30.226 8096
echo -e $so_query | nc -v -q 20 10.91.30.226 8096
let x+=1
let y+=1
done

View File

@ -1,24 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
so_query="GET http://10.91.30.226:8096/client/?command=createServiceOffering&name=SO$x&displayText=SO$x&storageType=local&cpuNumber=1&cpuSpeed=1000&memory=512&offerha=false&usevirtualnetwork=false&hosttags=SP$x HTTP/1.0\n\n"
echo -e $so_query | nc -v -q 20 10.91.30.226 8096

View File

@ -1,26 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
y=$2
name=$3
vlan_query="GET http://10.91.30.212/client/?command=createVlanIpRange&vlan=untagged&zoneid=1&podId=$name&forVirtualNetwork=false&gateway=172.$x.$y.1&netmask=255.255.255.0&startip=172.$x.$y.2&endip=172.$x.$y.252 HTTP/1.0\n\n"
echo -e $vlan_query | nc -v -w 20 10.91.30.212 8096

View File

@ -1,252 +0,0 @@
#!/usr/bin/env bash
# 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.
# zucchini uses local storage, before setting up make sure
# * xen.public.network.device is set
# * use.local.storage and systemvm.use.local.storage are true
# * optionally turn off stats collectors
# * expunge.delay and expunge.interval are 60s
# * ping.interval is around 3m
# * turn off dns updates to entire zone, network.dns.basiczone.update=pod
# * capacity.skipcounting.hours=0
# * direct.agent.load.size=1000
# * security groups are enabled
# This script will only setup an approximate number of hosts. To achieve the ratio
# by 13. So if 4000 hosts are added, you might see only 3900 come up
# 10 hosts per pod @ 1 host per cluster in a single zone
# Each pod has a /25, so 128 addresses. I think we reserved 5 IP addresses for system VMs in each pod.
# Then we had something like 60 addresses for hosts and 60 addresses for VMs.
#Environment
#1. Approximately 10 hosts per pod.
#2. Only 3 host tags.
#3. With in each pod, the host tags are the same. Homogenous Pods
#5. In simulator.properties, workers=1
usage() {
printf "Setup Zucchini Like Environment\nUsage: %s: -h management-server -z zoneid [-d delay] -n numberofhosts [-g numberof security groups]\n" $(basename $0) >&2
}
a=1 #CIDR - 16bytes
b=2 #CIDR - 8 bytes
#options
hflag=1
zflag=
dflag=1
nflag=1
gflag=1
host="127.0.0.1" #default localhost
zoneid=
delay=300 #default 5 minutes
numberofhosts=1300 #default 1300 hosts
numberofgroups=130 #default 130 groups
tag1="TAG1"
tag2="TAG2"
tag3="TAG3"
while getopts 'h:z:d:n:g:' OPTION
do
case $OPTION in
h) hflag=1
host="$OPTARG"
;;
z) zflag=1
zoneid="$OPTARG"
;;
d) dflag=1
delay="$OPTARG"
;;
n) nflag=1
numberofhosts="$OPTARG"
;;
g) gflag=1
numberofgroups="$OPTARG"
;;
?) usage
exit 2
;;
esac
done
if [ $zflag$nflag != "11" ]
then
usage
exit 2
fi
numberofpods=$(($numberofhosts/10)) #10 hosts per pod
tag_one_range=$(($numberofpods*5/13))
tag_two_range=$(($numberofpods*2/13))
tag_three_range=$(($numberofpods-$tag_one_range-$tag_two_range))
clusters_per_pod=10 #each cluster has one host
hosts_per_pod=10
declare -a pod_array
declare -a cluster_array
echo "Split Ratio :: " $tag_one_range":"$tag_two_range":"$tag_three_range
#create the zone
zone_query="GET http://$host/client/?command=createZone&networktype=Basic&securitygroupenabled=true&name=Zucchini&dns1=4.2.2.2&internaldns1=4.2.2.2 HTTP/1.0\n\n"
echo -e $zone_query | nc -v -w $delay $host 8096
#Add Secondary Storage
sstor_query="GET http://$host/client/?command=addSecondaryStorage&zoneid=$zoneid&url=nfs://172.16.15.32/export/share/secondary HTTP/1.0\n\n"
echo -e $sstor_query | nc -v -w $delay $host 8096
let x=a
let y=b
echo "[DEBUG] $(date) Starting Creation of $numberofpods Pods"
for ((name=1;name<=$numberofpods;name++))
do
echo "[DEBUG] $(date) Creating pod[POD$name]"
pod_query="GET http://$host/client/?command=createPod&zoneId=$zoneid&name=POD$name&netmask=255.255.255.128&startIp=172.$x.$y.130&endIp=172.$x.$y.189&gateway=172.$x.$y.129 HTTP/1.0\n\n"
pod_out=$(echo -e $pod_query | nc -v -w $delay $host 8096)
pod_id=$(echo $pod_out | sed 's/\(.*<id>\)\([0-9]*\)\(.*\)/\2/g')
if ! [[ "$pod_id" =~ ^[0-9]+$ ]] ; then
exec >&2; echo "[ERROR] $(date) pod [POD$name] creation failed"; continue
fi
echo "[DEBUG] $(date) Created pod["$pod_id":POD"$name"]"
pod_array[$name]=$pod_id
echo "[DEBUG] $(date) Creating vlan for pod[POD$name]"
vlan_query="GET http://$host/client/?command=createVlanIpRange&vlan=untagged&zoneid=$zoneid&podId=$pod_id&forVirtualNetwork=false&gateway=172.$x.$y.129&netmask=255.255.255.128&startip=172.$x.$y.190&endip=172.$x.$y.249 HTTP/1.0\n\n"
vlan_out=$(echo -e $vlan_query | nc -v -w $delay $host 8096)
vlan_id=$(echo $vlan_out | sed 's/\(.*<id>\)\([0-9]*\)\(.*\)/\2/g')
if ! [[ "$vlan_id" =~ ^[0-9]+$ ]] ; then
let y+=1
if [ "$y" -eq 256 ]
then
let x+=1
y=1
fi
exec >&2; echo "[ERROR] $(date) vlan creation for pod[POD$name] failed"; continue
fi
echo "[DEBUG] $(date) Created vlan for pod[POD$name]"
#add clusters
echo "[DEBUG] $(date) Starting Creation of $clusters_per_pod clusters for pod[POD$name]"
for ((cluster=1;cluster<=$clusters_per_pod;cluster++))
do
echo "[DEBUG] $(date) Creating cluster[POD$name-CLUSTER$cluster] for pod[POD$name]"
cluster_query="GET http://$host/client/?command=addCluster&hypervisor=Simulator&clustertype=CloudManaged&zoneId=$zoneid&podId=$pod_id&clustername=POD$name-CLUSTER$cluster HTTP/1.0\n\n"
cluster_out=$(echo -e $cluster_query | nc -v -w $delay $host 8096)
cluster_id=$(echo $cluster_out | sed 's/\(.*<id>\)\([0-9]*\)\(.*\)/\2/g')
if ! [[ "$cluster_id" =~ ^[0-9]+$ ]] ; then
exec >&2; echo "[ERROR] $(date) cluster[POD$name-CLUSTER$cluster] creation for pod[POD$name] failed"; continue
fi
echo "[DEBUG] $(date) Created cluster["$cluster_id":POD"$name"-CLUSTER"$cluster"]"
cluster_array[$(($name*$clusters_per_pod + $cluster))]=$cluster_id
done
echo "[DEBUG] $(date) Finished Creating clusters for pod[POD$name]"
let y+=1
if [ "$y" -eq 256 ]
then
let x+=1
y=1
fi
done
echo "[DEBUG] $(date) Finished Creating $numberofpods Pods"
#echo "DEBUG:Pods and Clusters"
#echo "PODS:("${#pod_array[@]}")" ${pod_array[@]}
#echo "CLUSTERS:("${#cluster_array[@]}")" ${cluster_array[@]}
echo
echo
echo "[DEBUG] $(date) Creating $numberofgroups security groups"
for ((sg=1;sg<=$numberofgroups;sg++))
do
sg_create_query="GET http://$host/client/?command=createSecurityGroup&name=zGroup$sg&description=zGroup$sg&domainid=1&account=admin HTTP/1.0\n\n"
sg_create_out=$(echo -e $sg_create_query | nc -v -w $delay $host 8096)
sg_id=$(echo $sg_create_out | sed 's/\(.*<id>\)\([0-9]*\)\(.*\)/\2/g')
if ! [[ "$sg_id" =~ ^[0-9]+$ ]] ; then
exec >&2; echo "[ERROR] $(date) security group[zGroup$sg] creation failed"; continue
fi
echo "[DEBUG] $(date) Created security group[$sg_id:zGroup$sg]"
echo "[DEBUG] $(date) Adding ingress rule start,end=$((2000 + $sg)), $((2000 + $sg)) to security group[$sg_id:zGroup$sg]"
sg_auth_query="GET http://$host/client/?command=authorizeSecurityGroupIngress&domainid=1&account=admin&securitygroupid=$sg_id&protocol=TCP&startport=$((2000 + $sg))&endport=$((2000 + $sg))&usersecuritygrouplist[0].account=admin&usersecuritygrouplist[0].group=zGroup$sg HTTP/1.0\n\n"
sg_auth_out=$(echo -e $sg_auth_query | nc -v -w $delay $host 8096)
done
echo "[DEBUG] $(date) Finished Creating security groups"
#Add hosts
#TAG1
for ((i=1;i<=$tag_one_range;i++))
do
podid=${pod_array[$i]}
for ((j=1;j<=$hosts_per_pod;j++))
do
clusterid=${cluster_array[$(($i*$clusters_per_pod + $j))]}
host_query="GET http://$host/client/?command=addHost&zoneId=$zoneid&podId=$podid&username=sim&password=sim&clusterid=$clusterid&url=http%3A%2F%2Fsim&hypervisor=Simulator&clustertype=CloudManaged&hosttags=$tag1 HTTP/1.0\n\n"
host_out=$(echo -e $host_query | nc -v -w $delay $host 8096)
host_id=$(echo $host_out | sed 's/\(.*<id>\)\([0-9]*\)\(.*\)/\2/g')
if ! [[ "$host_id" =~ ^[0-9]+$ ]] ; then
exec >&2; echo "[ERROR] $(date) host addition failed in [pod:$podid,cluster:$clusterid]"; continue
fi
host_name=$(echo $host_out | sed 's/\(.*<name>\)\(SimulatedAgent.[-0-9a-zA-Z]*\)\(.*\)/\2/g')
echo "[DEBUG] $date added host [$host_id:$host_name] to [pod:$podid,cluster:$clusterid] for TAG1"
done
done
#TAG2
for ((i=$(($tag_one_range + 1));i<=$(($tag_one_range + $tag_two_range));i++))
do
podid=${pod_array[$i]}
for ((j=1;j<=$hosts_per_pod;j++))
do
clusterid=${cluster_array[$(($i*$clusters_per_pod + $j))]}
host_query="GET http://$host/client/?command=addHost&zoneId=$zoneid&podId=$podid&username=sim&password=sim&clusterid=$clusterid&url=http%3A%2F%2Fsim&hypervisor=Simulator&clustertype=CloudManaged&hosttags=$tag2 HTTP/1.0\n\n"
host_out=$(echo -e $host_query | nc -v -w $delay $host 8096)
host_id=$(echo $host_out | sed 's/\(.*<id>\)\([0-9]*\)\(.*\)/\2/g')
if ! [[ "$host_id" =~ ^[0-9]+$ ]] ; then
exec >&2; echo "[ERROR] $(date) host addition failed in [pod:$podid,cluster:$clusterid]"; continue
fi
host_name=$(echo $host_out | sed 's/\(.*<name>\)\(SimulatedAgent.[-0-9a-zA-Z]*\)\(.*\)/\2/g')
echo "[DEBUG] $date added host [$host_id:$host_name] to [pod:$podid,cluster:$clusterid] for TAG2"
done
done
#TAG3
for ((i=$(($tag_two_range + $tag_one_range + 1));i<=$(($tag_three_range + $tag_two_range + $tag_one_range));i++))
do
podid=${pod_array[$i]}
for ((j=1;j<=$hosts_per_pod;j++))
do
clusterid=${cluster_array[$(($i*$clusters_per_pod + $j))]}
host_query="GET http://$host/client/?command=addHost&zoneId=$zoneid&podId=$podid&username=sim&password=sim&clusterid=$clusterid&url=http%3A%2F%2Fsim&hypervisor=Simulator&clustertype=CloudManaged&hosttags=$tag3 HTTP/1.0\n\n"
host_out=$(echo -e $host_query | nc -v -w $delay $host 8096)
host_id=$(echo $host_out | sed 's/\(.*<id>\)\([0-9]*\)\(.*\)/\2/g')
if ! [[ "$host_id" =~ ^[0-9]+$ ]] ; then
exec >&2; echo "[ERROR] $(date) host addition failed in [pod:$podid,cluster:$clusterid]"; continue
fi
host_name=$(echo $host_out | sed 's/\(.*<name>\)\(SimulatedAgent.[-0-9a-zA-Z]*\)\(.*\)/\2/g')
echo "[DEBUG] $date added host [$host_id:$host_name] to [pod:$podid,cluster:$clusterid] for TAG3"
done
done
echo "Setup complete"
exit 0

View File

@ -1,158 +0,0 @@
#!/usr/bin/env bash
# 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.
# zucchini uses local storage, before setting up make sure
# * xen.public.network.device is set
# * use.local.storage and systemvm.use.local.storage are true
# * optionally turn off stats collector
# * expunge.delay and expunge.interval are 60s
# * capacity.skipcounting.hours=0
#Environment
#1. Small setup for zucchini : 13, 26, 39, 52 hosts only
#2. Only 3 host tags.
#5. simulator.properties, workers=1
usage() {
printf "Setup Zucchini Like Environment\nUsage: %s: -h management-server -z zoneid [-d delay] -n numberofhosts\n" $(basename $0) >&2
}
a=1 #CIDR - 16bytes
b=2 #CIDR - 8 bytes
#options
hflag=1
zflag=1
dflag=1
nflag=1
host="127.0.0.1" #default localhost
zoneid=
delay=300 #default 5 minutes
numberofhosts=13 #default 13 hosts
tag1="TAG1"
tag2="TAG2"
tag3="TAG3"
while getopts 'h:z:d:n:' OPTION
do
case $OPTION in
h) hflag=1
host="$OPTARG"
;;
z) zflag=1
zoneid="$OPTARG"
;;
d) dflag=1
delay="$OPTARG"
;;
n) nflag=1
numberofhosts="$OPTARG"
;;
?) usage
exit 2
;;
esac
done
if [ $hflag$zflag$dflag$nflag != "1111" ]
then
usage
exit 2
fi
if [ $numberofhosts -gt 52 ]
then
echo "Can't exceed 52 hosts"
exit 130
fi
numberofpods=3 #130 hosts per pod. So need only 3. each pod is homogenous
tag_one_range=$(($numberofhosts*5/13))
tag_two_range=$(($numberofhosts*2/13))
tag_three_range=$(($numberofhosts-$tag_one_range-$tag_two_range))
#create the zone
zone_query="GET http://$host/client/?command=createZone&networktype=Basic&securitygroupenabled=true&name=Zucchini&dns1=4.2.2.2&internaldns1=4.2.2.2 HTTP/1.0\n\n"
echo -e $zone_query | nc -v -w $delay $host 8096
sstor_query="GET http://$host/client/?command=addSecondaryStorage&zoneid=$zoneid&url=nfs://172.16.15.32/export/share/secondary HTTP/1.0\n\n"
echo -e $sstor_query | nc -v -w $delay $host 8096
let x=a
let y=b
for name in `seq 1 $numberofpods`
do
pod_query="GET http://$host/client/?command=createPod&zoneId=$zoneid&name=POD$name&netmask=255.255.255.0&startIp=172.$x.$y.2&endIp=172.$x.$y.131&gateway=172.$x.$y.1 HTTP/1.0\n\n"
vlan_query="GET http://$host/client/?command=createVlanIpRange&vlan=untagged&zoneid=$zoneid&podId=$name&forVirtualNetwork=false&gateway=172.$y.$x.1&netmask=255.255.255.0&startip=172.$y.$x.2&endip=172.$y.$x.131 HTTP/1.0\n\n"
echo -e $pod_query | nc -v -w $delay $host 8096
echo -e $vlan_query | nc -v -w $delay $host 8096
let x+=1
let y+=1
done
#add clusters -
#for i in `seq 1 10`
# cluster_query="GET http://$host/client/?command=addCluster&hypervisor=Simulator&clustertype=CloudManaged&zoneId=$zoneid&podId=$podid&clustername=POD$podid-CLUSTER$cluster HTTP/1.0\n\n"
# echo -e $cluster_query | nc -v -w $delay $host 8096
#do
clusterid=1
#TAG1
for cluster in `seq 1 $tag_one_range`
do
cluster_query="GET http://$host/client/?command=addCluster&hypervisor=Simulator&clustertype=CloudManaged&zoneId=$zoneid&podId=1&clustername=POD1-CLUSTER$cluster HTTP/1.0\n\n"
echo -e $cluster_query | nc -v -w $delay $host 8096
host_query="GET http://$host/client/?command=addHost&zoneId=$zoneid&podId=1&username=sim&password=sim&clusterid=$clusterid&url=http%3A%2F%2Fsim&hypervisor=Simulator&clustertype=CloudManaged&hosttags=$tag1 HTTP/1.0\n\n"
echo -e $host_query | nc -v -w $delay $host 8096
let clusterid+=1
done
#TAG2
for cluster in `seq $(($tag_one_range + 1)) $(($tag_one_range + $tag_two_range))`
do
cluster_query="GET http://$host/client/?command=addCluster&hypervisor=Simulator&clustertype=CloudManaged&zoneId=$zoneid&podId=2&clustername=POD2-CLUSTER$cluster HTTP/1.0\n\n"
echo -e $cluster_query | nc -v -w $delay $host 8096
host_query="GET http://$host/client/?command=addHost&zoneId=$zoneid&podId=2&username=sim&password=sim&clusterid=$clusterid&url=http%3A%2F%2Fsim&hypervisor=Simulator&clustertype=CloudManaged&hosttags=$tag2 HTTP/1.0\n\n"
echo -e $host_query | nc -v -w $delay $host 8096
let clusterid+=1
done
#TAG3
for cluster in `seq $(($tag_two_range + $tag_one_range + 1)) $(($tag_three_range + $tag_two_range + $tag_one_range))`
do
cluster_query="GET http://$host/client/?command=addCluster&hypervisor=Simulator&clustertype=CloudManaged&zoneId=$zoneid&podId=3&clustername=POD3-CLUSTER$cluster HTTP/1.0\n\n"
echo -e $cluster_query | nc -v -w $delay $host 8096
host_query="GET http://$host/client/?command=addHost&zoneId=$zoneid&podId=3&username=sim&password=sim&clusterid=$clusterid&url=http%3A%2F%2Fsim&hypervisor=Simulator&clustertype=CloudManaged&hosttags=$tag3 HTTP/1.0\n\n"
echo -e $host_query | nc -v -w $delay $host 8096
let clusterid+=1
done
for i in {1..60}
do
sg_create_query="GET http://$host/client/?command=createSecurityGroup&name=TestGroup1&description=Test HTTP/1.0\n\n"
echo -e $sg_create_query | nc -v -w $delay $host 8096
sg_auth_query="GET http://$host/client/?command=authorizeSecurityGroupIngress&domainid=1&account=admin&securitygroupid=$((i+2))&protocol=TCP&startport=2002&endport=2002&usersecuritygrouplist[0].account=admin&usersecuritygrouplist[0].group=TestGroup1 HTTP/1.0\n\n"
echo -e $sg_create_query | nc -v -w $delay $host 8096
done
echo "Setup complete"
exit 0

View File

@ -1,21 +0,0 @@
#!/usr/bin/env bash
# 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.
./setupServiceOffering.sh -h $host -i T1 -l -m 7168 -c 1024 -n 1 -g TAG1
./setupServiceOffering.sh -h $host -i T2 -l -m 7168 -c 1024 -n 1 -g TAG2
./setupServiceOffering.sh -h $host -i T3 -l -m 7168 -c 1024 -n 1 -g TAG3

View File

@ -1,26 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
start_router="GET http://10.91.30.226:8096/client/?command=startRouter&id=$x HTTP/1.0\n\n"
echo -e $start_router | nc -v -q 60 10.91.30.226 8096

View File

@ -1,26 +0,0 @@
#!/usr/bin/env bash
# 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.
x=$1
start_vm="GET http://10.91.30.226:8096/client/?command=startVirtualMachine&id=$x HTTP/1.0\n\n"
echo -e $start_vm | nc -v -q 60 10.91.30.226 8096

View File

@ -1,49 +0,0 @@
#!/usr/bin/env bash
# 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.
usage() {
printf "Stop Router: %s: -h management-server -i vmid\n" $(basename $0) >&2
}
iflag=
hflag=
host="127.0.0.1" #defaults to localhost
vmid=
while getopts 'h:i:' OPTION
do
case $OPTION in
h) hflag=1
host="$OPTARG"
;;
i) iflag=1
vmid="$OPTARG"
;;
?) usage
exit 2
;;
esac
done
if [[ $iflag != "1" ]]
then
usage
exit 2
fi
stop_vm="GET http://$host:8096/client/?command=stopRouter&id=$vmid HTTP/1.0\n\n"
echo -e $stop_vm | nc -v -w 60 $host 8096

View File

@ -1,49 +0,0 @@
#!/usr/bin/env bash
# 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.
usage() {
printf "Stop Virtual Machine: %s: -h management-server -i vmid\n" $(basename $0) >&2
}
iflag=
hflag=
host="127.0.0.1" #defaults to localhost
vmid=
while getopts 'h:i:' OPTION
do
case $OPTION in
h) hflag=1
host="$OPTARG"
;;
i) iflag=1
vmid="$OPTARG"
;;
?) usage
exit 2
;;
esac
done
if [[ $iflag != "1" ]]
then
usage
exit 2
fi
stop_vm="GET http://$host:8096/client/?command=stopVirtualMachine&id=$vmid HTTP/1.0\n\n"
echo -e $stop_vm | nc -v -w 60 $host 8096

View File

@ -1,119 +0,0 @@
#!/usr/bin/env bash
# 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.
#1. Approximately 10 hosts per pod.
#2. Only 3 host tags.
a=$1 #CIDR - 16bytes
b=$2 #CIDR - 8 bytes
host=$3 #MSHOST
zone=$4
zone_query="GET http://$host/client/?command=createZone&name=Zucchini&dns1=4.2.2.2&internaldns1=4.2.2.2&vlan=10-4000&guestcidraddress=10.1.1.0%2F24 HTTP/1.0\n\n"
echo -e $zone_query | nc -v -w 120 $host 8096
# Pod Ratio: 38:15:47
let x=a
let y=b
for name in `seq 1 152`
do
pod_query="GET http://$host/client/?command=createPod&zoneId=$zone&name=POD$name&cidr=172.$x.$y.0%2F24&startIp=172.$x.$y.2&endIp=172.$x.$y.252&gateway=172.$x.$y.1 HTTP/1.0\n\n"
vlan_query="GET http://$host/client/?command=createVlanIpRange&vlan=untagged&zoneid=$zone&podId=$name&forVirtualNetwork=false&gateway=172.$y.$x.1&netmask=255.255.255.0&startip=172.$y.$x.2&endip=172.$y.$x.252 HTTP/1.0\n\n"
echo -e $pod_query | nc -v -w 20 $host 8096
echo -e $vlan_query | nc -v -w 20 $host 8096
let x+=1
let y+=1
done
let x=a
let y=b
for name in `seq 153 212`
do
pod_query="GET http://$host/client/?command=createPod&zoneId=$zone&name=POD$name&cidr=182.$x.$y.0%2F24&startIp=182.$x.$y.2&endIp=182.$x.$y.252&gateway=182.$x.$y.1 HTTP/1.0\n\n"
vlan_query="GET http://$host/client/?command=createVlanIpRange&vlan=untagged&zoneid=$zone&podId=$name&forVirtualNetwork=false&gateway=182.$y.$x.1&netmask=255.255.255.0&startip=182.$y.$x.2&endip=182.$y.$x.252 HTTP/1.0\n\n"
echo -e $pod_query | nc -v -w 20 $host 8096
echo -e $vlan_query | nc -v -w 20 $host 8096
let x+=1
let y+=1
done
let x=a
let y=b
for name in `seq 213 400`
do
pod_query="GET http://$host/client/?command=createPod&zoneId=$zone&name=POD$name&cidr=192.$x.$y.0%2F24&startIp=192.$x.$y.2&endIp=192.$x.$y.252&gateway=192.$x.$y.1 HTTP/1.0\n\n"
vlan_query="GET http://$host/client/?command=createVlanIpRange&vlan=untagged&zoneid=$zone&podId=$name&forVirtualNetwork=false&gateway=192.$y.$x.1&netmask=255.255.255.0&startip=192.$y.$x.2&endip=192.$y.$x.252 HTTP/1.0\n\n"
echo -e $pod_query | nc -v -w 20 $host 8096
echo -e $vlan_query | nc -v -w 20 $host 8096
let x+=1
let y+=1
done
#add clusters
#for name in `seq 1 400`
#do
# for cluster in `seq 1 10`
# do
# cluster_query="GET http://$host/client/?command=addCluster&hypervisor=Simulator&clustertype=CloudManaged&zoneId=$zone&podId=$name&clustername=POD$name-CLUSTER$cluster HTTP/1.0\n\n"
# echo -e $cluster_query | nc -v -w 120 $host 8096
# done
#done
# @ 10 hosts per pod @ 10 clusters per pod
clusterid=1
#TAG1
for podid in `seq 58 152`
do
for i in `seq 1 10`
do
host_query="GET http://$host/client/?command=addHost&zoneId=$zone&podId=$podid&username=sim&password=sim&clustername=CLUSTER$clusterid&hosttags=TAG1&url=http%3A%2F%2Fsim HTTP/1.0\n\n"
echo -e $host_query | nc -v -w 6000 $host 8096
done
let clusterid+=1
done
#TAG2
for podid in `seq 153 212`
do
for i in `seq 1 10`
do
host_query="GET http://$host/client/?command=addHost&zoneId=$zone&podId=$podid&username=sim&password=sim&clustername=CLUSTER$clusterid&hosttags=TAG2&url=http%3A%2F%2Fsim HTTP/1.0\n\n"
echo -e $host_query | nc -v -w 6000 $host 8096
done
let clusterid+=1
done
#TAG3
for podid in `seq 213 400`
do
for i in `seq 1 10`
do
host_query="GET http://$host/client/?command=addHost&zoneId=$zone&podId=$podid&username=sim&password=sim&cluster=CLUSTER$clusterid&hosttags=TAG3&url=http%3A%2F%2Fsim HTTP/1.0\n\n"
echo -e $host_query | nc -v -w 6000 $host 8096
done
let clusterid+=1
done

View File

@ -1,217 +0,0 @@
#!/usr/bin/env python
# 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.
'''
# zucchini uses local storage, before setting up make sure
# * xen.public.network.device is set
# * use.local.storage and systemvm.use.local.storage are true
# * optionally turn off stats collectors
# * expunge.delay and expunge.interval are 60s
# * ping.interval is around 3m
# * turn off dns updates to entire zone, network.dns.basiczone.update=pod
# * capacity.skipcounting.hours=0
# * direct.agent.load.size=1000
# * security groups are enabled
# This script will only setup an approximate number of hosts. To achieve the ratio
# by 13. So if 4000 hosts are added, you might see only 3900 come up
# 10 hosts per pod @ 1 host per cluster in a single zone
# Each pod has a /25, so 128 addresses. I think we reserved 5 IP addresses for system VMs in each pod.
# Then we had something like 60 addresses for hosts and 60 addresses for VMs.
#Environment
#1. Approximately 10 hosts per pod.
#2. Only 3 host tags.
#3. With in each pod, the host tags are the same. Homogenous Pods
#5. In simulator.properties, workers=1
'''
from optparse import OptionParser
from configGenerator import *
import random
def getGlobalSettings():
global_settings = {'expunge.delay': '60',
'expunge.interval': '60',
'expunge.workers': '3',
'workers': '10',
'network.dns.basiczone.updates':'pod',
'use.user.concentrated.pod.allocation':'false',
'vm.allocation.algorithm':'firstfit',
'capacity.check.period':'0',
# 'host.stats.interval':'-1',
# 'vm.stats.interval':'-1',
# 'storage.stats.interval':'-1',
# 'router.stats.interval':'-1',
'vm.op.wait.interval':'5',
'xen.public.network.device':'10.10.10.10', #only a dummy for the simulator
'guest.domain.suffix':'zucchini.simulator',
'instance.name':'ZIM',
'direct.agent.load.size':'1000',
'default.page.size':'10000',
'linkLocalIp.nums':'4',
'system.vm.use.local.storage':'true',
'use.local.storage':'true',
'check.pod.cidrs':'false',
}
for k,v in global_settings.iteritems():
cfg=configuration()
cfg.name=k
cfg.value=v
yield cfg
def podIpRangeGenerator():
x=1
y=2
while 1:
if y == 255:
x=x+1
if x == 255:
x=1
break
y=1
y=y+1
#pod mangement network
yield ('172.'+str(x)+'.'+str(y)+'.129', '172.'+str(x)+'.'+str(y)+'.130', '172.'+str(x)+'.'+str(y)+'.189')
def vlanIpRangeGenerator():
x=1
y=2
while 1:
if y == 255:
x=x+1
if x==255:
x=1
break
y=1
y=y+1
#vlan ip range
yield ('172.'+str(x)+'.'+str(y)+'.129', '172.'+str(x)+'.'+str(y)+'.190', '172.'+str(x)+'.'+str(y)+'.249')
def describeZucchiniResources(numberOfAgents=1300, dbnode='localhost', mshost='localhost', randomize=False, sgenabled=False):
zs=cloudstackConfiguration()
numberofpods=numberOfAgents/10
tagOneHosts = numberOfAgents*5/13
tagTwoHosts = numberOfAgents*2/13
tagThreeHosts = numberOfAgents-tagOneHosts-tagTwoHosts
clustersPerPod=10
hostsPerPod=10
z = zone()
z.dns1 = '4.2.2.2'
z.dns2 = '192.168.110.254'
z.internaldns1 = '10.91.28.6'
z.internaldns2 = '192.168.110.254'
z.name = 'Zucchini'
z.networktype = 'Basic'
z.securitygroupenabled = sgenabled
hosttags=['TAG1' for x in range(tagOneHosts)] + ['TAG2' for x in range(tagTwoHosts)] + ['TAG3' for x in range(tagThreeHosts)]
curhost=0
curpod=0
if randomize:
random.shuffle(hosttags) #randomize the host distribution
for podRange,vlanRange in zip(podIpRangeGenerator(), vlanIpRangeGenerator()):
p = pod()
curpod=curpod+1
p.name = 'POD'+str(curpod)
p.gateway=podRange[0]
p.startip=podRange[1]
p.endip=podRange[2]
p.netmask='255.255.255.128'
v = iprange()
v.gateway=vlanRange[0]
v.startip=vlanRange[1]
v.endip=vlanRange[2]
v.netmask="255.255.255.128"
p.guestIpRanges.append(v)
for i in range(1,clustersPerPod+1):
c = cluster()
c.clustername = 'POD'+str(curpod)+'-CLUSTER'+str(i)
c.hypervisor = 'Simulator'
c.clustertype = 'CloudManaged'
try:
h = host()
h.username = 'root'
h.password = 'password'
h.url = "http://sim/test-%d"%(curhost)
h.hosttags = hosttags.pop()
c.hosts.append(h)
curhost=curhost+1
p.clusters.append(c)
except IndexError:
break
#end clusters
z.pods.append(p)
if curpod == numberofpods or curhost == numberOfAgents:
break
#end pods
secondary = secondaryStorage()
secondary.url = 'nfs://172.16.25.32/secondary/path'
z.secondaryStorages.append(secondary)
zs.zones.append(z)
'''Add mgt server'''
mgt = managementServer()
mgt.mgtSvrIp = mshost #could be the LB balancing the cluster of management server as well
zs.mgtSvr.append(mgt)
'''Add a database'''
db = dbServer()
db.dbSvr = opts.dbnode
zs.dbSvr = db
'''Add some configuration'''
[zs.globalConfig.append(cfg) for cfg in getGlobalSettings()]
''''add loggers'''
testClientLogger = logger()
testClientLogger.name = "TestClient"
testClientLogger.file = "/var/log/testclient.log"
testCaseLogger = logger()
testCaseLogger.name = "TestCase"
testCaseLogger.file = "/var/log/testcase.log"
zs.logger.append(testClientLogger)
zs.logger.append(testCaseLogger)
return zs
if __name__=="__main__":
parser = OptionParser()
# parser.add_option('-h','--host',dest='host',help='location of management server(s) or load-balancer')
parser.add_option('-n', '--number-of-agents', action='store', dest='agents', help='number of agents in the deployment')
parser.add_option('-g', '--enable-security-groups', dest='sgenabled', help='specify if security groups are to be enabled', default=False, action='store_true')
parser.add_option('-o', '--output', action='store', default='./z.cfg', dest='output', help='the path where the json config file generated')
parser.add_option('-d', '--dbnode', dest='dbnode', help='hostname/ip of the database node', action='store')
parser.add_option('-m', '--mshost', dest='mshost', help='hostname/ip of management server', action='store')
parser.add_option('-r', '--randomize', dest='randomize', help='randomize the distribution of tags (hetergenous clusters)', action='store_true', default=False)
(opts, args) = parser.parse_args()
mandatories = ['agents']
for m in mandatories:
if not opts.__dict__[m]:
print 'mandatory option missing'
cfg = describeZucchiniResources(int(opts.agents), opts.dbnode, opts.mshost, opts.randomize, opts.sgenabled)
generate_setup_config(cfg, opts.output)

View File

@ -1,53 +0,0 @@
#!/usr/bin/env python
# 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.
import unittest2 as unittest
except ImportError:
import unittest
import timeit
import random
from cloudstackAPI import *
from cloudstackTestCase import *
class ListVmTests(cloudstackTestCase):
'''
List Virtual Machine tests
'''
def setUp(self):
pass
def tearDown(self):
pass
def listAllVm(self):
numVms = 0
api = self.testClient.getApiClient()
listVmCmd = listVirtualMachines.listVirtualMachinesCmd()
listVmCmd.account = 'admin'
listVmCmd.zoneid = 1
listVmCmd.domainid = 1
listVmResponse = api.listVirtualMachines(listVmCmd)
if listVmResponse is not None:
numVms = len(listVmResponse)
@unittest.skip("skipping")
def test_timeListVm(self):
t = timeit.Timer(self.listAllVm)
l = t.repeat(50, 50)

Some files were not shown because too many files have changed in this diff Show More