diff --git a/build.xml b/build.xml deleted file mode 100755 index b013518ac72..00000000000 --- a/build.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - This is the overall dispatch file. It includes other build - files but doesnot provide targets of its own. Do not modify - this file. If you need to create your own targets, modify the - developer.xml. - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/.gitignore b/build/.gitignore deleted file mode 100644 index d11410db1a5..00000000000 --- a/build/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -# 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. - -/override diff --git a/build/build-aws-api.properties b/build/build-aws-api.properties deleted file mode 100644 index 0a02d1b5579..00000000000 --- a/build/build-aws-api.properties +++ /dev/null @@ -1,28 +0,0 @@ -# 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. - -company.major.version=1 -company.minor.version=0 -company.patch.version=8 - -target.compat.version=1.6 -source.compat.version=1.6 - -debug=true -build.type=developer -debuglevel=lines,source,vars -deprecation=off diff --git a/build/build-aws-api.xml b/build/build-aws-api.xml deleted file mode 100644 index 40ad22c2679..00000000000 --- a/build/build-aws-api.xml +++ /dev/null @@ -1,478 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/build-cloud-plugins.xml b/build/build-cloud-plugins.xml deleted file mode 100755 index 207ef7113c8..00000000000 --- a/build/build-cloud-plugins.xml +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - - - - - - - Cloud Stack ant build file for building all the plugins - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/build-cloud.properties b/build/build-cloud.properties deleted file mode 100755 index be67a368fc0..00000000000 --- a/build/build-cloud.properties +++ /dev/null @@ -1,26 +0,0 @@ -# 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. - -debug=true -debuglevel=lines,source,vars -debug.jvmarg=-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n -deprecation=off -build.type=developer -target.compat.version=1.6 -source.compat.version=1.6 -branding.name=default -ssvm.include.vmware.jar=true diff --git a/build/build-cloud.xml b/build/build-cloud.xml deleted file mode 100755 index c31d00da220..00000000000 --- a/build/build-cloud.xml +++ /dev/null @@ -1,595 +0,0 @@ - - - - - - - Cloud Stack ant build file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/build-common.xml b/build/build-common.xml deleted file mode 100755 index 7240f5323c3..00000000000 --- a/build/build-common.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/build-devcloud.xml b/build/build-devcloud.xml deleted file mode 100644 index a001dc2dd9c..00000000000 --- a/build/build-devcloud.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/build-docs.xml b/build/build-docs.xml deleted file mode 100755 index c38b986ed5f..00000000000 --- a/build/build-docs.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - Cloud Stack ant build file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/build-marvin.xml b/build/build-marvin.xml deleted file mode 100644 index 6daac03f2ce..00000000000 --- a/build/build-marvin.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - This build file contains simple targets that - - build - - package - - distribute - the Marvin test client written in python - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/build-tests.xml b/build/build-tests.xml deleted file mode 100755 index 5f41ba278ff..00000000000 --- a/build/build-tests.xml +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - - Cloud Stack ant build file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - diff --git a/build/build-usage.xml b/build/build-usage.xml deleted file mode 100644 index 9940f46edb3..00000000000 --- a/build/build-usage.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - Cloud Stack Usage server build - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/cloud.properties b/build/cloud.properties deleted file mode 100755 index e3cddf7770d..00000000000 --- a/build/cloud.properties +++ /dev/null @@ -1,29 +0,0 @@ -# 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. - -# major.minor.patch versioning scheme for CloudStack -company.major.version=4 -company.minor.version=0 -company.patch.version=0 - -svn.revision=2 - -# copyright year -company.copyright.year=2012 -company.url=http://cloudstack.org -company.license.name=Apache License, Version 2.0 -company.name=CloudStack diff --git a/build/developer.xml b/build/developer.xml deleted file mode 100755 index fdda171aff6..00000000000 --- a/build/developer.xml +++ /dev/null @@ -1,431 +0,0 @@ - - - - - - - This is a developer.xml with tools to start and stop tomcat and - generally developer targets that has nothing to do with compiling. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - password - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/overview.html b/build/overview.html deleted file mode 100755 index 22f349fe10b..00000000000 --- a/build/overview.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - -

- -VMOps source javadoc. - -

-Javadoc for JUnit tests -is also available. -

