Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OaaS/HeuristicLab.Services.Hive.Scaler/AutoscalingServiceModel.xsd @ 13508

Last change on this file since 13508 was 9508, checked in by fschoepp, 11 years ago

#1888:
HL:

  • Web projects requires different users to interact with hive. The singleton HiveServiceLocator.Instance doesn't allow different users at the same time, resulting in serialization during access of HiveClient methods.

The following changes have been introduced in favor of a parallel use of the HL libs:

  • HiveClient, TaskDownloader and ConcurrentTaskDownloader may now use a different IHiveServiceLocator than HiveServiceLocator.Instance (all methods have appropriate overloads now).
  • The default instance is still HiveServiceLocator.Instance.

Automated Scaling of Instances:

  • Added Scaler project to solution which represents a WorkerRole that scales the slave instances based on the global cpu utilization of all slaves.
  • Scaler is based on WASABi, rules can be adjusted in rulesstore.xml. Basic rule is: if < 45% global cpu utilization => remove an instance; if > 65% cpu => add an instance. Minimum boundary is 1 and maximum boundary is 8 slave instances.
  • Adjusted Slave project to automatically register itself to a SlaveGroup during WebRole startup (can be adjusted in service configuration).

Web-Frontend:

  • Added basic error messages to the dialogs when an ajax call fails.
  • Removed Styling.js from scripts.
