removing allocators to its own doc

Project: http://git-wip-us.apache.org/repos/asf/cloudstack-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-docs/commit/f38572c4
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-docs/tree/f38572c4
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-docs/diff/f38572c4

Branch: refs/heads/master
Commit: f38572c42970a20c6d0a148b8246d1fb5e929d60
Parents: 0a7eabf
Author: David Nalley <[email protected]>
Authored: Thu Oct 3 13:30:26 2013 -0400
Committer: David Nalley <[email protected]>
Committed: Thu Oct 3 13:30:26 2013 -0400

----------------------------------------------------------------------
 en-US/Allocator_Implementation_Guide.ent |  22 ----
 en-US/Allocator_Implementation_Guide.xml |  51 --------
 en-US/allocators.xml                     |  38 ------
 en-US/custom-hostallocator.xml           | 173 --------------------------
 en-US/custom-storagepoolallocator.xml    | 144 ---------------------
 5 files changed, 428 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-docs/blob/f38572c4/en-US/Allocator_Implementation_Guide.ent
----------------------------------------------------------------------
diff --git a/en-US/Allocator_Implementation_Guide.ent 
b/en-US/Allocator_Implementation_Guide.ent
deleted file mode 100644
index abb1885..0000000
--- a/en-US/Allocator_Implementation_Guide.ent
+++ /dev/null
@@ -1,22 +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.
--->
-
-<!ENTITY PRODUCT "CloudStack">
-<!ENTITY BOOKID "Technical Documentation">
-<!ENTITY YEAR "2012">
-<!ENTITY HOLDER "Apache Software Foundation">

http://git-wip-us.apache.org/repos/asf/cloudstack-docs/blob/f38572c4/en-US/Allocator_Implementation_Guide.xml
----------------------------------------------------------------------
diff --git a/en-US/Allocator_Implementation_Guide.xml 
b/en-US/Allocator_Implementation_Guide.xml
deleted file mode 100644
index da12284..0000000
--- a/en-US/Allocator_Implementation_Guide.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" 
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; [
-<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
-%BOOK_ENTITIES;
-]>
-
-<!-- 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.
--->
-
-<book>
-    <bookinfo id="allocator_implementation_guide">
-    <title>&PRODUCT; Allocator Implementation Guide</title>
-    <productname>Apache CloudStack</productname>
-    <productnumber>4.2.0</productnumber>
-    <edition>1</edition>
-    <pubsnumber></pubsnumber>
-    <abstract>
-        <para>
-            Allocator Implementation Guide for &PRODUCT;.
-        </para>
-    </abstract>
-    <corpauthor>
-        <inlinemediaobject>
-            <imageobject>
-                <imagedata fileref="Common_Content/images/title_logo.svg" 
format="SVG" />
-            </imageobject>
-        </inlinemediaobject>
-    </corpauthor>
-    <xi:include href="Common_Content/Legal_Notice.xml" 
xmlns:xi="http://www.w3.org/2001/XInclude"; />
-    <xi:include href="Author_Group.xml" 
xmlns:xi="http://www.w3.org/2001/XInclude"; />
-    </bookinfo>
-    <xi:include href="allocators.xml" 
xmlns:xi="http://www.w3.org/2001/XInclude"; />
-    <xi:include href="custom-hostallocator.xml" 
xmlns:xi="http://www.w3.org/2001/XInclude"; />
-    <xi:include href="custom-storagepoolallocator.xml" 
xmlns:xi="http://www.w3.org/2001/XInclude"; />
-</book>
-

http://git-wip-us.apache.org/repos/asf/cloudstack-docs/blob/f38572c4/en-US/allocators.xml
----------------------------------------------------------------------
diff --git a/en-US/allocators.xml b/en-US/allocators.xml
deleted file mode 100644
index 821a7cb..0000000
--- a/en-US/allocators.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" 
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; [
-<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
-%BOOK_ENTITIES;
-]>
-
-<!-- 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.
--->
-
-<section id="allocators">
-  <title>Allocators</title>
-  <para>&PRODUCT; enables administrators to write custom allocators that will 
choose the Host to place a new guest and the storage host from which to 
allocate guest virtual disk images.</para>
-  <para>These are following categories of allocators currently 
supported:</para>
-  <itemizedlist>
-    <listitem>
-      <para>HostAllocators - Allows you to create custom rules to determine 
which physical host to allocate the guest virtual machines on. </para>
-    </listitem>
-    <listitem>
-      <para>StoragePoolAllocators - Allows you to create custom rules to 
determine which storage pool to allocate the guest virtual machines on. </para>
-    </listitem>
-  </itemizedlist>
-  
-</section>

