├── LICENSE ├── LICENSE-CN ├── README.md ├── README_zh.md ├── cluster-configuration ├── cluster-configuration.yaml ├── cluster-configuration.yaml.template ├── k8s-role-definition.yaml ├── kubernetes-configuration.yaml └── services-configuration.yaml ├── frameworklauncher ├── README-zh.md ├── README.md ├── bin │ ├── start.bat │ └── start.sh ├── build-internal.bat ├── build.bat ├── build.sh ├── conf │ └── frameworklauncher.yml ├── doc │ ├── USERMANUAL.md │ ├── USERMANUAL_zh.md │ ├── example │ │ ├── ExampleFramework.json │ │ └── ExampleFramework.sh │ └── img │ │ ├── Architecture.png │ │ └── Pipeline.png ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── microsoft │ │ │ └── frameworklauncher │ │ │ ├── applicationmaster │ │ │ ├── ApplicationMaster.java │ │ │ ├── Bootstrap.java │ │ │ ├── Configuration.java │ │ │ ├── FrameworkInfoPublisher.java │ │ │ ├── NMClientCallbackHandler.java │ │ │ ├── Node.java │ │ │ ├── RMClientCallbackHandler.java │ │ │ ├── RMResyncHandler.java │ │ │ ├── RequestManager.java │ │ │ ├── SelectionManager.java │ │ │ ├── SelectionResult.java │ │ │ ├── StatusManager.java │ │ │ ├── TaskEvent.java │ │ │ └── TaskStatusLocator.java │ │ │ ├── client │ │ │ └── LauncherClient.java │ │ │ ├── common │ │ │ ├── GlobalConstants.java │ │ │ ├── definition │ │ │ │ ├── FrameworkStateDefinition.java │ │ │ │ └── TaskStateDefinition.java │ │ │ ├── exceptions │ │ │ │ ├── AggregateException.java │ │ │ │ ├── AuthorizationException.java │ │ │ │ ├── BadRequestException.java │ │ │ │ ├── LauncherClientException.java │ │ │ │ ├── NonTransientException.java │ │ │ │ ├── NotAvailableException.java │ │ │ │ ├── NotFoundException.java │ │ │ │ ├── ThrottledRequestException.java │ │ │ │ └── TransientException.java │ │ │ ├── exit │ │ │ │ ├── ExitDiagnostics.java │ │ │ │ ├── ExitStatusKey.java │ │ │ │ └── ExitStatusValue.java │ │ │ ├── exts │ │ │ │ ├── CommonExts.java │ │ │ │ └── HadoopExts.java │ │ │ ├── log │ │ │ │ ├── ChangeAwareLogger.java │ │ │ │ └── DefaultLogger.java │ │ │ ├── model │ │ │ │ ├── AMType.java │ │ │ │ ├── AccessControlList.java │ │ │ │ ├── AclConfiguration.java │ │ │ │ ├── AggregatedFrameworkRequest.java │ │ │ │ ├── AggregatedFrameworkStatus.java │ │ │ │ ├── AggregatedLauncherRequest.java │ │ │ │ ├── AggregatedLauncherStatus.java │ │ │ │ ├── AggregatedTaskRoleStatus.java │ │ │ │ ├── AntiAffinityLevel.java │ │ │ │ ├── ClusterConfiguration.java │ │ │ │ ├── DataDeploymentVersionType.java │ │ │ │ ├── DiskType.java │ │ │ │ ├── ExecutionType.java │ │ │ │ ├── ExitType.java │ │ │ │ ├── FrameworkDescriptor.java │ │ │ │ ├── FrameworkInfo.java │ │ │ │ ├── FrameworkRequest.java │ │ │ │ ├── FrameworkState.java │ │ │ │ ├── FrameworkStatus.java │ │ │ │ ├── HealthCheckDescriptor.java │ │ │ │ ├── HealthCheckFailureType.java │ │ │ │ ├── HealthCheckType.java │ │ │ │ ├── LaunchClientType.java │ │ │ │ ├── LauncherConfiguration.java │ │ │ │ ├── LauncherRequest.java │ │ │ │ ├── LauncherStatus.java │ │ │ │ ├── MigrateTaskRequest.java │ │ │ │ ├── NodeConfiguration.java │ │ │ │ ├── OverrideApplicationProgressRequest.java │ │ │ │ ├── ParentFrameworkDescriptor.java │ │ │ │ ├── PlatformSpecificParametersDescriptor.java │ │ │ │ ├── Ports.java │ │ │ │ ├── ResourceDescriptor.java │ │ │ │ ├── RetryPolicyDescriptor.java │ │ │ │ ├── RetryPolicyState.java │ │ │ │ ├── RolloutStatus.java │ │ │ │ ├── ServiceDescriptor.java │ │ │ │ ├── ServiceStatus.java │ │ │ │ ├── SummarizedFrameworkInfo.java │ │ │ │ ├── SummarizedFrameworkInfos.java │ │ │ │ ├── TaskRoleApplicationCompletionPolicyDescriptor.java │ │ │ │ ├── TaskRoleDescriptor.java │ │ │ │ ├── TaskRolePlatformSpecificParametersDescriptor.java │ │ │ │ ├── TaskRoleRolloutStatus.java │ │ │ │ ├── TaskRoleStatus.java │ │ │ │ ├── TaskState.java │ │ │ │ ├── TaskStatus.java │ │ │ │ ├── TaskStatuses.java │ │ │ │ ├── UpdateDataDeploymentVersionRequest.java │ │ │ │ ├── UpdateExecutionTypeRequest.java │ │ │ │ ├── UpdateTaskNumberRequest.java │ │ │ │ ├── UserDescriptor.java │ │ │ │ └── ValueRange.java │ │ │ ├── service │ │ │ │ ├── AbstractService.java │ │ │ │ ├── StopStatus.java │ │ │ │ └── SystemTaskQueue.java │ │ │ ├── utils │ │ │ │ ├── CommonUtils.java │ │ │ │ ├── CompressionUtils.java │ │ │ │ ├── DnsUtils.java │ │ │ │ ├── HadoopUtils.java │ │ │ │ ├── PortUtils.java │ │ │ │ ├── RetryUtils.java │ │ │ │ ├── ValueRangeUtils.java │ │ │ │ └── YamlUtils.java │ │ │ ├── validation │ │ │ │ ├── CommonValidation.java │ │ │ │ ├── GpuConsistentValidation.java │ │ │ │ ├── GpuValidation.java │ │ │ │ ├── MapKeyNamingValidation.java │ │ │ │ ├── MapValueNotNullValidation.java │ │ │ │ ├── PortConsistentValidation.java │ │ │ │ └── PortValidation.java │ │ │ └── web │ │ │ │ ├── WebClient.java │ │ │ │ ├── WebClientOutput.java │ │ │ │ ├── WebCommon.java │ │ │ │ └── WebStructure.java │ │ │ ├── hdfsstore │ │ │ ├── HdfsStore.java │ │ │ └── HdfsStoreStructure.java │ │ │ ├── service │ │ │ ├── Bootstrap.java │ │ │ ├── DiagnosticsRetrieveHandler.java │ │ │ ├── FrameworkEvent.java │ │ │ ├── RMResyncHandler.java │ │ │ ├── RequestManager.java │ │ │ ├── Service.java │ │ │ └── StatusManager.java │ │ │ ├── webserver │ │ │ ├── JacksonObjectMapperProvider.java │ │ │ ├── LauncherExceptionHandler.java │ │ │ ├── LauncherModule.java │ │ │ ├── LauncherWebApp.java │ │ │ ├── RequestManager.java │ │ │ ├── StatusManager.java │ │ │ └── WebServer.java │ │ │ └── zookeeperstore │ │ │ ├── ZooKeeperClient.java │ │ │ ├── ZookeeperStore.java │ │ │ └── ZookeeperStoreStructure.java │ └── resources │ │ ├── log4j.properties │ │ └── webapps │ │ └── frameworklauncher │ │ └── .keep │ └── test │ ├── java │ └── com │ │ └── microsoft │ │ └── frameworklauncher │ │ ├── applicationmaster │ │ ├── ApplicationCompletionPolicyTest.java │ │ ├── GangAllocationTest.java │ │ ├── GenerateContainerIpListTest.java │ │ ├── KillAllOnAnyCompletedTest.java │ │ ├── MockAMRMClient.java │ │ ├── MockApplicationMaster.java │ │ ├── MockConfiguration.java │ │ ├── MockNMClient.java │ │ ├── MockResourceManager.java │ │ ├── MockYarnClient.java │ │ └── SelectionManagerTest.java │ │ ├── common │ │ ├── model │ │ │ ├── FrameworkDescriptorTest.java │ │ │ ├── LauncherConfigurationTest.java │ │ │ ├── ModelClassTest.java │ │ │ └── ResourceDescriptorTest.java │ │ └── utils │ │ │ ├── PortUtilsTest.java │ │ │ ├── ValueRangeUtilsTest.java │ │ │ └── YamlUtilsTest.java │ │ ├── hdfsstore │ │ └── MockHdfsStore.java │ │ ├── testutils │ │ ├── FeatureTestUtils.java │ │ ├── TestUtils.java │ │ └── YamlTestUtils.java │ │ └── zookeeperstore │ │ ├── MockZooKeeperClient.java │ │ └── MockZookeeperStore.java │ └── resources │ ├── TestAntiaffinityAllocation.json │ ├── TestApplicationCompletionPolicy.json │ ├── TestExpects │ ├── AccessControlList.yml │ ├── AclConfiguration.yml │ ├── AggregatedFrameworkRequest.yml │ ├── AggregatedFrameworkStatus.yml │ ├── AggregatedLauncherRequest.yml │ ├── AggregatedLauncherStatus.yml │ ├── AggregatedTaskRoleStatus.yml │ ├── ClusterConfiguration.yml │ ├── FrameworkDescriptor.yml │ ├── FrameworkInfo.yml │ ├── FrameworkRequest.yml │ ├── FrameworkStatus.yml │ ├── HealthCheckDescriptor.yml │ ├── LauncherConfiguration.yml │ ├── LauncherRequest.yml │ ├── LauncherStatus.yml │ ├── MigrateTaskRequest.yml │ ├── NodeConfiguration.yml │ ├── OverrideApplicationProgressRequest.yml │ ├── ParentFrameworkDescriptor.yml │ ├── PlatformSpecificParametersDescriptor.yml │ ├── Ports.yml │ ├── ResourceDescriptor.yml │ ├── RetryPolicyDescriptor.yml │ ├── RetryPolicyState.yml │ ├── ServiceDescriptor.yml │ ├── ServiceStatus.yml │ ├── SummarizedFrameworkInfo.yml │ ├── SummarizedFrameworkInfos.yml │ ├── TaskRoleApplicationCompletionPolicyDescriptor.yml │ ├── TaskRoleDescriptor.yml │ ├── TaskRolePlatformSpecificParametersDescriptor.yml │ ├── TaskRoleRolloutStatus.yml │ ├── TaskRoleStatus.yml │ ├── TaskStatus.yml │ ├── TaskStatuses.yml │ ├── UpdateDataDeploymentVersionRequest.yml │ ├── UpdateExecutionTypeRequest.yml │ ├── UpdateTaskNumberRequest.yml │ ├── UserDescriptor.yml │ └── ValueRange.yml │ ├── TestGangAllocation.json │ ├── TestGenerateContainerIpList.json │ ├── TestInputs │ ├── FrameworkDescriptionFull.json │ ├── FrameworkDescriptionMini.json │ ├── WrongFrameworkDescription.json │ ├── defaultValueTestFile.yml │ ├── frameworklauncher.yml │ └── readYamlTestFile.yml │ ├── TestKillAllOnAnyCompleted.json │ └── log4j.properties ├── grafana └── dashboards │ └── gpu.js ├── hadoop-ai ├── README-zh.md ├── README.md └── hadoop-build │ ├── README-zh.md │ ├── README.md │ ├── build.sh │ └── dockerfile ├── hadoop-fpga ├── README.md └── review.pdf ├── hice ├── dockerfile │ ├── Dockerfile │ ├── hice.zip │ └── requirements.txt └── readme.md ├── model-client ├── .gitignore ├── command │ ├── commands │ │ ├── cd.js │ │ ├── clone.js │ │ ├── convert.js │ │ ├── exit.js │ │ ├── init.js │ │ ├── lang.js │ │ ├── login.js │ │ ├── ls.js │ │ ├── mkdir.js │ │ ├── pull.js │ │ ├── push.js │ │ ├── rm.js │ │ ├── touch.js │ │ └── version.js │ ├── index.js │ ├── input.js │ ├── middlewares │ │ ├── check_login.js │ │ ├── exist.js │ │ ├── not_found.js │ │ ├── project_exist.js │ │ └── signed.js │ └── setup.js ├── config │ └── index.js ├── design.md ├── help.png ├── init.png ├── lib │ ├── download │ │ ├── api.js │ │ ├── index.js │ │ ├── lock.js │ │ ├── merge.js │ │ ├── readme.md │ │ ├── task.js │ │ └── tempFile.js │ ├── env │ │ └── index.js │ ├── login │ │ └── index.js │ ├── upload │ │ ├── api.js │ │ ├── index.js │ │ ├── project.js │ │ ├── stream.js │ │ └── task.js │ ├── user │ │ ├── index.js │ │ ├── local_info.js │ │ └── login.js │ └── userInfo │ │ └── index.js ├── ms_client.js ├── package.json ├── prototype │ ├── command │ │ └── index.js │ ├── concurrent │ │ └── index.js │ ├── flow │ │ └── index.js │ ├── lang │ │ └── index.js │ └── report │ │ └── index.js ├── readme.md ├── todo.md ├── utils │ ├── concurrent │ │ └── index.js │ ├── file │ │ └── index.js │ ├── log │ │ └── index.js │ ├── report │ │ └── index.js │ └── validate │ │ └── index.js └── yarn.lock ├── model-compression ├── README-ZH.md ├── README.md ├── codec │ └── huffman.py ├── main.py ├── prune │ └── pruning.py ├── quantization │ └── Qlinear.py └── utils.py ├── model-exchange ├── .gitignore ├── LICENSE ├── README.md ├── common │ ├── IR │ │ ├── IR_graph.py │ │ ├── __init__.py │ │ ├── converter.py │ │ ├── graph.py │ │ ├── meta_ops.json │ │ ├── model.proto │ │ ├── model_pb2.py │ │ ├── recover.py │ │ └── utils.py │ ├── __init__.py │ ├── keras │ │ ├── __init__.py │ │ ├── keras_converter.py │ │ ├── keras_graph.py │ │ └── keras_recover.py │ ├── mxnet │ │ ├── __init__.py │ │ ├── mxnet_converter.py │ │ ├── mxnet_graph.py │ │ └── mxnet_recover.py │ └── pytorch │ │ ├── README.md │ │ ├── __init__.py │ │ ├── pytorch_emitter.py │ │ ├── pytorch_graph.py │ │ ├── pytorch_parser.py │ │ ├── saver.py │ │ └── torch_to_np.py ├── restapi │ ├── README.md │ ├── app.py │ └── dockerfile ├── test │ ├── __init__.py │ ├── pytorch_test.py │ ├── test_keras.py │ ├── test_mxnet.py │ └── test_pytorch.py └── visualization │ ├── app.js │ ├── app.py │ ├── assets │ ├── css │ │ ├── bootstrap.css │ │ ├── fileinput.min.css │ │ ├── font-awesome.css │ │ └── style.css │ └── js │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ ├── custom.js │ │ ├── dataTables │ │ ├── dataTables.bootstrap.css │ │ ├── dataTables.bootstrap.js │ │ └── jquery.dataTables.js │ │ ├── fileinput.min.js │ │ └── jquery-1.10.2.js │ ├── draw.js │ ├── index.html │ ├── static │ ├── app.js │ ├── assets │ │ ├── css │ │ │ ├── bootstrap.css │ │ │ ├── fileinput.min.css │ │ │ ├── font-awesome.css │ │ │ └── style.css │ │ ├── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ └── glyphicons-halflings-regular.woff │ │ ├── img │ │ │ ├── 1.jpg │ │ │ ├── 2.jpg │ │ │ ├── 3.jpg │ │ │ ├── logo.png │ │ │ ├── user.gif │ │ │ └── user2.png │ │ └── js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ ├── custom.js │ │ │ ├── dataTables │ │ │ ├── dataTables.bootstrap.css │ │ │ ├── dataTables.bootstrap.js │ │ │ └── jquery.dataTables.js │ │ │ ├── fileinput.min.js │ │ │ └── jquery-1.10.2.js │ └── draw.js │ └── templates │ └── index.html ├── model-hub ├── .gitignore ├── README.md ├── build.md ├── config.json ├── config │ └── config.go ├── go.mod ├── lib │ ├── download │ │ ├── download.go │ │ ├── pipe.go │ │ └── readme.md │ ├── gbeta2 │ │ ├── context.go │ │ ├── gbeta2.go │ │ ├── readme.md │ │ └── response.go │ ├── login │ │ └── login.go │ ├── persist │ │ ├── file │ │ │ └── file.go │ │ └── mysql │ │ │ └── db.go │ ├── project │ │ ├── convert.go │ │ ├── info.go │ │ └── version.go │ └── upload │ │ ├── clean.go │ │ ├── declare.go │ │ ├── merge.go │ │ ├── readme.md │ │ ├── task.go │ │ ├── tempFile.go │ │ └── upload.go ├── main.go ├── middleware │ ├── auth.go │ ├── json_parser.go │ ├── link.go │ ├── logger.go │ ├── query_parser.go │ ├── type.go │ ├── upload_exist.go │ └── wrap.go ├── router │ ├── download.go │ ├── index.go │ ├── login.go │ ├── notFound.go │ ├── project.go │ └── upload.go └── util │ ├── args │ └── args.go │ ├── http │ └── helper.go │ ├── json │ └── json.go │ ├── log │ └── logger.go │ └── path │ └── path.go ├── openi-management ├── Dockerfile ├── README-zh.md ├── README.md ├── __init__.py ├── bootstrap │ ├── cleaning │ │ ├── cleaning.yaml.template │ │ └── service.yaml │ ├── cluster-configuration │ │ ├── add-new-nodes.sh │ │ ├── cleanup.sh.template │ │ ├── configmap-create.sh │ │ ├── docker-credentials │ │ │ └── config.json.template │ │ ├── gpu-configuration │ │ │ ├── gpu-configuration.json.template │ │ │ └── gpu-configuration.yml.template │ │ ├── host-configuration │ │ │ └── host-configuration.yaml.template │ │ ├── secret.yaml.template │ │ ├── service.yaml │ │ ├── ssh-configuration │ │ │ ├── id_rsa │ │ │ └── id_rsa.pub │ │ ├── start.sh │ │ └── update-configmap.sh │ ├── drivers │ │ ├── add-new-nodes.sh.template │ │ ├── cleanup.sh.template │ │ ├── drivers.yaml.template │ │ ├── node-label.sh.template │ │ ├── service.yaml │ │ └── start.sh │ ├── frameworklauncher │ │ ├── add-new-nodes.sh.template │ │ ├── cleanup.sh.template │ │ ├── configmap-create.sh │ │ ├── frameworklauncher-configuration │ │ │ ├── frameworklauncher-generate-config.sh │ │ │ └── frameworklauncher.yml │ │ ├── frameworklauncher.yaml.template │ │ ├── node-label.sh.template │ │ ├── service.yaml │ │ └── start.sh │ ├── grafana │ │ ├── add-new-nodes.sh.template │ │ ├── cleanup.sh.template │ │ ├── configmap-create.sh │ │ ├── grafana-configuration │ │ │ ├── openi-clusterview-dashboard.json.template │ │ │ ├── openi-jobview-dashboard.json.template │ │ │ ├── openi-nodeview-dashboard.json.template │ │ │ ├── openi-taskroleview-dashboard.json.template │ │ │ ├── openi-taskview-dashboard.json.template │ │ │ └── prom-datasource.json.template │ │ ├── grafana.yaml.template │ │ ├── node-label.sh.template │ │ ├── service.yaml │ │ └── start.sh │ ├── hadoop-service │ │ ├── add-new-nodes.sh.template │ │ ├── cleanup.sh.template │ │ ├── configmap-create.sh.template │ │ ├── hadoop-configuration │ │ │ ├── capacity-scheduler.xml.content.template │ │ │ ├── datanode-generate-script.sh │ │ │ ├── datanode-start-service.sh │ │ │ ├── jobhistory-generate-script.sh │ │ │ ├── jobhistory-start-service.sh │ │ │ ├── namenode-generate-script.sh │ │ │ ├── namenode-start-service.sh │ │ │ ├── nodemanager-generate-script.sh │ │ │ ├── nodemanager-start-service.sh │ │ │ ├── one-time-job-execute.sh │ │ │ ├── one-time-job-prepare.sh │ │ │ ├── resourcemanager-generate-script.sh │ │ │ └── resourcemanager-start-service.sh │ │ ├── hadoop-data-node.yaml.template │ │ ├── hadoop-jobhistory.yaml.template │ │ ├── hadoop-name-node.yaml.template │ │ ├── hadoop-node-manager.yaml.template │ │ ├── hadoop-resource-manager.yaml.template │ │ ├── node-label.sh.template │ │ ├── one-time-job-hadoop.yaml.template │ │ ├── service.yaml │ │ ├── start.sh │ │ └── zookeeper.yaml.template │ ├── model-exchange │ │ ├── add-new-nodes.sh │ │ ├── add-new-nodes.sh.template │ │ ├── cleanup.sh │ │ ├── cleanup.sh.template │ │ ├── model-exchange.yaml │ │ ├── model-exchange.yaml.template │ │ ├── node-label.sh │ │ ├── node-label.sh.template │ │ └── start.sh │ ├── model-hub │ │ ├── add-new-nodes.sh │ │ ├── add-new-nodes.sh.template │ │ ├── clean-up.sh.template │ │ ├── cleanup.sh │ │ ├── cleanup.sh.template │ │ ├── model-hub.yaml │ │ ├── model-hub.yaml.template │ │ ├── node-label.sh │ │ ├── node-label.sh.template │ │ └── start.sh │ ├── prometheus │ │ ├── add-new-nodes.sh.template │ │ ├── cleanup.sh.template │ │ ├── node-exporter-ds.yaml.template │ │ ├── node-label.sh.template │ │ ├── prometheus-configmap.yaml.template │ │ ├── prometheus-deployment.yaml.template │ │ ├── service.yaml │ │ └── start.sh │ ├── pylon │ │ ├── add-new-nodes.sh.template │ │ ├── cleanup.sh.template │ │ ├── node-label.sh.template │ │ ├── pylon.yaml.template │ │ ├── service.yaml │ │ └── start.sh │ ├── rest-server │ │ ├── add-new-nodes.sh.template │ │ ├── cleanup.sh.template │ │ ├── copy-templates.sh.template │ │ ├── node-label.sh.template │ │ ├── rest-server.yaml.template │ │ ├── service.yaml │ │ └── start.sh │ └── webportal │ │ ├── add-new-nodes.sh.template │ │ ├── cleanup.sh.template │ │ ├── node-label.sh.template │ │ ├── service.yaml │ │ ├── start.sh │ │ └── webportal.yaml.template ├── cleanup-service.py ├── config-patch │ ├── core-site.xml.patch │ ├── datanode-hdfs-site.xml.patch │ ├── hadoop-env.sh.patch │ ├── jobhistory-mapred-site.xml.patch │ ├── jobhistory-yarn-site.xml.patch │ ├── mapred-site.xml.patch │ ├── namenode-hdfs-site.xml.patch │ ├── nodemanager-mapred-site.xml.patch │ ├── nodemanager-yarn-site.xml.patch │ ├── resourcemanager-mapred-site.xml.patch │ ├── resourcemanager-yarn-site.xml.patch │ └── yarn-env.sh.patch ├── container-setup.sh ├── deploy.py ├── docker_build.py ├── host-configure │ └── host-configure.py ├── k8sClusterManagement.py ├── k8sPaiLibrary │ ├── __init__.py │ ├── maintainconf │ │ ├── add.yaml │ │ ├── clean.yaml │ │ ├── deploy.yaml │ │ ├── etcdfix.yaml │ │ ├── remove.yaml │ │ └── repair.yaml │ ├── maintainlib │ │ ├── __init__.py │ │ ├── add.py │ │ ├── clean.py │ │ ├── common.py │ │ ├── deploy.py │ │ ├── etcdfix.py │ │ ├── kubectl_install.py │ │ ├── remove.py │ │ └── repair.py │ ├── maintaintool │ │ ├── docker-ce-install.sh │ │ ├── etcdfix │ │ │ ├── restart-etcd-server.sh │ │ │ ├── stop-etcd-server.sh │ │ │ └── update-etcd-cluster.sh │ │ ├── hosts-check.sh │ │ ├── kubectl-install.sh │ │ ├── kubelet-start.sh │ │ ├── kubernetes-cleanup.sh │ │ └── repair-worker-node.sh │ └── template │ │ ├── apiserver.yaml.template │ │ ├── config.template │ │ ├── controller-manager.yaml.template │ │ ├── dashboard-deployment.yaml.template │ │ ├── dashboard-service.yaml.template │ │ ├── etcd.yaml.template │ │ ├── haproxy.cfg.template │ │ ├── haproxy.yaml.template │ │ ├── kube-proxy.yaml.template │ │ ├── kubelet.sh.template │ │ └── scheduler.yaml.template ├── kubernetesTool │ ├── __init__.py │ ├── nodestatus.py │ └── servicestatus.py ├── node-list-example.yaml ├── node_label_check.py ├── paiLibrary │ ├── __init__.py │ └── clusterObjectModel │ │ ├── __init__.py │ │ ├── objectModelFactory.py │ │ └── paiObjectModel.py ├── prepare_hadoop_config.sh ├── run_test.sh ├── service.yaml ├── service_dependency_solve.py ├── src │ ├── base-image │ │ ├── dockerfile │ │ └── image.yaml │ ├── cleaning-image │ │ ├── dockerfile.template │ │ ├── image.yaml │ │ └── start.sh │ ├── drivers │ │ ├── dockerfile.template │ │ ├── enable-nvidia-persistenced-mode.sh │ │ ├── image.yaml │ │ ├── install-all-drivers │ │ └── install-nvidia-drivers │ ├── frameworklauncher │ │ ├── dockerfile.template │ │ ├── image.yaml │ │ └── start.sh │ ├── gpu-exporter │ │ ├── dockerfile │ │ └── image.yaml │ ├── grafana │ │ ├── dockerfile │ │ ├── grafana_config.sh │ │ ├── image.yaml │ │ ├── run.sh │ │ └── start_server.sh │ ├── hadoop-run │ │ ├── dockerfile.template │ │ ├── image.yaml │ │ └── start.sh │ ├── model-exchange │ │ ├── dockerfile.template │ │ └── image.yaml │ ├── model-hub │ │ ├── dockerfile.template │ │ ├── dockerfile.templatebak │ │ └── image.yaml │ ├── pylon │ │ ├── dockerfile │ │ └── image.yaml │ ├── rest-server │ │ ├── .dockerignore │ │ ├── dockerfile.template │ │ └── image.yaml │ ├── webportal │ │ ├── dockerfile │ │ └── image.yaml │ └── zookeeper │ │ ├── dockerfile.template │ │ ├── image.yaml │ │ ├── myid │ │ ├── run.sh │ │ └── zoo.cfg ├── sysconf │ └── logging.yaml └── test │ ├── __init__.py │ ├── data │ ├── data_maintainlib_common │ │ ├── test.yaml │ │ ├── test.yaml.template │ │ ├── testfile1.sh.template │ │ └── testfile2.sh │ └── data_maintainlib_etcdfix │ │ ├── test_cluster_config_inconsistent_node_config.yaml │ │ ├── test_cluster_config_miss_master_list.yaml │ │ ├── test_cluster_config_miss_node_config.yaml │ │ ├── test_cluster_config_ok.yaml │ │ ├── test_cluster_config_wrong_node_config.yaml │ │ └── test_node_list_config.yaml │ ├── test-cluster-config.yaml │ ├── test-maintain.yaml │ ├── test_k8sClusterManagement.py │ ├── test_logging.yaml │ ├── test_maintainlib_common.py │ ├── test_maintainlib_etcdfix.py │ └── test_maintainlib_repair.py ├── openilogo.png ├── package-lock.json ├── prometheus └── exporter │ ├── docker_inspect.py │ ├── docker_stats.py │ ├── gpu_exporter.py │ └── job_exporter.py ├── pylon ├── .gitignore ├── README-zh.md ├── README.md └── src │ ├── nginx.conf.template │ └── render.py ├── rest-server ├── .autod.conf.js ├── .eslintignore ├── .eslintrc ├── .gitignore ├── .travis.yml ├── README-zh.md ├── README.md ├── app.js ├── app │ ├── controller │ │ ├── imageset.js │ │ ├── job.js │ │ ├── token.js │ │ ├── user.js │ │ └── vc.js │ ├── controllerSchema │ │ ├── job.js │ │ ├── token.js │ │ └── user.js │ ├── error │ │ ├── code.js │ │ └── proto.js │ ├── extend │ │ └── context.js │ ├── middleware │ │ ├── compress_handler.js │ │ ├── convert_job_name_handler.js │ │ ├── convert_vc_name_handler.js │ │ ├── jwt_handler.js │ │ ├── notfound_handler.js │ │ └── validate_handler.js │ ├── model │ │ ├── image_set.js │ │ └── user.js │ ├── router.js │ ├── routes │ │ ├── image_set.js │ │ ├── index.js │ │ ├── job.js │ │ ├── token.js │ │ ├── user.js │ │ └── vc.js │ ├── service │ │ ├── hdfs_proxy.js │ │ ├── image_set.js │ │ ├── job.js │ │ ├── token.js │ │ ├── user.js │ │ └── vc.js │ ├── templates │ │ ├── dockerContainerScript.mustache │ │ └── yarnContainerScript.mustache │ └── tpl │ │ ├── jobContainerSsh2bat.tpl │ │ └── jobContainerSsh2sh.tpl ├── appveyor.yml ├── config │ ├── config.default.js │ ├── config.local.js │ ├── config.prod.js │ └── plugin.js ├── package.json ├── test │ └── app │ │ └── controller │ │ ├── home.test.js │ │ └── vc.test.js ├── util │ ├── crypto.js │ ├── hdsf.js │ ├── index.js │ ├── ipMapTable.js │ └── job.js └── yarn.lock ├── sysarch-zh.png ├── sysarch.png ├── user manual.pdf └── webportal ├── .eslintrc.js ├── .gitignore ├── .npmrc ├── README-ZH.md ├── README.md ├── config ├── helpers.js ├── marked.config.js ├── preprocess.js ├── webpack.common.js ├── webpack.dev.common.js ├── webportal.config.dev.js └── webportal.config.js ├── package-lock.json ├── package.json ├── server ├── config │ ├── express.js │ ├── index.js │ └── logger.js ├── index.js └── server.js ├── src ├── app │ ├── cluster-view │ │ ├── hardware │ │ │ ├── hardware-detail.component.ejs │ │ │ ├── hardware-detail.component.js │ │ │ ├── hardware.component.ejs │ │ │ ├── hardware.component.js │ │ │ └── hardware.component.scss │ │ ├── k8s │ │ │ ├── k8s.component.ejs │ │ │ └── k8s.component.js │ │ └── services │ │ │ ├── service-info.js │ │ │ ├── service-table.component.ejs │ │ │ ├── service-view.component.scss │ │ │ ├── services.component.ejs │ │ │ └── services.component.js │ ├── common │ │ ├── common.component.scss │ │ └── common.js │ ├── dashboard │ │ ├── dashboard.component.ejs │ │ └── dashboard.component.js │ ├── fileCenter │ │ ├── fileCenter.component.ejs │ │ └── fileCenter.component.js │ ├── index.js │ ├── index2.html │ ├── index2.js │ ├── job │ │ ├── breadcrumb │ │ │ └── breadcrumb.component.ejs │ │ ├── dataset-view │ │ │ ├── dataset-table.component.ejs │ │ │ ├── dataset-view.component.ejs │ │ │ ├── dataset-view.component.js │ │ │ └── dataset-view.component.scss │ │ ├── imageset-view │ │ │ ├── imageset-table.component.ejs │ │ │ ├── imageset-view.component.ejs │ │ │ ├── imageset-view.component.js │ │ │ └── imageset-view.component.scss │ │ ├── job-docs │ │ │ ├── job-docs.component.ejs │ │ │ └── job-docs.component.js │ │ ├── job-public │ │ │ ├── job-public-detail-config-info-modal.component.ejs │ │ │ ├── job-public-detail-table.component.ejs │ │ │ ├── job-public-table.component.ejs │ │ │ ├── job-public.component.ejs │ │ │ ├── job-public.component.js │ │ │ └── job-public.component.scss │ │ ├── job-submit │ │ │ ├── getRandCharacter.js │ │ │ ├── job-submit.component.ejs │ │ │ ├── job-submit.component.js │ │ │ ├── job-submit.component.scss │ │ │ ├── job-submit.schema.js │ │ │ ├── job-suggest-info.json │ │ │ ├── selectize.bootstrap3.css │ │ │ └── selectize.js │ │ ├── job-view │ │ │ ├── bootstrap-table-zh-CN.min.js │ │ │ ├── bootstrap-table.min.css │ │ │ ├── bootstrap-table.min.js │ │ │ ├── job-detail-config-info-modal.component.ejs │ │ │ ├── job-detail-ssh-info-modal.component.ejs │ │ │ ├── job-detail-table.component.ejs │ │ │ ├── job-public-detail-table.component.ejs │ │ │ ├── job-table.component.ejs │ │ │ ├── job-view-public.component.ejs │ │ │ ├── job-view.component.ejs │ │ │ ├── job-view.component.js │ │ │ ├── job-view.component.scss │ │ │ ├── layout.bundle.scss │ │ │ ├── overview.ejs │ │ │ ├── overview.js │ │ │ ├── overview.scss │ │ │ ├── resource-detail-table.ejs │ │ │ ├── resource-detail.js │ │ │ └── resource-view-component.ejs │ │ └── loading │ │ │ ├── loading.component.ejs │ │ │ ├── loading.component.js │ │ │ └── loading.component.scss │ ├── layout │ │ ├── layout.component.ejs │ │ ├── layout.component.js │ │ └── layout.component.scss │ ├── order │ │ └── order-package │ │ │ ├── order-package.component.ejs │ │ │ └── order-package.component.js │ ├── publish │ │ ├── css │ │ │ ├── font-awesome.min.css │ │ │ ├── styles.css │ │ │ └── wysiwyg-editor.css │ │ ├── js │ │ │ ├── jquery-1.11.1.min.js │ │ │ ├── wysiwyg-editor.js │ │ │ └── wysiwyg.js │ │ └── publish-msg │ │ │ ├── publish-msg.component.ejs │ │ │ └── publish-msg.component.js │ ├── user │ │ ├── change-password │ │ │ ├── change-password.component.ejs │ │ │ ├── change-password.component.js │ │ │ └── change-password.component.scss │ │ ├── user-apply │ │ │ ├── user-apply.component.ejs │ │ │ └── user-apply.component.js │ │ ├── user-auth │ │ │ └── user-auth.component.js │ │ ├── user-login │ │ │ ├── user-login-nav.component.ejs │ │ │ ├── user-login.component.ejs │ │ │ ├── user-login.component.js │ │ │ └── user-login.component.scss │ │ ├── user-logout │ │ │ └── user-logout.component.js │ │ ├── user-register │ │ │ ├── user-register.component.ejs │ │ │ ├── user-register.component.js │ │ │ └── user-register.component.scss │ │ └── user-verify │ │ │ ├── user-verify.component.ejs │ │ │ └── user-verify.component.js │ └── vc │ │ ├── vc.component.ejs │ │ ├── vc.component.js │ │ └── vc.component.scss └── assets │ └── img │ ├── background.png │ ├── bg_login.png │ ├── dataset.png │ ├── datasetw.png │ ├── default-user-icon.png │ ├── favicon.ico │ ├── icon-addjob-act.png │ ├── icon-addjob.png │ ├── icon-arr-down.png │ ├── icon-arr-left.png │ ├── icon-collectbtn.png │ ├── icon-documents-act.png │ ├── icon-documents.png │ ├── icon-fav-jspt.png │ ├── icon-fbszc.png │ ├── icon-glygj-act.png │ ├── icon-glygj.png │ ├── icon-jobview-act.png │ ├── icon-jobview.png │ ├── icon-jrxyjq.png │ ├── icon-logo-inner.png │ ├── icon-logo-pai.png │ ├── icon-nav-openi.png │ ├── icon-openi.png │ ├── icon-task.png │ ├── icon-xnjq-act.png │ ├── icon-xnjq.png │ ├── icon-zgjhjm.png │ ├── icon_fb.png │ ├── icon_jh.png │ ├── icon_jq.png │ ├── jobs │ ├── avatar.png │ ├── icon-close.png │ ├── icon-doing.png │ ├── icon-edit.png │ ├── icon-end.png │ ├── icon-info.png │ ├── icon-job.png │ ├── icon-pause.png │ ├── icon-rest.png │ ├── icon-used.png │ ├── icon-wait.png │ └── pic-bita.png │ ├── loading.gif │ ├── logo.png │ ├── recharge.png │ └── txt_subtitle.png ├── webpack.config.js ├── webpack.dev.config.js └── yarn.lock /frameworklauncher/bin/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) Microsoft Corporation 4 | # All rights reserved. 5 | # 6 | # MIT License 7 | # 8 | # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 9 | # documentation files (the "Software"), to deal in the Software without restriction, including without limitation 10 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 11 | # to permit persons to whom the Software is furnished to do so, subject to the following conditions: 12 | # The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 15 | # BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 16 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 17 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | 20 | pushd "${0%/*}" 21 | if [ "$LAUNCHER_LOG_DIR" = "" ]; then 22 | export LAUNCHER_LOG_DIR=./logs 23 | fi 24 | 25 | export PATH=$PATH:$HADOOP_HOME/bin:$JAVA_HOME/bin 26 | export LD_LIBRARY_PATH=$HADOOP_HOME/lib/native 27 | export HADOOP_CLASSPATH=$(hadoop classpath) 28 | java -DLAUNCHER_LOG_DIR=$LAUNCHER_LOG_DIR -cp *:$CLASSPATH:$HADOOP_CLASSPATH com.microsoft.frameworklauncher.service.Bootstrap 29 | popd -------------------------------------------------------------------------------- /frameworklauncher/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | @rem Copyright (c) Microsoft Corporation 4 | @rem All rights reserved. 5 | @rem 6 | @rem MIT License 7 | @rem 8 | @rem Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 9 | @rem documentation files (the "Software"), to deal in the Software without restriction, including without limitation 10 | @rem the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 11 | @rem to permit persons to whom the Software is furnished to do so, subject to the following conditions: 12 | @rem The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 13 | @rem 14 | @rem THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 15 | @rem BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 16 | @rem NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 17 | @rem DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | @rem OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | 20 | @rem Start a new cmd.exe to avoid exit the caller cmd.exe. 21 | cmd /c "%~dp0build-internal.bat" %* -------------------------------------------------------------------------------- /frameworklauncher/conf/frameworklauncher.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.LauncherConfiguration 2 | # Common Setup 3 | zkConnectString: 127.0.0.1:2181 4 | zkRootDir: /Launcher 5 | hdfsRootDir: /Launcher 6 | rootAdminUsers: !!set 7 | ? {name: rootAdmin1} 8 | ? {name: rootAdmin2} 9 | 10 | # Service Setup 11 | serviceRMResyncIntervalSec: 30 12 | serviceRequestPullIntervalSec: 30 13 | 14 | # Application Setup 15 | applicationRetrieveDiagnosticsRetryIntervalSec: 30 16 | applicationRetrieveDiagnosticsMaxRetryCount: 15 17 | applicationTransientConflictMinDelaySec: 600 18 | applicationTransientConflictMaxDelaySec: 3600 19 | 20 | # Framework Setup 21 | frameworkCompletedRetainSec: 315360000 22 | 23 | # ApplicationMaster Setup 24 | amRmResyncFrequency: 6 25 | amRequestPullIntervalSec: 30 26 | amStatusPushIntervalSec: 30 27 | amFrameworkInfoPublishIntervalSec: 30 28 | amGangAllocationTimeoutSec: 500 29 | 30 | # WebServer Setup 31 | webServerAddress: http://localhost:9086 32 | webServerStatusPullIntervalSec: 30 -------------------------------------------------------------------------------- /frameworklauncher/doc/example/ExampleFramework.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "taskRoles": { 4 | "LRSMaster": { 5 | "taskNumber": 2, 6 | "taskService": { 7 | "version": 1, 8 | "entryPoint": "ExampleFramework/ExampleFramework.sh", 9 | "sourceLocations": [ 10 | "/ExampleFramework" 11 | ], 12 | "resource": { 13 | "cpuNumber": 1, 14 | "memoryMB": 1 15 | } 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /frameworklauncher/doc/example/ExampleFramework.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) Microsoft Corporation 4 | # All rights reserved. 5 | # 6 | # MIT License 7 | # 8 | # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 9 | # documentation files (the "Software"), to deal in the Software without restriction, including without limitation 10 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 11 | # to permit persons to whom the Software is furnished to do so, subject to the following conditions: 12 | # The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 15 | # BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 16 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 17 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | 20 | echo $PATH 21 | 22 | while true; do 23 | sleep 10 24 | echo $(date) 25 | done -------------------------------------------------------------------------------- /frameworklauncher/doc/img/Architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/frameworklauncher/doc/img/Architecture.png -------------------------------------------------------------------------------- /frameworklauncher/doc/img/Pipeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/frameworklauncher/doc/img/Pipeline.png -------------------------------------------------------------------------------- /frameworklauncher/src/main/java/com/microsoft/frameworklauncher/applicationmaster/Bootstrap.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | package com.microsoft.frameworklauncher.applicationmaster; 19 | 20 | // Bootstrap Services 21 | public class Bootstrap { 22 | public static void main(String[] args) { 23 | new ApplicationMaster().start(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /frameworklauncher/src/main/java/com/microsoft/frameworklauncher/common/model/AMType.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | package com.microsoft.frameworklauncher.common.model; 19 | 20 | import java.io.Serializable; 21 | 22 | public enum AMType implements Serializable { 23 | DEFAULT, 24 | AGENT 25 | } 26 | -------------------------------------------------------------------------------- /frameworklauncher/src/main/java/com/microsoft/frameworklauncher/common/model/AntiAffinityLevel.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | package com.microsoft.frameworklauncher.common.model; 19 | 20 | 21 | import java.io.Serializable; 22 | 23 | public enum AntiAffinityLevel implements Serializable { 24 | ANY, 25 | NODE, 26 | RACK 27 | } 28 | 29 | -------------------------------------------------------------------------------- /frameworklauncher/src/main/java/com/microsoft/frameworklauncher/common/model/DataDeploymentVersionType.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | package com.microsoft.frameworklauncher.common.model; 19 | 20 | import java.io.Serializable; 21 | 22 | public enum DataDeploymentVersionType implements Serializable { 23 | LAUNCHING, 24 | LAUNCHED 25 | } 26 | -------------------------------------------------------------------------------- /frameworklauncher/src/main/java/com/microsoft/frameworklauncher/common/model/DiskType.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | package com.microsoft.frameworklauncher.common.model; 19 | 20 | import java.io.Serializable; 21 | 22 | public enum DiskType implements Serializable { 23 | HDD, 24 | SSD 25 | } 26 | -------------------------------------------------------------------------------- /frameworklauncher/src/main/java/com/microsoft/frameworklauncher/common/model/ExecutionType.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | package com.microsoft.frameworklauncher.common.model; 19 | 20 | import java.io.Serializable; 21 | 22 | public enum ExecutionType implements Serializable { 23 | START, 24 | STOP 25 | } 26 | -------------------------------------------------------------------------------- /frameworklauncher/src/main/java/com/microsoft/frameworklauncher/common/model/HealthCheckFailureType.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | package com.microsoft.frameworklauncher.common.model; 19 | 20 | import java.io.Serializable; 21 | 22 | public enum HealthCheckFailureType implements Serializable { 23 | NON_TRANSIENT_ERROR, 24 | TRANSIENT_ERROR 25 | } 26 | -------------------------------------------------------------------------------- /frameworklauncher/src/main/java/com/microsoft/frameworklauncher/common/model/HealthCheckType.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | package com.microsoft.frameworklauncher.common.model; 19 | 20 | import java.io.Serializable; 21 | 22 | public enum HealthCheckType implements Serializable { 23 | COMMAND, 24 | WEB 25 | } 26 | -------------------------------------------------------------------------------- /frameworklauncher/src/main/java/com/microsoft/frameworklauncher/common/model/LaunchClientType.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | package com.microsoft.frameworklauncher.common.model; 19 | 20 | import java.io.Serializable; 21 | 22 | public enum LaunchClientType implements Serializable { 23 | UNKNOWN, 24 | LIB, 25 | DATA_DEPLOYMENT, 26 | APPLICATION_MASTER, 27 | CLI, 28 | WEB_UI 29 | } 30 | -------------------------------------------------------------------------------- /frameworklauncher/src/main/java/com/microsoft/frameworklauncher/common/model/RolloutStatus.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | package com.microsoft.frameworklauncher.common.model; 19 | 20 | import java.io.Serializable; 21 | 22 | public enum RolloutStatus implements Serializable { 23 | UNKNOWN, 24 | ONGOING, 25 | STOPPING_OLD, 26 | LAUNCHING_NEW, 27 | WAITING_TIMEOUT, 28 | SUCCEEDED 29 | } 30 | -------------------------------------------------------------------------------- /frameworklauncher/src/main/java/com/microsoft/frameworklauncher/service/Bootstrap.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | package com.microsoft.frameworklauncher.service; 19 | 20 | // Bootstrap Services 21 | public class Bootstrap { 22 | public static void main(String[] args) { 23 | new Service().start(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /frameworklauncher/src/main/resources/webapps/frameworklauncher/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/frameworklauncher/src/main/resources/webapps/frameworklauncher/.keep -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestAntiaffinityAllocation.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "", 3 | "version": 1, 4 | "retryPolicy": { 5 | "maxRetryCount": 0, 6 | "fancyRetryPolicy": false 7 | }, 8 | "taskRoles": { 9 | "LRMaster": { 10 | "taskNumber": 3, 11 | "priority": 1, 12 | "scaleUnitNumber": 1, 13 | "scaleUnitTimeoutSec": 0, 14 | "taskRetryPolicy": { 15 | "maxRetryCount": 0, 16 | "fancyRetryPolicy": false 17 | }, 18 | "taskService": { 19 | "version": 1, 20 | "entryPoint": "AntiaffinityAllocationTest/run.sh", 21 | "sourceLocations": [ 22 | ], 23 | "resource": { 24 | "cpuNumber": 1, 25 | "memoryMB": 1 26 | } 27 | } 28 | } 29 | }, 30 | "platformSpecificParameters": { 31 | "amResource": { 32 | "cpuNumber": 1, 33 | "memoryMB": 2048 34 | }, 35 | "amNodeLabel": null, 36 | "taskNodeLabel": null, 37 | "queue": "default", 38 | "containerConnectionMaxLostCount": -2, 39 | "containerConnectionMaxExceedCount": 2, 40 | "antiaffinityAllocation": true, 41 | "gangAllocation": false, 42 | "amType": "DEFAULT", 43 | "agentUseHeartbeat": false, 44 | "agentHeartbeatIntervalSec": 30, 45 | "agentExpiryIntervalSec": 180, 46 | "agentUseHealthCheck": false, 47 | "taskServiceHealthCheck": null 48 | } 49 | } -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestApplicationCompletionPolicy.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "", 3 | "version": 1, 4 | "retryPolicy": { 5 | "maxRetryCount": 0, 6 | "fancyRetryPolicy": false 7 | }, 8 | "taskRoles": { 9 | "LRMaster": { 10 | "taskNumber": 3, 11 | "priority": 1, 12 | "scaleUnitNumber": 1, 13 | "scaleUnitTimeoutSec": 0, 14 | "taskRetryPolicy": { 15 | "maxRetryCount": 0, 16 | "fancyRetryPolicy": false 17 | }, 18 | "applicationCompletionPolicy": { 19 | "minFailedTaskCount": 1, 20 | "minSucceededTaskCount": 1 21 | }, 22 | "taskService": { 23 | "version": 1, 24 | "entryPoint": "ApplicationCompletionPolicyTest/run.sh", 25 | "sourceLocations": [ 26 | ], 27 | "resource": { 28 | "cpuNumber": 1, 29 | "memoryMB": 1 30 | } 31 | } 32 | } 33 | }, 34 | "platformSpecificParameters": { 35 | "amResource": { 36 | "cpuNumber": 1, 37 | "memoryMB": 2048 38 | }, 39 | "amNodeLabel": null, 40 | "taskNodeLabel": null, 41 | "queue": "default", 42 | "containerConnectionMaxLostCount": -2, 43 | "containerConnectionMaxExceedCount": 2, 44 | "antiaffinityAllocation": false, 45 | "gangAllocation": false, 46 | "amType": "DEFAULT", 47 | "agentUseHeartbeat": false, 48 | "agentHeartbeatIntervalSec": 30, 49 | "agentExpiryIntervalSec": 180, 50 | "agentUseHealthCheck": false, 51 | "taskServiceHealthCheck": null 52 | } 53 | } -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/AccessControlList.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.AccessControlList 2 | users: !!set 3 | ? {name: testString} 4 | : null 5 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/AclConfiguration.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.AclConfiguration 2 | namespaceAcls: 3 | testString: 4 | users: !!set 5 | ? {name: testString} 6 | : null 7 | normalAdminUsers: !!set 8 | ? {name: testString} 9 | : null 10 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/AggregatedTaskRoleStatus.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.AggregatedTaskRoleStatus 2 | taskRoleStatus: 3 | frameworkVersion: 0 4 | taskRoleName: testString 5 | taskRoleRolloutStatus: 6 | currentRolloutEndTimestamp: 0 7 | currentRolloutScaleUnit: 0 8 | currentRolloutStartTimestamp: 0 9 | currentRolloutStatus: UNKNOWN 10 | currentRolloutTaskIndexes: [0] 11 | overallRolloutEndTimestamp: 0 12 | overallRolloutServiceVersion: 0 13 | overallRolloutStartTimestamp: 0 14 | overallRolloutStatus: UNKNOWN 15 | taskStatuses: 16 | frameworkVersion: 0 17 | taskRoleName: testString 18 | taskStatusArray: 19 | - containerCompletedTimestamp: 0 20 | containerConnectionLostCount: 0 21 | containerExitCode: 0 22 | containerExitDiagnostics: testString 23 | containerExitType: null 24 | containerGpus: 0 25 | containerHost: testString 26 | containerId: testString 27 | containerIp: testString 28 | containerIsDecommissioning: false 29 | containerLaunchedTimestamp: 0 30 | containerLogHttpAddress: testString 31 | containerPorts: testString 32 | taskCompletedTimestamp: 0 33 | taskCreatedTimestamp: 0 34 | taskIndex: 0 35 | taskRetryPolicyState: {nonTransientRetriedCount: 0, retriedCount: 0, succeededRetriedCount: 0, 36 | transientConflictRetriedCount: 0, transientNormalRetriedCount: 0, unKnownRetriedCount: 0} 37 | taskRoleName: testString 38 | taskServiceStatus: {serviceVersion: 0} 39 | taskState: TASK_WAITING 40 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/ClusterConfiguration.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.ClusterConfiguration 2 | nodes: 3 | testString: {gpuType: testString} 4 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/FrameworkStatus.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.FrameworkStatus 2 | applicationCompletedTimestamp: 0 3 | applicationExitCode: 0 4 | applicationExitDiagnostics: testString 5 | applicationExitType: null 6 | applicationId: testString 7 | applicationLaunchedTimestamp: 0 8 | applicationProgress: 0.0 9 | applicationTrackingUrl: testString 10 | frameworkCompletedTimestamp: 0 11 | frameworkCreatedTimestamp: 0 12 | frameworkName: testString 13 | frameworkRetryPolicyState: {nonTransientRetriedCount: 0, retriedCount: 0, succeededRetriedCount: 0, 14 | transientConflictRetriedCount: 0, transientNormalRetriedCount: 0, unKnownRetriedCount: 0} 15 | frameworkState: null 16 | frameworkVersion: 0 17 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/HealthCheckDescriptor.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.HealthCheckDescriptor {consecutiveFailures: 0, 2 | delaySeconds: 0, entryPoint: testString, gracePeriodSeconds: 0, healthCheckFailureType: TRANSIENT_ERROR, 3 | healthCheckType: COMMAND, intervalSeconds: 0, timeoutSeconds: 0, webUrl: testString} 4 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/LauncherConfiguration.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.LauncherConfiguration 2 | amAllowNoneGpuJobOnGpuNode: false 3 | amAttemptFailuresValidityIntervalSec: 0 4 | amAttemptMaxCount: 0 5 | amCandidateNodesFactor: 0 6 | amContainerMinPort: 0 7 | amContainerRequestMaxTimeoutSec: 0 8 | amContainerRequestMinTimeoutSec: 0 9 | amFrameworkInfoPublishIntervalSec: 0 10 | amGangAllocationTimeoutSec: 0 11 | amPriority: 0 12 | amRequestPullIntervalSec: 0 13 | amRmHeartbeatIntervalSec: 0 14 | amRmResyncFrequency: 0 15 | amRmResyncNmExpiryBufferSec: 0 16 | amSetupContainerRequestMaxRetryIntervalSec: 0 17 | amSetupContainerRequestMinRetryIntervalSec: 0 18 | amStatusPushIntervalSec: 0 19 | amVersion: 0 20 | applicationRetrieveDiagnosticsMaxRetryCount: 0 21 | applicationRetrieveDiagnosticsRetryIntervalSec: 0 22 | applicationSetupContextMaxRetryCount: 0 23 | applicationSetupContextRetryIntervalSec: 0 24 | applicationTransientConflictMaxDelaySec: 0 25 | applicationTransientConflictMinDelaySec: 0 26 | frameworkCompletedRetainSec: 0 27 | frameworkLeftoverGCMaxCount: 0 28 | hdfsRootDir: testString 29 | maxTotalTaskNumber: 0 30 | rootAdminUsers: !!set 31 | ? {name: testString} 32 | : null 33 | serviceRMResyncIntervalSec: 0 34 | serviceRequestPullIntervalSec: 0 35 | webServerAclEnable: false 36 | webServerAddress: testString 37 | webServerBindHost: testString 38 | webServerStatusPullIntervalSec: 0 39 | zkConnectString: testString 40 | zkRootDir: testString 41 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/LauncherRequest.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.LauncherRequest 2 | aclConfiguration: 3 | namespaceAcls: 4 | testString: 5 | users: !!set 6 | ? {name: testString} 7 | : null 8 | normalAdminUsers: !!set 9 | ? {name: testString} 10 | : null 11 | clusterConfiguration: 12 | nodes: 13 | testString: {gpuType: testString} 14 | launchedDataDeploymentVersion: testString 15 | launchingDataDeploymentVersion: testString 16 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/MigrateTaskRequest.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.MigrateTaskRequest {antiAffinityLevel: ANY} 2 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/NodeConfiguration.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.NodeConfiguration {gpuType: testString} 2 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/OverrideApplicationProgressRequest.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.OverrideApplicationProgressRequest { 2 | applicationProgress: null} 3 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/ParentFrameworkDescriptor.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.ParentFrameworkDescriptor {deleteOnParentDeleted: false, 2 | parentFrameworkName: testString, stopOnParentStopped: false} 3 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/PlatformSpecificParametersDescriptor.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.PlatformSpecificParametersDescriptor 2 | agentExpiryIntervalSec: 0 3 | agentHeartbeatIntervalSec: 0 4 | agentUseHealthCheck: false 5 | agentUseHeartbeat: false 6 | amNodeLabel: testString 7 | amResource: 8 | cpuNumber: 0 9 | diskMB: 0 10 | diskType: HDD 11 | gpuAttribute: 0 12 | gpuNumber: 0 13 | memoryMB: 0 14 | portDefinitions: 15 | testString: {count: 0, start: 0} 16 | portNumber: 0 17 | portRanges: 18 | - {begin: 0, end: 0} 19 | amType: DEFAULT 20 | antiaffinityAllocation: false 21 | containerConnectionMaxExceedCount: 0 22 | containerConnectionMaxLostCount: 0 23 | gangAllocation: false 24 | queue: testString 25 | skipLocalTriedResource: false 26 | taskNodeGpuType: testString 27 | taskNodeLabel: testString 28 | taskServiceHealthCheck: {consecutiveFailures: 0, delaySeconds: 0, entryPoint: testString, 29 | gracePeriodSeconds: 0, healthCheckFailureType: TRANSIENT_ERROR, healthCheckType: COMMAND, 30 | intervalSeconds: 0, timeoutSeconds: 0, webUrl: testString} 31 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/Ports.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.Ports {count: 0, start: 0} 2 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/ResourceDescriptor.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.ResourceDescriptor 2 | cpuNumber: 0 3 | diskMB: 0 4 | diskType: HDD 5 | gpuAttribute: 0 6 | gpuNumber: 0 7 | memoryMB: 0 8 | portDefinitions: 9 | testString: {count: 0, start: 0} 10 | portNumber: 0 11 | portRanges: 12 | - {begin: 0, end: 0} 13 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/RetryPolicyDescriptor.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.RetryPolicyDescriptor {fancyRetryPolicy: false, 2 | maxRetryCount: 0} 3 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/RetryPolicyState.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.RetryPolicyState {nonTransientRetriedCount: 0, 2 | retriedCount: 0, succeededRetriedCount: 0, transientConflictRetriedCount: 0, transientNormalRetriedCount: 0, 3 | unKnownRetriedCount: 0} 4 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/ServiceDescriptor.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.ServiceDescriptor 2 | entryPoint: testString 3 | resource: 4 | cpuNumber: 0 5 | diskMB: 0 6 | diskType: HDD 7 | gpuAttribute: 0 8 | gpuNumber: 0 9 | memoryMB: 0 10 | portDefinitions: 11 | testString: {count: 0, start: 0} 12 | portNumber: 0 13 | portRanges: 14 | - {begin: 0, end: 0} 15 | sourceLocations: [testString] 16 | version: 0 17 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/ServiceStatus.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.ServiceStatus {serviceVersion: 0} 2 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/SummarizedFrameworkInfo.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.SummarizedFrameworkInfo 2 | applicationExitCode: 0 3 | executionType: null 4 | firstRequestTimestamp: 0 5 | frameworkCompletedTimestamp: 0 6 | frameworkDescription: testString 7 | frameworkName: testString 8 | frameworkRetryPolicyState: {nonTransientRetriedCount: 0, retriedCount: 0, succeededRetriedCount: 0, 9 | transientConflictRetriedCount: 0, transientNormalRetriedCount: 0, unKnownRetriedCount: 0} 10 | frameworkState: null 11 | frameworkVersion: 0 12 | lastRequestTimestamp: 0 13 | queue: testString 14 | userName: testString 15 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/SummarizedFrameworkInfos.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.SummarizedFrameworkInfos 2 | summarizedFrameworkInfos: 3 | - applicationExitCode: 0 4 | executionType: null 5 | firstRequestTimestamp: 0 6 | frameworkCompletedTimestamp: 0 7 | frameworkDescription: testString 8 | frameworkName: testString 9 | frameworkRetryPolicyState: {nonTransientRetriedCount: 0, retriedCount: 0, succeededRetriedCount: 0, 10 | transientConflictRetriedCount: 0, transientNormalRetriedCount: 0, unKnownRetriedCount: 0} 11 | frameworkState: null 12 | frameworkVersion: 0 13 | lastRequestTimestamp: 0 14 | queue: testString 15 | userName: testString 16 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/TaskRoleApplicationCompletionPolicyDescriptor.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.TaskRoleApplicationCompletionPolicyDescriptor { 2 | minFailedTaskCount: 0, minSucceededTaskCount: 0} 3 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/TaskRoleDescriptor.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.TaskRoleDescriptor 2 | applicationCompletionPolicy: {minFailedTaskCount: 0, minSucceededTaskCount: 0} 3 | platformSpecificParameters: {samePortAllocation: false, taskNodeGpuType: testString, 4 | taskNodeLabel: testString} 5 | scaleUnitNumber: 0 6 | scaleUnitTimeoutSec: 0 7 | taskNumber: 0 8 | taskRetryPolicy: {fancyRetryPolicy: false, maxRetryCount: 0} 9 | taskService: 10 | entryPoint: testString 11 | resource: 12 | cpuNumber: 0 13 | diskMB: 0 14 | diskType: HDD 15 | gpuAttribute: 0 16 | gpuNumber: 0 17 | memoryMB: 0 18 | portDefinitions: 19 | testString: {count: 0, start: 0} 20 | portNumber: 0 21 | portRanges: 22 | - {begin: 0, end: 0} 23 | sourceLocations: [testString] 24 | version: 0 25 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/TaskRolePlatformSpecificParametersDescriptor.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.TaskRolePlatformSpecificParametersDescriptor { 2 | samePortAllocation: false, taskNodeGpuType: testString, taskNodeLabel: testString} 3 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/TaskRoleRolloutStatus.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.TaskRoleRolloutStatus 2 | currentRolloutEndTimestamp: 0 3 | currentRolloutScaleUnit: 0 4 | currentRolloutStartTimestamp: 0 5 | currentRolloutStatus: UNKNOWN 6 | currentRolloutTaskIndexes: [0] 7 | overallRolloutEndTimestamp: 0 8 | overallRolloutServiceVersion: 0 9 | overallRolloutStartTimestamp: 0 10 | overallRolloutStatus: UNKNOWN 11 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/TaskRoleStatus.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.TaskRoleStatus 2 | frameworkVersion: 0 3 | taskRoleName: testString 4 | taskRoleRolloutStatus: 5 | currentRolloutEndTimestamp: 0 6 | currentRolloutScaleUnit: 0 7 | currentRolloutStartTimestamp: 0 8 | currentRolloutStatus: UNKNOWN 9 | currentRolloutTaskIndexes: [0] 10 | overallRolloutEndTimestamp: 0 11 | overallRolloutServiceVersion: 0 12 | overallRolloutStartTimestamp: 0 13 | overallRolloutStatus: UNKNOWN 14 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/TaskStatus.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.TaskStatus 2 | containerCompletedTimestamp: 0 3 | containerConnectionLostCount: 0 4 | containerExitCode: 0 5 | containerExitDiagnostics: testString 6 | containerExitType: null 7 | containerGpus: 0 8 | containerHost: testString 9 | containerId: testString 10 | containerIp: testString 11 | containerIsDecommissioning: false 12 | containerLaunchedTimestamp: 0 13 | containerLogHttpAddress: testString 14 | containerPorts: testString 15 | taskCompletedTimestamp: 0 16 | taskCreatedTimestamp: 0 17 | taskIndex: 0 18 | taskRetryPolicyState: {nonTransientRetriedCount: 0, retriedCount: 0, succeededRetriedCount: 0, 19 | transientConflictRetriedCount: 0, transientNormalRetriedCount: 0, unKnownRetriedCount: 0} 20 | taskRoleName: testString 21 | taskServiceStatus: {serviceVersion: 0} 22 | taskState: TASK_WAITING 23 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/TaskStatuses.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.TaskStatuses 2 | frameworkVersion: 0 3 | taskRoleName: testString 4 | taskStatusArray: 5 | - containerCompletedTimestamp: 0 6 | containerConnectionLostCount: 0 7 | containerExitCode: 0 8 | containerExitDiagnostics: testString 9 | containerExitType: null 10 | containerGpus: 0 11 | containerHost: testString 12 | containerId: testString 13 | containerIp: testString 14 | containerIsDecommissioning: false 15 | containerLaunchedTimestamp: 0 16 | containerLogHttpAddress: testString 17 | containerPorts: testString 18 | taskCompletedTimestamp: 0 19 | taskCreatedTimestamp: 0 20 | taskIndex: 0 21 | taskRetryPolicyState: {nonTransientRetriedCount: 0, retriedCount: 0, succeededRetriedCount: 0, 22 | transientConflictRetriedCount: 0, transientNormalRetriedCount: 0, unKnownRetriedCount: 0} 23 | taskRoleName: testString 24 | taskServiceStatus: {serviceVersion: 0} 25 | taskState: TASK_WAITING 26 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/UpdateDataDeploymentVersionRequest.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.UpdateDataDeploymentVersionRequest { 2 | dataDeploymentVersion: testString, dataDeploymentVersionType: null} 3 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/UpdateExecutionTypeRequest.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.UpdateExecutionTypeRequest {executionType: null} 2 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/UpdateTaskNumberRequest.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.UpdateTaskNumberRequest {taskNumber: 0} 2 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/UserDescriptor.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.UserDescriptor {name: testString} 2 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestExpects/ValueRange.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.ValueRange {begin: 0, end: 0} 2 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestGangAllocation.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "", 3 | "version": 1, 4 | "retryPolicy": { 5 | "maxRetryCount": 0, 6 | "fancyRetryPolicy": false 7 | }, 8 | "taskRoles": { 9 | "LRMaster": { 10 | "taskNumber": 3, 11 | "priority": 1, 12 | "scaleUnitNumber": 1, 13 | "scaleUnitTimeoutSec": 0, 14 | "taskRetryPolicy": { 15 | "maxRetryCount": 0, 16 | "fancyRetryPolicy": false 17 | }, 18 | "taskService": { 19 | "version": 1, 20 | "entryPoint": "GangAllocationTest/run.sh", 21 | "sourceLocations": [ 22 | ], 23 | "resource": { 24 | "cpuNumber": 1, 25 | "memoryMB": 1 26 | } 27 | } 28 | } 29 | }, 30 | "platformSpecificParameters": { 31 | "amResource": { 32 | "cpuNumber": 1, 33 | "memoryMB": 2048 34 | }, 35 | "amNodeLabel": null, 36 | "taskNodeLabel": null, 37 | "queue": "default", 38 | "containerConnectionMaxLostCount": -2, 39 | "containerConnectionMaxExceedCount": 2, 40 | "antiaffinityAllocation": false, 41 | "gangAllocation": true, 42 | "amType": "DEFAULT", 43 | "agentUseHeartbeat": false, 44 | "agentHeartbeatIntervalSec": 30, 45 | "agentExpiryIntervalSec": 180, 46 | "agentUseHealthCheck": false, 47 | "taskServiceHealthCheck": null 48 | } 49 | } -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestGenerateContainerIpList.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "", 3 | "version": 1, 4 | "retryPolicy": { 5 | "maxRetryCount": 0, 6 | "fancyRetryPolicy": false 7 | }, 8 | "taskRoles": { 9 | "LRMaster": { 10 | "taskNumber": 3, 11 | "priority": 1, 12 | "scaleUnitNumber": 1, 13 | "scaleUnitTimeoutSec": 0, 14 | "taskRetryPolicy": { 15 | "maxRetryCount": 0, 16 | "fancyRetryPolicy": false 17 | }, 18 | "taskService": { 19 | "version": 1, 20 | "entryPoint": "GenerateContainerIpListTest/run.sh", 21 | "sourceLocations": [ 22 | ], 23 | "resource": { 24 | "cpuNumber": 1, 25 | "memoryMB": 1, 26 | "portRanges": [ 27 | ], 28 | "diskType": 0, 29 | "diskMB": 0 30 | } 31 | } 32 | } 33 | }, 34 | "platformSpecificParameters": { 35 | "amResource": { 36 | "cpuNumber": 1, 37 | "memoryMB": 2048 38 | }, 39 | "amNodeLabel": null, 40 | "taskNodeLabel": null, 41 | "queue": "default", 42 | "containerConnectionMaxLostCount": -2, 43 | "containerConnectionMaxExceedCount": 2, 44 | "antiaffinityAllocation": false, 45 | "killAllOnAnyCompleted": false, 46 | "killAllOnAnyServiceCompleted": false, 47 | "generateContainerIpList": true, 48 | "amType": "DEFAULT", 49 | "agentUseHeartbeat": false, 50 | "agentHeartbeatIntervalSec": 30, 51 | "agentExpiryIntervalSec": 180, 52 | "agentUseHealthCheck": false, 53 | "taskServiceHealthCheck": null 54 | } 55 | } -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestInputs/FrameworkDescriptionMini.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 10, 3 | "taskRoles": { 4 | "HBaseMaster": { 5 | "taskNumber": 14, 6 | "taskService": { 7 | "version": 23, 8 | "entryPoint": "HBaseMaster/start.bat", 9 | "sourceLocations": [ 10 | "/HBaseMaster" 11 | ], 12 | "resource": { 13 | "cpuNumber": 18, 14 | "memoryMB": 19 15 | } 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestInputs/defaultValueTestFile.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.utils.ClassForYamlTest 2 | booleanClassField: false 3 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestInputs/frameworklauncher.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.common.model.LauncherConfiguration 2 | # Common Setup 3 | zkConnectString: 127.0.0.1:2181 4 | zkRootDir: /Launcher 5 | hdfsRootDir: /Launcher 6 | rootAdminUsers: !!set 7 | ? {name: rootAdmin1} 8 | ? {name: rootAdmin2} 9 | 10 | # Service Setup 11 | serviceRMResyncIntervalSec: 30 12 | serviceRequestPullIntervalSec: 30 13 | 14 | # Application Setup 15 | applicationRetrieveDiagnosticsRetryIntervalSec: 30 16 | applicationRetrieveDiagnosticsMaxRetryCount: 15 17 | applicationTransientConflictMinDelaySec: 600 18 | applicationTransientConflictMaxDelaySec: 3600 19 | 20 | # Framework Setup 21 | frameworkCompletedRetainSec: 43200 22 | 23 | # ApplicationMaster Setup 24 | amRmResyncFrequency: 6 25 | amRequestPullIntervalSec: 30 26 | amStatusPushIntervalSec: 30 27 | amFrameworkInfoPublishIntervalSec: 30 28 | amGangAllocationTimeoutSec: 500 29 | 30 | # WebServer Setup 31 | webServerAddress: http://localhost:9086 32 | webServerStatusPullIntervalSec: 30 -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestInputs/readYamlTestFile.yml: -------------------------------------------------------------------------------- 1 | !!com.microsoft.frameworklauncher.utils.ClassForYamlTest 2 | intField: 1024 3 | integerField: 1024 4 | floatField: 3.14f 5 | floatClassField: 3.14f 6 | doubleField: 3.14 7 | doubleClassField: 3.14 8 | booleanField: true 9 | booleanClassField: true 10 | stringField: Yaml Test 11 | -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/TestKillAllOnAnyCompleted.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "", 3 | "version": 1, 4 | "retryPolicy": { 5 | "maxRetryCount": 0, 6 | "fancyRetryPolicy": false 7 | }, 8 | "taskRoles": { 9 | "LRMaster": { 10 | "taskNumber": 3, 11 | "priority": 1, 12 | "scaleUnitNumber": 1, 13 | "scaleUnitTimeoutSec": 0, 14 | "taskRetryPolicy": { 15 | "maxRetryCount": 0, 16 | "fancyRetryPolicy": false 17 | }, 18 | "taskService": { 19 | "version": 1, 20 | "entryPoint": "KillAllOnAnyCompletedTest/run.sh", 21 | "sourceLocations": [ 22 | ], 23 | "resource": { 24 | "cpuNumber": 1, 25 | "memoryMB": 1, 26 | "portRanges": [ 27 | ], 28 | "diskType": 0, 29 | "diskMB": 0 30 | } 31 | } 32 | } 33 | }, 34 | "platformSpecificParameters": { 35 | "amResource": { 36 | "cpuNumber": 1, 37 | "memoryMB": 2048 38 | }, 39 | "amNodeLabel": null, 40 | "taskNodeLabel": null, 41 | "queue": "default", 42 | "containerConnectionMaxLostCount": -2, 43 | "containerConnectionMaxExceedCount": 2, 44 | "antiaffinityAllocation": false, 45 | "killAllOnAnyCompleted": true, 46 | "killAllOnAnyServiceCompleted": false, 47 | "generateContainerIpList": false, 48 | "amType": "DEFAULT", 49 | "agentUseHeartbeat": false, 50 | "agentHeartbeatIntervalSec": 30, 51 | "agentExpiryIntervalSec": 180, 52 | "agentUseHealthCheck": false, 53 | "taskServiceHealthCheck": null 54 | } 55 | } -------------------------------------------------------------------------------- /frameworklauncher/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation 2 | # All rights reserved. 3 | # 4 | # MIT License 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | # documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | # to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | # The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | # 12 | # THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | # BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | log4j.rootLogger=OFF 19 | log4j.logger.com.microsoft.frameworklauncher=DEBUG,InternalInfoConsole 20 | 21 | log4j.appender.InternalInfoConsole=org.apache.log4j.ConsoleAppender 22 | log4j.appender.InternalInfoConsole.Threshold=INFO 23 | log4j.appender.InternalInfoConsole.layout=org.apache.log4j.PatternLayout 24 | log4j.appender.InternalInfoConsole.layout.ConversionPattern=%d{ISO8601} %p [%t] %c: %m%n -------------------------------------------------------------------------------- /hadoop-ai/hadoop-build/README-zh.md: -------------------------------------------------------------------------------- 1 | ## 在docker容器中编译hadoop-ai 2 | 3 | 4 | ```yaml 5 | 6 | sudo docker build -t hadoop-build . 7 | 8 | sudo docker run --rm --name=hadoop-build --volume=/hadoop-binary:/hadoop-binary hadoop-build 9 | 10 | ``` 11 | 12 | 等待编译完成. 13 | 你将在 ```/hadoop-binary```找到hadoop二进制文件 14 | -------------------------------------------------------------------------------- /hadoop-fpga/README.md: -------------------------------------------------------------------------------- 1 | # FPGA Scheduling -------------------------------------------------------------------------------- /hadoop-fpga/review.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/hadoop-fpga/review.pdf -------------------------------------------------------------------------------- /hice/dockerfile/hice.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/hice/dockerfile/hice.zip -------------------------------------------------------------------------------- /hice/dockerfile/requirements.txt: -------------------------------------------------------------------------------- 1 | scikit-image>=0.13.0 2 | Cython>=0.19.2 3 | numpy>=1.7.1 4 | scipy>=0.13.2 5 | matplotlib==2.0.0 6 | ipython==5.8.0 7 | h5py>=2.2.0 8 | leveldb>=0.191 9 | networkx>=1.8.1 10 | nose>=1.3.0 11 | python-dateutil>=2.5.0 12 | pandas>=0.12.0 13 | protobuf>=2.5.0 14 | python-gflags>=2.0 15 | pyyaml>=3.10 16 | Pillow>=2.3.0 17 | six>=1.1.0 18 | 19 | -------------------------------------------------------------------------------- /hice/readme.md: -------------------------------------------------------------------------------- 1 | # HICE 2 | 3 | HICE(High-performance intelligent computation engine)基于张量数据格式,分别封装基础数学操作,常用机器学习算法,卷积操作等,对外提供`C++`操作接口,并针对大规模计算,提供GPU支持。 4 | 5 | 请参考[HICE](https://pku-hpc.github.io/hice-doc/zh/) -------------------------------------------------------------------------------- /model-client/.gitignore: -------------------------------------------------------------------------------- 1 | # node_modules 2 | node_modules 3 | 4 | # test data 5 | test_data -------------------------------------------------------------------------------- /model-client/command/commands/cd.js: -------------------------------------------------------------------------------- 1 | // created by yyrdl on 2018.12.5 2 | const co = require("zco"); 3 | const fs = require("fs"); 4 | const path = require("path"); 5 | const Command = require("../../prototype/command"); 6 | const lang = require("../../prototype/lang"); 7 | const log = require("../../utils/log"); 8 | 9 | 10 | function cd(args,opt){ 11 | return co.brief(function*(){ 12 | let targetDir = path.join(process.cwd(),args[0]); 13 | if(!fs.existsSync(targetDir)){ 14 | let l = lang.New().zh(`目录"${targetDir}"不存在`).en(`Directory "${targetDir}" Not Found!`); 15 | log.info(l); 16 | }else{ 17 | process.chdir(targetDir); 18 | } 19 | return false; 20 | }) 21 | } 22 | 23 | let type = lang.New().en("About File").zh("文件相关"); 24 | let note = lang.New().en("Switch to target directory.").zh("切换到指定目录"); 25 | let usage1 = lang.New().zh("切换到'path'指定的路径").en(`Switch to directory which is specified by "path".`); 26 | 27 | const cmd = new Command("cd",cd,type); 28 | 29 | cmd.note(note); 30 | 31 | cmd.usage("cd 'path'",usage1); 32 | 33 | module.exports = cmd; 34 | -------------------------------------------------------------------------------- /model-client/command/commands/exit.js: -------------------------------------------------------------------------------- 1 | // created by yyrdl on 2018.12.5 2 | const co = require("zco"); 3 | const Command = require("../../prototype/command"); 4 | const lang = require("../../prototype/lang"); 5 | 6 | 7 | 8 | 9 | function _exit(args,opt){ 10 | return co.brief(function*(){ 11 | process.exit(0) 12 | return false; 13 | }) 14 | } 15 | 16 | let type = lang.New().en("System").zh("系统"); 17 | let note = lang.New().en("Exit the command line tool.").zh("退出命令行工具"); 18 | 19 | const cmd = new Command("exit",_exit,type); 20 | 21 | cmd.note(note); 22 | 23 | cmd.usage("exit",note); 24 | 25 | module.exports = cmd; 26 | -------------------------------------------------------------------------------- /model-client/command/commands/lang.js: -------------------------------------------------------------------------------- 1 | const co = require("zco"); 2 | const Command = require("../../prototype/command"); 3 | const lang = require("../../prototype/lang"); 4 | const setUp = require("../setup"); 5 | const env = require("../../lib/env"); 6 | 7 | function _switch(){ 8 | return co.brief(function*(){ 9 | yield env.SetEnv("lang",env.GetEnv().lang == "zh" ? "en":"zh"); 10 | yield env.Reload(); 11 | setUp.run(); 12 | }); 13 | } 14 | 15 | 16 | 17 | let cmd = new Command("lang",_switch,lang.New().en("System").zh("系统")); 18 | 19 | let note = lang.New().en("切换系统语言").zh('Switch system language.'); 20 | 21 | cmd.note(note); 22 | cmd.usage("lang",note); 23 | 24 | 25 | module.exports = cmd; 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /model-client/command/commands/ls.js: -------------------------------------------------------------------------------- 1 | // created by yyrdl on 2018.12.5 2 | const co = require("zco"); 3 | const fs = require("fs"); 4 | const path = require("path"); 5 | const chalk = require("chalk"); 6 | const fileUtil = require("../../utils/file"); 7 | 8 | const Command = require("../../prototype/command"); 9 | const lang = require("../../prototype/lang"); 10 | 11 | 12 | function blank(num){ 13 | let str = ""; 14 | for(let i=0;i this._max -1){ 20 | this._queue.push(resume); 21 | this._awake(); 22 | }else{ 23 | this._invoke(resume) 24 | } 25 | } 26 | 27 | Lock.prototype._invoke = function(func){ 28 | if ("function" == typeof func){ 29 | this._running +=1; 30 | func() 31 | } 32 | } 33 | 34 | Lock.prototype._awake = function(){ 35 | if (this._running < this._max){ 36 | this._invoke(this._queue.shift()); 37 | } 38 | } 39 | 40 | 41 | module.exports = Lock; -------------------------------------------------------------------------------- /model-client/prototype/lang/index.js: -------------------------------------------------------------------------------- 1 | // created by yyrdl on 2018.12.5 2 | const env = require("../../lib/env"); 3 | 4 | function Lang(){ 5 | this._en = ""; 6 | this._zh = ""; 7 | } 8 | 9 | Lang.prototype.en = function(txt){ 10 | this._en = txt; 11 | return this; 12 | } 13 | Lang.prototype.zh = function(txt){ 14 | this._zh = txt; 15 | return this; 16 | } 17 | 18 | Lang.prototype.toString = function (){ 19 | return env.GetEnv().lang == "zh" ? this._zh : this._en; 20 | } 21 | 22 | Lang.prototype.valueOf = function(){ 23 | return env.GetEnv().lang == "zh" ? this._zh : this._en; 24 | } 25 | 26 | function New(){ 27 | return new Lang() 28 | } 29 | 30 | exports.New = New; -------------------------------------------------------------------------------- /model-client/prototype/report/index.js: -------------------------------------------------------------------------------- 1 | // created by yyrdl on 2018.12.5 2 | const log = require("../../utils/log"); 3 | 4 | function Reporter(total,label){ 5 | this.totalSize = total; 6 | this.completedSize = 0; 7 | this.label = label; 8 | } 9 | 10 | 11 | Reporter.prototype.Incre = function(size){ 12 | this.completedSize += size; 13 | log.progress( this.completedSize / this.totalSize, this.label); 14 | } 15 | 16 | Reporter.prototype.Sub = function(size){ 17 | this.completedSize -= size; 18 | log.progress( this.completedSize / this.totalSize, this.label); 19 | } 20 | 21 | module.exports = Reporter; -------------------------------------------------------------------------------- /model-client/todo.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/model-client/todo.md -------------------------------------------------------------------------------- /model-client/utils/concurrent/index.js: -------------------------------------------------------------------------------- 1 | // created by yyrdl on 2018.12.5 2 | /*** 3 | * 并发锁,用来限制上传和下载的并发数,单线程安全 4 | * 5 | */ 6 | 7 | 8 | function New(max_concurrent){ 9 | return { 10 | "current_running" : 0, 11 | "unLock" : function () { 12 | this.current_running--; 13 | this._awake(); 14 | }, 15 | "lock" : function (co_next) { 16 | if(this._busy()){ 17 | this._waitFree(co_next); 18 | }else { 19 | this.current_running++; 20 | co_next(); 21 | } 22 | }, 23 | "_busy" : function () { 24 | return this.current_running > max_concurrent - 1; 25 | }, 26 | "_waitFree" : function (callback) { 27 | this._reply_pool.push(callback); 28 | this._awake(); 29 | }, 30 | "_reply_pool" : [], 31 | "_awake" : function () { 32 | if (this.current_running < max_concurrent) { 33 | let func = this._reply_pool.shift(); 34 | if ("function" == typeof func) { 35 | this.current_running +=1; 36 | func(); 37 | } 38 | } 39 | } 40 | } 41 | } 42 | 43 | 44 | exports.New = New; -------------------------------------------------------------------------------- /model-client/utils/log/index.js: -------------------------------------------------------------------------------- 1 | // created by yyrdl on 2018.12.5 2 | const singleLine = require('single-line-log').stdout; 3 | 4 | 5 | 6 | function error(msg){ 7 | console.log(msg) 8 | } 9 | 10 | function debug(err){ 11 | if (err && err.stack){ 12 | console.log("[DEBUG] - "+err.stack); 13 | }else{ 14 | console.log("[DEBUG] - "+err); 15 | } 16 | } 17 | 18 | function info(msg){ 19 | console.log("\n"+msg+""); 20 | } 21 | 22 | function progress(ratio,description,bar_len = 80){ 23 | var percent = (ratio).toFixed(4); 24 | var cell_num = Math.floor(percent * bar_len); 25 | 26 | var cell = ''; 27 | for (var i=0;i 3 && ".ms" == project.slice(project.length-3); 15 | } 16 | 17 | exports.isValidateProjectAddress = isValidateProjectAddress; -------------------------------------------------------------------------------- /model-compression/quantization/Qlinear.py: -------------------------------------------------------------------------------- 1 | import torch 2 | from torch.autograd import Variable 3 | import math 4 | 5 | def linear(model, bits, overflow_rate = 0, out_file = None): 6 | assert 1<=bits<=32, bits 7 | print('Start linear quantization.') 8 | for k, v in model.state_dict().items(): 9 | print(k) 10 | if 'running' in k or 'batches' in k: 11 | continue 12 | else: 13 | sf = bits - 1. - compute_integral_part(v, overflow_rate=overflow_rate) 14 | v_quant = linear_quantize(v, sf, bits=bits) 15 | v.data.copy_(v_quant)# 复制 model.state_dict()[k] 16 | if out_file is not None: 17 | torch.save(model.state_dict(), out_file) 18 | 19 | def compute_integral_part(input, overflow_rate): 20 | abs_value = input.abs().view(-1) 21 | sorted_value = abs_value.sort(dim=0, descending=True)[0] 22 | split_idx = int(overflow_rate * len(sorted_value)) 23 | v = sorted_value[split_idx] 24 | if isinstance(v, Variable): 25 | v = v.data.cpu().numpy() 26 | sf = math.ceil(math.log2(v+1e-12)) 27 | return sf 28 | 29 | def linear_quantize(input, sf, bits): 30 | assert bits >= 1, bits 31 | if bits == 1: 32 | return torch.sign(input) - 1 33 | delta = math.pow(2.0, -sf) 34 | bound = math.pow(2.0, bits-1) 35 | min_val = - bound 36 | max_val = bound - 1 37 | rounded = torch.floor(input / delta + 0.5) 38 | 39 | clipped_value = torch.clamp(rounded, min_val, max_val) * delta 40 | return clipped_value -------------------------------------------------------------------------------- /model-exchange/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Guangyao Chen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /model-exchange/README.md: -------------------------------------------------------------------------------- 1 | # open-exchange 2 | 3 | ## Acknowledgements 4 | Thanks to [Microsoft](https://github.com/Microsoft), the initial code of *MXNet -> IR converting* is references to his project [MMdnn](https://github.com/Microsoft/MMdnn). 5 | -------------------------------------------------------------------------------- /model-exchange/common/IR/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/model-exchange/common/IR/__init__.py -------------------------------------------------------------------------------- /model-exchange/common/IR/meta_ops.json: -------------------------------------------------------------------------------- 1 | { 2 | "abs": { 3 | "description": "The absolute value of the input data, applied to each element", 4 | "input": { 5 | "name": "X", 6 | "type_attr": "T", 7 | "description": "input arg 1" 8 | }, 9 | "output": { 10 | "name": "Y", 11 | "type_attr": "T", 12 | "description": "output arg 1" 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /model-exchange/common/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/model-exchange/common/__init__.py -------------------------------------------------------------------------------- /model-exchange/common/keras/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/model-exchange/common/keras/__init__.py -------------------------------------------------------------------------------- /model-exchange/common/mxnet/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/model-exchange/common/mxnet/__init__.py -------------------------------------------------------------------------------- /model-exchange/common/pytorch/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from __future__ import division 3 | from __future__ import print_function 4 | 5 | from common.pytorch.pytorch_parser import * 6 | from common.pytorch.pytorch_emitter import * 7 | from common.pytorch.saver import * -------------------------------------------------------------------------------- /model-exchange/common/pytorch/saver.py: -------------------------------------------------------------------------------- 1 | import torch 2 | 3 | 4 | def save_model(MainModel, network_filepath, weight_filepath, dump_filepath): 5 | model = MainModel.KitModel(weight_filepath) 6 | model.eval() 7 | torch.save(model, dump_filepath) 8 | print('PyTorch model file is saved as [{}], generated by [{}.py] and [{}]. Notice that you may need [{}.py] to load the model back.'.format( 9 | dump_filepath, network_filepath, weight_filepath, network_filepath)) 10 | -------------------------------------------------------------------------------- /model-exchange/test/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Peking University 2018 2 | # 3 | # The software is released under the Open-Intelligence Open Source License V1.0. 4 | # The copyright owner promises to follow "Open-Intelligence Open Source Platform 5 | # Management Regulation V1.0", which is provided by The New Generation of 6 | # Artificial Intelligence Technology Innovation Strategic Alliance (the AITISA). -------------------------------------------------------------------------------- /model-exchange/visualization/app.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Peking University 2018 2 | // 3 | // The software is released under the Open-Intelligence Open Source License V1.0. 4 | // The copyright owner promises to follow "Open-Intelligence Open Source Platform 5 | // Management Regulation V1.0", which is provided by The New Generation of 6 | // Artificial Intelligence Technology Innovation Strategic Alliance (the AITISA). 7 | 8 | const express = require('express') 9 | const app = express() 10 | app.use(express.static('public')) 11 | app.get('/', (req, res) => res.sendFile('index.html', {"root": __dirname})) 12 | 13 | app.listen(8080, () => console.log('vis is listening on port 8000!')) -------------------------------------------------------------------------------- /model-exchange/visualization/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template, request 2 | # from flask.ext.restful import Api, Resource 3 | 4 | app = Flask(__name__) 5 | 6 | @app.route('/', methods=["GET"]) 7 | def index(): 8 | # return "hello word" 9 | return render_template('index.html') 10 | 11 | if __name__ == '__main__': 12 | app.run(debug=False, threaded=True, port=6009) -------------------------------------------------------------------------------- /model-exchange/visualization/assets/js/custom.js: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | (function ($) { 5 | "use strict"; 6 | var mainApp = { 7 | slide_fun: function () { 8 | 9 | $('#carousel-example').carousel({ 10 | interval:3000 // THIS TIME IS IN MILLI SECONDS 11 | }) 12 | 13 | }, 14 | dataTable_fun: function () { 15 | 16 | $('#dataTables-example').dataTable(); 17 | 18 | }, 19 | 20 | custom_fun:function() 21 | { 22 | /*==================================== 23 | WRITE YOUR SCRIPTS BELOW 24 | ======================================*/ 25 | 26 | 27 | 28 | 29 | }, 30 | 31 | } 32 | 33 | 34 | $(document).ready(function () { 35 | mainApp.slide_fun(); 36 | mainApp.dataTable_fun(); 37 | mainApp.custom_fun(); 38 | }); 39 | }(jQuery)); 40 | 41 | 42 | -------------------------------------------------------------------------------- /model-exchange/visualization/static/app.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const app = express() 3 | app.use(express.static('public')) 4 | app.get('/', (req, res) => res.sendFile('index.html', {"root": __dirname})) 5 | 6 | app.listen(8080, () => console.log('vis is listening on port 8000!')) -------------------------------------------------------------------------------- /model-exchange/visualization/static/assets/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/model-exchange/visualization/static/assets/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /model-exchange/visualization/static/assets/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/model-exchange/visualization/static/assets/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /model-exchange/visualization/static/assets/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/model-exchange/visualization/static/assets/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /model-exchange/visualization/static/assets/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/model-exchange/visualization/static/assets/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /model-exchange/visualization/static/assets/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/model-exchange/visualization/static/assets/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /model-exchange/visualization/static/assets/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/model-exchange/visualization/static/assets/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /model-exchange/visualization/static/assets/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/model-exchange/visualization/static/assets/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /model-exchange/visualization/static/assets/img/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/model-exchange/visualization/static/assets/img/1.jpg -------------------------------------------------------------------------------- /model-exchange/visualization/static/assets/img/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/model-exchange/visualization/static/assets/img/2.jpg -------------------------------------------------------------------------------- /model-exchange/visualization/static/assets/img/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/model-exchange/visualization/static/assets/img/3.jpg -------------------------------------------------------------------------------- /model-exchange/visualization/static/assets/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/model-exchange/visualization/static/assets/img/logo.png -------------------------------------------------------------------------------- /model-exchange/visualization/static/assets/img/user.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/model-exchange/visualization/static/assets/img/user.gif -------------------------------------------------------------------------------- /model-exchange/visualization/static/assets/img/user2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/model-exchange/visualization/static/assets/img/user2.png -------------------------------------------------------------------------------- /model-exchange/visualization/static/assets/js/custom.js: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | (function ($) { 5 | "use strict"; 6 | var mainApp = { 7 | slide_fun: function () { 8 | 9 | $('#carousel-example').carousel({ 10 | interval:3000 // THIS TIME IS IN MILLI SECONDS 11 | }) 12 | 13 | }, 14 | dataTable_fun: function () { 15 | 16 | $('#dataTables-example').dataTable(); 17 | 18 | }, 19 | 20 | custom_fun:function() 21 | { 22 | /*==================================== 23 | WRITE YOUR SCRIPTS BELOW 24 | ======================================*/ 25 | 26 | 27 | 28 | 29 | }, 30 | 31 | } 32 | 33 | 34 | $(document).ready(function () { 35 | mainApp.slide_fun(); 36 | mainApp.dataTable_fun(); 37 | mainApp.custom_fun(); 38 | }); 39 | }(jQuery)); 40 | 41 | 42 | -------------------------------------------------------------------------------- /model-hub/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | *.gv 3 | *.ipr 4 | *.iws 5 | *.orig 6 | *.rej 7 | *.sdf 8 | *.suo 9 | *.vcxproj.user 10 | *.log 11 | .idea 12 | .svn 13 | .classpath 14 | .project 15 | .settings 16 | .vscode 17 | target/ 18 | build/ 19 | out/ 20 | tmp/ 21 | dist/ 22 | 23 | 24 | # bin 25 | ms_server.exe 26 | 27 | #mod 28 | go.sum 29 | 30 | #test_upload file 31 | data -------------------------------------------------------------------------------- /model-hub/build.md: -------------------------------------------------------------------------------- 1 | # 编译配置 2 | 3 | 4 | go version >= 1.11 5 | 6 | 启用 go module 7 | 8 | 9 | 编译命令 `go build` 会自动拉取依赖编译出可执行的文件 10 | 11 | 启动: `ms_server --config ./config.json` -------------------------------------------------------------------------------- /model-hub/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "SERVER_PORT":"8080", 3 | "FILE_STORAGE_PATH": "./data", 4 | "MYSQL": "root:root@tcp(192.168.113.221:3308)/modelhub", 5 | "USER_CENTER":"http://192.168.113.221:9186", 6 | "EXCHANGE_SERVICE":"http://192.168.113.221:6023" 7 | } 8 | -------------------------------------------------------------------------------- /model-hub/go.mod: -------------------------------------------------------------------------------- 1 | module ms_server 2 | 3 | require ( 4 | github.com/go-sql-driver/mysql v1.4.1 5 | github.com/google/uuid v1.1.0 6 | github.com/json-iterator/go v1.1.5 7 | github.com/julienschmidt/httprouter v1.2.0 8 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect 9 | github.com/modern-go/reflect2 v1.0.1 // indirect 10 | go.uber.org/atomic v1.3.2 // indirect 11 | go.uber.org/multierr v1.1.0 // indirect 12 | go.uber.org/zap v1.9.1 13 | ) 14 | -------------------------------------------------------------------------------- /model-hub/lib/download/pipe.go: -------------------------------------------------------------------------------- 1 | package download 2 | 3 | import ( 4 | "io" 5 | ) 6 | 7 | 8 | const BUF_SIZE int64 = 512 9 | 10 | func Pipe(reader io.Reader,writer io.Writer,chunksize int64)(error) { 11 | 12 | var count int64 = 0 13 | 14 | var data_len int64 15 | 16 | var writeError error 17 | 18 | buf := make([]byte,BUF_SIZE,BUF_SIZE) 19 | 20 | var done bool = false 21 | 22 | for{ 23 | 24 | 25 | n,err := reader.Read(buf) 26 | 27 | data_len = int64(n) 28 | 29 | if count + data_len >= chunksize{ 30 | 31 | data_len = chunksize - count 32 | 33 | done = true 34 | } 35 | 36 | if err == nil { 37 | 38 | if data_len == BUF_SIZE{ 39 | 40 | _,writeError = writer.Write(buf) 41 | 42 | }else if data_len >0 && data_len < BUF_SIZE{ 43 | 44 | _,writeError = writer.Write(buf[0:data_len]) 45 | 46 | } 47 | 48 | if nil != writeError{ 49 | return writeError 50 | } 51 | 52 | }else{ 53 | 54 | if "EOF" == err.Error(){//读到文件末尾了, read at the end of the file 55 | if n > 0 { 56 | _,writeError = writer.Write(buf[0:data_len]) 57 | } 58 | break 59 | }else{ 60 | //非读到文件末尾的操作,则是异常 ,NOT EOF ERROR 61 | return err 62 | } 63 | } 64 | 65 | count = count + data_len 66 | 67 | if count == chunksize{ 68 | done = true 69 | } 70 | 71 | if done == true{ 72 | break; 73 | } 74 | 75 | } 76 | 77 | if nil != writeError{ 78 | return writeError 79 | } 80 | 81 | return nil 82 | } -------------------------------------------------------------------------------- /model-hub/lib/download/readme.md: -------------------------------------------------------------------------------- 1 | # 下载部分 2 | 3 | 下载部分为只读操作 4 | 5 | 数据在后端存的路径是: 6 | 7 | `rootPath`+`/`+ `username`+`/`+`projectName`+`/v`+`project_version` 8 | 9 | 假如后端模型数据都存在目录 `/module` 下, 那么用户`test` 的`imgNet`项目的`v1` 版本的存储路径就是 10 | 11 | `/module/test/imgNet/vv1` 12 | 13 | -------------------------------------------------------------------------------- /model-hub/lib/gbeta2/context.go: -------------------------------------------------------------------------------- 1 | // created by yyrdl on 2018.12.18 2 | 3 | package gbeta2 4 | 5 | import ( 6 | "sync" 7 | ) 8 | 9 | type Ctx struct { 10 | mu *sync.RWMutex 11 | store map[string]interface{} 12 | } 13 | 14 | 15 | func (c *Ctx) Set(key string, value interface{}) { 16 | c.mu.Lock() 17 | c.store[key] = value 18 | c.mu.Unlock() 19 | } 20 | 21 | 22 | func (c *Ctx) Get(key string) interface{} { 23 | c.mu.RLock() 24 | v := c.store[key] 25 | c.mu.RUnlock() 26 | return v 27 | } 28 | 29 | func (c *Ctx) Delete(key string) { 30 | c.mu.Lock() 31 | delete(c.store, key) 32 | c.mu.Unlock() 33 | } 34 | 35 | 36 | func (c *Ctx) Clear() { 37 | c.mu.Lock() 38 | for key, _ := range c.store { 39 | delete(c.store, key) 40 | } 41 | c.mu.Unlock() 42 | } 43 | 44 | 45 | func NewContext() *Ctx { 46 | c := new(Ctx) 47 | c.mu = new(sync.RWMutex) 48 | c.store = make(map[string]interface{}, 5) 49 | return c 50 | } -------------------------------------------------------------------------------- /model-hub/lib/gbeta2/readme.md: -------------------------------------------------------------------------------- 1 | # Gbeta2 2 | 3 | 这是在 httprouter 上架构的一个web框架, httprouter 提供了基础的功能,但稍显简陋。 4 | 所以在httprouter 之上增加如下几个功能: 5 | 6 | * 子路由 7 | * 中间件 8 | 9 | 10 | 中间件分两种类型:一种是可以在一个API 请求开始和处理结束之后定义一些操作,比如`./middleware/logger.go` 11 | 12 | 另一种可以请求被正式处理之前做一些准备工作,比如`./middleware/json_parser.go` 在请求被正式处理之前,先 13 | 将用户发送的数据转成JSON 格式 14 | 15 | 16 | 中间件 支持局部作用域,中间件的作用域 和 定义时的作用域一致,比如在子路由中使用的中间件在其他地方是看不到的。 17 | 18 | 在主路由定义的中间件在其之后的所有路径下均是可见的 19 | 20 | 21 | # 为什么不选用Gin这类框架? 22 | 23 | 诚然 github上高赞的框架 集成了很多基础设施,会很方便。但是无法判断他是否针对每次Http请求都有尝试去解析用户上传的数据, 24 | 在这个项目的API中上传部分的数据很大,也不需要解析,为了消除这个担忧而去check框架的代码的话还不如在httprouter上架构一层 25 | 来的快速容易。 26 | 27 | -------------------------------------------------------------------------------- /model-hub/lib/gbeta2/response.go: -------------------------------------------------------------------------------- 1 | // created by yyrdl on 2018.12.18 2 | package gbeta2 3 | 4 | 5 | import ( 6 | "net/http" 7 | "io" 8 | ) 9 | 10 | type Res struct { 11 | wr http.ResponseWriter 12 | size int 13 | status int 14 | } 15 | 16 | const ( 17 | noWritten = -1 18 | defaultStatus = 200 19 | ) 20 | 21 | func (w *Res) Clear( ) { 22 | w.wr = nil 23 | w.size = noWritten 24 | w.status = defaultStatus 25 | } 26 | 27 | func(w*Res)SetWriter(wr http.ResponseWriter){ 28 | w.wr = wr 29 | } 30 | 31 | func (w *Res) WriteHeader(code int) { 32 | if code > 0 && w.status != code { 33 | w.status = code 34 | } 35 | } 36 | 37 | func (w *Res) WriteHeaderNow() { 38 | if !w.Written() { 39 | w.size = 0 40 | w.wr.WriteHeader(w.status) 41 | } 42 | } 43 | 44 | func (w *Res) Write(data []byte) (n int, err error) { 45 | w.WriteHeaderNow() 46 | n, err = w.wr.Write(data) 47 | w.size += n 48 | return 49 | } 50 | 51 | func (w *Res) WriteString(s string) (n int, err error) { 52 | w.WriteHeaderNow() 53 | n, err = io.WriteString(w.wr, s) 54 | w.size += n 55 | return 56 | } 57 | 58 | func (w *Res) Status() int { 59 | if w.status > 0 { 60 | return w.status 61 | }else{ 62 | return 200 63 | } 64 | 65 | } 66 | 67 | func (w *Res) Size() int { 68 | return w.size 69 | } 70 | 71 | func (w *Res) Written() bool { 72 | return w.size != noWritten 73 | } 74 | 75 | 76 | func (w *Res) Flush() { 77 | w.WriteHeaderNow() 78 | w.wr.(http.Flusher).Flush() 79 | } -------------------------------------------------------------------------------- /model-hub/lib/project/info.go: -------------------------------------------------------------------------------- 1 | package project 2 | 3 | import ( 4 | "ms_server/lib/persist/mysql" 5 | "github.com/json-iterator/go" 6 | "errors" 7 | ) 8 | 9 | func Info(user,project,version string) (string,jsoniter.Any,error) { 10 | 11 | sql:= "SELECT * FROM ms_projects WHERE username = ? AND project_name = ?;" 12 | 13 | results,err := mysql_util.QueryAsJson(sql,user,project) 14 | 15 | 16 | if nil != err{ 17 | return "",nil,err 18 | } 19 | 20 | if results.Size() == 0{ 21 | return "",nil,errors.New(project +" Not Found!") 22 | } 23 | 24 | var tar_version string = version 25 | 26 | 27 | if "" == version{ 28 | var create_date int64 = 0 29 | for i:=0;i create_date{ 32 | create_date = date 33 | tar_version = results.Get(i).Get("project_version").ToString() 34 | } 35 | } 36 | } 37 | 38 | var info jsoniter.Any = nil 39 | 40 | for i:= 0;i= expiration{ 46 | 47 | w.WriteHeader(403) 48 | 49 | w.Write([]byte(`{"success":false,"message":"Token expired","token_expired":true}`)) 50 | 51 | sql:= "DELETE FROM ms_token WHERE token = ?;" 52 | 53 | db:= mysql_util.GetDB() 54 | 55 | rows2,_:= db.Query(sql,token) 56 | 57 | rows2.Close() 58 | 59 | return nil,nil 60 | } 61 | 62 | next() 63 | 64 | return nil,nil 65 | }) 66 | 67 | -------------------------------------------------------------------------------- /model-hub/middleware/json_parser.go: -------------------------------------------------------------------------------- 1 | //created by yyrdl on 2018.12.18 2 | package mw 3 | 4 | import ( 5 | "net/http" 6 | "ms_server/lib/gbeta2" 7 | "ms_server/util/log" 8 | "github.com/json-iterator/go" 9 | "io/ioutil" 10 | ) 11 | 12 | 13 | func JSON_Parser(w *gbeta2.Res, r *http.Request ,ctx *gbeta2.Ctx,next gbeta2.Next){ 14 | 15 | content_type:= r.Header.Get("Content-Type") 16 | 17 | if "application/json" != content_type{ 18 | next() 19 | return 20 | } 21 | 22 | body,err:= ioutil.ReadAll(r.Body) 23 | 24 | if nil != err{ 25 | 26 | logger := log.GetLogger() 27 | 28 | defer logger.Sync() 29 | logger.Error(err.Error()) 30 | 31 | w.WriteHeader(500) 32 | w.Write([]byte(`{"success":false,"msg":"Failed to read request body for path :`+r.URL.Path+`"}`)) 33 | }else{ 34 | var json = jsoniter.ConfigCompatibleWithStandardLibrary 35 | ctx.Set("body",json.Get([]byte(body))) 36 | next() 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /model-hub/middleware/link.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "github.com/julienschmidt/httprouter" 5 | "net/http" 6 | ) 7 | func Link(mws ...Middleware) httprouter.Handle { 8 | return func(w http.ResponseWriter, r *http.Request, ps httprouter.Params){ 9 | for _,mw:= range mws{ 10 | next:= mw(w,r,ps) 11 | if true!= next{ 12 | break 13 | } 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /model-hub/middleware/query_parser.go: -------------------------------------------------------------------------------- 1 | //created by yyrdl on 2018.12.18 2 | package mw 3 | 4 | import ( 5 | "net/http" 6 | "ms_server/lib/gbeta2" 7 | "net/url" 8 | "ms_server/util/log" 9 | ) 10 | 11 | 12 | func Query_Parser(w *gbeta2.Res, r *http.Request ,ctx *gbeta2.Ctx,next gbeta2.Next){ 13 | query,err:= url.ParseQuery(r.URL.RawQuery) 14 | if nil != err{ 15 | 16 | logger := log.GetLogger() 17 | 18 | defer logger.Sync() 19 | 20 | logger.Error(err.Error()) 21 | w.WriteHeader(500) 22 | w.Write([]byte(`{"success":false,"msg":"Failed to parse query:`+r.URL.Path+`"}`)) 23 | }else{ 24 | ctx.Set("query",query) 25 | next() 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /model-hub/middleware/type.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "github.com/julienschmidt/httprouter" 5 | "net/http" 6 | ) 7 | type Middleware func (w http.ResponseWriter, r *http.Request, ps httprouter.Params) bool -------------------------------------------------------------------------------- /model-hub/middleware/upload_exist.go: -------------------------------------------------------------------------------- 1 | //created by yyrdl on 2018.12.19 2 | package mw 3 | 4 | import ( 5 | "net/http" 6 | "ms_server/lib/gbeta2" 7 | "ms_server/lib/persist/mysql" 8 | "github.com/json-iterator/go" 9 | "net/url" 10 | "ms_server/util/log" 11 | ) 12 | 13 | 14 | func Upload_Task_Should_Exist(w *gbeta2.Res, r *http.Request ,ctx *gbeta2.Ctx,next gbeta2.Next){ 15 | 16 | query := ctx.Get("query").(url.Values) 17 | 18 | upload_id := query.Get("upload_id") 19 | 20 | if "" == upload_id{ 21 | if nil != ctx.Get("body"){ 22 | body := ctx.Get("body").(jsoniter.Any) 23 | upload_id = body.Get("upload_id").ToString() 24 | } 25 | } 26 | 27 | if "" == upload_id{ 28 | w.Write([]byte(`{"success":false,"message":"missing query param 'upload_id',path:`+r.URL.Path+`"}`)) 29 | return 30 | } 31 | 32 | sql := "SELECT project_name FROM ms_task WHERE task_id=?;" 33 | 34 | results,err:= mysql_util.QueryAsJson(sql,upload_id) 35 | 36 | if nil != err{ 37 | logger := log.GetLogger() 38 | 39 | defer logger.Sync() 40 | 41 | logger.Error(err.Error()) 42 | 43 | w.WriteHeader(500) 44 | w.Write([]byte(`{"success":false,"message":"Internal Error `+err.Error()+`"}`)) 45 | 46 | }else{ 47 | if results.Size() == 0{ 48 | w.Write([]byte(`{"success":false,"message":"Upload task is not existed!"}`)); 49 | }else{ 50 | next() 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /model-hub/middleware/wrap.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "github.com/julienschmidt/httprouter" 5 | "net/http" 6 | 7 | ) 8 | 9 | type Handler func(r *http.Request, ps httprouter.Params)([]byte,error) 10 | 11 | 12 | func Wrap(handler Handler)Middleware{ 13 | return func(w http.ResponseWriter, r *http.Request, ps httprouter.Params)bool{ 14 | response,err := handler(r,ps) 15 | if err != nil{ 16 | w.Write([]byte(`{"success":false,"message":"Internal Error:`+err.Error()+`"}`)) 17 | }else{ 18 | w.Write(response) 19 | } 20 | return false 21 | } 22 | } -------------------------------------------------------------------------------- /model-hub/router/index.go: -------------------------------------------------------------------------------- 1 | package router 2 | 3 | 4 | import ( 5 | "net/http" 6 | "ms_server/lib/gbeta2" 7 | "ms_server/util/json" 8 | "ms_server/util/http" 9 | ) 10 | 11 | func index(w *gbeta2.Res, r *http.Request, ctx *gbeta2.Ctx,next gbeta2.Next)(J.JSON,error){ 12 | return J.JSON{ 13 | "msg":"Welcome!", 14 | },nil 15 | } 16 | 17 | // export method 18 | var Index gbeta2.Handler = http_util.HandleError(index) 19 | 20 | -------------------------------------------------------------------------------- /model-hub/router/notFound.go: -------------------------------------------------------------------------------- 1 | package router 2 | 3 | import ( 4 | "github.com/julienschmidt/httprouter" 5 | "net/http" 6 | ) 7 | 8 | func NotFound(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { 9 | 10 | } -------------------------------------------------------------------------------- /model-hub/util/args/args.go: -------------------------------------------------------------------------------- 1 | package args 2 | 3 | import ( 4 | "strings" 5 | ) 6 | 7 | func ParseArgs(args []string) map[string]string { 8 | result := make(map[string]string) 9 | i:= 1 10 | var last_key string = "" 11 | 12 | for i < len(args){ 13 | key:= args[i] 14 | if 0 == strings.Index(key,"-"){ 15 | if "" != last_key{ 16 | result[last_key] = "EXIST_OPTION" 17 | } 18 | 19 | last_key = strings.Join(strings.Split(key,"-"),"") 20 | }else{ 21 | if last_key != ""{ 22 | result[last_key] = key 23 | } 24 | last_key = "" 25 | } 26 | i= i+1 27 | } 28 | 29 | return result 30 | } -------------------------------------------------------------------------------- /model-hub/util/http/helper.go: -------------------------------------------------------------------------------- 1 | package http_util 2 | 3 | import ( 4 | "net/http" 5 | "ms_server/lib/gbeta2" 6 | "github.com/json-iterator/go" 7 | "ms_server/util/json" 8 | "ms_server/util/log" 9 | ) 10 | 11 | var json = jsoniter.ConfigCompatibleWithStandardLibrary 12 | 13 | type _Http_Handle func(w *gbeta2.Res, r *http.Request, ctx *gbeta2.Ctx,next gbeta2.Next)(J.JSON,error) 14 | 15 | func HandleError(handle _Http_Handle) gbeta2.Handler{ 16 | return func(w *gbeta2.Res, r *http.Request, ctx *gbeta2.Ctx,next gbeta2.Next){ 17 | logger:= log.GetLogger() 18 | defer logger.Sync() 19 | response,err:= handle(w,r,ctx,next) 20 | if nil != err{ 21 | logger.Error(err.Error()) 22 | w.WriteHeader(500) 23 | w.Write([]byte(`{"success":false,"message":"Internal Error `+err.Error()+`"}`)) 24 | }else if nil != response{ 25 | bytes,err:= json.Marshal(response) 26 | if nil != err{ 27 | logger.Error(err.Error()) 28 | w.WriteHeader(500) 29 | w.Write([]byte(`{"success":false,"message":"Internal Error `+err.Error()+`"}`)) 30 | }else{ 31 | w.Write(bytes) 32 | } 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /model-hub/util/json/json.go: -------------------------------------------------------------------------------- 1 | //created by yyrdl on 2018.12.18 2 | package J 3 | 4 | 5 | type JSON map[string]interface{} -------------------------------------------------------------------------------- /model-hub/util/log/logger.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import ( 4 | "os" 5 | "go.uber.org/zap" 6 | "go.uber.org/zap/zapcore" 7 | ) 8 | 9 | var highPriority zap.LevelEnablerFunc = zap.LevelEnablerFunc(func(lvl zapcore.Level) bool { 10 | return lvl >= zapcore.ErrorLevel 11 | }) 12 | 13 | var lowPriority zap.LevelEnablerFunc = zap.LevelEnablerFunc(func(lvl zapcore.Level) bool { 14 | return lvl < zapcore.ErrorLevel 15 | }) 16 | 17 | 18 | var consoleDebugging zapcore.WriteSyncer = zapcore.Lock(os.Stdout) 19 | var consoleErrors zapcore.WriteSyncer = zapcore.Lock(os.Stderr) 20 | 21 | var consoleEncoder zapcore.Encoder = zapcore.NewJSONEncoder(zap.NewDevelopmentEncoderConfig()) 22 | 23 | var core zapcore.Core = zapcore.NewTee( 24 | zapcore.NewCore(consoleEncoder, consoleErrors, highPriority), 25 | zapcore.NewCore(consoleEncoder, consoleDebugging, lowPriority), 26 | ) 27 | 28 | 29 | func GetLogger() *zap.Logger { 30 | 31 | // From a zapcore.Core, it's easy to construct a Logger. 32 | 33 | return zap.New(core) 34 | 35 | } -------------------------------------------------------------------------------- /model-hub/util/path/path.go: -------------------------------------------------------------------------------- 1 | 2 | package path_util 3 | 4 | import ( 5 | "strings" 6 | ) 7 | 8 | // the Join method in the standard lib is wrong. 9 | 10 | func Join(ps ... string)string{ 11 | path_:= make([]string,0) 12 | for i:=0;i0 && temp[0] == ""{ 15 | path_ = append(path_,"/") 16 | } 17 | for k:=0;k-1;k--{ 25 | if ""!=path_[k]{ 26 | path_[i] = "" 27 | break 28 | } 29 | } 30 | }else if ".." == path_[i]{ 31 | for k:= i-1;k>-1;k--{ 32 | if ""!=path_[k]{ 33 | path_[k] = "" 34 | path_[i] = "" 35 | break 36 | } 37 | } 38 | } 39 | } 40 | 41 | var str string = "" 42 | 43 | for i:= 0;i 5 | 6 | 7 | + 8 | + 9 | + fs.defaultFS 10 | + hdfs://{HDFS_ADDRESS}:9000 11 | + 12 | + Formerly fs.default.name, the default path prefix used by the Hadoop FS client when 13 | + none is given. 14 | + 15 | + 16 | + 17 | + 18 | + hadoop.tmp.dir 19 | + /var/lib/hadoopdata 20 | + 21 | + A base for other temporary directories. 22 | + 23 | + 24 | + 25 | 26 | -------------------------------------------------------------------------------- /openi-management/config-patch/jobhistory-mapred-site.xml.patch: -------------------------------------------------------------------------------- 1 | --- hadoop-2.9.0/etc/hadoop/mapred-site.xml.template 2016-01-25 19:20:20.000000000 -0500 2 | +++ jobhistory-mapred-site.xml 2018-04-19 01:33:20.544102088 -0400 3 | @@ -1,4 +1,4 @@ 4 | - 5 | + 6 | 7 | 11 | 12 | 13 | + 14 | + mapreduce.framework.name 15 | + yarn 16 | + 17 | 18 | + 19 | + mapreduce.jobhistory.address 20 | + {LOGSERVER_ADDRESS}:10020 21 | + 22 | + 23 | + 24 | + mapreduce.jobhistory.webapp.address 25 | + {LOGSERVER_ADDRESS}:19888 26 | + 27 | + 28 | + 29 | + mapreduce.job.emit-timeline-data 30 | + true 31 | + 32 | + 33 | 34 | -------------------------------------------------------------------------------- /openi-management/config-patch/mapred-site.xml.patch: -------------------------------------------------------------------------------- 1 | --- hadoop/mapred-site.xml.template 2017-11-13 02:17:42.673171586 -0500 2 | +++ src/hadoop-run/mapred-site.xml 2017-11-13 02:18:24.373188897 -0500 3 | @@ -16,6 +16,12 @@ 4 | 5 | 6 | 7 | + 8 | + 9 | 10 | + 11 | + mapreduce.framework.name 12 | + yarn 13 | + 14 | 15 | 16 | -------------------------------------------------------------------------------- /openi-management/config-patch/nodemanager-mapred-site.xml.patch: -------------------------------------------------------------------------------- 1 | --- hadoop/mapred-site.xml.template 2017-11-13 02:17:42.673171586 -0500 2 | +++ bootstrap/hadoop-service/hadoop-configuration/nodemanager-mapred-site.xml 2017-11-13 02:37:45.785753184 -0500 3 | @@ -1,5 +1,4 @@ 4 | 5 | - 6 | 12 | 13 | - 14 | 15 | 16 | + 17 | + mapreduce.framework.name 18 | + yarn 19 | + 20 | 21 | + 22 | + mapreduce.jobhistory.address 23 | + {LOGSERVER_ADDRESS}:10020 24 | + 25 | + 26 | + 27 | + mapreduce.jobhistory.webapp.address 28 | + {LOGSERVER_ADDRESS}:19888 29 | + 30 | + 31 | + 32 | + mapreduce.job.emit-timeline-data 33 | + true 34 | + 35 | + 36 | + 37 | 38 | -------------------------------------------------------------------------------- /openi-management/config-patch/resourcemanager-mapred-site.xml.patch: -------------------------------------------------------------------------------- 1 | --- hadoop/mapred-site.xml.template 2017-11-13 02:17:42.673171586 -0500 2 | +++ bootstrap/hadoop-service/hadoop-configuration/resourcemanager-mapred-site.xml 2017-11-13 02:38:18.941768729 -0500 3 | @@ -1,5 +1,4 @@ 4 | 5 | - 6 | 12 | 13 | - 14 | - 15 | 16 | + 17 | + mapreduce.framework.name 18 | + yarn 19 | + 20 | + 21 | + 22 | + mapreduce.jobhistory.address 23 | + {LOGSERVER_ADDRESS}:10020 24 | + 25 | 26 | + 27 | + mapreduce.jobhistory.webapp.address 28 | + {LOGSERVER_ADDRESS}:19888 29 | + 30 | + 31 | + 32 | + mapreduce.job.emit-timeline-data 33 | + true 34 | + 35 | + 36 | 37 | -------------------------------------------------------------------------------- /openi-management/k8sPaiLibrary/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/openi-management/k8sPaiLibrary/__init__.py -------------------------------------------------------------------------------- /openi-management/k8sPaiLibrary/maintainlib/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation 2 | # All rights reserved. 3 | # 4 | # MIT License 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | # documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | # to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | # The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | # 12 | # THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | # BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | # 18 | # 19 | # Copyright (c) Peking University 2018 20 | # 21 | # The software is released under the Open-Intelligence Open Source License V1.0. 22 | # The copyright owner promises to follow "Open-Intelligence Open Source Platform 23 | # Management Regulation V1.0", which is provided by The New Generation of 24 | # Artificial Intelligence Technology Innovation Strategic Alliance (the AITISA). 25 | -------------------------------------------------------------------------------- /openi-management/kubernetesTool/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation 2 | # All rights reserved. 3 | # 4 | # MIT License 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | # documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | # to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | # The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | # 12 | # THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | # BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | # 18 | # 19 | # Copyright (c) Peking University 2018 20 | # 21 | # The software is released under the Open-Intelligence Open Source License V1.0. 22 | # The copyright owner promises to follow "Open-Intelligence Open Source Platform 23 | # Management Regulation V1.0", which is provided by The New Generation of 24 | # Artificial Intelligence Technology Innovation Strategic Alliance (the AITISA). 25 | -------------------------------------------------------------------------------- /openi-management/paiLibrary/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/openi-management/paiLibrary/__init__.py -------------------------------------------------------------------------------- /openi-management/paiLibrary/clusterObjectModel/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/openi-management/paiLibrary/clusterObjectModel/__init__.py -------------------------------------------------------------------------------- /openi-management/run_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) Microsoft Corporation 4 | # All rights reserved. 5 | # 6 | # MIT License 7 | # 8 | # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 9 | # documentation files (the "Software"), to deal in the Software without restriction, including without limitation 10 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 11 | # to permit persons to whom the Software is furnished to do so, subject to the following conditions: 12 | # The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 15 | # BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 16 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 17 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # 21 | # Copyright (c) Peking University 2018 22 | # 23 | # The software is released under the Open-Intelligence Open Source License V1.0. 24 | # The copyright owner promises to follow "Open-Intelligence Open Source Platform 25 | # Management Regulation V1.0", which is provided by The New Generation of 26 | # Artificial Intelligence Technology Innovation Strategic Alliance (the AITISA). 27 | 28 | python -m unittest discover test/ -------------------------------------------------------------------------------- /openi-management/src/zookeeper/myid: -------------------------------------------------------------------------------- 1 | {% if 'zkid' in host_config -%} 2 | {{ host_config['zkid'] }} 3 | {%- endif %} 4 | -------------------------------------------------------------------------------- /openi-management/src/zookeeper/zoo.cfg: -------------------------------------------------------------------------------- 1 | tickTime=2000 2 | dataDir=/var/lib/zoodata 3 | clientPort=2181 4 | initLimit=5 5 | syncLimit=2 6 | 7 | {% for host in cluster_config if 'zkid' in cluster_config[ host ] -%} 8 | server.{{cluster_config[ host ]['zkid']}}={{cluster_config[ host ]['ip']}}:2888:3888 9 | {% endfor %} 10 | -------------------------------------------------------------------------------- /openi-management/test/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation 2 | # All rights reserved. 3 | # 4 | # MIT License 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | # documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | # to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | # The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | # 12 | # THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | # BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | # 18 | # 19 | # Copyright (c) Peking University 2018 20 | # 21 | # The software is released under the Open-Intelligence Open Source License V1.0. 22 | # The copyright owner promises to follow "Open-Intelligence Open Source Platform 23 | # Management Regulation V1.0", which is provided by The New Generation of 24 | # Artificial Intelligence Technology Innovation Strategic Alliance (the AITISA). 25 | -------------------------------------------------------------------------------- /openi-management/test/data/data_maintainlib_common/test.yaml: -------------------------------------------------------------------------------- 1 | testkey1: testkey1 2 | testkey2: testkey2 3 | testkey3: testkey3 -------------------------------------------------------------------------------- /openi-management/test/data/data_maintainlib_common/test.yaml.template: -------------------------------------------------------------------------------- 1 | testkey1: {{hostcofig['testkey1']}} 2 | testkey2: {{clusterconfig['testkey2']}} 3 | testkey3: {{cluster['testkey3']}} -------------------------------------------------------------------------------- /openilogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/openilogo.png -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "lockfileVersion": 1 3 | } 4 | -------------------------------------------------------------------------------- /pylon/.gitignore: -------------------------------------------------------------------------------- 1 | .env* 2 | -------------------------------------------------------------------------------- /rest-server/.autod.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | write: true, 5 | prefix: '^', 6 | plugin: 'autod-egg', 7 | test: [ 8 | 'test', 9 | 'benchmark', 10 | ], 11 | dep: [ 12 | 'egg', 13 | 'egg-scripts', 14 | ], 15 | devdep: [ 16 | 'egg-ci', 17 | 'egg-bin', 18 | 'egg-mock', 19 | 'autod', 20 | 'autod-egg', 21 | 'eslint', 22 | 'eslint-config-egg', 23 | 'webstorm-disable-index', 24 | ], 25 | exclude: [ 26 | './test/fixtures', 27 | './dist', 28 | ], 29 | }; 30 | 31 | -------------------------------------------------------------------------------- /rest-server/.eslintignore: -------------------------------------------------------------------------------- 1 | coverage 2 | -------------------------------------------------------------------------------- /rest-server/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "eslint-config-egg" 3 | } 4 | -------------------------------------------------------------------------------- /rest-server/.gitignore: -------------------------------------------------------------------------------- 1 | logs/ 2 | npm-debug.log 3 | yarn-error.log 4 | node_modules/ 5 | package-lock.json 6 | coverage/ 7 | .idea/ 8 | run/ 9 | .DS_Store 10 | *.sw* 11 | *.un~ 12 | rest-server 13 | -------------------------------------------------------------------------------- /rest-server/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - '8' 5 | install: 6 | - npm i npminstall && npminstall 7 | script: 8 | - npm run ci 9 | after_script: 10 | - npminstall codecov && codecov 11 | -------------------------------------------------------------------------------- /rest-server/app.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | 'use strict'; 19 | const fse = require('fs-extra'); 20 | require.extensions['.mustache'] = (module, filename) => { 21 | module.exports = fse.readFileSync(filename, 'utf8'); 22 | }; 23 | global.Promise = require('bluebird').Promise; 24 | 25 | module.exports = () => { 26 | }; 27 | -------------------------------------------------------------------------------- /rest-server/app/controllerSchema/token.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | 'use strict'; 19 | const Joi = require('joi'); 20 | 21 | module.exports = { 22 | get: Joi.object().keys({ 23 | username: Joi.string() 24 | .required(), 25 | password: Joi.string() 26 | .min(6) 27 | .required(), 28 | expiration: Joi.number() 29 | .integer() 30 | .min(60) 31 | .max(7 * 24 * 60 * 60) 32 | .default(24 * 60 * 60), 33 | }).required(), 34 | }; 35 | -------------------------------------------------------------------------------- /rest-server/app/middleware/compress_handler.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 'use strict'; 18 | 19 | module.exports = require('koa-compress'); 20 | -------------------------------------------------------------------------------- /rest-server/app/middleware/notfound_handler.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | 'use strict'; 19 | const LError = require("../error/proto"); 20 | const ECode = require("../error/code"); 21 | 22 | module.exports = () => { 23 | return async function notFoundHandler(ctx, next) { 24 | await next(); 25 | if (ctx.status === 404 && !ctx.body) { 26 | ctx.body = (new LError(ECode.NOT_FOUND,"Path not found!")).toJson(); 27 | } 28 | }; 29 | }; 30 | -------------------------------------------------------------------------------- /rest-server/app/router.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const Routes = require('./routes'); 3 | 4 | module.exports = app => { 5 | new Routes(app).load(); 6 | const { routes } = app; 7 | 8 | 9 | routes.vc.namespace('/api/v1/virtual-clusters'); 10 | routes.imageSet.namespace('/api/v1/imagesets'); 11 | routes.token.namespace('/api/v1/token'); 12 | routes.user.namespace('/api/v1/user'); 13 | routes.job.namespace('/api/v1/jobs'); 14 | }; 15 | -------------------------------------------------------------------------------- /rest-server/app/routes/image_set.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | 'use strict'; 19 | 20 | module.exports = (app, router) => { 21 | // 获取所有镜像信息 22 | router.get('/', 'imageset.list'); 23 | 24 | // 获取单个镜像具体信息 25 | router.get('/:imagesetId', 'imageset.get'); 26 | }; 27 | -------------------------------------------------------------------------------- /rest-server/app/routes/token.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | 'use strict'; 19 | 20 | module.exports = (app, router) => { 21 | router.post('/', 'token.get'); 22 | }; 23 | -------------------------------------------------------------------------------- /rest-server/app/routes/vc.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | 'use strict'; 19 | 20 | module.exports = (app, router) => { 21 | const convertVcNameHandler = app.middleware.convertVcNameHandler(); 22 | 23 | router.get('/', 'vc.list'); 24 | router.get('/:vcName', 'vc.get'); 25 | 26 | router.param('vcName', convertVcNameHandler); 27 | }; 28 | -------------------------------------------------------------------------------- /rest-server/app/service/token.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | 'use strict'; 19 | 20 | const Service = require('egg').Service; 21 | const jwt = require('jsonwebtoken'); 22 | 23 | class TokenService extends Service { 24 | async generate(payload = {}, options) { 25 | const { jwt: jwtConfig } = this.config; 26 | return jwt.sign(payload, jwtConfig.secret, options); 27 | } 28 | } 29 | 30 | module.exports = TokenService; 31 | -------------------------------------------------------------------------------- /rest-server/app/tpl/jobContainerSsh2bat.tpl: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | type nul> {{privateKeyFileName}}.key 4 | <% for(var i = 0; i < privateKey.length; i++){ %> 5 | {{if privateKey[i]}}echo {{privateKey[i]}}>> {{privateKeyFileName}}.key{{/if}} 6 | <% } %> 7 | ssh -i ./{{privateKeyFileName}}.key -p {{sshPort}} root@{{sshIp}} 8 | pause -------------------------------------------------------------------------------- /rest-server/app/tpl/jobContainerSsh2sh.tpl: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cat > {{privateKeyFileName}} << EOF 3 | {{privateKey}} 4 | EOF 5 | chmod 600 {{privateKeyFileName}} 6 | ssh -i {{privateKeyFileName}} -p {{sshPort}} root@{{sshIp}} -------------------------------------------------------------------------------- /rest-server/appveyor.yml: -------------------------------------------------------------------------------- 1 | environment: 2 | matrix: 3 | - nodejs_version: '8' 4 | 5 | install: 6 | - ps: Install-Product node $env:nodejs_version 7 | - npm i npminstall && node_modules\.bin\npminstall 8 | 9 | test_script: 10 | - node --version 11 | - npm --version 12 | - npm run test 13 | 14 | build: off 15 | -------------------------------------------------------------------------------- /rest-server/config/plugin.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | // const path = require('path'); 3 | 4 | module.exports = { 5 | sequelize: { 6 | enable: true, 7 | package: 'egg-sequelize', 8 | }, 9 | cors: { 10 | enable: true, 11 | package: 'egg-cors', 12 | }, 13 | security: { 14 | enable: true, 15 | package: 'egg-security', 16 | }, 17 | routerPlus: { 18 | enable: true, 19 | package: 'egg-router-plus', 20 | }, 21 | }; 22 | -------------------------------------------------------------------------------- /rest-server/test/app/controller/home.test.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const { app, assert } = require('egg-mock/bootstrap'); 4 | 5 | describe('test/app/controller/token.test.js', () => { 6 | describe('POST /api/v1/token', () => { 7 | it('should status 200 and get the body', async () => { 8 | const result = await app.httpRequest() 9 | .post('/api/v1/token') 10 | .send({ 11 | username: 'admin', 12 | password: 'KLtmMug9BDvvRjlg', 13 | expiration: 7200, 14 | }); 15 | assert(result.status === 200); 16 | assert(result.body.username); 17 | assert(result.body.token); 18 | }); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /rest-server/test/app/controller/vc.test.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const { app, assert } = require('egg-mock/bootstrap'); 4 | 5 | describe('test/app/controller/vc.test.js', () => { 6 | 7 | it('should assert', function* () { 8 | const pkg = require('../../../package.json'); 9 | assert(app.config.keys.startsWith(pkg.name)); 10 | 11 | // const ctx = app.mockContext({}); 12 | // yield ctx.service.xx(); 13 | }); 14 | 15 | }); 16 | -------------------------------------------------------------------------------- /rest-server/util/index.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | 'use strict'; 19 | 20 | module.exports = { 21 | deepCopy: function deepExtend(source, obj) { 22 | for (const key in obj) { 23 | if (obj.hasOwnProperty(key)) { 24 | if (typeof obj[key] === 'object') { 25 | source[key] = deepExtend(obj[key]); // 递归复制 26 | } else { 27 | source[key] = obj[key]; 28 | } 29 | } 30 | } 31 | return source; 32 | }, 33 | }; 34 | -------------------------------------------------------------------------------- /sysarch-zh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/sysarch-zh.png -------------------------------------------------------------------------------- /sysarch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/sysarch.png -------------------------------------------------------------------------------- /user manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/user manual.pdf -------------------------------------------------------------------------------- /webportal/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "env": { 3 | "browser": true, 4 | "es6": true, 5 | "node": true, 6 | "jquery": true, 7 | }, 8 | "extends": ["eslint:recommended", "google"], 9 | "globals": { 10 | "cookies": false, 11 | "userLogout": false, 12 | }, 13 | "rules": { 14 | "max-len": [0, 80], 15 | "require-jsdoc": 0, 16 | "valid-jsdoc": 0, 17 | }, 18 | }; 19 | -------------------------------------------------------------------------------- /webportal/.gitignore: -------------------------------------------------------------------------------- 1 | *.zip 2 | job-docs.md 3 | job-submit.example.json 4 | src/app/config/ 5 | 6 | # gitignore file for node js 7 | # Created by GitHub (https://github.com/github/gitignore/blob/master/Node.gitignore) 8 | 9 | # Logs 10 | logs 11 | *.log 12 | npm-debug.log* 13 | yarn-debug.log* 14 | yarn-error.log* 15 | 16 | # Runtime data 17 | pids 18 | *.pid 19 | *.seed 20 | *.pid.lock 21 | 22 | # Directory for instrumented libs generated by jscoverage/JSCover 23 | lib-cov 24 | 25 | # Coverage directory used by tools like istanbul 26 | coverage 27 | 28 | # nyc test coverage 29 | .nyc_output 30 | 31 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 32 | .grunt 33 | 34 | # Bower dependency directory (https://bower.io/) 35 | bower_components 36 | 37 | # node-waf configuration 38 | .lock-wscript 39 | 40 | # Compiled binary addons (https://nodejs.org/api/addons.html) 41 | build/Release 42 | 43 | # Dependency directories 44 | node_modules/ 45 | jspm_packages/ 46 | 47 | # Typescript v1 declaration files 48 | typings/ 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Optional REPL history 57 | .node_repl_history 58 | 59 | # Output of 'npm pack' 60 | *.tgz 61 | 62 | # Yarn Integrity file 63 | .yarn-integrity 64 | 65 | # dotenv environment variables file 66 | .env* 67 | 68 | #build 69 | dist -------------------------------------------------------------------------------- /webportal/.npmrc: -------------------------------------------------------------------------------- 1 | save=true 2 | save-exact=true -------------------------------------------------------------------------------- /webportal/README-ZH.md: -------------------------------------------------------------------------------- 1 | # **Webportal** 2 | 3 | webportal网络门户是任务和集群管理的入口。用户可以通过网络用户界面提交、监视或终止任务。集群操作员可以通过webportal查看和管理集群状态。 4 | 5 | ## 部署 6 | 7 | 服务部署中的 [readme](https://github.com/open-intelligence/OpenI/blob/master/service-deployment/README.md)文件介绍了包含Web Portal的整个安装过程。[clusterconfig.yaml](https://github.com/open-intelligence/OpenI/blob/master/service-deployment/clusterconfig-example.yaml)中下列参数是webportal所涉及的: 8 | 9 | - `REST_SERVER_URI`: String, rest-server服务的url,例如: 10 | - `GRAFANA_URI`: String, grafana 服务的url,例如: [http://10.0.3.9:9090](http://10.0.3.9:9090/) 11 | - `K8S_DASHBOARD_URI`: String, kubernetes dashboard的url,例如: 12 | - `SERVER_PORT`: Int, 启动WebPortal使用的端口, 例如:默认9286 13 | 14 | ## 用法 15 | 16 | ### 提交任务 17 | 18 | 单击"Submit Job" (“提交任务”),显示一个按钮,要求您提交一个json文件。作业配置文件必须遵循 [job tutorial](https://github.com/open-intelligence/OpenI/blob/master/job-tutorial/README.md)中格式。 19 | 20 | ### 查看任务状态 21 | 22 | 单击"Job View" (“任务列表”),查看所有任务列表。单击每个任务可查看其详细的实时状态。 23 | 24 | ### 查看群集状态--仅admin用户 25 | 26 | 单击"Cluster View" (“群集视图”),查看整个群集的状态。注: 27 | 28 | - Services服务:每台机器所有服务的状态。 29 | 30 | - Hardware硬件:每台机器的硬件指标。 31 | 32 | - K8s Dashboard:Kubernetes仪表板。 33 | - Cluster Dashboard:集群仪表板,可查看集群的资源使用情况。 34 | 35 | -------------------------------------------------------------------------------- /webportal/config/helpers.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | 19 | // module dependencies 20 | const path = require('path'); 21 | 22 | 23 | const root = path.join.bind(path, path.resolve(__dirname, '..')); 24 | 25 | module.exports = { root }; -------------------------------------------------------------------------------- /webportal/config/webportal.config.dev.js: -------------------------------------------------------------------------------- 1 | /** 2 | * config for dev 3 | * */ 4 | 5 | let config = { 6 | restServerUri: 'http://127.0.0.1:9186', 7 | prometheusUri: "http://192.168.113.221:9091", 8 | yarnWebPortalUri: "http://192.168.113.221:8088", 9 | grafanaUri: "http://192.168.113.221:3000", 10 | k8sDashboardUri:"http://192.168.113.221:9090", 11 | k8sApiServerUri:'http://192.168.113.221:8080', 12 | exporterPort: "9100", 13 | orderServiceUrl: process.env.ORDER_SERVICE_URL, 14 | clusterName: process.env.CLUSTER_NAME, 15 | // for debug config 16 | REPLACEDCOMMAND: "sleep 1800", 17 | DEBUGVC: "vc1", 18 | // for spec 19 | CPURATIO: 2, 20 | MEMRATIO: 8196, 21 | 22 | // for competition 23 | COMPETITIONUSER: "pai_admin_username", 24 | COMPETITIONVC: "vc2", 25 | }; 26 | 27 | // module exports 28 | module.exports = config; -------------------------------------------------------------------------------- /webportal/server/index.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | 19 | module.exports = require('./server'); -------------------------------------------------------------------------------- /webportal/server/server.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | 19 | // module dependencies 20 | const config = require('./config/index'); 21 | const logger = require('./config/logger'); 22 | const app = require('./config/express'); 23 | 24 | logger.info('config: %j', config); 25 | 26 | // start the server 27 | app.listen(config.serverPort, () => { 28 | logger.info('Webportal server starts on port %d', config.serverPort); 29 | }); -------------------------------------------------------------------------------- /webportal/src/app/cluster-view/hardware/hardware-detail.component.ejs: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Hardware Utilization: <%= instance.split(':')[0] %>