File size: 11.0 KB
RevLine 
[9508]1<?xml version="1.0" encoding="utf-8"?>
2<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3           xmlns="http://schemas.microsoft.com/practices/2011/entlib/autoscaling/serviceModel"
4           xmlns:sm="http://schemas.microsoft.com/practices/2011/entlib/autoscaling/serviceModel"
5           targetNamespace="http://schemas.microsoft.com/practices/2011/entlib/autoscaling/serviceModel"
6           elementFormDefault="qualified"
7           attributeFormDefault="unqualified">
8
9  <xs:element name="serviceModel" type="ServiceModelType">
10    <xs:unique name="SubscriptionsUnique">
11      <xs:selector xpath="sm:subscriptions/sm:subscription"/>
12      <xs:field xpath="@subscriptionId"/>
13    </xs:unique>
14
15    <xs:key name="RolesKey">
16      <xs:selector xpath="sm:subscriptions/sm:subscription/sm:services/sm:service/sm:roles/sm:role"/>
17      <xs:field xpath="@alias"/>
18    </xs:key>
19    <xs:key name="StorageAccountsKey">
20      <xs:selector xpath="sm:subscriptions/sm:subscription/sm:storageAccounts/sm:storageAccount"/>
21      <xs:field xpath="@alias"/>
22    </xs:key>
23    <xs:key name="ScaleGroupsKey">
24      <xs:selector xpath="sm:scaleGroups/sm:scaleGroup"/>
25      <xs:field xpath="@name"/>
26    </xs:key>
27    <xs:keyref name="ScaleGroupRoleKeyRef" refer="sm:RolesKey">
28      <xs:selector xpath="sm:scaleGroups/sm:scaleGroup/sm:roles/sm:role"/>
29      <xs:field xpath="@roleAlias"/>
30    </xs:keyref>
31
32    <xs:keyref name="StabilizerRolesKey" refer="sm:RolesKey">
33      <xs:selector xpath="sm:stabilizer/sm:role"/>
34      <xs:field xpath="@roleAlias"/>
35    </xs:keyref>
36    <xs:keyref name="StabilizerGroupsKeyRef" refer="sm:ScaleGroupsKey">
37      <xs:selector xpath="sm:stabilizer/sm:group"/>
38      <xs:field xpath="@groupName"/>
39    </xs:keyref>
40  </xs:element>
41
42  <xs:complexType name="ServiceModelType">
43    <xs:all>
44      <xs:element name="stabilizer" type="StabilizerRoleType" minOccurs="0" maxOccurs="1">
45        <xs:unique name="StabilizerRoleUnique">
46          <xs:selector xpath="sm:role"/>
47          <xs:field xpath="@roleAlias"/>
48        </xs:unique>
49        <xs:unique name="StabilizerScaleGroupUnique">
50          <xs:selector xpath="sm:group"/>
51          <xs:field xpath="@groupName"/>
52        </xs:unique>
53      </xs:element>
54      <xs:element name="subscriptions" minOccurs="0" maxOccurs="1">
55        <xs:complexType>
56          <xs:sequence>
57            <xs:element name="subscription" type="SubscriptionType" minOccurs="0" maxOccurs="unbounded">
58              <xs:unique name="ServicesUnique">
59                <xs:selector xpath="sm:services/sm:service"/>
60                <xs:field xpath="@name"/>
61                <xs:field xpath="@slot"/>
62              </xs:unique>
63            </xs:element>
64          </xs:sequence>
65        </xs:complexType>
66      </xs:element>
67      <xs:element name="scaleGroups" minOccurs="0" maxOccurs="1">
68        <xs:complexType>
69          <xs:sequence>
70            <xs:element name="scaleGroup" type="ScaleGroupType" minOccurs="0" maxOccurs="unbounded">
71              <xs:unique name="RolesUnique">
72                <xs:selector xpath="sm:roles/sm:role"/>
73                <xs:field xpath="@roleAlias"/>
74              </xs:unique>
75            </xs:element>
76          </xs:sequence>
77        </xs:complexType>
78      </xs:element>
79    </xs:all>
80  </xs:complexType>
81
82  <xs:complexType name="SubscriptionType">
83    <xs:all>
84      <xs:element name="services" minOccurs="0" maxOccurs="1">
85        <xs:complexType>
86          <xs:sequence>
87            <xs:element name="service" type="ServiceType" minOccurs="0" maxOccurs="unbounded"/>
88          </xs:sequence>
89        </xs:complexType>
90      </xs:element>
91      <xs:element name="storageAccounts" minOccurs="0" maxOccurs="1">
92        <xs:complexType>
93          <xs:sequence>
94            <xs:element name="storageAccount" type="StorageAccountType" minOccurs="0" maxOccurs="unbounded">
95              <xs:unique name="QueuesUnique">
96                <xs:selector xpath="sm:queues/sm:queue"/>
97                <xs:field xpath="@queueName"/>
98              </xs:unique>
99            </xs:element>
100          </xs:sequence>
101        </xs:complexType>
102      </xs:element>
103    </xs:all>
104
105    <xs:attribute name="name" type="NameType" use="required"/>
106    <xs:attribute name="subscriptionId" type="GuidType" use="required"/>
107    <xs:attribute name="certificateThumbprint" type="CertificateThumbprintType" use="required"/>
108    <xs:attribute name="certificateStoreName" type="CertificateStoreNameType" use="required"/>
109    <xs:attribute name="certificateStoreLocation" type="CertificateStoreLocationType" use="required"/>
110  </xs:complexType>
111
112  <xs:complexType name="ServiceType">
113    <xs:all>
114      <xs:element name="roles" minOccurs="0" maxOccurs="1">
115        <xs:complexType>
116          <xs:sequence>
117            <xs:element name="role" type="RoleType" minOccurs="0" maxOccurs="unbounded"/>
118          </xs:sequence>
119        </xs:complexType>
120      </xs:element>
121    </xs:all>
122
123    <xs:attribute name="dnsPrefix" type="ServiceDnsPrefixType" use="required"/>
124    <xs:attribute name="slot" type="DeploymentSlotType" use="required"/>
125    <xs:attribute name="scalingMode" type="ScalingModeType" use="optional"/>
126    <xs:attribute name="notificationRecipients" type="EmailListType" use="optional"/>
127  </xs:complexType>
128
129  <xs:complexType name="RoleType">
130    <xs:attribute name="alias" type="NameType" use="required"/>
131    <xs:attribute name="roleName" type="NamedElementNameString" use="required"/>
132    <xs:attribute name="wadStorageAccountName" type="NameType" use="required"/>
133  </xs:complexType>
134
135  <xs:complexType name="StorageAccountType">
136    <xs:all>
137      <xs:element name="queues" minOccurs="0" maxOccurs="1">
138        <xs:complexType>
139          <xs:sequence>
140            <xs:element name="queue" type="QueueType" minOccurs="0" maxOccurs="unbounded"/>
141          </xs:sequence>
142        </xs:complexType>
143      </xs:element>
144    </xs:all>
145    <xs:attribute name="alias" type="NameType" use="required"/>
146    <xs:attribute name="connectionString" type="xs:string" use="required"/>
147  </xs:complexType>
148
149  <xs:complexType name="QueueType">
150    <xs:attribute name="alias" type="NameType" use="required"/>
151    <xs:attribute name="queueName" type="NameType" use="required"/>
152  </xs:complexType>
153
154  <xs:complexType name="ScaleGroupType">
155    <xs:all>
156      <xs:element name="roles" minOccurs="0" maxOccurs="1">
157        <xs:complexType>
158          <xs:sequence>
159            <xs:element name="role" type="ScaleGroupRoleType" minOccurs="0" maxOccurs="unbounded"/>
160          </xs:sequence>
161        </xs:complexType>
162      </xs:element>
163    </xs:all>
164    <xs:attribute name="name" type="NameType" use="required"/>
165  </xs:complexType>
166
167  <xs:complexType name="ScaleGroupRoleType">
168    <xs:attribute name="roleAlias" type="NameType" use="required"/>
169    <xs:attribute name="ratio" type="xs:positiveInteger" use="required"/>
170  </xs:complexType>
171
172  <xs:complexType name="StabilizerRoleType">
173    <xs:sequence minOccurs="0" maxOccurs="unbounded">
174      <xs:choice>
175        <xs:element name="role" minOccurs="0" maxOccurs="unbounded">
176          <xs:complexType>
177            <xs:attribute name="roleAlias" type="NameType" use="required"/>
178            <xs:attributeGroup ref="StabilizerSettingsAttributeGroup"/>
179          </xs:complexType>
180        </xs:element>
181        <xs:element name="group" minOccurs="0" maxOccurs="unbounded">
182          <xs:complexType>
183            <xs:attribute name="groupName" type="NameType" use="required"/>
184            <xs:attributeGroup ref="StabilizerSettingsAttributeGroup"/>
185          </xs:complexType>
186        </xs:element>
187      </xs:choice>
188    </xs:sequence>
189    <xs:attributeGroup ref="StabilizerSettingsAttributeGroup"/>
190    <xs:attribute name="notificationsCooldown" type="TimeSpanType" use="optional"/>
191  </xs:complexType>
192
193  <xs:attributeGroup name="StabilizerSettingsAttributeGroup">
194    <xs:attribute name="scaleUpCooldown" type="TimeSpanType" use="optional"/>
195    <xs:attribute name="scaleDownCooldown" type="TimeSpanType" use="optional"/>
196    <xs:attribute name="scaleUpOnlyInFirstMinutesOfHour" type="CostOptimizationMinutes" use="optional"/>
197    <xs:attribute name="scaleDownOnlyInLastMinutesOfHour" type="CostOptimizationMinutes" use="optional"/>
198  </xs:attributeGroup>
199
200  <xs:simpleType name="CostOptimizationMinutes">
201    <xs:restriction base="xs:nonNegativeInteger">
202      <xs:minInclusive value="0"/>
203      <xs:maxInclusive value="60"/>
204      <xs:pattern value="(\d*[123456789]\d+|0*)"/>
205    </xs:restriction>
206  </xs:simpleType>
207
208  <xs:simpleType name="NameType">
209    <xs:restriction base="xs:string"/>
210  </xs:simpleType>
211
212  <xs:simpleType name="GuidType">
213    <xs:restriction base="xs:string">
214      <xs:pattern value="([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})|(\{[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\})"/>
215    </xs:restriction>
216  </xs:simpleType>
217
218  <xs:simpleType name="CertificateThumbprintType">
219    <xs:restriction base="xs:string">
220      <xs:pattern value="[0-9a-fA-F]{40}"/>
221    </xs:restriction>
222  </xs:simpleType>
223
224  <xs:simpleType name="CertificateStoreNameType">
225    <xs:restriction base="xs:string">
226      <xs:enumeration value="AddressBook"/>
227      <xs:enumeration value="AuthRoot"/>
228      <xs:enumeration value="CertificateAuthority"/>
229      <xs:enumeration value="Disallowed"/>
230      <xs:enumeration value="My"/>
231      <xs:enumeration value="Root"/>
232      <xs:enumeration value="TrustedPeople"/>
233      <xs:enumeration value="TrustedPublisher"/>
234    </xs:restriction>
235  </xs:simpleType>
236
237  <xs:simpleType name="CertificateStoreLocationType">
238    <xs:restriction base="xs:string">
239      <xs:enumeration value="CurrentUser"/>
240      <xs:enumeration value="LocalMachine"/>
241    </xs:restriction>
242  </xs:simpleType>
243
244  <xs:simpleType name="ServiceDnsPrefixType">
245    <xs:restriction base="xs:NMTOKEN"/>
246  </xs:simpleType>
247
248  <xs:simpleType name="DeploymentSlotType">
249    <xs:restriction base="xs:string">
250      <xs:enumeration value="Staging"/>
251      <xs:enumeration value="Production"/>
252    </xs:restriction>
253  </xs:simpleType>
254
255  <xs:simpleType name="ScalingModeType">
256    <xs:restriction base="xs:string">
257      <xs:enumeration value="Scale"/>
258      <xs:enumeration value="Notify"/>
259      <xs:enumeration value="ScaleAndNotify"/>
260    </xs:restriction>
261  </xs:simpleType>
262
263  <xs:simpleType name="EmailListType">
264    <xs:restriction base="xs:string"/>
265  </xs:simpleType>
266
267  <xs:simpleType name="TimeSpanType">
268    <xs:restriction base="xs:string">
269      <xs:pattern value="([123456789]\d*\.)?([01]\d|2[0123]):([012345]\d):([012345]\d)"/>
270    </xs:restriction>
271  </xs:simpleType>
272
273  <!-- Copied from the service definition schema -->
274  <xs:simpleType name="NamedElementNameString">
275    <xs:restriction base="xs:string">
276      <xs:pattern value="^[a-zA-Z_][^\\\/\:\*\?\&quot;\&lt;\&gt;\|\`\'\^]*(?&lt;![\.\s])$" />
277    </xs:restriction>
278  </xs:simpleType>
279
280</xs:schema>
Note: See TracBrowser for help on using the repository browser.