http://git-wip-us.apache.org/repos/asf/cloudstack-docs/blob/f38572c4/en-US/custom-hostallocator.xml
----------------------------------------------------------------------
diff --git a/en-US/custom-hostallocator.xml b/en-US/custom-hostallocator.xml
deleted file mode 100644
index 3e25d1f..0000000
--- a/en-US/custom-hostallocator.xml
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" 
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; [
-<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
-%BOOK_ENTITIES;
-]>
-
-<!-- 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.
--->
-
-<section id="custom-hostallocator">
-  <title>Implementing a custom HostAllocator</title>
-  <para>HostAllocators are written by extending 
com.cloud.agent.manager.allocator.HostAllocator interface.</para>
-  
-  <section>
-    <title>HostAllocator Interface</title>
-    <para>The interface defines the following two methods.</para>
-    
-    <programlisting>
-      /**
-        * Checks if the VM can be upgraded to the specified ServiceOffering
-        * @param UserVm vm
-        * @param ServiceOffering offering
-        * @return boolean true if the VM can be upgraded
-      **/
-
-      publicboolean isVirtualMachineUpgradable(final UserVm vm, final 
ServiceOffering offering);
-
-      /**
-        * Determines which physical hosts are suitable to allocate the guest 
virtual machines on
-        *
-        * @paramVirtualMachineProfile vmProfile
-        * @paramDeploymentPlan plan
-        * @paramType type
-        * @paramExcludeList avoid
-        * @paramint returnUpTo
-        * @returnList<Host>List of hosts that are suitable for VM allocation
-      **/      
-
-      publicList<Host> allocateTo( 
VirtualMachineProfile<?extendsVirtualMachine> vmProfile,  DeploymentPlan plan, 
Type type, ExcludeList avoid, intreturnUpTo);
-    </programlisting>
-    <para>A custom HostAllocator can be written by implementing the 
‘allocateTo’ method</para>
-    
-    <section>
-      <title>Input Parameters for the method ‘HostAllocator :: 
allocateTo’</title>
-      
-      <para><emphasis role="italic">com.cloud.vm.VirtualMachineProfile 
vmProfile</emphasis></para>
-      <para>VirtualMachineProfile describes one virtual machine. This allows 
the adapters like Allocators to process the information in the virtual machine 
and make determinations on what the virtual machine profile should look like 
before it is actually started on the hypervisor.</para>
-      <para>HostAllocators can make use of the following information present 
in the VirtualMachineProfile:</para>
-      <itemizedlist>
-        <listitem>
-          <para>The ServiceOffering that specifies configuration like 
requested CPU speed, RAM etc necessary for the guest VM.</para>
-        </listitem>
-        <listitem>
-          <para>The VirtualMachineTemplate, the template to be used to start 
the VM.</para>
-        </listitem>
-      </itemizedlist>
-      
-      <para><emphasis role="italic">com.cloud.deploy.DeploymentPlan 
plan</emphasis></para>
-      <para>DeploymentPlan should specify:</para>
-      <itemizedlist>
-        <listitem>
-          <para>dataCenterId: The data center the VM should deploy in</para>
-        </listitem>
-        <listitem>
-          <para>podId: The pod the Vm should deploy in; null if no 
preference</para>
-        </listitem>
-        <listitem>
-          <para>clusterId: The cluster the VM should deploy in; null if no 
preference</para>
-        </listitem>
-        <listitem>
-          <para>poolId: The storage pool the VM should be created in; null if 
no preference</para>
-        </listitem>
-      </itemizedlist>
-      
-      <para><emphasis role="italic">com.cloud.host.Host.Type  
type</emphasis></para>
-      <para>Type of the Host needed for this guest VM. Currently 
com.cloud.host.Host.Type interface defines the following Host types:</para>
-      <itemizedlist>
-        <listitem>
-          <para>Storage</para>
-        </listitem>
-        <listitem>
-          <para>Routing</para>
-        </listitem>
-        <listitem>
-          <para>SecondaryStorage</para>
-        </listitem>
-        <listitem>
-          <para>ConsoleProxy</para>
-        </listitem>
-        <listitem>
-          <para>ExternalFirewall</para>
-        </listitem>
-        <listitem>
-          <para>ExternalLoadBalancer</para>
-        </listitem>
-      </itemizedlist>
-      
-      <para><emphasis 
role="italic">com.cloud.deploy.DeploymentPlanner.ExcludeList 
avoid</emphasis></para>
-      <para>The ExcludeList specifies what datacenters, pods, clusters, hosts, 
storagePools should not be considered for allocating this guest VM. 
HostAllocators should avoid the hosts that are mentioned in 
ExcludeList.hostIds.</para>
-      <itemizedlist>
-        <listitem>
-          <para>Set<Long> dcIds;</para>
-        </listitem>
-        <listitem>
-          <para>Set<Long> podIds;</para>
-        </listitem>
-        <listitem>
-          <para>Set<Long> clusterIds;</para>
-        </listitem>
-        <listitem>
-          <para>Set<Long> hostIds;</para>
-        </listitem>
-        <listitem>
-          <para>Set<Long> poolIds;</para>
-        </listitem>
-      </itemizedlist>
-      
-      <para><emphasis role="italic">int returnUpTo</emphasis></para>
-      <para>This specifies return up to that many available hosts for this 
guest VM.</para>
-      <para>To get all possible hosts, set this value to -1.</para>
-    </section>
-    
-    <section>
-      <title>Reference HostAllocator implementation</title>
-      <para>Refer com.cloud.agent.manager.allocator.impl.FirstFitAllocator 
that implements the HostAllocator interface. This allocator checks available 
hosts in the specified datacenter, Pod, Cluster and considering the given 
ServiceOffering requirements.</para>
-      <para>If returnUpTo = 1, this allocator would return the first Host that 
fits the requirements of the guest VM.</para>
-    </section>
-    
-    <section>
-      <title>Loading a custom HostAllocator</title>
-      <orderedlist>
-        <listitem>
-          <para>Write a custom HostAllocator class, implementing the interface 
described above.</para>
-        </listitem>
-        <listitem>
-          <para>Package the code into a JAR file and make the JAR available in 
the classpath of the Management Server/tomcat.</para>
-        </listitem>
-        <listitem>
-          <para>Modify the components.xml and components-premium.xml files 
found in /client/ tomcatconf as follows.</para>
-        </listitem>
-        <listitem>
-          <para>Search for ‘HostAllocator’ in these files.</para>
-          <programlisting>
-            <adapters key="com.cloud.agent.manager.allocator.HostAllocator">
-              <adapter name="FirstFit" 
class="com.cloud.agent.manager.allocator.impl.FirstFitAllocator"/>
-            </adapters>
-          </programlisting>
-        </listitem>
-        <listitem>
-          <para>Replace the FirstFitAllocator with your class name. 
Optionally, you can change the name of the adapter as well.</para>
-        </listitem>
-        <listitem>
-          <para>Restart the Management Server.</para>
-        </listitem>
-      </orderedlist>
-    </section>
-  </section>
-</section>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack-docs/blob/f38572c4/en-US/custom-storagepoolallocator.xml
----------------------------------------------------------------------
diff --git a/en-US/custom-storagepoolallocator.xml 
b/en-US/custom-storagepoolallocator.xml
deleted file mode 100644
index cf9af79..0000000
--- a/en-US/custom-storagepoolallocator.xml
+++ /dev/null
@@ -1,144 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" 
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; [
-<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
-%BOOK_ENTITIES;
-]>
-
-<!-- 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.
--->
-
-<section id="custom-storagepoolallocator">
-  <title>Implementing a custom StoragePoolAllocator</title>
-  <para>StoragePoolAllocators are written by extending 
com.cloud.storage.allocator. StoragePoolAllocator interface.</para>
-  
-  <section>
-    <title>StoragePoolAllocator Interface</title>
-    <para>A custom StoragePoolAllocator can be written by implementing the 
‘allocateTo’ method.</para>
-    
-    <programlisting>
-      /**
-        * Determines which storage pools are suitable for the guest virtual 
machine
-        * @param DiskProfile dskCh
-        * @param VirtualMachineProfile vmProfile
-        * @param DeploymentPlan plan
-        * @param ExcludeList avoid
-        * @param int returnUpTo
-        * @return List<StoragePool> List of storage pools that are suitable 
for the VM
-      **/
-
-      public List<StoragePool> allocateToPool(DiskProfile dskCh, 
VirtualMachineProfile<? extends VirtualMachine> vm, DeploymentPlan plan, 
ExcludeList avoid, int returnUpTo);
-    </programlisting>
-    <para>This interface also contains some other methods to support some 
legacy code. However your custom allocator can extend the existing 
com.cloud.storage.allocator. AbstractStoragePoolAllocator. This class provides 
default implementation for all the other interface methods.</para>
-    
-    <section>
-      <title>Input Parameters for the method ‘StoragePoolAllocator :: 
allocateTo’</title>
-      
-      <para><emphasis role="italic">com.cloud.vm.DiskProfile 
dskCh</emphasis></para>
-      <para>DiskCharacteristics describes a disk and what functionality is 
required from it. It specifies the storage pool tags if any to be used while 
searching for a storage pool.</para>
-      
-      <para><emphasis role="italic">com.cloud.vm.VirtualMachineProfile 
vmProfile</emphasis></para>
-      <para>VirtualMachineProfile describes one virtual machine. This allows 
the adapters like Allocators to process the information in the virtual machine 
and make determinations on what the virtual machine profile should look like 
before it is actually started on the hypervisor.</para>
-      <para>StoragePoolAllocators can make use of the following information 
present in the VirtualMachineProfile:</para>
-      <itemizedlist>
-        <listitem>
-          <para>The VirtualMachine instance that specifies properties of the 
guest VM.</para>
-        </listitem>
-        <listitem>
-          <para>The VirtualMachineTemplate, the template to be used to start 
the VM.</para>
-        </listitem>
-      </itemizedlist>
-      
-      <para><emphasis role="italic">com.cloud.deploy.DeploymentPlan 
plan</emphasis></para>
-      <para>DeploymentPlan should specify:</para>
-      <itemizedlist>
-        <listitem>
-          <para>dataCenterId: The data center the VM should deploy in</para>
-        </listitem>
-        <listitem>
-          <para>podId: The pod the VM should deploy in; null if no 
preference</para>
-        </listitem>
-        <listitem>
-          <para>clusterId: The cluster the VM should deploy in; null if no 
preference</para>
-        </listitem>
-        <listitem>
-          <para>poolId: The storage pool the VM should be created in; null if 
no preference</para>
-        </listitem>
-      </itemizedlist>
-      
-      <para><emphasis 
role="italic">com.cloud.deploy.DeploymentPlanner.ExcludeList 
avoid</emphasis></para>
-      <para>The ExcludeList specifies what datacenters, pods, clusters, hosts, 
storagePools should not be considered for allocating this guest VM. 
StoragePoolAllocators should avoid the pools that are mentioned in 
ExcludeList.poolIds</para>
-      <itemizedlist>
-        <listitem>
-          <para>Set<Long> dcIds;</para>
-        </listitem>
-        <listitem>
-          <para>Set<Long> podIds;</para>
-        </listitem>
-        <listitem>
-          <para>Set<Long> clusterIds;</para>
-        </listitem>
-        <listitem>
-          <para>Set<Long> hostIds;</para>
-        </listitem>
-        <listitem>
-          <para>Set<Long> poolIds;</para>
-        </listitem>
-      </itemizedlist>
-      
-      <para><emphasis role="italic">int returnUpTo</emphasis></para>
-      <para>This specifies return up to that many available pools for this 
guest VM</para>
-      <para>To get all possible pools, set this value to -1</para>
-    </section>
-    
-    <section>
-      <title>Reference StoragePoolAllocator implementation</title>
-      
-      <para>Refer com.cloud.storage.allocator.FirstFitStoragePoolAllocator 
that implements the StoragePoolAllocator interface. This allocator checks 
available pools in the specified datacenter, Pod, Cluster and considering the 
given DiskProfile characteristics.</para>
-      <para>If returnUpTo = 1, this allocator would return the first Storage 
Pool that fits the requirements of the guest VM.</para>
-    </section>
-    
-    <section>
-      <title>Loading a custom StoragePoolAllocator</title>
-      <orderedlist>
-        <listitem>
-          <para>Write a custom StoragePoolAllocator class, implementing the 
interface described above.</para>
-        </listitem>
-        <listitem>
-          <para>Package the code into a JAR file and make the JAR available in 
the classpath of the Management Server/tomcat.</para>
-        </listitem>
-        <listitem>
-          <para>Modify the components.xml and components-premium.xml files 
found in /client/ tomcatconf as follows.</para>
-        </listitem>
-        <listitem>
-          <para>Search for ‘StoragePoolAllocator’ in these files.</para>
-          <programlisting>
-            <adapters key="com.cloud.storage.allocator.StoragePoolAllocator">
-              <adapter name="Storage" 
class="com.cloud.storage.allocator.FirstFitStoragePoolAllocator"/>
-            </adapters>
-          </programlisting>
-        </listitem>
-        <listitem>
-          <para>Replace the FirstFitStoragePoolAllocator with your class name. 
Optionally, you can change the name of the adapter as well.</para>
-        </listitem>
-        <listitem>
-          <para>Restart the Management Server.</para>
-        </listitem>
-      </orderedlist>
-    </section>
-  </section>
-</section>
\ No newline at end of file

Reply via email to