4 | 8 |
9 | -------------------------------------------------------------------------------- /webportal/src/app/cluster-view/hardware/hardware.component.scss: -------------------------------------------------------------------------------- 1 | .metric-cell { 2 | width: 80px; 3 | text-align: center 4 | } 5 | 6 | .metric-span { 7 | width: 14px; 8 | height: 14px; 9 | } 10 | 11 | .metric-icon { 12 | top: -7px; 13 | } 14 | 15 | .metric-icon-loading { 16 | color: silver; 17 | } -------------------------------------------------------------------------------- /webportal/src/app/cluster-view/k8s/k8s.component.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /webportal/src/app/cluster-view/services/service-view.component.scss: -------------------------------------------------------------------------------- 1 | .btn, .label{ 2 | padding: 3px; 3 | margin: 2px; 4 | font-size: 13px; 5 | } 6 | 7 | .table{ 8 | min-width: 3000px; 9 | } 10 | 11 | .table > thead{ 12 | background: #fff; 13 | overflow: hidden; 14 | } -------------------------------------------------------------------------------- /webportal/src/app/cluster-view/services/services.component.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

View Services

5 |
6 |
7 | <%= serviceTable({ data: [] }) %> 8 |
9 |
10 |
11 |
12 | <%= loading() %> 13 |
14 | -------------------------------------------------------------------------------- /webportal/src/app/common/common.js: -------------------------------------------------------------------------------- 1 | const errorHandle = (xhr) => { 2 | const res = JSON.parse(xhr.responseText) 3 | if(res.code!=null){ 4 | if(res.code.startsWith('UnauthorizedUserError')){ 5 | alert('login timeout'); 6 | window.location.replace('/login.html'); 7 | } 8 | } 9 | if(res.error!=null){ 10 | if(!res.error.startsWith("UserHasNoJobList")){ 11 | alert(res.message); 12 | } 13 | } 14 | }; 15 | 16 | module.exports = {errorHandle}; 17 | -------------------------------------------------------------------------------- /webportal/src/app/dashboard/dashboard.component.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /webportal/src/app/fileCenter/fileCenter.component.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /webportal/src/app/index.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | window.location.replace('/login.html'); 19 | -------------------------------------------------------------------------------- /webportal/src/app/index2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 |
9 | 10 |
11 | 12 | 19 |
20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /webportal/src/app/index2.js: -------------------------------------------------------------------------------- 1 | require('jquery'); 2 | require('bootstrap'); 3 | require('bootstrap/dist/css/bootstrap.min.css'); -------------------------------------------------------------------------------- /webportal/src/app/job/breadcrumb/breadcrumb.component.ejs: -------------------------------------------------------------------------------- 1 |

<%= breadcrumbTitle %>

2 | -------------------------------------------------------------------------------- /webportal/src/app/job/dataset-view/dataset-table.component.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | <% for (let i = 0; i < datasets.length; i ++) { %> 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | <% } %> 23 | 24 |
IdNameTypePathProviderCreateTime
<%= datasets[i].id %><%= datasets[i].name %><%= datasets[i].type %><%= datasets[i].place %><%= datasets[i].provider %><%= datasets[i].createtime %>
25 | -------------------------------------------------------------------------------- /webportal/src/app/job/dataset-view/dataset-view.component.ejs: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | <%= datasetTable({ datasets: [] }) %> 6 |
7 |
8 | <%= loading() %> 9 |
10 | -------------------------------------------------------------------------------- /webportal/src/app/job/dataset-view/dataset-view.component.scss: -------------------------------------------------------------------------------- 1 | .divider { 2 | border-top: 1px solid #7c7c7c; 3 | } 4 | 5 | .table > tbody > tr > td { 6 | vertical-align: middle; 7 | } -------------------------------------------------------------------------------- /webportal/src/app/job/imageset-view/imageset-table.component.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | <% for (let i = 0; i < imagesets.length; i ++) { %> 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | <% } %> 21 | 22 |
IdNamePathProviderCreateTime
<%= imagesets[i].id %><%= imagesets[i].name %><%= imagesets[i].place %><%= imagesets[i].provider %><%= imagesets[i].createtime %>
23 | -------------------------------------------------------------------------------- /webportal/src/app/job/imageset-view/imageset-view.component.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | <%= imagesetTable({ imagesets: [] }) %> 5 |
6 |
7 | <%= loading() %> 8 | 24 |
25 | -------------------------------------------------------------------------------- /webportal/src/app/job/imageset-view/imageset-view.component.scss: -------------------------------------------------------------------------------- 1 | .divider { 2 | border-top: 1px solid #7c7c7c; 3 | } 4 | 5 | .table > tbody > tr > td { 6 | vertical-align: middle; 7 | } -------------------------------------------------------------------------------- /webportal/src/app/job/job-docs/job-docs.component.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

Introduction

5 |
6 | 9 |
10 |
11 |
12 | This is the web portal of the GPU cluster. 13 |
14 |
15 |
16 |
17 |

Job Guide

18 |
19 | 22 |
23 |
24 |
25 | ${require('./job-docs.md')} 26 |
27 |
28 |
-------------------------------------------------------------------------------- /webportal/src/app/job/job-docs/job-docs.component.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | 19 | // module dependencies 20 | const jobDocsComponent = require('./job-docs.component.ejs'); 21 | 22 | 23 | const jobDocsHtml = jobDocsComponent({ 24 | }); 25 | 26 | $('#sidebar-menu--documents').addClass('active'); 27 | $('#sidebar-menu--documents--getting-started').addClass('active'); 28 | 29 | $('#content-wrapper').html(jobDocsHtml); 30 | -------------------------------------------------------------------------------- /webportal/src/app/job/job-public/job-public-detail-config-info-modal.component.ejs: -------------------------------------------------------------------------------- 1 | 2 | 17 | -------------------------------------------------------------------------------- /webportal/src/app/job/job-public/job-public-table.component.ejs: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /webportal/src/app/job/job-public/job-public.component.ejs: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 |
7 |
8 |
9 | <%= publicJobTable({ jobs: [] }) %> 10 |
11 |
12 | <%= loading() %> 13 |
-------------------------------------------------------------------------------- /webportal/src/app/job/job-public/job-public.component.scss: -------------------------------------------------------------------------------- 1 | divider { 2 | border-top: 1px solid #7c7c7c; 3 | } 4 | 5 | .table > tbody > tr > td { 6 | vertical-align: middle; 7 | } 8 | 9 | .modal { 10 | position: relative; 11 | top: auto; 12 | bottom: auto; 13 | right: auto; 14 | left: auto; 15 | display: block; 16 | z-index: 1; 17 | } 18 | -------------------------------------------------------------------------------- /webportal/src/app/job/job-submit/getRandCharacter.js: -------------------------------------------------------------------------------- 1 | const randomNumber = function randomNumber() { 2 | let str = ""; 3 | let range = 5 ; 4 | let arr = ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n', 5 | 'o','p','q','r','s','t','u','v','w','x','y','z']; 6 | for (var i = 0 ;i=97 && (nid.substr(i,1).charCodeAt()<=122))){ 21 | sum += parseInt((nid.substr(i,1).charCodeAt()-96),10)*arrExp[i]; 22 | }else { 23 | //对前5位数字与权值求和 24 | sum += parseInt(nid.substr(i,1),10)*arrExp[i]; 25 | //计算模 26 | } 27 | } 28 | idx = sum % 37; 29 | //校验码 30 | checkNumber = arrValid[idx]; 31 | 32 | return nid+checkNumber; 33 | } 34 | module.exports= {randomNumber,isNewId}; 35 | -------------------------------------------------------------------------------- /webportal/src/app/job/job-view/bootstrap-table-zh-CN.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * bootstrap-table - v1.12.1 - 2018-03-12 3 | * https://github.com/wenzhixin/bootstrap-table 4 | * Copyright (c) 2018 zhixin wen 5 | * Licensed MIT License 6 | */ 7 | !function(a){"use strict";a.fn.bootstrapTable.locales["zh-CN"]={formatLoadingMessage:function(){return"正在努力地加载数据中,请稍候……"},formatRecordsPerPage:function(a){return"每页显示 "+a+" 条记录"},formatShowingRows:function(a,b,c){return"显示第 "+a+" 到第 "+b+" 条记录,总共 "+c+" 条记录"},formatSearch:function(){return"搜索"},formatNoMatches:function(){return"没有找到匹配的记录"},formatPaginationSwitch:function(){return"隐藏/显示分页"},formatRefresh:function(){return"刷新"},formatToggle:function(){return"切换"},formatColumns:function(){return"列"},formatExport:function(){return"导出数据"},formatClearFilters:function(){return"清空过滤"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["zh-CN"])}(jQuery); -------------------------------------------------------------------------------- /webportal/src/app/job/job-view/job-detail-config-info-modal.component.ejs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /webportal/src/app/job/job-view/job-detail-ssh-info-modal.component.ejs: -------------------------------------------------------------------------------- 1 | 2 | 23 | -------------------------------------------------------------------------------- /webportal/src/app/job/job-view/job-public-detail-table.component.ejs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /webportal/src/app/job/job-view/job-table.component.ejs: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /webportal/src/app/job/job-view/job-view-public.component.ejs: -------------------------------------------------------------------------------- 1 | 2 | 26 | -------------------------------------------------------------------------------- /webportal/src/app/job/job-view/job-view.component.ejs: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 | <%= jobTable({ jobs: [] }) %> 7 |
8 |
9 | <%= loading() %> 10 |
11 | -------------------------------------------------------------------------------- /webportal/src/app/job/job-view/job-view.component.scss: -------------------------------------------------------------------------------- 1 | .divider { 2 | border-top: 1px solid #7c7c7c; 3 | } 4 | 5 | .table > tbody > tr > td { 6 | vertical-align: middle; 7 | } 8 | 9 | 10 | .disabled { 11 | pointer-events: none; 12 | color: silver; 13 | cursor: default; 14 | } 15 | 16 | .btn-group-sm>.btn, .btn-sm{ 17 | padding: 1px 5px!important; 18 | } 19 | -------------------------------------------------------------------------------- /webportal/src/app/job/job-view/resource-detail-table.ejs: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /webportal/src/app/job/job-view/resource-view-component.ejs: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 |
7 |
8 |
9 | <%= resourceTable({ resources: [] }) %> 10 |
11 |
12 | <%= loading() %> 13 |
-------------------------------------------------------------------------------- /webportal/src/app/job/loading/loading.component.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 |
-------------------------------------------------------------------------------- /webportal/src/app/job/loading/loading.component.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | 19 | // module dependencies 20 | require('./loading.component.scss'); 21 | 22 | 23 | const showLoading = () => { 24 | $('#mask').show(); 25 | }; 26 | 27 | const hideLoading = () => { 28 | $('#mask').hide(); 29 | }; 30 | 31 | module.exports = {showLoading, hideLoading}; 32 | -------------------------------------------------------------------------------- /webportal/src/app/job/loading/loading.component.scss: -------------------------------------------------------------------------------- 1 | .mask { 2 | display: none; 3 | position: absolute; 4 | top: 0; 5 | left: 0; 6 | width: 100%; 7 | height: 100%; 8 | background-color: #f5f5f5; 9 | opacity: 0.5; 10 | } 11 | 12 | .loading { 13 | display: block; 14 | position: absolute; 15 | top: 40%; 16 | left: 40%; 17 | width: 20%; 18 | height: 20%; 19 | text-align: center; 20 | } -------------------------------------------------------------------------------- /webportal/src/app/order/order-package/order-package.component.ejs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /webportal/src/app/publish/publish-msg/publish-msg.component.ejs: -------------------------------------------------------------------------------- 1 | 2 |
3 |

发布文章

4 |
5 |
6 | 7 | 8 | 9 |
10 |
11 | 12 | 15 | 16 |
17 |
18 |
-------------------------------------------------------------------------------- /webportal/src/app/user/change-password/change-password.component.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 | 17 |
18 |
19 |
20 |
21 |
22 |
-------------------------------------------------------------------------------- /webportal/src/app/user/change-password/change-password.component.scss: -------------------------------------------------------------------------------- 1 | .form-change-password { 2 | max-width: 360px; 3 | padding: 40px; 4 | margin: 0 auto; 5 | } 6 | 7 | .message-box-error { 8 | margin-top:10px; 9 | color: Red; 10 | } 11 | 12 | .message-box-error:before { 13 | content: '* '; 14 | color: Red; 15 | } 16 | 17 | .message-box-info { 18 | margin-top:10px; 19 | color: black; 20 | } 21 | 22 | .form-change-password label{ 23 | margin-top:10px; 24 | } 25 | 26 | .form-reset-password .form-reset-password-heading, 27 | .form-reset-password .checkbox { 28 | margin-bottom: 10px; 29 | } 30 | 31 | .form-reset-password .checkbox { 32 | font-weight: normal; 33 | } 34 | 35 | .form-reset-password .form-control { 36 | position: relative; 37 | height: auto; 38 | -webkit-box-sizing: border-box; 39 | -moz-box-sizing: border-box; 40 | box-sizing: border-box; 41 | padding: 10px; 42 | font-size: 16px; 43 | } 44 | 45 | .form-reset-password .form-control:focus { 46 | z-index: 2; 47 | } 48 | 49 | .form-reset-password input[type="password"] { 50 | margin-bottom: 10px; 51 | border-bottom-right-radius: 0; 52 | border-bottom-left-radius: 0; 53 | } -------------------------------------------------------------------------------- /webportal/src/app/user/user-auth/user-auth.component.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | 19 | const checkToken = (callback) => { 20 | const authToken = cookies.get('token'); 21 | if (authToken) { 22 | callback(authToken); 23 | } else { 24 | alert('login timeout'); 25 | window.location.replace('/login.html'); 26 | } 27 | }; 28 | 29 | const checkAdmin = () => { 30 | return cookies.get('admin'); 31 | }; 32 | 33 | module.exports = {checkToken, checkAdmin}; 34 | -------------------------------------------------------------------------------- /webportal/src/app/user/user-login/user-login-nav.component.ejs: -------------------------------------------------------------------------------- 1 | <% if (cookies.get("token")) { %> 2 | 11 | <% } else { %> 12 |
  • 13 | 14 | 15 | Login 16 | 17 |
  • 18 | <% } %> -------------------------------------------------------------------------------- /webportal/src/app/user/user-login/user-login.component.scss: -------------------------------------------------------------------------------- 1 | .form-login { 2 | max-width: 360px; 3 | padding: 40px; 4 | margin: 0 auto; 5 | } 6 | 7 | .form-login .form-login-heading, 8 | .form-login .checkbox { 9 | margin-bottom: 10px; 10 | } 11 | 12 | .form-login .checkbox { 13 | font-weight: normal; 14 | } 15 | 16 | .form-login .form-control { 17 | position: relative; 18 | height: auto; 19 | //-webkit-box-sizing: border-box; 20 | // -moz-box-sizing: border-box; 21 | // box-sizing: border-box; 22 | padding: 10px; 23 | font-size: 16px; 24 | } 25 | 26 | .form-login .form-control:focus { 27 | z-index: 2; 28 | } 29 | 30 | .form-login input[type="username"] { 31 | margin-bottom: -1px; 32 | border-bottom-right-radius: 0; 33 | border-bottom-left-radius: 0; 34 | } 35 | 36 | .form-login input[type="password"] { 37 | margin-bottom: 10px; 38 | border-top-left-radius: 0; 39 | border-top-right-radius: 0; 40 | } 41 | 42 | #err_txt{ 43 | color: red; 44 | } -------------------------------------------------------------------------------- /webportal/src/app/user/user-register/user-register.component.scss: -------------------------------------------------------------------------------- 1 | 2 | #err_txt{ 3 | color: red; 4 | } -------------------------------------------------------------------------------- /webportal/src/app/vc/vc.component.scss: -------------------------------------------------------------------------------- 1 | .metric-cell { 2 | width: 80px; 3 | text-align: center 4 | } 5 | 6 | .metric-span { 7 | width: 14px; 8 | height: 14px; 9 | } 10 | 11 | .metric-icon { 12 | top: -7px; 13 | } 14 | 15 | .metric-icon-loading { 16 | color: silver; 17 | } -------------------------------------------------------------------------------- /webportal/src/assets/img/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/background.png -------------------------------------------------------------------------------- /webportal/src/assets/img/bg_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/bg_login.png -------------------------------------------------------------------------------- /webportal/src/assets/img/dataset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/dataset.png -------------------------------------------------------------------------------- /webportal/src/assets/img/datasetw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/datasetw.png -------------------------------------------------------------------------------- /webportal/src/assets/img/default-user-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/default-user-icon.png -------------------------------------------------------------------------------- /webportal/src/assets/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/favicon.ico -------------------------------------------------------------------------------- /webportal/src/assets/img/icon-addjob-act.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon-addjob-act.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon-addjob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon-addjob.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon-arr-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon-arr-down.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon-arr-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon-arr-left.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon-collectbtn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon-collectbtn.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon-documents-act.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon-documents-act.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon-documents.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon-documents.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon-fav-jspt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon-fav-jspt.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon-fbszc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon-fbszc.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon-glygj-act.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon-glygj-act.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon-glygj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon-glygj.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon-jobview-act.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon-jobview-act.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon-jobview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon-jobview.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon-jrxyjq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon-jrxyjq.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon-logo-inner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon-logo-inner.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon-logo-pai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon-logo-pai.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon-nav-openi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon-nav-openi.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon-openi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon-openi.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon-task.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon-task.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon-xnjq-act.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon-xnjq-act.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon-xnjq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon-xnjq.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon-zgjhjm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon-zgjhjm.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon_fb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon_fb.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon_jh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon_jh.png -------------------------------------------------------------------------------- /webportal/src/assets/img/icon_jq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/icon_jq.png -------------------------------------------------------------------------------- /webportal/src/assets/img/jobs/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/jobs/avatar.png -------------------------------------------------------------------------------- /webportal/src/assets/img/jobs/icon-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/jobs/icon-close.png -------------------------------------------------------------------------------- /webportal/src/assets/img/jobs/icon-doing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/jobs/icon-doing.png -------------------------------------------------------------------------------- /webportal/src/assets/img/jobs/icon-edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/jobs/icon-edit.png -------------------------------------------------------------------------------- /webportal/src/assets/img/jobs/icon-end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/jobs/icon-end.png -------------------------------------------------------------------------------- /webportal/src/assets/img/jobs/icon-info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/jobs/icon-info.png -------------------------------------------------------------------------------- /webportal/src/assets/img/jobs/icon-job.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/jobs/icon-job.png -------------------------------------------------------------------------------- /webportal/src/assets/img/jobs/icon-pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/jobs/icon-pause.png -------------------------------------------------------------------------------- /webportal/src/assets/img/jobs/icon-rest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/jobs/icon-rest.png -------------------------------------------------------------------------------- /webportal/src/assets/img/jobs/icon-used.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/jobs/icon-used.png -------------------------------------------------------------------------------- /webportal/src/assets/img/jobs/icon-wait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/jobs/icon-wait.png -------------------------------------------------------------------------------- /webportal/src/assets/img/jobs/pic-bita.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/jobs/pic-bita.png -------------------------------------------------------------------------------- /webportal/src/assets/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/loading.gif -------------------------------------------------------------------------------- /webportal/src/assets/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/logo.png -------------------------------------------------------------------------------- /webportal/src/assets/img/recharge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/recharge.png -------------------------------------------------------------------------------- /webportal/src/assets/img/txt_subtitle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-intelligence/OpenI-Octopus/6c7f440e5fb8e564feaa5fb72f86b23fa68b294b/webportal/src/assets/img/txt_subtitle.png -------------------------------------------------------------------------------- /webportal/webpack.config.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation 2 | // All rights reserved. 3 | // 4 | // MIT License 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 9 | // to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 13 | // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 14 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | 19 | module.exports = require('./config/webpack.common'); -------------------------------------------------------------------------------- /webportal/webpack.dev.config.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./config/webpack.dev.common'); --------------------------------------------------------------------------------