- - - diff --git a/build/package.xml b/build/package.xml deleted file mode 100755 index 3efdd7dda05..00000000000 --- a/build/package.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - This is a package.xml with tools to package the cloud stack distribution - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/release-notes b/build/release-notes deleted file mode 100644 index 34b20803a00..00000000000 --- a/build/release-notes +++ /dev/null @@ -1,328 +0,0 @@ -******************************************************************************** - VMOps Cloud Stack Version 0.4 - Release Notes -******************************************************************************** - -================================= -WHAT'S NEW : -================================= - -* NIC bonding support for the Computing, Routing, and Storage nodes to take -advantage of the multiple NICS installed on the server. -* Maintenance Mode support for physical servers. Administrators now have the -option to enable or disable maintenance mode on any physical servers. Enabling -maintenance mode on a Routing or Computing node will result in the seamless live -migration of guest virtual machines into other physical servers within the same -zone before making the server available for maintenance. -* Introduction of a new user web interface for allowing user accounts to manage -their own virtual machines. This new interface has a brand new look and feel, -allows for easier branding and customization, and is easier to incorporate into -existing web interfaces. -* Added support for the creation of Reseller Domains. The Reseller Domain -feature allows host providers to create resellers complete with their own -user base and administrators while using the same global computing resources -provided by the host provider. -* Added a new email alerting system that will now inform administrators of -events such as when physical servers are down or computing resources are -passing a pre-configured threshold. -* Massive improvements to the existing Developer and Integration API. Error -codes have now been added and existing API method names and parameters have been -made more consistent. A JSON format can also now be optionally -returned in addition to the existing XML format. Please read the new API -Reference documentation for more details on the changes. -* Billing records have now been changed to Usage records to provide data for -both billing integration and usage metering. Price has been completely removed -from VMOps. Instead we added ability to set your own display text for both -service offering and templates. You can now use this to set any text for the UI -to display. -* New virtual machines deployed will now generate a random password. A reset -password is also now available both in the web user interface as well as the -API. We support both Linux and Windows OS based templates. -* Storage server is now a bare-bone installation and uses the new COMSTAR iSCSI -stack for improved performance. We recognized that while running the storage -server as a virtual machine does allows for more hardware support, it severely -impacts performance. The list of compatible hardware can be found in the Open -Solaris website. -* Added clustering support for the VMOps Management Server. -* Added the ability to configure an additional storage ip address (separate -subnet) for both Routing and Computing servers. If a server is configured with -an additional storage ip, all storage traffic will route through this subnet and -all network/internet traffic will route through the existing private network. -* Added concept of a user account. VMOps supports multiple username for a -single user account. -* Created new installers for the VMOps MultiTenant Hypervisor and the VMOps -Storage. - -================================= -KNOWN ISSUES : -================================= - -* DomR is still counting internal network activities as part of the usage that -is being returned by the API. -* The reset password for virtual machine feature does not return an error if it -fails to successfully reset the password. -* VMOps installation scripts to not validate bad network configuration values. -* VNX Proxy Server does not handle rapid refreshes of web console proxy well. -* VNC Proxy Server at times do not return a thumbnail image. -* Rebooting a DomR instance will cause network traffic to not be collected. -* Associating new IP addresses should clean out existing LB or PF rules before -assigning it to a DomR instance. -* The Usage parse engine needs to be split out from the VMOps Management Server -so that only a single instance of this can be running and does not affect -normal operations. -* Templates needs a way of specifying the minimum CPU and Memory requirements. -* createUser API method currently allows you to assign users to admin accounts. -* Installations of servers with more than 3 NIC sometimes duplicates the MAC -address on the ifcfg configuration files. -* Additional admin only API methods are missing (ie. Domain management, router -management). -* Usage parse engine could go OOM in the event it has not been run recently -and there are a large (2 million+ records). -* Problem with domU when both e1000 and e1000e used as a NIC drivers for a -Computing Server. The installer needs to blacklist one of the drivers. -* vnet failures and xen crashes currently do not generate an alert to the administrator. -* The current limit for domU instances created on a Computing Server is 64 and -the currently limit for domR instances created is 59 on a Routing Server. -* No current way of allowing different subnets for different pods within the -same zone. -* limit the number of usage and event records returned by the API. A large -enough of the query could cause the Management Server to go oom. - -================================= -BUG FIXES : -================================= - -* Improved transactions across both database calls and calls across agents. -* Fixed an issue where duplicate IP or LB rules could be sent to the DomR -instance during a DomR restart. -* Removed requirement of the reverse DNS lookup for the Storage Server. -* Massive improvements to the HA process. -* Fixed an issue where the it would take too long for the management server -to detect a TCP disconnect. -* Fixed an issue where the the agent would *think* it has connected to the -management server but in reality, it is just stuck waiting for a response that -will never come. -* Generic DB lock wait timeout fixes. -* Improvements to the general state management of the servers. -* Fixed issue where where physical servers with the same IP attempts to connect -to the Management Server. The second server is now prevented from registering. -* Fixed an issue where deleting a user from an account would result in all the -virtual machines to be cleaned up. This can only happen if the last user for -an account has been deleted. -* Fixed an issue where the source NAT ip address of a DomR instance is being -released back into the public pool even though the DomR instance was not -successfully destroyed. -* Fixed an issue where a guest virtual machine cannot be destroyed while in HA -state. -* Removed requirement to specify the storage type when installing a new tempate. -* Fixed an issue where the console proxy from different zones are all starting -in the same zone. -* Fixed an issue where the listing of virtual machines would hang if the console -proxy is not even started. -* Massive improvements to our installer scripts. -* Massive improvements to the general stability of the Cloud Stack. -* Fixed an issue where the Hypervisor installer is unable to install onto -machines with a IPMI card. -* As usual, there are too many bug fixes to list... - -******************************************************************************** - VMOps Cloud Stack Version 0.3.xxxx - Release Notes -******************************************************************************** - -================================= -WHAT'S NEW : -================================= - -* Introduction of VMOps Developer API. This allows users of the VMOps Cloud - Stack to manage their virtual machines through a set of REST-like API. -* Improved collection of user usage data that can be used for both billing - aggregation and metric collection. -* High availability support for user virtual machines. -* Support for automatic hypervisor agent software update. -* VNC console proxy servers can now run as managed VMOps system VMs. The new - implementation provides features such as on-demand VM startup, standby - capacity pre-allocation and console proxy load monitoring. -* Much Improved VMOps Cloud Stack installation process. VMOps Cloud Stack can - now be installed with a minimum of two physical servers. -* VMOps Cloud Stack installation DVD now comes in two flavors. VMOps Cloud Stack - Management Server Installation DVD and VMOps Cloud Stack Multitenant - Hypervisor Installation DVD. - -================================= -KNOWN ISSUES : -================================= - -* PV drivers for Windows 2003 and Windows 2003 x86_64 (Incomplete Feature) -* GUI panel for allowing administrators to set various system configurations - - i.e. zones, pods, ip addresses (Incomplete Feature) -* Support for multiple NIC cards on computing, routing, and storage servers - (Disabled Feature) -* Support for resellers (Incomplete Feature) -* Allow admins/users to specify the root password for their new instance. It - cannot default to root/password (Bug 134) -* Admin/User Dashboard (Bug 154 and 155) -* Dynamically refresh server and vm instance status in GUI without a manual - refresh (Bug 389) -* Need transaction semantics across DB and agent. Without this, it is possible - to timeout db calls that first lock a record and relies on an agent response - before releasing that record. (Bug 408) -* All Server Roles (Mgmt, Computing, Routing, and Storage) require a functioning - eth0 NIC in order to install correctly. (Bug 470) -* Unable to handle HA when an entire Pod is unreachable (Bug 620) -* Improved network traffic reporting (Bug 642) -* Multiple login support a single user account (Bug 589) -* DomR instances continue to run even though all VMs associated with the DomR - are no longer even running. (Bug 617) -* HA fails when VM and Router for the same user go down at the same time - (Bug 603) - -================================= -BUG FIXES : -================================= - -* Improved Billing data generation (Bug 482) -* Able to create new admins through the admin console UI. (Bug 492) -* Able to create new Service Offerings through the admin console UI (Bug 500) -* Significantly improved the imaging speed when installing VMOps Cloud Stack - (Bug 476) -* Harden DomR Template to prevent unauthorized access -* No longer require eth0 during installation process of the hosts (Bug 490) -* Fixed issue where having multiple NIC cards caused issues (Bug 489) -* Installation UI will now allow you to select to the disk for storage - (Bug 556) -* Installation UI will now allow you to select NIC to use as private, public, - or simply disabled -* Mgmt server will now reflect the status of user vms if the storage server that - hosts the vm's volumes is no longer accessible. (Bug 521) -* Routing and Console Proxy VM will now be HA-enabled by default (Bug 614) -* Console Proxy VM are now automatically managed by the Mgmt Server (Bug 110) -* Template Management from the console admin UI should be improved -* Too many to list... - -******************************************************************************** - VMOps Cloud Stack Version 0.2.6297 - Release Notes -******************************************************************************** - -================================= -WHAT'S NEW : -================================= - -* VMOps Server - - Introduction of VMOps Integration API. This API allows service providers - to provision users and to retrieve billing info and events. It is a simple - query language written on top of HTTP that simply returns results in XML - format. - - Improved VMOps Server installation process. - -* VMOps Multitenant Hypervisor - - Improved VMOps Multitenant Hypervisor installation process. - -================================= -KNOWN ISSUES : -================================= - -* PV drivers for Windows 2003 and Windows 2003 x86_64 (Incomplete Feature) -* Developer, Billing, and Provisioning API (Incomplete Feature) -* Mirroring of disk images on storage servers across pods (Incomplete Feature) -* HA Enabled VMs (Disabled Feature) -* Firewall integration API (Incomplete Feature) -* GUI panel for allowing administrators to set various system configurations - - i.e. zones, pods, ip addresses (Incomplete Feature) -* Support for multiple NIC cards on computing, routing, and storage servers - (Disabled Feature) -* Ability to deploy agent upgrade on VMOps server and have the upgrade - automatically propagated to storage, routing, and computing servers. - (Bug 386) -* Detailed IO stats for storage servers (Bug 94) -* Admin/User Dashboard (Bug 154 and 155) -* OpenSolaris kernel panic (Bug 413) -* Dynamically refresh server and vm instance status in GUI without a manual - refresh (Bug 389) -* Need transaction semantics across DB and agent. Without this, it is possible - to timeout db calls that first lock a record and relies on an agent response - before releasing that record. (Bug 408) -* All Server Roles (Mgmt, Computing, Routing, and Storage) require a functioning - eth0 NIC in order to install correctly. (Bug 470) -* Admin Console UI Templates Tab needs improvement. (Bug 469) -* Unable to create new admins through the admin console UI. (Bug 492) -* Unable to create new Service Offerings through the admin console UI (Bug 500) - -================================= -BUG FIXES : -================================= - -* Added a new XML (server-setup.xml) to configure initial VMOps Server data. - (Bug 430) -* Made installation of the router template easier (Bug 434) -* Deleting a user through the admin UI will now show a progress bar (Bug 428) -* You can no longer any drop down boxes in the search left panel of the console - UI (Bug 439) -* Configured dom0 and domR to no longer do any reverse DNS lookup (Bug 459) -* Fixed installer to handle multiple NIC (Bug 457) -* Missing SDL module in all templates (Bug 449) - -******************************************************************************** - VMOps Cloud Stack Version 0.1.6053 - Release Notes -******************************************************************************** - -================================= -WHAT'S NEW : -================================= - -* VMOps Server - - Complete web UI for both administrators and users to manage VMOps Cloud - Stack. - - Allows administrators to manage the creation of service offerings and set - its pricing along with pricing for network bandwidth, additional public - ips, and vm templates. - - Allows administrators to retrieve billing records and user usages. - - VM Sync - coordinates, manages, and maintains the life cycle of VMOps agents - running on attached computing, routing, and storage hosts. - - VM Template Management - allows administrators to manage and upload hosted - vm templates into VMOps Cloud Stack. - -* VMOps Multitenant Hypervisor - - Designed to allow for the complete isolation of CPU, memory, storage, and - network resources for each user. - • Hypervisor Attached Storage (HAS) – The storage solution that is - integrated within the hypervisor and does not rely on centralized SAN or NAS - to implement storage virtualization. It provides a high performance and - ultra-reliable block storage for virtual machine images - - Hypervisor Aware Network (HAN) – The network solution for VMOps Cloud Stack - that implements the necessary IP address translation and tunneling for the - guest OS running inside the virtual machine. It does not rely on VLAN to - implement any network virtualization and isolation. - -================================= -KNOWN ISSUES : -================================= - -* PV drivers for Windows 2003 and Windows 2003 x86_64 (Incomplete Feature) -* Developer, Billing, and Provisioning API (Incomplete Feature) -* Mirroring of disk images on storage servers across pods (Incomplete Feature) -* HA Enabled VMs (Disabled Feature) -* Firewall integration API (Incomplete Feature) -* GUI panel for allowing administrators to set various system configurations - - i.e. zones, pods, ip addresses (Incomplete Feature) -* Support for multiple NIC cards on computing, routing, and storage servers - (Disabled Feature) -* Ability to deploy agent upgrade on VMOps server and have the upgrade - automatically propagated to storage, routing, and computing servers. - (Bug 386) -* Detailed IO stats for storage servers (Bug 94) -* Admin/User Dashboard (Bug 154 and 155) -* OpenSolaris kernel panic (Bug 413) -* Dynamically refresh server and vm instance status in GUI without a manual - refresh (Bug 389) -* Need transaction semantics across DB and agent. Without this, it is possible - to timeout db calls that first lock a record and relies on an agent response - before releasing that record. (Bug 408) - -================================= -BUG FIXES : -================================= - -* N/A \ No newline at end of file diff --git a/cloud.spec b/cloud.spec deleted file mode 100644 index bde3958d0be..00000000000 --- a/cloud.spec +++ /dev/null @@ -1,647 +0,0 @@ -# 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. - -%define __os_install_post %{nil} -%global debug_package %{nil} - -# DISABLE the post-percentinstall java repacking and line number stripping -# we need to find a way to just disable the java repacking and line number stripping, but not the autodeps - -Name: cloud -Summary: CloudStack IaaS Platform -Version: %{_ver} -#http://fedoraproject.org/wiki/PackageNamingGuidelines#Pre-Release_packages -%if "%{?_prerelease}" != "" -Release: 0.%{_build_number}%{dist}.%{_prerelease} -%else -Release: %{_rel}%{dist} -%endif -License: Apache License 2.0 -Vendor: CloudStack -Packager: CloudStack -Group: System Environment/Libraries -# FIXME do groups for every single one of the subpackages -Source0: %{name}-%{_ver}.tar.bz2 -BuildRoot: %{_tmppath}/%{name}-%{_ver}-%{release}-build - -%if 0%{?fedora} >= 17 -BuildRequires: java-1.7.0-openjdk-devel -%else -BuildRequires: java-1.6.0-openjdk-devel -%endif -BuildRequires: tomcat6 -BuildRequires: ws-commons-util -BuildRequires: jpackage-utils -BuildRequires: gcc -BuildRequires: glibc-devel -BuildRequires: /usr/bin/mkisofs -BuildRequires: MySQL-python - -%description -CloudStack is a highly-scalable elastic, open source, -intelligent IaaS cloud implementation. - -%package utils -Summary: CloudStack utility library -Requires: java >= 1.6.0 -Requires: python -Group: System Environment/Libraries -Obsoletes: vmops-utils < %{version}-%{release} -%description utils -Utility libraries and set of Java classes used -by CloudStack. - -%package client-ui -Summary: CloudStack management server UI -Requires: %{name}-client -Group: System Environment/Libraries -Obsoletes: vmops-client-ui < %{version}-%{release} -%description client-ui -The CloudStack management server is the central point of coordination, -management, and intelligence in CloudStack. This package -is a requirement of the %{name}-client package, which installs the -CloudStack management server. - -%package server -Summary: CloudStack server library -Requires: java >= 1.6.0 -Obsoletes: vmops-server < %{version}-%{release} -Requires: %{name}-utils = %{version}, %{name}-core = %{version}, %{name}-deps = %{version}, %{name}-scripts = %{version}, tomcat6-servlet-2.5-api -Group: System Environment/Libraries -%description server -The CloudStack server libraries provide a set of Java classes for CloudStack. - -%package scripts -Summary: CloudStack scripts -# FIXME nuke the archdependency -Requires: python -Requires: bash -Requires: bzip2 -Requires: gzip -Requires: unzip -Requires: /sbin/mount.nfs -Requires: openssh-clients -Requires: nfs-utils -Requires: wget -# there is a fsimage.so in the source code, which adds xen-libs as a dependence, needs to supress it, as rhel doesn't have this pacakge -AutoReqProv: no -Provides: cloud-agent-scripts = %{version}-%{release} -Obsoletes: cloud-agent-scripts < %{version}-%{release} -Group: System Environment/Libraries -%description scripts -This package contains common scripts used by the Agent and Management server - -%package python -Summary: CloudStack Python library -# FIXME nuke the archdependency -Requires: python -Group: System Environment/Libraries -%description python -The CloudStack Python library contains a few Python modules that the -CloudStack uses. - -%package deps -Summary: CloudStack library dependencies -Requires: java >= 1.6.0 -Requires: mysql-connector-java -Obsoletes: vmops-deps < %{version}-%{release} -Group: System Environment/Libraries -%description deps -This package contains a number of third-party dependencies -not shipped by distributions, required to run CloudStack - - -%package core -Summary: CloudStack core library -Requires: java >= 1.6.0 -Requires: %{name}-utils = %{version}, %{name}-deps = %{version} -Group: System Environment/Libraries -Obsoletes: vmops-core < %{version}-%{release} -%description core -The CloudStack core libraries provide a set of Java classes used -in CloudStack. - -%package client -Summary: CloudStack management server -# If GCJ is present, a setPerformanceSomething method fails to load Catalina -Conflicts: java-1.5.0-gcj-devel -Obsoletes: vmops-client < %{version}-%{release} -Obsoletes: cloud-premium < %{version}-%{release} -Requires: java >= 1.6.0 -Requires: %{name}-deps = %{version}, %{name}-utils = %{version}, %{name}-server = %{version} -Requires: %{name}-client-ui = %{version} -Requires: %{name}-setup = %{version} -Requires: %{name}-scripts = %{version} -Requires: %{name}-python = %{version} -Requires: %{name}-aws-api = %{version} -# for consoleproxy -# Requires: %{name}-agent -Requires: tomcat6 -Requires: ws-commons-util -Requires: jpackage-utils -Requires: sudo -Requires: /sbin/service -Requires: /sbin/chkconfig -Requires: /usr/bin/ssh-keygen -Requires: mkisofs -Requires: MySQL-python -Requires: python-paramiko -Requires: ipmitool -Requires: %{name}-utils = %{version} -%if 0%{?fedora} > 14 -Requires: apache-commons-dbcp -Requires: apache-commons-collections -Requires: jakarta-commons-httpclient -Requires: jakarta-taglibs-standard -Requires: mysql-connector-java -%endif - -Group: System Environment/Libraries -%description client -The CloudStack management server is the central point of coordination, -management, and intelligence in CloudStack and installs the management server. - -%package setup -Summary: CloudStack setup tools -Obsoletes: vmops-setup < %{version}-%{release} -Requires: java >= 1.6.0 -Requires: python -Requires: MySQL-python -Requires: %{name}-utils = %{version} -Requires: %{name}-server = %{version} -Requires: %{name}-deps = %{version} -Requires: %{name}-python = %{version} -Group: System Environment/Libraries -%description setup -The CloudStack setup tools let you set up your Management Server and Usage Server. - -%package agent-libs -Summary: CloudStack agent libraries -Requires: java >= 1.6.0 -Requires: %{name}-utils = %{version}, %{name}-core = %{version}, %{name}-deps = %{version} -Requires: commons-httpclient -Requires: jakarta-commons-logging -Requires: jpackage-utils -Group: System Environment/Libraries -%description agent-libs -The CloudStack agent libraries are used by the KVM Agent - -%package agent -Summary: CloudStack agent -Obsoletes: vmops-agent < %{version}-%{release} -Obsoletes: vmops-console < %{version}-%{release} -Obsoletes: cloud-console < %{version}-%{release} -Obsoletes: cloud-vnet < %{version}-%{release} -Obsoletes: cloud-premium-agent < %{version}-%{release} -Requires: java >= 1.6.0 -Requires: %{name}-utils = %{version}, %{name}-core = %{version}, %{name}-deps = %{version} -Requires: %{name}-agent-libs = %{version} -Requires: %{name}-scripts = %{version} -Requires: python -Requires: %{name}-python = %{version} -Requires: commons-httpclient -Requires: jakarta-commons-logging -Requires: libvirt -Requires: /usr/sbin/libvirtd -Requires: jpackage-utils -Requires: /sbin/service -Requires: /sbin/chkconfig -Requires: jna -Requires: ebtables -Requires: jsvc -Requires: jakarta-commons-daemon -Requires: bridge-utils -Group: System Environment/Libraries - -Requires: kvm - -%if 0%{?fedora} >= 14 && 0%{?fedora} != 16 -Requires: cloud-qemu-kvm -Requires: cloud-qemu-img -%endif - -%if 0%{?rhel} >= 5 -Requires: qemu-img -%endif - -Requires: libcgroup -%if 0%{?fedora} >= 16 -Requires: libcgroup-tools -%endif -Requires: /usr/bin/uuidgen -Requires: rsync -Requires: /bin/egrep -Requires: /sbin/ip -Requires: vconfig -Group: System Environment/Libraries -%description agent -The CloudStack agent is in charge of managing KVM shared computing resources in -a CloudStack-powered cloud. Install this package if this computer -will participate in your cloud. - -%package baremetal-agent -Summary: CloudStack baremetal agent -Requires: PING -Requires: tftp-server -Requires: xinetd -Requires: syslinux -Requires: chkconfig -Requires: dhcp -Group: System Environment/Libraries -%description baremetal-agent -The CloudStack baremetal agent - -%package cli -Summary: CloudStack command line tools -Requires: python -Group: System Environment/Libraries -%description cli -The CloudStack command line tools contain a few Python modules that can call cloudStack APIs. - -%package usage -Summary: CloudStack usage monitor -Obsoletes: vmops-usage < %{version}-%{release} -Requires: java >= 1.6.0 -Requires: %{name}-utils = %{version}, %{name}-core = %{version}, %{name}-deps = %{version}, %{name}-server = %{version} -Requires: %{name}-setup = %{version} -Requires: %{name}-client = %{version} -Requires: jsvc -License: Apache License 2.0 -Group: System Environment/Libraries -%description usage -The CloudStack usage monitor provides usage accounting across the entire cloud for -cloud operators to charge based on usage parameters. - -%package aws-api -Summary: CloudStack CloudBridge -Group: System Environment/Libraries -Requires: java >= 1.6.0 -Requires: tomcat6 -Requires: %{name}-deps = %{version} -%if 0%{?fedora} > 15 -Requires: apache-commons-lang -%endif -%if 0%{?rhel} >= 5 -Requires: jakarta-commons-lang -%endif -Obsoletes: cloud-bridge < %{version}-%{release} -%description aws-api -This is the CloudStack CloudBridge - -%prep - -echo Doing CloudStack build - -%setup -q -n %{name}-%{_ver} - -%build - -# this fixes the /usr/com bug on centos5 -%define _localstatedir /var -%define _sharedstatedir /var/lib -./waf configure --prefix=%{_prefix} --libdir=%{_libdir} --bindir=%{_bindir} --javadir=%{_javadir} --sharedstatedir=%{_sharedstatedir} --localstatedir=%{_localstatedir} --sysconfdir=%{_sysconfdir} --mandir=%{_mandir} --docdir=%{_docdir}/%{name}-%{version} --with-tomcat=%{_datadir}/tomcat6 --tomcat-user=%{name} --fast --build-number=%{_ver}-%{release} --package-version=%{_ver} -./waf build --build-number=%{?_build_number} --package-version=%{_ver} - -%install -[ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT} -# we put the build number again here, otherwise state checking will cause an almost-full recompile -./waf install --destdir=$RPM_BUILD_ROOT --nochown --build-number=%{?_build_number} -rm $RPM_BUILD_ROOT/etc/rc.d/init.d/cloud-console-proxy -rm $RPM_BUILD_ROOT/usr/bin/cloud-setup-console-proxy -rm $RPM_BUILD_ROOT/usr/libexec/console-proxy-runner -ant deploy-rpm-install -Drpm.install.dir=$RPM_BUILD_ROOT - -%clean - -[ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT} - - -%preun client -/sbin/service %{name}-management stop || true -if [ "$1" == "0" ] ; then - /sbin/chkconfig --del %{name}-management > /dev/null 2>&1 || true - /sbin/service %{name}-management stop > /dev/null 2>&1 || true -fi - -%pre aws-api -id %{name} > /dev/null 2>&1 || /usr/sbin/useradd -M -c "CloudStack unprivileged user" \ - -r -s /bin/sh -d %{_sharedstatedir}/%{name}/management %{name}|| true - -rm -rf %{_localstatedir}/cache/%{name} -# user harcoded here, also hardcoded on wscript - -%pre client-ui -if [ -d %{_datadir}/%{name}/management/webapps/client/ ]; then - pushd /tmp &>/dev/null - file=cloud-ui-backup-%(date +%%F).tar.bz2 - cp -r %{_datadir}/%{name}/management/webapps/client/ . - tar cjf "$file" client/ - rm -rf client/ - mkdir -p /usr/share/cloud/ui-backup/ - mv "$file" /usr/share/cloud/ui-backup/ - popd &>/dev/null -fi - -%preun usage -if [ "$1" == "0" ] ; then - /sbin/chkconfig --del %{name}-usage > /dev/null 2>&1 || true - /sbin/service %{name}-usage stop > /dev/null 2>&1 || true -fi - -%pre usage -id %{name} > /dev/null 2>&1 || /usr/sbin/useradd -M -c "CloudStack unprivileged user" \ - -r -s /bin/sh -d %{_sharedstatedir}/%{name}/management %{name}|| true -# user harcoded here, also hardcoded on wscript - -%post usage -if [ "$1" == "1" ] ; then - /sbin/chkconfig --add %{name}-usage > /dev/null 2>&1 || true - /sbin/chkconfig --level 345 %{name}-usage on > /dev/null 2>&1 || true -else - /sbin/service %{name}-usage condrestart >/dev/null 2>&1 || true -fi - -%preun agent -if [ "$1" == "0" ] ; then - /sbin/chkconfig --del %{name}-agent > /dev/null 2>&1 || true - /sbin/service %{name}-agent stop > /dev/null 2>&1 || true -fi - -%post agent -if [ "$1" == "1" ] ; then - /sbin/chkconfig --add %{name}-agent > /dev/null 2>&1 || true - /sbin/chkconfig --level 345 %{name}-agent on > /dev/null 2>&1 || true -else - /sbin/service %{name}-agent condrestart >/dev/null 2>&1 || true -fi - -if [ -x /etc/sysconfig/modules/kvm.modules ] ; then - /bin/sh /etc/sysconfig/modules/kvm.modules -fi - -%post client - /sbin/chkconfig --add %{name}-management > /dev/null 2>&1 || true - /sbin/chkconfig --level 345 %{name}-management on > /dev/null 2>&1 || true - - root=/usr/share/cloud/bridge - target=/usr/share/cloud/management - - mkdir -p $target/webapps7080 - if [ ! -h $target/webapps7080/awsapi ]; then - ln -sf $root/webapps7080/awsapi $target/webapps7080/awsapi - fi - -# jars=`ls $root/lib` -# for j in $jars -# do -# cp -f $root/lib/$j $root/webapps/awsapi/WEB-INF/lib/ -# done - - confs="cloud-bridge.properties ec2-service.properties" - for c in $confs - do - cp -f $root/conf/$c $target/conf - done - -%files utils -%defattr(0644,root,root,0755) -%{_javadir}/%{name}-utils.jar -%{_javadir}/%{name}-api.jar -%attr(0755,root,root) %{_bindir}/cloud-sccs -%attr(0755,root,root) %{_bindir}/cloud-gitrevs -%doc %{_docdir}/%{name}-%{version}/version-info -%doc LICENSE -%doc NOTICE - -%files client-ui -%defattr(0644,root,root,0755) -%{_datadir}/%{name}/management/webapps/client/* -%doc LICENSE -%doc NOTICE - -%files server -%defattr(0644,root,root,0755) -%{_javadir}/%{name}-server.jar -%{_javadir}/%{name}-ovm.jar -%{_javadir}/%{name}-dp-user-concentrated-pod.jar -%{_javadir}/%{name}-dp-user-dispersing.jar -%{_javadir}/%{name}-host-allocator-random.jar -%{_javadir}/%{name}-plugin-ovs.jar -%{_javadir}/%{name}-storage-allocator-random.jar -%{_javadir}/%{name}-user-authenticator-ldap.jar -%{_javadir}/%{name}-user-authenticator-md5.jar -%{_javadir}/%{name}-user-authenticator-plaintext.jar -%{_javadir}/%{name}-plugin-hypervisor-xen.jar -%{_javadir}/%{name}-plugin-elb.jar -%{_javadir}/%{name}-plugin-nicira-nvp.jar -%{_javadir}/%{name}-plugin-bigswitch-vns.jar -%config(noreplace) %{_sysconfdir}/%{name}/server/* -%doc LICENSE -%doc NOTICE - -%files scripts -%defattr(-,root,root,-) -%{_libdir}/%{name}/common/scripts/* -# maintain the following list in sync with files scripts -%{_libdir}/%{name}/common/vms/systemvm.zip -%{_libdir}/%{name}/common/vms/systemvm.iso -%doc LICENSE -%doc NOTICE - -%files deps -%defattr(0644,root,root,0755) -%{_javadir}/axiom-*.jar -%{_javadir}/axis2-*.jar -%{_javadir}/antlr*.jar -%{_javadir}/XmlSchema-*.jar -%{_javadir}/json-simple*.jar -%{_javadir}/neethi*.jar -%{_javadir}/woden*.jar -%{_javadir}/xercesImpl*.jar -%{_javadir}/xml-apis*.jar -%{_javadir}/dom4j*.jar -%{_javadir}/javassist*.jar -%{_javadir}/commons-fileupload*.jar -%{_javadir}/commons-codec-1.6.jar -%{_javadir}/commons-dbcp-1.4.jar -%{_javadir}/commons-pool-1.6.jar -%{_javadir}/gson-1.7.1.jar -%{_javadir}/CAStorSDK-*.jar -%{_javadir}/backport-util-concurrent-3.1.jar -%{_javadir}/ehcache-1.5.0.jar -%{_javadir}/httpcore-4.0.jar -%{_javadir}/mail-1.4.jar -%{_javadir}/activation-1.1.jar -%{_javadir}/xapi-5.6.100-1-SNAPSHOT.jar -%{_javadir}/log4j-*.jar -%{_javadir}/apache-log4j-extras-1.1.jar -%{_javadir}/trilead-ssh2-build213-svnkit-1.3-patch.jar -%{_javadir}/cglib-nodep-2.2.2.jar -%{_javadir}/xmlrpc-common-3.*.jar -%{_javadir}/xmlrpc-client-3.*.jar -%{_javadir}/wsdl4j-1.6.2.jar -%{_javadir}/jsch-0.1.42.jar -%{_javadir}/jasypt-1.*.jar -%{_javadir}/commons-configuration-1.8.jar -%{_javadir}/ejb-api-3.0.jar -%{_javadir}/axis2-1.5.1.jar -%{_javadir}/commons-discovery-0.5.jar -%{_javadir}/jstl-1.2.jar -%{_javadir}/javax.persistence-2.0.0.jar -%{_javadir}/bcprov-jdk16-1.45.jar -%doc LICENSE -%doc NOTICE - -%files core -%defattr(0644,root,root,0755) -%{_javadir}/%{name}-core.jar -%doc LICENSE -%doc NOTICE - -%files python -%defattr(0644,root,root,0755) -%{_prefix}/lib*/python*/site-packages/%{name}* -%attr(0755,root,root) %{_bindir}/cloud-external-ipallocator.py -%attr(0755,root,root) %{_initrddir}/cloud-ipallocator -%dir %attr(0770,root,root) %{_localstatedir}/log/%{name}/ipallocator -%doc LICENSE -%doc NOTICE - -%files setup -%attr(0755,root,root) %{_bindir}/%{name}-setup-databases -%attr(0755,root,root) %{_bindir}/%{name}-migrate-databases -%attr(0755,root,root) %{_bindir}/%{name}-set-guest-password -%attr(0755,root,root) %{_bindir}/%{name}-set-guest-sshkey -%attr(0755,root,root) %{_bindir}/%{name}-sysvmadm -%attr(0755,root,root) %{_bindir}/%{name}-setup-encryption -%dir %{_datadir}/%{name}/setup -%{_datadir}/%{name}/setup/*.sql -%{_datadir}/%{name}/setup/db/*.sql -%{_datadir}/%{name}/setup/*.sh -%{_datadir}/%{name}/setup/server-setup.xml -%doc LICENSE -%doc NOTICE - -%files client -%defattr(0644,root,root,0775) -%config(noreplace) %{_sysconfdir}/%{name}/management -%config(noreplace) %attr(0640,root,%{name}) %{_sysconfdir}/%{name}/management/db.properties -%config(noreplace) %{_sysconfdir}/%{name}/management/log4j-%{name}.xml -%config(noreplace) %{_sysconfdir}/%{name}/management/tomcat6.conf -%dir %attr(0770,root,%{name}) %{_sysconfdir}/%{name}/management/Catalina -%dir %attr(0770,root,%{name}) %{_sysconfdir}/%{name}/management/Catalina/localhost -%dir %attr(0770,root,%{name}) %{_sysconfdir}/%{name}/management/Catalina/localhost/client -%config(noreplace) %{_sysconfdir}/sysconfig/%{name}-management -%attr(0755,root,root) %{_initrddir}/%{name}-management -%dir %{_datadir}/%{name}/management -%{_datadir}/%{name}/management/* -%attr(0755,root,root) %{_bindir}/%{name}-setup-management -%attr(0755,root,root) %{_bindir}/%{name}-update-xenserver-licenses -%dir %attr(0770,root,%{name}) %{_sharedstatedir}/%{name}/mnt -%dir %attr(0770,%{name},%{name}) %{_sharedstatedir}/%{name}/management -%dir %attr(0770,root,%{name}) %{_localstatedir}/cache/%{name}/management -%dir %attr(0770,root,%{name}) %{_localstatedir}/cache/%{name}/management/work -%dir %attr(0770,root,%{name}) %{_localstatedir}/cache/%{name}/management/temp -%dir %attr(0770,root,%{name}) %{_localstatedir}/log/%{name}/management -%dir %attr(0770,root,%{name}) %{_localstatedir}/log/%{name}/agent -%doc LICENSE -%doc NOTICE - -%files agent-libs -%defattr(0644,root,root,0755) -%{_javadir}/%{name}-agent.jar -%{_javadir}/%{name}-plugin-hypervisor-kvm.jar -%{_javadir}/libvirt-0.4.9.jar -%doc LICENSE -%doc NOTICE - -%files agent -%defattr(0644,root,root,0755) -%config(noreplace) %{_sysconfdir}/%{name}/agent/agent.properties -%config(noreplace) %{_sysconfdir}/%{name}/agent/developer.properties.template -%config(noreplace) %{_sysconfdir}/%{name}/agent/environment.properties -%config(noreplace) %{_sysconfdir}/%{name}/agent/log4j-%{name}.xml -%attr(0755,root,root) %{_initrddir}/%{name}-agent -%attr(0755,root,root) %{_bindir}/%{name}-setup-agent -%attr(0755,root,root) %{_bindir}/%{name}-ssh -%dir %attr(0770,root,root) %{_localstatedir}/log/%{name}/agent -%doc LICENSE -%doc NOTICE - -%files cli -%{_bindir}/%{name}-tool -%{_bindir}/cloudvoladm -%{_bindir}/cloud-grab-dependent-library-versions -%config(noreplace) %{_sysconfdir}/%{name}/cli/commands.xml -%dir %{_prefix}/lib*/python*/site-packages/%{name}tool -%{_prefix}/lib*/python*/site-packages/%{name}tool/* -%{_prefix}/lib*/python*/site-packages/%{name}apis.py -%doc LICENSE -%doc NOTICE - -%files baremetal-agent -%attr(0755,root,root) %{_bindir}/cloud-setup-baremetal -%doc LICENSE -%doc NOTICE - -%files usage -%defattr(0644,root,root,0775) -%{_javadir}/%{name}-usage.jar -%attr(0755,root,root) %{_initrddir}/%{name}-usage -%dir %attr(0770,root,%{name}) %{_localstatedir}/log/%{name}/usage -%config(noreplace) %{_sysconfdir}/%{name}/usage/usage-components.xml -%config(noreplace) %{_sysconfdir}/%{name}/usage/log4j-%{name}_usage.xml -%config(noreplace) %attr(0640,root,%{name}) %{_sysconfdir}/%{name}/usage/db.properties -%doc LICENSE -%doc NOTICE - -%files aws-api -%defattr(0644,cloud,cloud,0755) -%{_datadir}/cloud/bridge/conf/* -%{_datadir}/cloud/bridge/webapps7080/* -%attr(0644,root,root) %{_datadir}/cloud/setup/bridge/db/* -%attr(0755,root,root) %{_bindir}/cloudstack-aws-api-register -%attr(0755,root,root) %{_bindir}/cloud-setup-bridge -%doc LICENSE -%doc NOTICE - -%changelog -* Mon Nov 19 2012 Satoshi Kobayashi 4.0.1 -- adding dependency bridge-utils to fix a system requirement - -* Fri Sep 14 2012 Marcus Sorensen 4.0.1 -- adding dependency jakarta-commons-daemon to fix "cannot find daemon loader" - -* Thu Aug 16 2012 Marcus Sorensen 4.0 -- rearranged files sections to match currently built files - -* Mon May 3 2010 Manuel Amador (Rudd-O) 1.9.12 -- Bump version for RC4 release - -* Fri Apr 30 2010 Manuel Amador (Rudd-O) 1.9.11 -- Rename to CloudStack everywhere - -* Wed Apr 28 2010 Manuel Amador (Rudd-O) 1.9.10 -- FOSS release - -* Mon Apr 05 2010 Manuel Amador (Rudd-O) 1.9.8 -- RC3 branched - -* Wed Feb 17 2010 Manuel Amador (Rudd-O) 1.9.7 -- First initial broken-up release - - diff --git a/waf b/waf deleted file mode 100755 index a2c41383096..00000000000 Binary files a/waf and /dev/null differ diff --git a/waf.bat b/waf.bat deleted file mode 100755 index afc94cd12bd..00000000000 --- a/waf.bat +++ /dev/null @@ -1,44 +0,0 @@ -@echo off -rem Licensed to the Apache Software Foundation (ASF) under one -rem or more contributor license agreements. See the NOTICE file -rem distributed with this work for additional information -rem regarding copyright ownership. The ASF licenses this file -rem to you under the Apache License, Version 2.0 (the -rem "License"); you may not use this file except in compliance -rem with the License. You may obtain a copy of the License at -rem -rem http://www.apache.org/licenses/LICENSE-2.0 -rem -rem Unless required by applicable law or agreed to in writing, -rem software distributed under the License is distributed on an -rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -rem KIND, either express or implied. See the License for the -rem specific language governing permissions and limitations -rem under the License. - -if exist jython.jar goto runjython -if exist C:\Python26\Python.exe goto runpython -goto helprun - -:helprun -echo To run waf with Python -echo 1. Download Python 2.6 for Windows from http://www.python.org/ -echo 2. Install it in C:\Python2.6 (the default path) -echo 3. Use this batch file to run waf -echo "" -echo To run waf without installing Python -echo 1. Download the Jython installer from http://wiki.python.org/jython/ -echo 2. Install it to this directory in standalone mode -echo 3. Ensure the java command is on your PATH variable -echo 3. Use this batch file to run waf -goto end - -:runjython -java -jar jython.jar waf %* -goto end - -:runpython -C:\Python26\Python.exe waf %* -goto end - -:end diff --git a/wscript b/wscript deleted file mode 100644 index 077fc713686..00000000000 --- a/wscript +++ /dev/null @@ -1,782 +0,0 @@ -#! /usr/bin/env python -# -*- coding: utf-8 -*- -# 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. - - -# the following variables are used by the target "waf dist" -# if you change APPNAME here, you need to change 'Name' also -# in cloud.spec, add a %changelog entry there, and add an -# entry in debian/changelog. SHORTVERSION is used in package -# naming for deb/rpm, VERSION is used for tarball and bin -VERSION = '4.0.0.2012-08-15T18:03:12Z' -SHORTVERSION = '4.0.0' -APPNAME = 'cloud' - -import shutil,os -import email,time -import optparse -import Utils,Node,Options,Logs,Scripting,Environment,Build,Configure -from subprocess import Popen as _Popen,PIPE -import os -import sys -from os import unlink as _unlink, makedirs as _makedirs, getcwd as _getcwd, chdir as _chdir -from os.path import abspath as _abspath, basename as _basename, dirname as _dirname, exists as _exists, isdir as _isdir, split as _split, join as _join, sep, pathsep, pardir, curdir -from glob import glob as _glob -import zipfile,tarfile -try: - from os import chmod as _chmod,chown as _chown - import pwd,stat,grp -except ImportError: - _chmod,_chown,pwd,stat,grp = (None,None,None,None,None) -import xml.dom.minidom -import re - -# these variables are mandatory ('/' are converted automatically) -srcdir = '.' -blddir = 'artifacts' - -Configure.autoconfig = True - -# things not to include in the source tarball -# exclude by file name or by _glob (wildcard matching) -for _globber in [ - ["dist", # does not belong in the source tarball - "system", # for windows - "override", # not needed - "eclipse", # only there to please eclipse - "repomanagement", # internal management stuff - "client-api", # obsolete - "cloud-bridge", # not compiled and packaged yet - "target", # eclipse workdir - "apache-log4j-1.2.16", - "apache-log4j-extras-1.1", - "cglib", - "gson", - "ehcache", - "vhd-tools", - "xmlrpc", - "PreviousDatabaseSchema", - "mockito", - "gcc", - "junit" ], - _glob("./*.disabledblahxml"), - ]: - for f in _globber: Scripting.excludes.append(_basename(f)) # _basename() only the filename - -# things never to consider when building or installing -for pattern in ["**/.project","**/.classpath","**/.pydevproject"]: Node.exclude_regs += "\n%s"%pattern - -# Support functions - -def distclean(ctx): - """Clear the build artifacts""" - for root, folder, files in os.walk(blddir): - for f in files: - path = os.path.join(root, f) - print "Removing artifact %s"%path - os.remove(path) - -def inspectobj(x): - """Look inside an object""" - for m in dir(x): print m,": ",getattr(x,m) -Utils.inspectobj = inspectobj - -def _trm(x,y): - if len(x) > y: return x[:y] + "..." - return x - -def getrpmdeps(): - def rpmdeps(fileset): - for f in fileset: - lines = file(f).readlines() - lines = [ x[len("BuildRequires: "):] for x in lines if x.startswith("BuildRequires") ] - for l in lines: - deps = [ x.strip() for x in l.split(",") ] - for d in deps: - if "%s-"%APPNAME in d: continue - yield d - yield "rpm-build" - - deps = set(rpmdeps(_glob("./*.spec"))) - deps.add("ant") - return deps - -# CENTOS does not have this -- we have to put this here -try: - from subprocess import check_call as _check_call - from subprocess import CalledProcessError -except ImportError: - def _check_call(*popenargs, **kwargs): - import subprocess - retcode = subprocess.call(*popenargs, **kwargs) - cmd = kwargs.get("args") - if cmd is None: cmd = popenargs[0] - if retcode: raise CalledProcessError(retcode, cmd) - return retcode - - class CalledProcessError(Exception): - def __init__(self, returncode, cmd): - self.returncode = returncode ; self.cmd = cmd - def __str__(self): return "Command '%s' returned non-zero exit status %d" % (self.cmd, self.returncode) -def throws_command_errors(f): - def g(*args,**kwargs): - try: return f(*args,**kwargs) - except CalledProcessError,e: - raise Utils.WafError("system command %s failed with error value %s"%(e.cmd[0],e.returncode)) - except IOError,e: - if e.errno is 32: - raise Utils.WafError("system command %s terminated abruptly, closing communications with parent's pipe"%e.cmd[0]) - raise - return g - -def c(cmdlist,cwd=None): - # Run a command with _check_call, pretty-printing the cmd list - Utils.pprint("BLUE"," ".join(cmdlist)) - return _check_call(cmdlist,cwd=cwd) - -def svninfo(*args): - try: p = _Popen(['svn','info']+list(args),stdin=PIPE,stdout=PIPE,stderr=PIPE) - except OSError,e: - if e.errno == 2: return '' # svn command is not installed - raise - stdout,stderr = p.communicate('') - retcode = p.wait() - # If the guess fails, just return nothing. - if retcode: return - # SVN available - rev = [ x for x in stdout.splitlines() if x.startswith('Revision') ] - if not rev: rev = '' - else: rev = "SVN " + rev[0].strip() - url = [ x for x in stdout.splitlines() if x.startswith('URL') ] - if not url: url = '' - else: url = "SVN " + url[0].strip() - return rev + "\n" + url - -def gitinfo(dir=None): - if dir and not _isdir(dir): return '' - try: p = _Popen(['git','remote','show','-n','origin'],stdin=PIPE,stdout=PIPE,stderr=PIPE,cwd=dir) - except OSError,e: - if e.errno == 2: return '' # svn command is not installed - raise - stdout,stderr = p.communicate('') - retcode = p.wait() - # If the guess fails, just return nothing. - if retcode: return - stdout = [ s.strip() for s in stdout.splitlines() ] - try: url = [ s[11:] for s in stdout if s.startswith("Fetch URL") ][0] - except IndexError: url = [ s[5:] for s in stdout if s.startswith("URL") ][0] - assert url - - p = _Popen(['git','log','-1'],stdin=PIPE,stdout=PIPE,stderr=PIPE,cwd=dir) - stdout,stderr = p.communicate('') - retcode = p.wait() - if retcode: return - # If the guess fails, just return nothing. - stdout = [ s.strip() for s in stdout.splitlines() ] - commitid = [ s.split()[1] for s in stdout if s.startswith("commit") ][0] - assert commitid - - return "Git Revision: %s"%commitid + "\n" + "Git URL: %s"%url - -def allgitinfo(): - t = gitinfo() - if not t: return t - - u = gitinfo(_join(pardir,"cloudstack-proprietary")) - if not u: return t - - return t + "\n\ncloustack-proprietary:\n" + u - -def _getbuildnumber(): # FIXME implement for git - n = Options.options.BUILDNUMBER - if n: - # luntbuild prepends "build-" to the build number. we work around this here: - if n.startswith("build-"): n = n[6:] - # SVN identifiers prepend "$Revision:" to the build number. we work around this here: - if n.startswith("$Revision:"): n = n[11:-2].strip() - return n - else: - # Try to guess the SVN revision number by calling SVN info. - stdout = svninfo() - if not stdout: return '' - # Filter lines. - rev = [ x for x in stdout.splitlines() if x.startswith('SVN Revision') ] - if not rev: return '' - # Parse revision number. - rev = rev[0][14:].strip() - return rev -Utils.getbuildnumber = _getbuildnumber - -def mkdir_p(directory): - if not _isdir(directory): - Utils.pprint("GREEN","Creating directory %s and necessary parents"%directory) - _makedirs(directory) - -def relpath(path, start="."): - if not path: raise ValueError("no path specified") - - start_list = os.path.abspath(start).split(sep) - path_list = os.path.abspath(path).split(sep) - - # Work out how much of the filepath is shared by start and path. - i = len(os.path.commonprefix([start_list, path_list])) - - rel_list = [pardir] * (len(start_list)-i) + path_list[i:] - if not rel_list: - return curdir - return os.path.join(*rel_list) -Utils.relpath = relpath - -def dev_override(pathname): - p,e = _split(pathname) - overridden = _join(p,"override",e) - if _exists(overridden): return overridden - return pathname - -def discover_ant_targets_and_properties(files): - doms = [ xml.dom.minidom.parseString(file(f).read(-1)) for f in files if f.endswith(".xml") ] - targets = dict( [ (target.getAttribute("name"),target) for dom in doms for target in dom.getElementsByTagName("target") if target.getElementsByTagName("compile-java") ] ) - propsinxml = [ (prop.getAttribute("name"),prop.getAttribute("value") or prop.getAttribute("location")) for dom in doms for prop in dom.getElementsByTagName("property") ] - propsinpropfiles = [ l.strip().split("=",1) for f in files if f.endswith(".properties") for l in file(f).readlines() if "=" in l and not l.startswith("#") ] - props = dict( propsinxml + propsinpropfiles ) - props["base.dir"] = '.' - props["p.base.dir"] = '.' - - result = [] - for name,target in targets.items(): - sourcedir = target.getElementsByTagName("compile-java")[0].getAttribute("top.dir") + "/src" - classdir = "${classes.dir}/" + target.getElementsByTagName("compile-java")[0].getAttribute("jar.name") - jarpath = "${jar.dir}/" + target.getElementsByTagName("compile-java")[0].getAttribute("jar.name") - def lookup(matchobject): return props[matchobject.group(1)] - while "$" in sourcedir: sourcedir = re.sub("\${(.+?)}",lookup,sourcedir) - while "$" in classdir: classdir = re.sub("\${(.+?)}",lookup,classdir) - while "$" in jarpath: jarpath= re.sub("\${(.+?)}",lookup,jarpath) - dependencies = [ dep.strip() for dep in target.getAttribute("depends").split(",") if dep.strip() in targets ] - result.append([str(name),str(relpath(sourcedir)),str(relpath(classdir)),str(relpath(jarpath)),[str(s) for s in dependencies]]) - # hardcoded here because the discovery process does not get it - result.append( ["build-console-viewer","console-viewer/src", "target/classes/console-viewer", "target/jar/VMOpsConsoleApplet.jar", ["compile-utils","compile-console-common"] ] ) - return result,props -Utils.discover_ant_targets_and_properties = discover_ant_targets_and_properties - -# this snippet of code runs a list of ant targets -# then it expects a certain set of JAR files to be output in the artifacts/default/ant/jar directory -# this set of jar files is defined here in the variable jartgts, and must match the definitions at the bottom of -# build/package.xml and build/premium/package-premium.xml -# this is NOT a task for a task generator -- it is a plain function. -# If you want to use it as a task function in a task generator, use a lambda x: runant("targetname") -def runant(tsk): - - environ = dict(os.environ) - environ["CATALINA_HOME"] = tsk.env.TOMCATHOME - if tsk.generator.env.DISTRO == "Windows": - stanzas = [ - "ant", - "-Dthirdparty.classpath=\"%s\""%(tsk.env.CLASSPATH.replace(os.pathsep,",")), - ] - else: - stanzas = [ - "ant", - "-Dthirdparty.classpath=%s"%(tsk.env.CLASSPATH.replace(os.pathsep,",")), - ] - stanzas += tsk.generator.antargs - ret = Utils.exec_command(" ".join(stanzas),cwd=tsk.generator.bld.srcnode.abspath(),env=environ,log=True) - if ret != 0: raise Utils.WafError("Ant command %s failed with error value %s"%(stanzas,ret)) - return ret -Utils.runant = runant - -@throws_command_errors -def run_java(classname,classpath,options=None,arguments=None): - if not options: options = [] - if not arguments: arguments = [] - if type(classpath) in [list,tuple]: classpath = pathsep.join(classpath) - - Utils.pprint("BLUE","Run-time CLASSPATH:") - for v in classpath.split(pathsep): Utils.pprint("BLUE"," %s"%v) - - cmd = ["java","-classpath",classpath] + options + [classname] + arguments - Utils.pprint("BLUE"," ".join([ _trm(x,32) for x in cmd ])) - _check_call(cmd) - -# this will enforce the after= ordering constraints in the javac task generators -from TaskGen import after, feature -@feature('*') -@after('apply_core', 'apply_java', 'apply_subst') -def process_after(self): - lst = self.to_list(getattr(self, 'after', [])) - for x in lst: - obj = self.bld.name_to_obj(x,self.bld.env) - if not obj: break - obj.post() - for a in obj.tasks: - for b in self.tasks: - b.set_run_after(a) - -Build.BuildContext.process_after = staticmethod(process_after) - -def _getbuildcontext(): - ctx = Build.BuildContext() - ctx.load_dirs(_abspath(srcdir),_abspath(blddir)) - ctx.load_envs() - return ctx - -def _install_files_filtered(self,destdir,listoffiles,**kwargs): - if "cwd" in kwargs: cwd = kwargs["cwd"] - else: cwd = self.path - if isinstance(listoffiles,str) and '**' in listoffiles: - listoffiles = cwd.ant_glob(listoffiles,flat=True) - elif isinstance(listoffiles,str) and '*' in listoffiles: - listoffiles = [ n for x in listoffiles.split() for n in _glob(cwd.abspath() + os.sep + x.replace("/",os.sep)) ] - listoffiles = Utils.to_list(listoffiles)[:] - listoffiles = [ x for x in listoffiles if not ( x.endswith("~") or x == "override" or "%soverride"%os.sep in x ) ] - for n,f in enumerate(listoffiles): - f = os.path.abspath(f) - f = dev_override(f) - if _isdir(f): continue - if f.endswith(".in"): - source = f ; target = f[:-3] - tgen = self(features='subst', source=source[len(self.path.abspath())+1:], target=target[len(self.path.abspath())+1:], name="filtered_%s"%source) - tgen.dict = self.env.get_merged_dict() - else: - source = f ; target = f - listoffiles[n] = target[len(cwd.abspath())+1:] - if "postpone" not in kwargs: kwargs["postpone"] = True - ret = self.install_files(destdir,listoffiles,**kwargs) - return ret -Build.BuildContext.install_files_filtered = _install_files_filtered - -def _substitute(self,listoffiles,install_to=None,cwd=None,dict=None,name=None,**kwargs): - if cwd is None: cwd = self.path - tgenkwargs = {} - if name is not None: tgenkwargs["name"] = name - if isinstance(listoffiles,str) and '**' in listoffiles: - listoffiles = cwd.ant_glob(listoffiles,flat=True) - elif isinstance(listoffiles,str) and '*' in listoffiles: - listoffiles = [ n for x in listoffiles.split() for n in _glob(cwd.abspath() + os.sep + x.replace("/",os.sep)) ] - for src in Utils.to_list(listoffiles): - tgt = src + ".subst" - inst = src # Utils.relpath(src,relative_to) <- disabled - - # Use cwd path when creating task and shift back later - tmp = self.path - self.path = cwd - tgen = self(features='subst', source=src, target=tgt, **tgenkwargs) - self.path = tmp - - if dict is not None: tgen.dict = dict - else: tgen.dict = self.env.get_merged_dict() - self.path.find_or_declare(tgt) - if install_to is not None: self.install_as("%s/%s"%(install_to,inst), tgt, cwd=cwd, **kwargs) -Build.BuildContext.substitute = _substitute - -def set_options(opt): - """Register command line options""" - opt.tool_options('gnu_dirs') - opt.tool_options('python') - opt.tool_options('tar',tooldir='tools/waf') - opt.tool_options('mkisofs',tooldir='tools/waf') - if Options.platform not in ['darwin','win32']: opt.tool_options('usermgmt',tooldir='tools/waf') - if Options.platform not in ['darwin','win32']: opt.tool_options('javadir',tooldir='tools/waf') - opt.tool_options('tomcat',tooldir='tools/waf') - if Options.platform not in ['darwin',"win32"]: opt.tool_options('compiler_cc') - - inst_dir = opt.get_option_group('--srcdir') - inst_dir.add_option('--with-db-host', - help = 'Database host to use for waf deploydb [Default: 127.0.0.1]', - default = '127.0.0.1', - dest = 'DBHOST') - inst_dir.add_option('--with-db-user', - help = 'Database user to use for waf deploydb [Default: root]', - default = 'root', - dest = 'DBUSER') - inst_dir.add_option('--with-db-pw', - help = 'Database password to use for waf deploydb [Default: ""]', - default = '', - dest = 'DBPW') - inst_dir.add_option('--tomcat-user', - help = 'UNIX user that the management server initscript will switch to [Default: ]', - default = '', - dest = 'MSUSER') - inst_dir.add_option('--no-dep-check', - action='store_true', - help = 'Skip dependency check and assume JARs already exist', - default = False, - dest = 'NODEPCHECK') - inst_dir.add_option('--fast', - action='store_true', - help = 'does ---no-dep-check', - default = False, - dest = 'NODEPCHECK') - inst_dir = opt.get_option_group('--force') - inst_dir.add_option('--preserve-config', - action='store_true', - help = 'do not install configuration files', - default = False, - dest = 'PRESERVECONFIG') - - debugopts = optparse.OptionGroup(opt.parser,'run/debug options') - opt.add_option_group(debugopts) - debugopts.add_option('--debug-port', - help = 'Port on which the debugger will listen when running waf debug [Default: 8787]', - default = '8787', - dest = 'DEBUGPORT') - debugopts.add_option('--debug-suspend', - action='store_true', - help = 'Suspend the process upon startup so that a debugger can attach and set breakpoints', - default = False, - dest = 'DEBUGSUSPEND') - debugopts.add_option('--run-verbose', - action='store_true', - help = 'Run Tomcat in verbose mode (java option -verbose)', - default = False, - dest = 'RUNVERBOSE') - - rpmopts = optparse.OptionGroup(opt.parser,'RPM/DEB build options') - opt.add_option_group(rpmopts) - rpmopts.add_option('--build-number', - help = 'Build number [Default: SVN revision number for builds from checkouts, or empty for builds from source releases]', - default = '', - dest = 'BUILDNUMBER') - rpmopts.add_option('--package-version', - help = 'package version', - default = '', - dest = 'VERNUM') - rpmopts.add_option('--release-version', - help = 'release version', - default = '', - dest = 'RELEASENUM') - rpmopts.add_option('--prerelease', - help = 'Branch name to append to the release number (if specified, alter release number to be a prerelease); this option requires --build-number=X [Default: nothing]', - default = '', - dest = 'PRERELEASE') - rpmopts.add_option('--skip-dist', - action='store_true', - help = 'Normally, dist() is called during package build. This makes the package build assume that a distribution tarball has already been made, and use that. This option is also valid during distcheck and dist.', - default = False, - dest = 'DONTDIST') - - distopts = optparse.OptionGroup(opt.parser,'dist options') - opt.add_option_group(distopts) - distopts.add_option('--oss', - help = 'Only include open source components', - action = 'store_true', - default = False, - dest = 'OSS') - -def showconfig(conf): - """prints out the current configure environment configuration""" - conf = _getbuildcontext() - - Utils.pprint("WHITE","Build environment:") - for key,val in sorted(conf.env.get_merged_dict().items()): - if "CLASSPATH" in key: - Utils.pprint("BLUE"," %s:"%key) - for v in val.split(pathsep): - Utils.pprint("BLUE"," %s"%v) - continue - Utils.pprint("BLUE"," %s: %s"%(key,val)) - -def _getconfig(self): - lines = [] - for key,val in sorted(self.env.get_merged_dict().items()): - if "CLASSPATH" in key: - lines.append(" %s:"%key) - for v in val.split(pathsep): - lines.append(" %s"%v) - continue - lines.append(" %s: %s"%(key,val)) - return "\n".join(lines) -Build.BuildContext.getconfig = _getconfig - -def list_targets(ctx): - """return the list of buildable and installable targets""" - - bld = Build.BuildContext() - proj = Environment.Environment(Options.lockfile) - bld.load_dirs(proj['srcdir'], proj['blddir']) - bld.load_envs() - - bld.add_subdirs([os.path.split(Utils.g_module.root_path)[0]]) - - names = set([]) - for x in bld.all_task_gen: - try: - names.add(x.name or x.target) - except AttributeError: - pass - - lst = list(names) - lst.sort() - for name in lst: - print(name) - -def decorate_dist(f): - def dist(appname='',version=''): - '''makes a tarball for redistributing the sources -- if --skip-dist is specified, does nothing''' - if Options.options.DONTDIST: - if not appname: appname=Utils.g_module.APPNAME - if not version: version=Utils.g_module.VERSION - tmp_folder=appname+'-'+version - if Scripting.g_gz in['gz','bz2']: - arch_name=tmp_folder+'.tar.'+Scripting.g_gz - else: - arch_name=tmp_folder+'.'+'zip' - Logs.info('New archive skipped: %s'%(arch_name)) - return arch_name - else: - return f(appname,version) - return dist -Scripting.dist = decorate_dist(Scripting.dist) - -def dist_hook(): - # Clean the GARBAGE that clogs our repo to the tune of 300 MB - # so downloaders won't have to cry every time they download a "source" - # package over 90 MB in size - [ shutil.rmtree(f) for f in _glob(_join("*","bin")) if _isdir(f) ] - [ shutil.rmtree(f) for f in _glob(_join("cloudstack-proprietary","thirdparty","*")) if _isdir(f) ] - [ shutil.rmtree(f) for f in [ _join("cloudstack-proprietary","tools") ] if _isdir(f) ] - - if Options.options.OSS: - [ shutil.rmtree(f) for f in "cloudstack-proprietary".split() if _exists(f) ] - - stdout = svninfo("..") or allgitinfo() - if stdout: - f = file("sccs-info","w") - f.write(stdout) - f.flush() - f.close() - else: - # No SVN available - if _exists("sccs-info"): - # If the file already existed, we preserve it - return - else: - f = file("sccs-info","w") - f.write("No revision control information could be detected when the source distribution was built.") - f.flush() - f.close() - -def bindist(ctx): - """creates a binary distribution that, when unzipped in the root directory of a machine, deploys the entire stack""" - ctx = _getbuildcontext() - - if Options.options.VERNUM: - VERSION = Options.options.VERNUM - - tarball = "%s-bindist-%s.tar.%s"%(APPNAME,VERSION,Scripting.g_gz) - zf = _join(ctx.bldnode.abspath(),tarball) - Options.options.destdir = _join(ctx.bldnode.abspath(),"bindist-destdir") - Scripting.install(ctx) - - if _exists(zf): _unlink(zf) - Utils.pprint("GREEN","Creating %s"%(zf)) - z = tarfile.open(zf,"w:bz2") - cwd = _getcwd() - _chdir(Options.options.destdir) - z.add(".") - z.close() - _chdir(cwd) - -@throws_command_errors -def deb(context): - raise Utils.WafError("Debian packages are no longer build with waf. Use dpkg-buildpackage instead.") - -@throws_command_errors -def rpm(context): - buildnumber = Utils.getbuildnumber() - if buildnumber: buildnumber = ["--define","_build_number %s"%buildnumber] - else: buildnumber = [] - - if Options.options.PRERELEASE: - if not buildnumber: - raise Utils.WafError("Please specify a build number to go along with --prerelease") - prerelease = ["--define","_prerelease %s"%Options.options.PRERELEASE] - else: prerelease = [] - - if Options.options.RELEASENUM: - release = Options.options.RELEASENUM - else: release = "1" - - releasever = ["--define", "_rel %s" % release] - - if Options.options.VERNUM: - ver = Options.options.VERNUM - else: ver = SHORTVERSION - - packagever = ["--define", "_ver %s" % ver] - - # FIXME wrap the source tarball in POSIX locking! - if not Options.options.blddir: outputdir = _join(context.curdir,blddir,"rpmbuild") - else: outputdir = _join(_abspath(Options.options.blddir),"rpmbuild") - Utils.pprint("GREEN","Building RPMs") - - tarball = Scripting.dist('', ver) - sourcedir = _join(outputdir,"SOURCES") - - if _exists(sourcedir): shutil.rmtree(sourcedir) - for a in ["RPMS/noarch","SRPMS","BUILD","SPECS","SOURCES"]: mkdir_p(_join(outputdir,a)) - shutil.move(tarball,_join(sourcedir,tarball)) - - specfile = "%s.spec"%APPNAME - checkdeps = lambda: c(["rpmbuild","--define","_topdir %s"%outputdir,"--nobuild",specfile]+packagever+releasever) - dorpm = lambda: c(["rpmbuild","--define","_topdir %s"%outputdir,"-bb",specfile]+buildnumber+prerelease+packagever+releasever) - try: checkdeps() - except (CalledProcessError,OSError),e: - Utils.pprint("YELLOW","Dependencies might be missing. Trying to auto-install them...") - installrpmdeps(context) - dorpm() - -def uninstallrpms(context): - """uninstalls any Cloud Stack RPMs on this system""" - Utils.pprint("GREEN","Uninstalling any installed RPMs") - cmd = "rpm -qa | grep %s- | xargs -r sudo rpm -e"%APPNAME - Utils.pprint("BLUE",cmd) - system(cmd) - -def viewrpmdeps(context): - """shows all the necessary dependencies to build the RPM packages of the stack""" - for dep in getrpmdeps(): print dep - -@throws_command_errors -def installrpmdeps(context): - """installs all the necessary dependencies to build the RPM packages of the stack""" - runnable = ["sudo","yum","install","-y"]+list(getrpmdeps()) - Utils.pprint("GREEN","Installing RPM build dependencies") - Utils.pprint("BLUE"," ".join(runnable)) - _check_call(runnable) - -@throws_command_errors -def deploydb(ctx,virttech=None): - if not virttech: raise Utils.WafError('use deploydb_xenserver, deploydb_vmware or deploydb_kvm rather than deploydb') - - ctx = _getbuildcontext() - setupdatabases = _join(ctx.env.BINDIR,"cloud-setup-databases") - serversetup = _join(ctx.env.SETUPDATADIR,"server-setup.xml") - - if not _exists(setupdatabases): # Needs install! - Scripting.install(ctx) - - cmd = [ - ctx.env.PYTHON, - setupdatabases, - "cloud@%s"%ctx.env.DBHOST, - virttech, - "--auto=%s"%serversetup, - "--deploy-as=%s:%s"%(ctx.env.DBUSER,ctx.env.DBPW), - ] - - Utils.pprint("BLUE"," ".join(cmd)) - retcode = Utils.exec_command(cmd,shell=False,stdout=None,stderr=None,log=True) - if retcode: raise CalledProcessError(retcode,cmd) - -def deploydb_xenserver(ctx): - """re-deploys the database using the MySQL connection information and the XenServer templates.sql""" - return deploydb(ctx,"xenserver") -def deploydb_kvm(ctx): - """re-deploys the database using the MySQL connection information and the KVM templates.sql""" - return deploydb(ctx,"kvm") -def deploydb_vmware(ctx): - """re-deploys the database using the MySQL connection information and the KVM templates.sql""" - return deploydb(ctx,"vmware") - -def run(args): - """runs the management server""" - conf = _getbuildcontext() - - runverbose = [] - if Options.options.RUNVERBOSE: runverbose = ['-verbose'] - if args == "debug": - suspend = "n" - if Options.options.DEBUGSUSPEND: suspend = "y" - debugargs = [ - "-Xdebug","-Xrunjdwp:transport=dt_socket,address=%s,server=y,suspend=%s"%( - Options.options.DEBUGPORT,suspend), - "-ea"] - Utils.pprint("GREEN","Starting Tomcat in debug mode") - else: - Utils.pprint("GREEN","Starting Tomcat in foreground mode") - debugargs = [] - - options = runverbose + debugargs + [ - "-Dcatalina.base=" + conf.env.MSENVIRON, - "-Dcatalina.home=" + conf.env.MSENVIRON, - "-Djava.io.tmpdir="+_join(conf.env.MSENVIRON,"temp"), ] - - if not _exists(_join(conf.env.BINDIR,"cloud-setup-databases")): Scripting.install(conf) - - cp = [conf.env.MSCONF] - cp += _glob(_join(conf.env.MSENVIRON,'bin',"*.jar")) - cp += _glob(_join(conf.env.MSENVIRON,'lib',"*.jar")) - cp += _glob( _join ( conf.env.PREMIUMJAVADIR , "*" ) ) - cp += [conf.env.SYSTEMCLASSPATH] - cp += [conf.env.DEPSCLASSPATH] - cp += [conf.env.MSCLASSPATH] - - # FIXME Make selectable at runtime - #plugins = _glob( _join(conf.env.PLUGINJAVADIR,"*") ) - #if plugins: cp = plugins + cp - #vendorconfs = _glob( _join(conf.env.MSCONF,"vendor","*") ) - #if vendorconfs: cp = plugins + cp - - run_java("org.apache.catalina.startup.Bootstrap",cp,options,["start"]) - -def debug(ctx): - """runs the management server in debug mode""" - run("debug") - -@throws_command_errors -def run_agent(args): - """runs the agent""" # FIXME: make this use the run/debug options - conf = _getbuildcontext() - if not _exists(_join(conf.env.LIBEXECDIR,"agent-runner")): Scripting.install(conf) - _check_call("sudo",[_join(conf.env.LIBEXECDIR,"agent-runner")]) - -@throws_command_errors -#def run_console_proxy(args): -# """runs the console proxy""" # FIXME: make this use the run/debug options -# conf = _getbuildcontext() -# if not _exists(_join(conf.env.LIBEXECDIR,"console-proxy-runner")): Scripting.install(conf) -# _check_call("sudo",[_join(conf.env.LIBEXECDIR,"console-proxy-runner")]) - -def simulate_agent(args): - """runs the agent simulator, compiling and installing files as needed - - Any parameter specified after the simulate_agent is appended to - the java command line. To inhibit waf from interpreting the - command-line options that you specify to the agent, put a -- - (double-dash) between the waf simulate_agent and the options, like this: - - python waf simulate_agent -- -z KY -p KY -""" - - # to get this to work smoothly from the configure onwards, you need to - # create an override directory in java/agent/conf, then add an agent.properties - # there, with the correct configuration that you desire - # that is it -- you are now ready to simulate_agent - conf = _getbuildcontext() - args = sys.argv[sys.argv.index("simulate_agent")+1:] - if '--' in args: args.remove('--') - - cp = [conf.env.AGENTSYSCONFDIR] - cp += _glob( _join ( conf.env.PREMIUMJAVADIR , "*" ) ) - cp += [conf.env.SYSTEMCLASSPATH] - cp += [conf.env.DEPSCLASSPATH] - cp += [conf.env.AGENTSIMULATORCLASSPATH] - - if not _exists(_join(conf.env.LIBEXECDIR,"agent-runner")): Scripting.install(conf) - - run_java("com.cloud.agent.AgentSimulator",cp,arguments=args) - diff --git a/wscript_build b/wscript_build deleted file mode 100644 index 1c12c612912..00000000000 --- a/wscript_build +++ /dev/null @@ -1,457 +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. - -"""builds the entire stack""" -#For every matching build change here, that produces new installable -#files, the cloud.spec file and the Debian control files must be -#revised and tested. - -import shutil,os -import Utils,Node,Options,Logs,Scripting,Environment,Build,Configure -from os import unlink as _unlink, makedirs as _makedirs, getcwd as _getcwd, chdir as _chdir -from os.path import abspath as _abspath, basename as _basename, dirname as _dirname, exists as _exists, isdir as _isdir, split as _split, join as _join, sep, pathsep, pardir, curdir -from glob import glob as _glob -from subprocess import Popen as _Popen,PIPE -try: set([1,2,3]) -except Exception: from Sets import set -import re -import zipfile,tarfile -import time -try: - from os import chmod as _chmod,chown as _chown - import pwd,stat,grp -except ImportError: - _chmod,_chown,pwd,stat,grp = (None,None,None,None,None) - - -# Global variables setup -sourcedir = bld.srcnode.abspath() -builddir = bld.path.abspath(bld.env) -#buildpremium = _exists(_join(sourcedir,"cloudstack-proprietary")) -buildpremium = False -filelist = bld.path.ant_glob -distdir = Utils.relpath(_join(sourcedir,"dist")) -targetdir = Utils.relpath(_join(sourcedir,"target")) - -def gitinfo(dir=None): - if dir and not _isdir(dir): return '' - try: p = _Popen(['git','remote','show','-n','origin'],stdin=PIPE,stdout=PIPE,stderr=PIPE,cwd=dir) - except OSError,e: - if e.errno == 2: return '' # svn command is not installed - raise - stdout,stderr = p.communicate('') - retcode = p.wait() - # If the guess fails, just return nothing. - if retcode: return - stdout = [ s.strip() for s in stdout.splitlines() ] - try: url = [ s[11:] for s in stdout if s.startswith("Fetch URL") ][0] - except IndexError: url = [ s[5:] for s in stdout if s.startswith("URL") ][0] - assert url - - p = _Popen(['git','log','-1'],stdin=PIPE,stdout=PIPE,stderr=PIPE,cwd=dir) - stdout,stderr = p.communicate('') - retcode = p.wait() - if retcode: return - # If the guess fails, just return nothing. - stdout = [ s.strip() for s in stdout.splitlines() ] - commitid = [ s.split()[1] for s in stdout if s.startswith("commit") ][0] - assert commitid - - return "Git Revision: %s"%commitid + "\n" + "Git URL: %s"%url + "\n" - -def build_utils_docs (): - stdout = gitinfo() - if stdout: - f = file("sccs-info","w") - f.write(stdout) - f.flush() - f.close() - else: - if _exists("sccs-info"): - # If the file already existed, we preserve it - return - else: - f = file("sccs-info","w") - f.write("No revision control information could be detected when the source distribution was built.") - f.flush() - f.close() - - sccsinfo = _join(sourcedir,"sccs-info") - if _exists(sccsinfo): bld.install_files("${DOCDIR}","sccs-info") - - tgen = bld(features='subst', name='configure-info', source="configure-info.in", target="configure-info") - tgen.dict = {"CONFIGUREVARS":bld.getconfig()} - bld.install_files("${DOCDIR}","configure-info") - -# compile jar files using ant -# ant only needs to be reinvoked if the version with build number changes -# we here trim all the depended targets from the target list: -def build_jars (): - Implementation_Version = bld.env.VERSION - - # this is to trigger recompilation / cache avoidance if the relevant environment for ant changes - ant_args = [ - "build-all", - "-Dimpl.version=%s" % Implementation_Version, - "-Dtarget.dir=%s" % targetdir, - "-Ddist.dir=%s" % distdir, - "-Dbase.dir=%s" % sourcedir, - "-f %s" % Utils.relpath (_join(sourcedir, "build.xml")), - ] - - if buildpremium: - ant_args.append("-Dbuild.premium=true") - - tgen = bld(features='subst', name='version-info', source="version-info.in", target="version-info") - tgen.dict = { "Implementation_Version":Implementation_Version,"ant_args":ant_args } - bld.install_files("${DOCDIR}","version-info") - - bld.srcnode.ensure_dir_node_from_path("target/jar") - bld.srcnode.ensure_dir_node_from_path("dist") - - tgen = bld.new_task_gen (rule = Utils.runant, - name = "runant", - antargs = ant_args) - - jarnode = bld.srcnode.find_dir ('target/jar') - jars_str = jarnode.ant_glob ('*.jar').split () - ant_jars = [] - excludes = ["cloud-xstream-1.3.1.jar", "cloud-commons-dbcp-1.2.2.jar", - "cloud-commons-httpclient-3.1.jar", "cloud-commons-pool-1.4.jar", - "cloud-servlet-api.jar", "cloud-commons-logging-1.1.1.jar", - "cloud-ws-commons-util-1.0.2.jar", - "cloud-commons-collections-3.2.1.jar", "vmware*.jar", "cloud-secstorage-extras.jar", - "cloud-agent-simulator.jar", "cloud-awsapi.jar", "cloud-test.jar", "cloud-wsdl4j.jar", "cloud-console-proxy.jar"] - - for a in jars_str: - if _basename (a).startswith ("cloud-") \ - and not _basename (a) in excludes: - a = jarnode.abspath () + os.sep + a - ant_jars.append (a) - - bld.install_files ('${JAVADIR}', ant_jars) - - -def build_premium (): - if buildpremium: bld.recurse(["cloudstack-proprietary/"],'build') - -def build_thirdparty_dir (): - start_path = bld.path.find_dir ("thirdparty") - bld.install_files('${PREMIUMJAVADIR}','*.jar', cwd = start_path) - Utils.pprint ("GREEN", "Installed files of thirdparty/") - -def build_dependences (): - excludes = ["cloud-xstream-1.3.1.jar", "cloud-servlet-api.jar", "cloud-commons-logging-1.1.1.jar", - "cloud-ws-commons-util-1.0.2.jar", - "cloud-commons-collections-3.2.1.jar", "cloud-wsdl4j.jar"] - - start_path = bld.path.find_dir ("deps") - - bld.install_files('${JAVADIR}',start_path.ant_glob(["CAStorSDK-*.jar", "javax.persistence-2.0.0.jar", "apache-log4j-extras-1.1.jar", "libvirt-0.4.9.jar", "axis2-1.5.1.jar", "jstl-1.2.jar", "commons-discovery-0.5.jar", "commons-codec-1.6.jar", "ejb-api-3.0.jar", "xmlrpc-client-3.1.3.jar", "commons-dbcp-1.4.jar", "commons-pool-1.6.jar", "gson-1.7.1.jar", - "netscaler-1.0.jar", "netscaler-sdx-1.0.jar", "backport-util-concurrent-3.1.jar", "ehcache-1.5.0.jar", "httpcore-4.0.jar", "log4j-1.2.16.jar", "trilead-ssh2-build213-svnkit-1.3-patch.jar", "cglib-nodep-2.2.2.jar", "xmlrpc-common-3.*.jar", - "axiom*.jar", "axis2*.jar", "antlr*.jar", "XmlSchema*.jar", "json-simple*.jar", "neethi*.jar", "woden*.jar", "xercesImpl*.jar", "xml-apis*.jar", "dom4j*.jar", "javassist*.jar", "commons-fileupload*.jar", - "xmlrpc-client-3.*.jar", "wsdl4j-1.6.2.jar", "bcprov-jdk16-1.45.jar", "jsch-0.1.42.jar", "jasypt-1.9.0.jar", "commons-configuration-1.8.jar", "mail-1.4.jar", "activation-1.1.jar", "xapi-5.6.100-1-SNAPSHOT.jar"], excl = excludes), cwd=start_path) - -#def build_console_proxy (): - # binary unsubstitutable files: -# start_path = bld.path.find_dir ("console-proxy") -# bld.install_files("${CPLIBDIR}",start_path.ant_glob("images/**",src=True,bld=False,dir=False,flat=True),cwd=start_path,relative_trick=True) - - # text substitutable files (substitute with tokens from the environment bld.env): -# bld.substitute('css/** js/** ui/** scripts/**',install_to="${CPLIBDIR}", cwd=start_path) - - # config files (do not replace them if preserve config option is true) -# if not Options.options.PRESERVECONFIG: bld.install_files_filtered("${CPSYSCONFDIR}","conf.dom0/*", cwd=start_path) - -def build_patches (): - # done here because the patches require substituted files - start_path = bld.path.find_dir ("patches") - bld.substitute("*/**",name="patchsubst", cwd = start_path) - - for virttech in Utils.to_list(start_path.ant_glob("*",dir=True)): - if virttech in ["shared"]: continue - patchfiles = start_path.ant_glob('shared/** %s/debian/config/**'%virttech,src=False,bld=True,dir=False,flat=True) - tmp = bld.path - bld.path = start_path - tgen = bld( - features = 'tar',#Utils.tar_up, - source = patchfiles, - target = 'cloud-scripts.tgz', - name = 'cloud-scripts_tgz', - root = os.path.join("patches", virttech + "/debian/config"), - rename = lambda x: re.sub(".subst$","",x), - ) - bld.path = tmp - - -def build_systemvm_patch (): - if bld.env.DISTRO not in ["Windows","Mac"]: - # patch creation - bld.install_files ("${COMMONLIBDIR}/vms", "%s/systemvm.zip" % distdir) - # ISO creation - bld.install_as("${COMMONLIBDIR}/vms/systemvm.iso", "%s/systemvm.iso" % distdir) - -def build_systemvm_iso (): - if buildpremium: - bld.install_as("${AGENTLIBDIR}/vms/systemvm-premium.iso", "%s/systemvm-premium.iso" % distdir) - -# =================== Empty directory / symlink creation on install target ==================== - -def build_dirs_symlinks (): - bld.createuser(bld.env.MSUSER,bld.env.MSENVIRON,'/bin/sh') - - # 7. make log and cache dirs (this actually runs first) - if bld.env.DISTRO in 'Windows Mac': pass - else: - x = ("root",bld.env.MSUSER) - directories = [ - ("${MSLOGDIR}",0770,x), - ("${AGENTLOGDIR}",0770,x), - ("${USAGELOGDIR}",0770,x), -# ("${CPLOGDIR}",0770,x), - ("${IPALLOCATORLOGDIR}",0770,x), - ("${LOCALSTATEDIR}/cache/${MSPATH}",0770,x), - ("${LOCALSTATEDIR}/cache/${MSPATH}/temp",0770,x), - ("${LOCALSTATEDIR}/cache/${MSPATH}/work",0770,x), - ("${SHAREDSTATEDIR}/${MSPATH}",0770,x), - ("${MSMNTDIR}",0770,x), - ("${MSCONF}/Catalina",0770,x), - ("${MSCONF}/Catalina/localhost",0770,x), - ("${MSCONF}/Catalina/localhost/client",0770,x), - ("${PIDDIR}",0755,("root","root")), - ("${LOCKDIR}",0755,("root","root")), - ] - - for a,mode,owner in directories: - s = bld.subst_add_destdir(a,bld) - if Options.is_install: - bld.install_dir(a) - bld.setownership(a,owner[0],owner[1],mode) - - # 8. create environment symlinks - symlinks = [ - ('${MSENVIRON}/bin', '${TOMCATHOME}/bin'), - ('${MSENVIRON}/lib', '${TOMCATHOME}/lib'), - ('${MSENVIRON}/logs', "${MSLOGDIR}"), - ('${MSENVIRON}/temp', '${LOCALSTATEDIR}/cache/${MSPATH}/temp'), - ('${MSENVIRON}/work','${LOCALSTATEDIR}/cache/${MSPATH}/work'), - ('${MSENVIRON}/conf', '${SYSCONFDIR}/${MSPATH}'), -# ("${AGENTLIBDIR}/css", '${CPLIBDIR}/css'), -# ("${AGENTLIBDIR}/images", '${CPLIBDIR}/images'), -# ("${AGENTLIBDIR}/js", '${CPLIBDIR}/js'), -# ("${AGENTLIBDIR}/ui", '${CPLIBDIR}/ui'), - ("${MSCONF}/server.xml", '${MSCONF}/server-nonssl.xml'), - ("${MSCONF}/tomcat6.conf", '${MSCONF}/tomcat6-nonssl.conf'), - ] - - for lnk,dst in symlinks: bld.symlink_as(lnk,Utils.subst_vars(dst,bld.env)) - - -def build_scripts (): - start_path = bld.path.find_dir ("scripts") - bld.substitute('**',"${COMMONLIBDIR}/scripts",chmod=0755, cwd=start_path) - -def build_bin_exec_dirs (): - #bld.install_files_filtered("${LIBEXECDIR}","*/libexec/* cloudstack-proprietary/*/libexec/*",chmod=0755) - #bld.install_files_filtered("${BINDIR}","*/bindir/* cloudstack-proprietary/*/bindir/*",chmod=0755) - #bld.install_files_filtered("${SBINDIR}","*/sbindir/* cloudstack-proprietary/*/sbindir/*",chmod=0755) - - bld.install_files_filtered("${LIBEXECDIR}","*/libexec/*",chmod=0755) - bld.install_files_filtered("${BINDIR}","*/bindir/*",chmod=0755) - bld.install_files_filtered("${SBINDIR}","*/sbindir/*",chmod=0755) - -def build_server_client (): - start_path = bld.path.find_dir("client/WEB-INF") - bld.install_files('${MSENVIRON}/webapps/client/WEB-INF', - start_path.ant_glob("**",src=True,bld=False,dir=False,flat=True), - cwd=start_path,relative_trick=True) - - start_path = bld.path.find_dir("client") - bld.install_files("${MSCONF}/resources",'WEB-INF/classes/resources/*.properties',chmod=0640, cwd=start_path) - - if not Options.options.PRESERVECONFIG: - bld.install_files_filtered("${MSCONF}","tomcatconf/*", cwd=start_path) - bld.install_files("${MSCONF}",'tomcatconf/db.properties',chmod=0640, cwd=start_path) - bld.setownership("${MSCONF}/db.properties","root",bld.env.MSUSER) - - start_path = bld.path.find_dir("server") - if not Options.options.PRESERVECONFIG: - bld.install_files_filtered("${SERVERSYSCONFDIR}","conf/*", cwd=start_path) - -def build_agent (): - start_path = bld.path.find_dir ("agent") - bld.install_files("${AGENTLIBDIR}", - start_path.ant_glob("storagepatch/**",src=True,bld=False,dir=False,flat=True), - cwd=start_path,relative_trick=True) - if not Options.options.PRESERVECONFIG: - bld.install_files_filtered("${AGENTSYSCONFDIR}","conf/*", cwd = start_path) - -def build_ui (): - # binary unsubstitutable files: - start_path = bld.path.find_dir ("ui") - bld.install_files ("${MSENVIRON}/webapps/client",start_path.ant_glob("*.ico **/*png **/*jpg **/*gif",src=True,bld=False,dir=False,flat=True),cwd=start_path,relative_trick=True) - - # text substitutable files (substitute with tokens from the environment bld.env): - bld.substitute ("*html **/*html **/*js **/*css **/*properties **/*jsp *jsp",install_to="${MSENVIRON}/webapps/client", cwd=start_path) - -def build_conf_files (): - # apply distro-specific config on top of the 'all' generic cloud-management config - globspec = _join("*","distro",bld.env.DISTRO.lower(),"*") # matches premium/distro/centos/SYSCONFDIR - #distrospecificdirs=_glob(globspec) + _glob(_join("cloudstack-proprietary",globspec)) - distrospecificdirs=_glob(globspec) - for dsdir in distrospecificdirs: - start_path = bld.srcnode.find_dir(dsdir) - subpath,varname = _split(dsdir) - dsdirwithvar = _join("${%s}"%varname) - files = filelist('%s/**'%dsdir,src=True,bld=False,dir=False,flat=True) - mode = 0644 - if "SYSCONFDIR" in dsdir: - mode = 0755 - if Options.options.PRESERVECONFIG: continue - bld.install_files_filtered(dsdirwithvar, files, cwd=start_path, relative_trick=True,chmod=mode) - -# cloudstack-proprietary still has db files for usage -def build_db_files (): - #bld.install_files_filtered("${SETUPDATADIR}",filelist("*/db/* cloudstack-proprietary/*/db/*",excl=Node.exclude_regs + "\ncloud-gate\ncloud-bridge")) - start_path = bld.path.find_dir ("setup/db") - bld.substitute('**',"${SETUPDATADIR}", cwd=start_path) - if buildpremium: - start_path = bld.path.find_dir ("cloudstack-proprietary/premium/db") - bld.substitute('**',"${SETUPDATADIR}", cwd=start_path) - - -def build_plugins (): - # ====================== Feature-specific plugins ======================== - - for plugin in _glob(_join("plugins","*")) + _glob(_join("cloudstack-proprietary","plugins","*")): - if not _exists(_join(plugin,"build.xml")): continue - pluginname = _basename(plugin) - target = 'target/jar/cloud-%s.jar' % pluginname - sources = filelist( '%s/**/*.java' % plugin.replace(sep,"/") , src=True, bld=False, dir=False ) - tgen = bld(rule=lambda x: runant("compile-%s"%pluginname), name='compile_%s'%pluginname, source=sources, target=target, after='runant') - bld.install_files('${PLUGINJAVADIR}',target) - - # ====================== End feature-specific plugins ==================== - - - # ====================== Vendor-specific plugins ======================== - - for vendor in _glob(_join("vendor","*")) + _glob(_join("cloudstack-proprietary","vendor","*")): - if not Options.options.PRESERVECONFIG: - bld.install_files_filtered("${MSCONF}/%s"%vendor,filelist("%s/tomcatconf/*"%vendor)) - - # ====================== End vendor-specific plugins ==================== - -def build_xml_api_description (): - def generate_xml_api_description(task): - relationship = Utils.relpath(sourcedir,os.getcwd()) - cp = [ _join(relationship,x) for x in task.generator.env.CLASSPATH.split(pathsep) ] - - jarnames = ['utils','server','core', 'api', 'server-extras'] - props = ["client/tomcatconf/commands.properties.in"] - - sources = [] - for i in jarnames: - str = 'target/jar/cloud-%s.jar' % i - sources.append (str) - sources.append ("client/tomcatconf/commands.properties.in") - if buildpremium: - sources.append("client/tomcatconf/commands-ext.properties.in") - - buildproducts = [] - for i in sources: - path = bld.path.abspath() + os.sep + i - buildproducts.append (path) - - jars = [ x for x in buildproducts if x.endswith("jar") ] - properties = [ x for x in buildproducts if x.endswith("properties.in") ] - cp += jars - cp = pathsep.join(cp) - arguments = ["-f",",".join(properties),"-d",builddir] - ret = Utils.exec_command(["java","-cp",cp,"com.cloud.api.doc.ApiXmlDocWriter"]+arguments,log=True) - return ret - - #TODO: We can't use 'source' token here because task_gen check if sources - # exist before all task_gen. This bring a problem that 'runant' task doesn't - # run when the check happen, which results in no source found at target/jar. - # Ask waf community to fix that - tgen = bld.new_task_gen ( - rule = generate_xml_api_description, - target = 'commands.xml', - name = 'xmlapi', - after = 'runant', - install_path="${CLIDIR}" - ) - - bld.install_as("${PYTHONDIR}/cloud_utils.py", 'python/lib/cloud_utils.py') - bld.install_files("${PYTHONDIR}/cloudtool", 'cloud-cli/cloudtool/*') - bld.install_files("${PYTHONDIR}/cloudutils", 'python/lib/cloudutils/*') - bld.install_as("${PYTHONDIR}/cloudapis.py", 'cloud-cli/cloudapis/cloud.py') - -def build_ovm(): - start_path = bld.path.find_dir("plugins/hypervisors/ovm/scripts") - bld.substitute('**',"${COMMONLIBDIR}/scripts",chmod=0755, cwd=start_path) - -def build_test(): - start_path = bld.path.find_dir("test/scripts") - bld.install_files('${LIBDIR}/${PACKAGE}/test', \ - start_path.ant_glob("**",src=True,bld=False,dir=False,flat=True), \ - cwd=start_path,relative_trick=True) - - start_path = bld.path.find_dir("test/metadata") - bld.install_files('${SHAREDSTATEDIR}/${PACKAGE}/test', \ - start_path.ant_glob("**",src=True,bld=False,dir=False,flat=True), \ - cwd=start_path,relative_trick=True) - - if not Options.options.PRESERVECONFIG: - start_path = bld.path.find_dir("test") - bld.install_files('${SYSCONFDIR}/${PACKAGE}/test','conf/*', cwd = start_path) - Utils.pprint ("GREEN", "Installed files of test/") - -def build_usage_dir (): - start_path = bld.path.find_dir ("usage") - bld.install_files_filtered("${USAGESYSCONFDIR}","conf/*", cwd = start_path) - bld.symlink_as("${USAGESYSCONFDIR}/db.properties", \ - Utils.subst_vars("${MSCONF}/db.properties",bld.env)) - Utils.pprint ("GREEN", "Installed files of usage/") - - -# Get started to execute here -#build_utils_docs () -build_jars () -build_premium () -#build_thirdparty_dir() -build_dependences () -#build_patches () -build_systemvm_patch () -build_dirs_symlinks () -build_scripts () -build_bin_exec_dirs () -build_server_client () -build_agent () -build_ui () -build_conf_files () -build_db_files () -build_plugins () -build_xml_api_description () -build_ovm () -#build_test() -build_usage_dir() - -# ====================== Magic! ========================================= -bld.use_the_magic() diff --git a/wscript_configure b/wscript_configure deleted file mode 100644 index d586c9e56fb..00000000000 --- a/wscript_configure +++ /dev/null @@ -1,408 +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. - -"""examines environment, then: - - configures classpath as per environment or command-line options - - detects Tomcat (on Windows) - - detects or configures directories according to command-line options""" - -import Utils,Node,Options,Logs,Scripting,Environment,Build,Configure -from os import unlink as _unlink, makedirs as _makedirs, getcwd as _getcwd, chdir as _chdir -try: from os import getuid as _getuid -except ImportError: pass -from os.path import abspath as _abspath, basename as _basename, dirname as _dirname, exists as _exists, isdir as _isdir, split as _split, join as _join, expanduser as _expanduser, sep, pathsep, pardir -from glob import glob as _glob -import time - - -# list of JARs that provide the build dependencies -# "j" generally means /usr/share/java -# when adding a new system JAR file: -# 1. check the hard_deps variable at the bottom and add the appropriate packaging information, -# 2. add the RPM package that contains the jarfile into the cloud.spec file, and the DEB package into the debian/control file -# 3. (the jars specified here will be looked up at runtime with build-classpath, on linux installs) -systemjars = { - 'common': - ( - "commons-collections.jar", - # "commons-daemon.jar", - #"commons-dbcp.jar", - "commons-codec.jar", - "commons-logging.jar", - "commons-logging-api.jar", - #"commons-pool.jar", - "commons-httpclient.jar", - "ws-commons-util.jar", - "mysql-connector-java.jar", - ), - 'Fedora': - ( - "tomcat6-servlet-2.5-api.jar", - "tomcat6-el-2.1-api-6.0.26.jar", - "tomcat6-jsp-2.1-api-6.0.26.jar", - #"tomcat6/catalina.jar", # all supported distros put the file there - ), - 'RHEL': - ( - "tomcat6-servlet-2.5-api.jar", - "tomcat6-el-2.1-api-6.0.24.jar", - "tomcat6-jsp-2.1-api-6.0.24.jar", - "jakarta-taglibs-core-1.1.1.jar", - "jakarta-taglibs-standard-1.1.1.jar", - "tomcat6/jasper.jar", - "tomcat6/jasper-el.jar", - "tomcat6/jasper-jdt.jar", - - ), - 'CentOS': - ( - "tomcat6-servlet-2.5-api.jar", - "tomcat6-jsp-2.1-api-6.0.24.jar", - "tomcat6-el-2.1-api-6.0.24.jar", - "jakarta-taglibs-core-1.1.1.jar", - "jakarta-taglibs-standard-1.1.1.jar", - "tomcat6/jasper.jar", - "tomcat6/jasper-el.jar", - "tomcat6/jasper-jdt.jar", - #"tomcat6/catalina.jar", # all supported distros put the file there - ), - 'Ubuntu': - ( - "servlet-api-2.5.jar", - "jsp-api-2.1.jar", - "jasper.jar", - "el-api-2.1.jar", - "jasper-el.jar", - "ecj.jar", - "cglib.jar", - "asm3.jar", - "jsch.jar", - "backport-util-concurrent.jar", - "jetty.jar", - "jetty-util.jar", - "jetty-start-daemon.jar", - "jetty-sslengine.jar", - "jetty-start.jar", - "jna.jar", - "log4j-1.2.jar", - ), - 'Windows': - ( - "servlet-api.jar", # this ships with Tomcat in lib/ - #"catalina.jar", - ), - 'Mac': - ( - "servlet-api.jar", - ), - 'openSUSE': - ( - "tomcat6-servlet-2.5-api.jar", - "tomcat6-jsp-2.1-api-6.0.24.jar", - "tomcat6-el-1.0-api.jar" - ), - 'SLES': - ( - "tomcat6-servlet-2.5-api.jar", - "tomcat6-jsp-2.1-api-6.0.24.jar", - "tomcat6-el-1.0-api.jar" - ) -} - -#A JAR dependency may be: - -#- required during compile-time -#- required during run-time - -#A JAR file can be available: - -#- in Tomcat lib/ -#- as a Linux system package -#- in the cloud-deps package -#- in the cloud-premium package - -# servlet-api: - -#- is required during compile-time -#- is required during management server run-time -#- is available in Tomcat lib/ (Windows/Mac) AND as a system package (Linux) -# -> ERGO, we do not need to include it -# but it should be named on the SYSTEMJARS (which is then used in the tomcat6.conf to build the MS classpath), -# and it should also be in the compile-time CLASSPATH - -# ===================================== - -# list of dependencies for configure check -# (classname,fedora package name,ubuntu package name) -# when adding a package name here, also add to the spec or debian control file -hard_deps = [ - ('java.io.FileOutputStream',"java-devel","openjdk-6-jdk"), - ('javax.servlet.http.Cookie',"tomcat6-servlet-2.5-api","libservlet2.5-java","(if on Windows,did you set TOMCAT_HOME to point to your Tomcat setup?)"), - ('org.apache.naming.resources.Constants',"tomcat6-lib","libtomcat6-java","(if on Windows,did you set TOMCAT_HOME to point to your Tomcat setup?)"), -] - - -if Options.options.VERNUM: - Version = Options.options.VERNUM -else: - Version = "2.2" -builddate = time.strftime("%Y.%m.%d.%H.%M.%S", time.localtime()).replace('.','') -conf.env.VERSION = Version + "." + builddate - -conf.check_message_1('Detecting distribution') -if Options.platform == 'win32': conf.env.DISTRO = "Windows" -elif Options.platform == 'darwin': conf.env.DISTRO = "Mac" -elif _exists("/etc/network"): conf.env.DISTRO = "Ubuntu" -elif _exists("/etc/fedora-release"): conf.env.DISTRO = "Fedora" -elif _exists("/etc/centos-release"): conf.env.DISTRO = "CentOS" -elif _exists("/etc/redhat-release"): - version = file("/etc/redhat-release").readline() - if version.find("Red Hat Enterprise Linux Server release 6") != -1: - conf.env.DISTRO = "RHEL" - elif version.find("CentOS release") != -1: - conf.env.DISTRO = "CentOS" -elif _exists("/etc/SuSE-release"): - content = file("/etc/SuSE-release").readlines() - supportedVersion = None - if content[0].find("SUSE Linux Enterprise Server 11") != -1: - spLevel = eval(content[-1].split()[-1]) - if spLevel >= 2: - conf.env.DISTRO = "SLES" - supportedVersion = 1 - elif content[0].find("openSUSE") != -1: - version = eval(content[1].split()[-1]) - if version >= 12.1: - conf.env.DISTRO = "openSUSE" - supportedVersion = 1 - if not supportedVersion: - conf.env.DISTRO = "unknown" -else: conf.env.DISTRO = "unknown" -if conf.env.DISTRO == "unknown": c = "YELLOW" -else: c = "GREEN" -conf.check_message_2(conf.env.DISTRO,c) -conf.check_message_1('Detecting installation prefix') -if Options.options.prefix == Options.default_prefix: - if conf.env.DISTRO == 'Windows': - conf.env.PREFIX = 'C:\\CloudStack' - elif _getuid() != 0: # not root - conf.env.PREFIX = _join(_expanduser("~"),"cloudstack") -conf.check_message_2("%s"%conf.env.PREFIX,"GREEN") - -conf.check_tool('misc') - -conf.check_tool("gnu_dirs") -if conf.env.DISTRO == 'Windows': - # waf uses slashes somewhere along the line in some paths. we fix them on windows. - for pth in [ x for x in conf.env.get_merged_dict().keys() if x.endswith("DIR") ]: - if not pth: continue - if not conf.env[pth]: continue - conf.env[pth] = conf.env[pth].replace("/","\\") - -conf.check_tool('tar') -try: conf.check_tool('mkisofs') -except Configure.ConfigurationError,e: - raise Configure.ConfigurationError, "The program genisoimage (or mkisofs) could not be found.\nOn Linux: ./waf installrpmdeps or ./waf installdebdeps according to your distro's package format.\nOn Windows: Use cygwin to install the mkisofs package, then ensure that the program is in your PATH." -conf.check_tool('java') - -conf.check_tool("python") -conf.check_python_version((2,4,0)) - -conf.check_message_1('Detecting Python MySQL module') -try: import MySQLdb -except ImportError,e: - raise Configure.ConfigurationError, "The Python MySQLdb module could not be found.\nOn Linux: ./waf installrpmdeps or ./waf installdebdeps according to your distro's package format.\nOn Windows: Install MySQL 5.1 on your machine, then install the Python MySQLdb module for Python %s.\nThe module for Python 2.6 / win32 / MySQL 5.1 is available here: http://soemin.googlecode.com/files/MySQL-python-1.2.3c1.win32-py2.6.exe"%conf.env.PYTHON_VERSION -conf.check_message_2('MySQLdb','GREEN') -conf.check_message_1('Database info for developer setup') -for a in "DBHOST DBUSER DBPW".split(): conf.env[a] = getattr(Options.options, a, '') -conf.check_message_2("user: %r, password: %r, host: %r"%(conf.env.DBUSER,conf.env.DBPW,conf.env.DBHOST),'GREEN') - -try: conf.check_tool("tomcat") -except Configure.ConfigurationError,e: - conf.fatal("Tomcat directory %r not found. Either install Tomcat using ./waf installrpmdeps or ./waf installdebdeps, or manually install Tomcat to a directory in your system and set the environment variable TOMCAT_HOME to point to it."%conf.env.TOMCATHOME) - -conf.env.COMMONPATH = _join(conf.env.PACKAGE,"common") -conf.env.AGENTPATH = _join(conf.env.PACKAGE,"agent") -conf.env.CPPATH = _join(conf.env.PACKAGE,"console-proxy") -conf.env.IPALLOCATORPATH = _join(conf.env.PACKAGE,"ipallocator") -conf.env.MSPATH = _join(conf.env.PACKAGE,"management") -conf.env.USAGEPATH = _join(conf.env.PACKAGE,"usage") -conf.env.SETUPPATH = _join(conf.env.PACKAGE,"setup") -conf.env.SERVERPATH = _join(conf.env.PACKAGE,"server") - -if conf.env.DISTRO in ['Windows','Mac']: - conf.env.MSENVIRON = conf.env.TOMCATHOME - conf.env.MSCONF = _join(conf.env.TOMCATHOME,"conf") - conf.env.MSLOGDIR = _join(conf.env.TOMCATHOME,"logs") - conf.env.MSMNTDIR = _join(conf.env.TOMCATHOME,"mnt") - conf.env.JAVADIR = _join(conf.env.MSENVIRON,"lib") - conf.env.PREMIUMJAVADIR = conf.env.JAVADIR - conf.env.PLUGINJAVADIR = conf.env.JAVADIR - conf.env.SYSTEMJAVADIR = conf.env.JAVADIR -else: - conf.env.MSENVIRON = _join(conf.env.DATADIR,conf.env.MSPATH) - conf.env.MSCONF = _join(conf.env.SYSCONFDIR,conf.env.MSPATH) - conf.env.MSLOGDIR = _join(conf.env.LOCALSTATEDIR,"log",conf.env.MSPATH) - conf.env.MSMNTDIR = _join(conf.env.SHAREDSTATEDIR,conf.env.PACKAGE,"mnt") - conf.check_tool('compiler_cc') - conf.check_cc(lib='dl') - conf.check_tool('usermgmt') - conf.check_message_1('Determining management server user name') - msuser = getattr(Options.options, 'MSUSER', '') - if msuser: - conf.env.MSUSER = msuser - conf.check_message_2("%s (forced through --tomcat-user)"%conf.env.MSUSER,"GREEN") - else: - conf.env.MSUSER = conf.env.PACKAGE - conf.check_message_2("%s (Linux default)"%conf.env.MSUSER,"GREEN") - conf.check_tool("javadir") - conf.env.PREMIUMJAVADIR = _join(conf.env.JAVADIR,"%s-premium"%conf.env.PACKAGE) - conf.env.PLUGINJAVADIR = _join(conf.env.JAVADIR,"%s-plugins"%conf.env.PACKAGE) - conf.env.SYSTEMJAVADIR = "/usr/share/java" - -in_javadir = lambda name: _join(conf.env.JAVADIR,_basename(name)) # $PREFIX/share/java -in_system_javadir = lambda name: _join(conf.env.SYSTEMJAVADIR,name) # /usr/share/java -in_premiumjavadir = lambda name: _join(conf.env.PREMIUMJAVADIR,name) # $PREFIX/share/java/cloud-premium - -conf.env.COMMONLIBDIR = Utils.subst_vars(_join("${LIBDIR}","${COMMONPATH}"),conf.env) - -conf.env.AGENTLIBDIR = Utils.subst_vars(_join("${LIBDIR}","${AGENTPATH}"),conf.env) -conf.env.AGENTSYSCONFDIR = Utils.subst_vars(_join("${SYSCONFDIR}","${AGENTPATH}"),conf.env) -conf.env.AGENTLOGDIR = Utils.subst_vars(_join("${LOCALSTATEDIR}","log","${AGENTPATH}"),conf.env) - -conf.env.USAGELOGDIR = Utils.subst_vars(_join("${LOCALSTATEDIR}","log","${USAGEPATH}"),conf.env) -conf.env.USAGESYSCONFDIR = Utils.subst_vars(_join("${SYSCONFDIR}","${USAGEPATH}"),conf.env) - -conf.env.CPLIBDIR = Utils.subst_vars(_join("${LIBDIR}","${CPPATH}"),conf.env) -conf.env.CPSYSCONFDIR = Utils.subst_vars(_join("${SYSCONFDIR}","${CPPATH}"),conf.env) -conf.env.CPLOGDIR = Utils.subst_vars(_join("${LOCALSTATEDIR}","log","${CPPATH}"),conf.env) - -conf.env.MSLOG = _join(conf.env.MSLOGDIR,"management-server.log") -conf.env.AWSAPILOG = _join(conf.env.MSLOGDIR,"awsapi.log") -conf.env.APISERVERLOG = _join(conf.env.MSLOGDIR,"api-server.log") -conf.env.AGENTLOG = _join(conf.env.AGENTLOGDIR,"agent.log") -conf.env.USAGELOG = _join(conf.env.USAGELOGDIR,"usage.log") -conf.env.CPLOG = _join(conf.env.CPLOGDIR,"console-proxy.log") - -conf.env.SETUPDATADIR = Utils.subst_vars(_join("${DATADIR}","${SETUPPATH}"),conf.env) - -conf.env.SERVERSYSCONFDIR = Utils.subst_vars(_join("${SYSCONFDIR}","${SERVERPATH}"),conf.env) -conf.env.PIDDIR = _join(conf.env.LOCALSTATEDIR,"run") -conf.env.LOCKDIR = _join(conf.env.LOCALSTATEDIR,"lock","subsys") - - -conf.check_message_1('Building classpaths') - -# == Here we build the run-time classpaths == - -# The system classpath points to JARs we expect the user has installed using distro packages -# not used for Windows and Mac (except for servlet-api.jar) because we install them from the thirdparty/ directory -sysjars = list(systemjars['common']) -if conf.env.DISTRO in systemjars.keys(): sysjars = sysjars + list(systemjars[conf.env.DISTRO]) -conf.env.SYSTEMJARS = " ".join(sysjars) # used by build-classpath in the initscripts -conf.env.SYSTEMCLASSPATH = pathsep.join([ in_system_javadir(x) for x in sysjars ]) # used for compile, waf run and simulate_agent - -# the deps classpath points to JARs that are installed in the cloud-deps package -# these will install on Tomcat6's lib/ directory on Windows and Mac -depsclasspath = [ in_javadir(_basename(x)) for x in _glob(_join(conf.srcdir,"deps","*.jar")) ] -conf.env.DEPSCLASSPATH = pathsep.join(depsclasspath) - -# the MS classpath points to JARs required to run the management server -msclasspath = [ in_javadir("%s-%s.jar"%(conf.env.PACKAGE,x)) for x in "utils api core server server-extras core-extras vmware-base ovm dp-user-concentrated-pod dp-user-dispersing host-allocator-random plugin-f5 plugin-netscaler plugin-ovs plugin-srx storage-allocator-random user-authenticator-ldap user-authenticator-md5 user-authenticator-plaintext vmware plugin-hypervisor-xen plugin-nicira-nvp plugin-elb plugin-netapp plugin-bigswitch-vns".split() ] -conf.env.MSCLASSPATH = pathsep.join(msclasspath) - -# the agent and simulator classpaths point to JARs required to run these two applications -agentclasspath = [ in_javadir("%s-%s.jar"%(conf.env.PACKAGE,x)) for x in "utils api core server server-extras agent console-common console-proxy core-extras agent-extras plugin-hypervisor-kvm".split() ] -agentclasspath.append(in_javadir("jna.jar")) -conf.env.AGENTCLASSPATH = pathsep.join(agentclasspath) -conf.env.AGENTSIMULATORCLASSPATH = pathsep.join(agentclasspath+[in_javadir("%s-agent-simulator.jar"%conf.env.PACKAGE)]) - -usageclasspath = [ in_javadir("%s-%s.jar"%(conf.env.PACKAGE,x)) for x in "utils api core server server-extras usage core-extras".split() ] -conf.env.USAGECLASSPATH = pathsep.join(usageclasspath) - -# the premium classpath was ELIMINATED -# CloudStack now detects the premium classpath at runtime by iterating through the JAR files in @PREMIUMJAVADIR@ -# premium JARs will install on Tomcat6's lib/ directory on Windows and Mac - -# The compile path is composed of the -# 1. source directories (without including the JARs) -# JARs are not included because in case of parallel compilation (IOW, all the time), javac picks up half-written JARs and die -compilecp = []# list(srcdirs) -# 2.b) the deps/ directory in the source if on Linux -# 2.a) the thirdparty/ directory if available -if conf.env.DISTRO in ["Windows","Mac"]: - pass -else: - compilecp+= _glob(_join("deps","*.jar")) -compilecp+= _glob(_join("cloudstack-proprietary","thirdparty","*.jar")) -# 3. the system classpath (system-installed JARs) -compilecp+= [ conf.env.SYSTEMCLASSPATH ] -compilecp+= _glob(_join(conf.env.TOMCATHOME,'bin',"*.jar")) -compilecp+= _glob(_join(conf.env.TOMCATHOME,'lib',"*.jar")) -conf.env.CLASSPATH = pathsep.join(compilecp) -conf.check_message_2('Done','GREEN') - -# log4j config and property config files require backslash escapes on Windows - -conf.env.COMMONLIBDIR = Utils.subst_vars(_join("${LIBDIR}","${COMMONPATH}"),conf.env) - -conf.env.AGENTLIBDIR = Utils.subst_vars(_join("${LIBDIR}","${AGENTPATH}"),conf.env) -conf.env.AGENTSYSCONFDIR = Utils.subst_vars(_join("${SYSCONFDIR}","${AGENTPATH}"),conf.env) -conf.env.AGENTLOGDIR = Utils.subst_vars(_join("${LOCALSTATEDIR}","log","${AGENTPATH}"),conf.env) - -conf.env.USAGELOGDIR = Utils.subst_vars(_join("${LOCALSTATEDIR}","log","${USAGEPATH}"),conf.env) -conf.env.USAGESYSCONFDIR = Utils.subst_vars(_join("${SYSCONFDIR}","${USAGEPATH}"),conf.env) - -conf.env.CPLIBDIR = Utils.subst_vars(_join("${LIBDIR}","${CPPATH}"),conf.env) -conf.env.CPSYSCONFDIR = Utils.subst_vars(_join("${SYSCONFDIR}","${CPPATH}"),conf.env) -conf.env.CPLOGDIR = Utils.subst_vars(_join("${LOCALSTATEDIR}","log","${CPPATH}"),conf.env) - -conf.env.CLIPATH = _join(conf.env.PACKAGE,"cli") - -conf.env.IPALLOCATORLIBDIR = Utils.subst_vars(_join("${LIBDIR}","${IPALLOCATORPATH}"),conf.env) -conf.env.IPALLOCATORSYSCONFDIR = Utils.subst_vars(_join("${SYSCONFDIR}","${IPALLOCATORPATH}"),conf.env) -conf.env.IPALLOCATORLOGDIR = Utils.subst_vars(_join("${LOCALSTATEDIR}","log","${IPALLOCATORPATH}"),conf.env) - -conf.env.MSLOG = _join(conf.env.MSLOGDIR,"management-server.log") -conf.env.APISERVERLOG = _join(conf.env.MSLOGDIR,"api-server.log") -conf.env.AGENTLOG = _join(conf.env.AGENTLOGDIR,"agent.log") -conf.env.USAGELOG = _join(conf.env.USAGELOGDIR,"usage.log") -conf.env.CPLOG = _join(conf.env.CPLOGDIR,"console-proxy.log") -conf.env.IPALOCATORLOG = _join(conf.env.IPALLOCATORLOGDIR,"ipallocator.log") - -conf.env.SETUPDATADIR = Utils.subst_vars(_join("${DATADIR}","${SETUPPATH}"),conf.env) - -conf.env.CLIDIR = Utils.subst_vars(_join("${SYSCONFDIR}","${CLIPATH}"),conf.env) - -conf.env.SERVERSYSCONFDIR = Utils.subst_vars(_join("${SYSCONFDIR}","${SERVERPATH}"),conf.env) - -if conf.env.DISTRO in ["Windows"]: - for log in "MSLOG APISERVERLOG AGENTLIBDIR USAGELOG AGENTLOG".split(): conf.env[log] = conf.env[log].replace("\\","\\\\") - -no_java_class = lambda x: conf.check_java_class(x,with_classpath=conf.env.CLASSPATH) != 0 -def require_dependency(javacls,packagenames): - if no_java_class(javacls): - conf.fatal("Cannot find the Java class %s (available in the distro packages: %s)"%( - javacls, ", ".join(packagenames))) -def check_dependencies(deps): - for d in deps: - cls,pkgs = d[0],d[1:] - require_dependency(cls,pkgs) - -if not getattr(Options.options, 'NODEPCHECK', ''): check_dependencies(hard_deps) - -Utils.pprint("WHITE","Configure finished. Use 'python waf showconfig' to show the configure-time environment.")