基础设施运营商微服务
nevermined-compute-api的Python项目详细描述
无终止计算API
Compute to the Data Infrastructure Orchestration Micro-service
目录
关于
Compute API是一个微服务,实现了对数据用例的无终止计算, 负责管理执行请求的工作流。 通常,计算服务与Nevermined Gateway集成, 但可以独立于它来调用。在
Compute API负责与K8s集群建立通信,允许:
- 将工作流注册为K8s对象
- 列出在K8s中注册的工作流
- 停止正在运行的工作流执行
- 获取有关工作流执行状态的信息
computeapi没有为工作流提供任何存储功能,所有的状态都直接存储在K8s集群中。在
入门
当地环境
ComputeAPI负责接收运行计算工作流和 在K8s基础设施中设置。 为此,在本地环境中,computeapi需要连接到K8s环境。在
有多种配置和部署的k8可能,但这里我们将展示 如何连接到运行在minikube中的现有K8s集群。在
设置minikube
首先需要使用配置minikube
计算堆栈
^{
# There are some bugs affecting minikube with k8s 1.18.0 so we need to use 1.17.0 $ minikube config set kubernetes-version 1.17.0 # Start compute stack $ ./scripts/setup_minikube.sh # If minikube refuses to start due to virtualization problems be can set the minikube driver to docker $ MINIKUBE_DRIVER=docker ./scripts/setup_minikube.sh # Create a configmap for the artifacts $ kubectl create configmap artifacts \ --from-file=$HOME/.nevermined/nevermined-contracts/artifacts/ \ --namespace=nevermined-compute # Start the argo-artifacts service $ helm install argo-artifacts stable/minio --set service.type=LoadBalancer \ --set fullnameOverride=argo-artifacts # If helm can't find argo-artifacts add the helm repo and try again $ helm repo add stable https://kubernetes-charts.storage.googleapis.com/ $ helm repo update
运行服务
使用minikube
运行计算堆栈后,运行服务
只需运行以下命令即可:
运行服务器后,您可以找到完整的swaggerapi文档
在^{
测试
自动测试是通过GitHub操作设置的。在
新版本
bumpversion.sh
脚本有助于转换项目版本。您可以使用{major|minor|patch}
执行脚本
作为第一个参数,相应地改变版本。在
归属
此库服务位于Ocean ProtocolOperator Service。 它保留了相同的apachev2许可证,并添加了一些改进。见NOTICE file。在
许可证
Copyright 2020 Keyko GmbH
This product includes software developed at
BigchainDB GmbH and Ocean Protocol (https://www.oceanprotocol.com/)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- 项目
标签: