initializeCluster.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  1. <?php require_once "./head.inc"; ?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one
  4. or more contributor license agreements. See the NOTICE file
  5. distributed with this work for additional information
  6. regarding copyright ownership. The ASF licenses this file
  7. to you under the Apache License, Version 2.0 (the
  8. "License"); you may not use this file except in compliance
  9. with the License. You may obtain a copy of the License at
  10. http://www.apache.org/licenses/LICENSE-2.0
  11. Unless required by applicable law or agreed to in writing,
  12. software distributed under the License is distributed on an
  13. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. KIND, either express or implied. See the License for the
  15. specific language governing permissions and limitations
  16. under the License.
  17. -->
  18. <html>
  19. <head>
  20. <?php require "./head.htmli" ?>
  21. <script src="../js/ext/jquery.min.js"></script>
  22. <script src="../js/ext/bootstrap.min.js"></script>
  23. </head>
  24. <body class="yui3-skin-sam">
  25. <?php require "./topnav.htmli"; ?>
  26. <div id="ContentDivId">
  27. <!-- List of clusters
  28. <div name="clustersListDiv" id="clustersListDivId">
  29. </div>
  30. -->
  31. <!-- Installation Wizard -->
  32. <div name="installationWizardDiv" id="installationWizardDivId" style="display:block">
  33. <div name="installationWizardProgressBarDiv" id="installationWizardProgressBarDivId">
  34. <ol id="installationWizardProgressBarListId">
  35. <li id="createClusterStageId" class="installationWizardFirstStage installationWizardCurrentStage">
  36. <div>
  37. <span class="installationWizardStageNumber">
  38. 1
  39. </span>
  40. Create Cluster
  41. </div>
  42. </li>
  43. <li id="addNodesStageId" class="installationWizardUnvisitedStage">
  44. <div>
  45. <span class="installationWizardStageNumber">
  46. 2
  47. </span>
  48. Add Nodes
  49. </div>
  50. </li>
  51. <li id="selectServicesStageId" class="installationWizardUnvisitedStage">
  52. <div>
  53. <span class="installationWizardStageNumber">
  54. 3
  55. </span>
  56. Select Services
  57. </div>
  58. </li>
  59. <li id="assignHostsStageId" class="installationWizardUnvisitedStage">
  60. <div>
  61. <span class="installationWizardStageNumber">
  62. 4
  63. </span>
  64. Assign Hosts
  65. </div>
  66. </li>
  67. <li id="configureClusterStageId" class="installationWizardUnvisitedStage">
  68. <div>
  69. <span class="installationWizardStageNumber">
  70. 5
  71. </span>
  72. Select Mount Points
  73. </div>
  74. </li>
  75. <li id="configureClusterAdvancedStageId" class="installationWizardUnvisitedStage">
  76. <div>
  77. <span class="installationWizardStageNumber">
  78. 6
  79. </span>
  80. Custom Config
  81. </div>
  82. </li>
  83. <li id="deployClusterStageId" class="installationWizardLastStage installationWizardUnvisitedStage">
  84. <div>
  85. <span class="installationWizardStageNumber">
  86. 7
  87. </span>
  88. Review &amp; Deploy
  89. </div>
  90. </li>
  91. </ol>
  92. </div>
  93. <?php require "./utils.htmli"; ?>
  94. <div id="installationMainFormsDivId">
  95. <div id="createClusterCoreDivId">
  96. <div class="pageSummary">
  97. <h2><?php echo $RES['initWizard.createCluster.pageSummary.header'] ?></h2>
  98. <p><?php echo $RES['initWizard.createCluster.pageSummary.body'] ?></p>
  99. </div>
  100. <div id="formStatusDivId" class="formStatusBar" style="display:none">
  101. </div>
  102. <div class="pageContent">
  103. <form id="createClusterFormId">
  104. <label for="clusterNameId"><?php echo $RES['initWizard.createCluster.clusterName.label'] ?></label>
  105. <input type="text" name="clusterName" id="clusterNameId" placeholder="cluster name" value="">
  106. </form>
  107. <a href="javascript:void 0" class="btn btn-large" id="createClusterSubmitButtonId"><?php echo $RES['initWizard.createCluster.submit.label'] ?></a>
  108. </div>
  109. </div>
  110. <div id="addNodesCoreDivId" style="display:none">
  111. <div class="pageSummary">
  112. <h2><?php echo $RES['initWizard.addNodes.pageSummary.header'] ?></h2>
  113. <?php echo $RES['initWizard.addNodes.pageSummary.body'] ?>
  114. </div>
  115. <div id="formStatusDivId" class="alert alert-error" style="display:none">
  116. </div>
  117. <div class="pageContent">
  118. <form id="addNodesFilesFormId" enctype="multipart/form-data" method="post">
  119. <input type="hidden" name="ClusterDeployUser" id="clusterDeployUserId" value="root" placeholder="">
  120. <label for="clusterDeployUserIdentityFileId"><?php echo $RES['common.sshPrivateKeyFile.label'] ?></label>
  121. <input type="file" name="clusterDeployUserIdentityFile" id="clusterDeployUserIdentityFileId" value="" placeholder="">
  122. <div class="separator"></div>
  123. <label for="clusterHostsFileId"><?php echo $RES['common.hostsFile.label'] ?></label>
  124. <input type="file" name="clusterHostsFile" id="clusterHostsFileId" value="" placeholder="">
  125. <div class="separator"></div>
  126. <div id="yumMirrorSupportFormId">
  127. <div id="yumMirrorSupportFormButtonWrapperId">
  128. <label class="checkbox" for="yumMirrorSupportFormButtonId"><?php echo $RES['initWizard.addNodes.useLocalYum.label'] ?>
  129. <input type="checkbox" name="YumMirrorSupportFormButton" id="yumMirrorSupportFormButtonId" value="" placeholder="">
  130. </label>
  131. </div>
  132. <div id="yumMirrorSupportFormFieldsId" style="display:none">
  133. <label for="yumRepoFilePathId"><?php echo $RES['initWizard.addNodes.yumRepoFilePath.label'] ?></label>
  134. <input type="text" name="YumRepoFilePath" id="yumRepoFilePathId" value="" placeholder="">
  135. </div>
  136. </div>
  137. <div id="fileUploadWrapperDivId">
  138. <iframe name="fileUploadTarget" id="fileUploadTargetId" src="about:blank" style="display:none"></iframe>
  139. </div>
  140. </form>
  141. <div class="separator"></div>
  142. <a href="javascript:void 0" class="btn btn-large" id="addNodesSubmitButtonId"><?php echo $RES['initWizard.addNodes.submit.label'] ?></a>
  143. </div>
  144. </div>
  145. <div name="selectServicesCoreDiv" id="selectServicesCoreDivId" style="display:none">
  146. <fieldset>
  147. <div class="pageSummary">
  148. <h2><?php echo $RES['initWizard.selectServices.pageSummary.header'] ?></h2>
  149. <p><?php echo $RES['initWizard.selectServices.pageSummary.body'] ?></p>
  150. </div>
  151. <div style="width:400px;height:40px;float:right;">
  152. <div id="formStatusDivId" class="formStatusBar" style="display:none">
  153. </div>
  154. </div>
  155. <div class="pageContent" style="margin-top:14px">
  156. <div id="selectCoreServicesListId">
  157. <ul id="selectCoreServicesListUlId">
  158. <div id="selectCoreServicesDynamicRenderDivId">
  159. </div>
  160. </ul>
  161. </div>
  162. <div id="selectOptionalServicesListId">
  163. <ul id="selectOptionalServicesListUlId">
  164. <div id="selectOptionalServicesDynamicRenderDivId">
  165. </div>
  166. </ul>
  167. </div>
  168. <div id="selectNonSelectableServicesListId">
  169. <ul id="selectNonSelectableServicesListUlId">
  170. <div id="selectNonSelectableServicesDynamicRenderDivId">
  171. </div>
  172. </ul>
  173. </div>
  174. </div>
  175. </fieldset>
  176. <a href="javascript:void 0" class="btn btn-large" style="margin:10px 0 0 60px" id="selectServicesSubmitButtonId" class="submitButton"><?php echo $RES['initWizard.selectServices.submit.label'] ?></a>
  177. </div>
  178. <!-- End of selectServicesCoreDivId -->
  179. <div name="assignHostsCoreDiv" id="assignHostsCoreDivId" style="display:none">
  180. <div id="statusDivId">
  181. </div>
  182. <div class="pageSummary">
  183. <h2><?php echo $RES['initWizard.assignMasters.pageSummary.header'] ?></h2>
  184. <p><?php echo $RES['initWizard.assignMasters.pageSummary.body'] ?></p>
  185. </div>
  186. <div id="formStatusDivId" class="formStatusBar" style="display:none">
  187. </div>
  188. <div id="masterServices">
  189. <div id="masterServicesToHostsContainer">
  190. <div id="masterServicesToHosts"></div>
  191. <a href="javascript:void 0" class="btn btn-large" id="selectServiceMastersSubmitButtonId"><?php echo $RES['initWizard.assignMasters.submit.label'] ?></a>
  192. </div>
  193. <div id="hostsToMasterServices"></div>
  194. </div>
  195. <div style="clear:both"></div>
  196. </div>
  197. <div name="configureClusterCoreDiv" id="configureClusterCoreDivId" style="display:none">
  198. <div class="pageSummary">
  199. <h2><?php echo $RES['initWizard.configureCluster.pageSummary.header'] ?></h2>
  200. <p><?php echo $RES['initWizard.configureCluster.pageSummary.body'] ?></p>
  201. </div>
  202. <div id="formStatusDivId" class="formStatusBar" style="display:none">
  203. </div>
  204. <div id="configureClusterInputContainerDivId">
  205. <form id="configureClusterFormId">
  206. <div name="configureClusterInputDiv" id="configureClusterInputDivId">
  207. <fieldset id="configureClusterInputFieldSetId">
  208. <!--<legend>Select mount points</legend>-->
  209. <div name="configureClusterMountPointsInputDiv" id="configureClusterMountPointsInputDivId">
  210. <div id="configureClusterMountPointsDynamicRenderDivId"></div>
  211. <p>
  212. <label for="customMountPoints"><?php echo $RES['initWizard.configureCluster.customMountPoints.label'] ?></label>
  213. <input type="text" name="customMountPoints" id="customMountPointsId" value="" placeholder="Comma-Separated List">
  214. </p>
  215. </div>
  216. <!-- Additional <div>s for other categories of cluster configuration go here -->
  217. </fieldset>
  218. </div>
  219. <a id="previewLinkId" href="javascript:void 0"><?php echo $RES['initWizard.configureCluster.preview.label'] ?></a>
  220. </form>
  221. <a href="javascript:void 0" class="btn btn-large" id="configureClusterSubmitButtonId"><?php echo $RES['initWizard.configureCluster.submit.label'] ?></a>
  222. </div>
  223. <div id="configureClusterDisplayDivId" style="display:none">
  224. <fieldset>
  225. <!--<legend>Effective mount points</legend>-->
  226. <div name="configureClusterMountPointsDisplayDiv" id="configureClusterMountPointsDisplayDivId">
  227. </div>
  228. </fieldset>
  229. </div>
  230. </div>
  231. <div id="configureClusterAdvancedCoreDivId" style="display:none">
  232. <div class="pageSummary">
  233. <h2><?php echo $RES['initWizard.configureClusterAdvanced.pageSummary.header'] ?></h2>
  234. <p><?php echo $RES['initWizard.configureClusterAdvanced.pageSummary.body'] ?></p>
  235. </div>
  236. <div id="formStatusDivId" class="formStatusBar" style="display:none">
  237. </div>
  238. <form id="configureClusterAdvancedFormId">
  239. <fieldset id="configureClusterAdvancedFieldSetId">
  240. <!--<legend>Advanced configuration</legend>-->
  241. <div id="configureClusterAdvancedDynamicRenderDivId"></div>
  242. </fieldset>
  243. </form>
  244. <div id="buttonAreaDivId" class="clearfix">
  245. <div id="buttonGroupDivId">
  246. <?php /*
  247. <div id="backNextDivId" class="btn-group">
  248. <a href="javascript:void 0" class="btn btn-large" id="configureClusterAdvancedBackButtonId"><?php echo $RES['initWizard.configureClusterAdvanced.back.label'] ?></a>
  249. <a href="javascript:void 0" class="btn btn-large" id="configureClusterAdvancedNextButtonId"><?php echo $RES['initWizard.configureClusterAdvanced.next.label'] ?></a>
  250. </div>
  251. */ ?>
  252. <a href="javascript:void 0" class="btn btn-large" id="configureClusterAdvancedSubmitButtonId"><?php echo $RES['initWizard.configureClusterAdvanced.submit.label'] ?></a>
  253. </div>
  254. </div>
  255. </div>
  256. <div name="deployCoreDiv" id="deployCoreDivId" style="display:none">
  257. <div class="pageSummary">
  258. <h2><?php echo $RES['initWizard.reviewAndDeploy.pageSummary.header'] ?></h2>
  259. <p><?php echo $RES['initWizard.reviewAndDeploy.pageSummary.body'] ?></p>
  260. </div>
  261. <div id="formStatusDivId" class="formStatusBar" style="display:none">
  262. </div>
  263. <form id="deployFormId">
  264. <fieldset id="deployFieldSetId">
  265. <!--<legend>Review your settings</legend>-->
  266. <div id="deployDynamicRenderDivId"></div>
  267. </fieldset>
  268. </form>
  269. <label></label>
  270. <a href="javascript:void 0" class="btn btn-large" id="deploySubmitButtonId" value="Deploy"><?php echo $RES['initWizard.reviewAndDeploy.submit.label'] ?></a>
  271. </div>
  272. <?php require "./txnUtils.htmli"; ?>
  273. </div>
  274. </div>
  275. <!-- End of installation Wizard -->
  276. </div>
  277. <?php require "./footer.htmli"; ?>
  278. <!-- Javascript Scaffolding -->
  279. <script type="text/javascript">
  280. var freshInstall = true;
  281. var nodesAction = "addNodes";
  282. var InstallationWizard = {
  283. CreateCluster:
  284. {},
  285. AddNodes:
  286. {},
  287. AddNodesProgress:
  288. {},
  289. SelectServices:
  290. {},
  291. AssignMasters:
  292. {},
  293. ConfigureCluster:
  294. {},
  295. ConfigureServices:
  296. {},
  297. ReviewAndDeploy:
  298. {},
  299. DeployProgress:
  300. {}
  301. };
  302. var jsFilesToLoad = [
  303. 'js/utils.js',
  304. 'js/txnUtils.js',
  305. 'js/installationWizard.js',
  306. 'js/createCluster.js',
  307. 'js/addNodes.js',
  308. 'js/addNodesProgress.js',
  309. 'js/selectServices.js',
  310. 'js/assignMasters.js',
  311. 'js/configureCluster.js',
  312. 'js/configureServicesUtils.js',
  313. 'js/configureServices.js',
  314. 'js/reviewAndDeploy.js',
  315. 'js/deployProgress.js'
  316. ];
  317. // uncomment to allow jumping to a specified stage for development
  318. // jsFilesToLoad.push('js/test/initializeClusterTest.js');
  319. </script>
  320. <?php require "./bootstrapJs.htmli"; ?>
  321. <!-- End of Javascript Scaffolding -->
  322. </body>
  323. </html>