软件包生命周期

本页介绍了 Manufacturing Data Engine (MDE) 的软件包生命周期。

上传新的配置软件包

您可以使用 REST 端点或通过 MDE 网页界面上传新的 MDE 配置软件包,只需提供一个 *.zip 文件即可。

REST

使用以下信息执行 REST API 请求:

  • 方法:POST。
  • 端点/configuration/v1/configuration-packages
  • 请求正文multiform data with key=”packageArchive”, value=configuration-package-zip file
  • 响应代码:200 OK。
  • 响应正文 (JSON)

    {
        "id": "4adaecc2-54b9-482b-90d6-380f5d4b2be6",
        "name": "basic-configuration",
        "provider": "google",
        "latestStatus": "ACTIVATED",
        "status": [
            {
                "code": "NOT_LOADED",
                "updatedTime": "1742566718210",
                "messages": []
            },
            {
                "code": "VALIDATED",
                "updatedTime": "1742566718210",
                "messages": [
                    {
                        "severity": "INFO",
                        "message": "Successfully validated all message classes in the package"
                    },
                    {
                        "severity": "INFO",
                        "message": "Successfully validated all parsers in the package"
                    },
                    {
                        "severity": "INFO",
                        "message": "Successfully validated all types in the package"
                    }
                ]
            },
            {
                "code": "LOADED",
                "updatedTime": "1742566718696",
                "messages": [
                    {
                        "severity": "INFO",
                        "message": "Successfully applied all message classes in the package"
                    },
                    {
                        "severity": "INFO",
                        "message": "Successfully applied all types in the package"
                    },
                    {
                        "severity": "INFO",
                        "message": "Successfully applied all parsers in the package"
                    }
                ]
            },
            {
                "code": "ACTIVATED",
                "updatedTime": "1742566718792",
                "messages": [
                    {
                        "severity": "INFO",
                        "message": "Successfully activated all ingestion-specification, if there is any, in the package"
                    },
                    {
                        "severity": "INFO",
                        "message": "Successfully activated all message classes, if there is any, in the package"
                    },
                    {
                        "severity": "INFO",
                        "message": "Successfully activated all buckets, if there is any, in the package"
                    },
                    {
                        "severity": "INFO",
                        "message": "Successfully activated all metadata instance, if there is any, in the package"
                    },
                    {
                        "severity": "INFO",
                        "message": "Successfully activated all types, if there is any, in the package"
                    },
                    {
                        "severity": "INFO",
                        "message": "Successfully activated all parsers, if there is any, in the package"
                    }
                ]
            }
        ]
    }
    

控制台

  1. 点击 Cloud 配置
  2. 点击添加新配置软件包
  3. 选择要上传到控制台的文件。
  4. 点击上传

新的配置软件包

上传软件包后,MDE 将通过运行以下阶段来处理该软件包:

  1. 验证:在此阶段,MDE 会验证 软件包的内容,确保所有文件的语法正确且 位于正确的位置。如果此阶段成功完成,则 MDE 会继续执行下一阶段。

  2. 加载:在此阶段,MDE 会尝试加载软件包中指定的配置,并将其与当前环境配置合并。它会检查所有依赖项,并确保与现有配置没有命名冲突。此阶段是原子性的,这意味着软件包要么成功加载,要么完全回滚。如果加载成功,则 MDE 将继续执行下一阶段。

  3. 激活:在此阶段,MDE 会激活配置 并使其对环境中的其他用户可见。它还会触发创建作为软件包配置一部分所需的任何基础架构元素(例如,激活类型)。

MDE v1.5.0 不支持更新已 部署或已激活的软件包。如果需要修复验证或加载阶段中的任何错误,您可以再次上传同一软件包,只要该软件包未处于活跃状态即可。将软件包设置为活跃状态后,您将无法再次上传同一软件包,也无法上传包含名称冲突的配置实体的软件包。

列出现有配置软件包

您可以使用 REST 端点或通过 MDE 网页界面列出 MDE 的现有配置软件包。

REST

使用以下信息执行 REST API 请求:

  • 方法:GET。
  • 端点/configuration/v1/configuration-packages
  • 响应代码:200 OK。
  • 响应正文 (JSON)

    {
        "configurationPackages": [
            {
                "id": "0505ed17-ad20-458d-9128-d44783704acb",
                "name": "default-configuration-package",
                "provider": "google",
                "latestStatus": "ACTIVATED",
                "status": [
                    {
                        "code": "NOT_LOADED",
                        "updatedTime": "1742501535249",
                        "messages": []
                    },
                    {
                        "code": "VALIDATED",
                        "updatedTime": "1742501535249",
                        "messages": [
                            {
                                "severity": "INFO",
                                "message": "Successfully validated all buckets in the package"
                            },
                            {
                                "severity": "INFO",
                                "message": "Successfully validated all message classes in the package"
                            },
                            {
                                "severity": "INFO",
                                "message": "Successfully validated all metadata-instances in the package"
                            },
                            {
                                "severity": "INFO",
                                "message": "Successfully validated all parsers in the package"
                            },
                            {
                                "severity": "INFO",
                                "message": "Successfully validated all types in the package"
                            }
                        ]
                    },
                    {
                        "code": "LOADED",
                        "updatedTime": "1742501536740",
                        "messages": [
                            {
                                "severity": "INFO",
                                "message": "Successfully applied all message classes in the package"
                            },
                            {
                                "severity": "INFO",
                                "message": "Successfully applied all buckets in the package"
                            },
                            {
                                "severity": "INFO",
                                "message": "Successfully validated all metadata-instances in the package"
                            },
                            {
                                "severity": "INFO",
                                "message": "Successfully applied all types in the package"
                            },
                            {
                                "severity": "INFO",
                                "message": "Successfully applied all parsers in the package"
                            }
                        ]
                    },
                    {
                        "code": "ACTIVATED",
                        "updatedTime": "1742501537289",
                        "messages": [
                            {
                                "severity": "INFO",
                                "message": "Successfully activated all ingestion-specification, if there is any, in the package"
                            },
                            {
                                "severity": "INFO",
                                "message": "Successfully activated all message classes, if there is any, in the package"
                            },
                            {
                                "severity": "INFO",
                                "message": "Successfully activated all buckets, if there is any, in the package"
                            },
                            {
                                "severity": "INFO",
                                "message": "Successfully activated all metadata instance, if there is any, in the package"
                            },
                            {
                                "severity": "INFO",
                                "message": "Successfully activated all types, if there is any, in the package"
                            },
                            {
                                "severity": "INFO",
                                "message": "Successfully activated all parsers, if there is any, in the package"
                            }
                        ]
                    }
                ]
            },
            {
                "id": "4adaecc2-54b9-482b-90d6-380f5d4b2be6",
                "name": "basic-configuration",
                "provider": "google",
                "latestStatus": "ACTIVATED",
                "status": [
                    {
                        "code": "NOT_LOADED",
                        "updatedTime": "1742566718210",
                        "messages": []
                    },
                    {
                        "code": "VALIDATED",
                        "updatedTime": "1742566718210",
                        "messages": [
                            {
                                "severity": "INFO",
                                "message": "Successfully validated all message classes in the package"
                            },
                            {
                                "severity": "INFO",
                                "message": "Successfully validated all parsers in the package"
                            },
                            {
                                "severity": "INFO",
                                "message": "Successfully validated all types in the package"
                            }
                        ]
                    },
                    {
                        "code": "LOADED",
                        "updatedTime": "1742566718696",
                        "messages": [
                            {
                                "severity": "INFO",
                                "message": "Successfully applied all message classes in the package"
                            },
                            {
                                "severity": "INFO",
                                "message": "Successfully applied all types in the package"
                            },
                            {
                                "severity": "INFO",
                                "message": "Successfully applied all parsers in the package"
                            }
                        ]
                    },
                    {
                        "code": "ACTIVATED",
                        "updatedTime": "1742566718792",
                        "messages": [
                            {
                                "severity": "INFO",
                                "message": "Successfully activated all ingestion-specification, if there is any, in the package"
                            },
                            {
                                "severity": "INFO",
                                "message": "Successfully activated all message classes, if there is any, in the package"
                            },
                            {
                                "severity": "INFO",
                                "message": "Successfully activated all buckets, if there is any, in the package"
                            },
                            {
                                "severity": "INFO",
                                "message": "Successfully activated all metadata instance, if there is any, in the package"
                            },
                            {
                                "severity": "INFO",
                                "message": "Successfully activated all types, if there is any, in the package"
                            },
                            {
                                "severity": "INFO",
                                "message": "Successfully activated all parsers, if there is any, in the package"
                            }
                        ]
                    }
                ]
            }
        ],
        "nextPageToken": ""
    }
    

控制台

您可以在配置 页面上的 Cloud 配置 部分中看到现有配置软件包 的列表。

列出配置软件包

删除现有配置软件包

从 v1.5.0 开始,MDE 支持一个环境标志,该标志可以 将环境更改为 开发模式, 让您可以删除配置实体和删除配置软件包。 设置此模式后,您可以使用 REST 端点或 MDE 网页界面删除按钮删除已激活的软件包。

REST

使用以下信息执行 REST API 请求:

  • 方法:DELETE
  • 端点: /configuration/v1/configuration-packages/$PACKAGE-ID
  • 响应代码: 200 OK
  • 响应正文 (JSON)
{
    "id": "87e160db-8ff9-403a-a873-e6674f6ac3cb",
    "name": "postman-test-configuration-package",
    "provider": "google",
    "latestStatus": "DELETED",
    "status": [
        {
            "code": "NOT_LOADED",
            "updatedTime": "1742550114832",
            "messages": []
        },
        {
            "code": "VALIDATED",
            "updatedTime": "1742550114832",
            "messages": [
                {
                    "severity": "INFO",
                    "message": "Successfully validated all buckets in the package"
                },
                {
                    "severity": "INFO",
                    "message": "Successfully validated all ingestion-specifications in the package"
                },
                {
                    "severity": "INFO",
                    "message": "Successfully validated all message classes in the package"
                },
                {
                    "severity": "INFO",
                    "message": "Successfully validated all metadata-instances in the package"
                },
                {
                    "severity": "INFO",
                    "message": "Successfully validated all parsers in the package"
                },
                {
                    "severity": "INFO",
                    "message": "Successfully validated all types in the package"
                }
            ]
        },
        {
            "code": "LOADED",
            "updatedTime": "1742550115241",
            "messages": [
                {
                    "severity": "INFO",
                    "message": "Successfully applied all ingestion-specification in the package"
                },
                {
                    "severity": "INFO",
                    "message": "Successfully applied all message classes in the package"
                },
                {
                    "severity": "INFO",
                    "message": "Successfully applied all buckets in the package"
                },
                {
                    "severity": "INFO",
                    "message": "Successfully validated all metadata-instances in the package"
                },
                {
                    "severity": "INFO",
                    "message": "Successfully applied all types in the package"
                },
                {
                    "severity": "INFO",
                    "message": "Successfully applied all parsers in the package"
                }
            ]
        },
        {
            "code": "ACTIVATED",
            "updatedTime": "1742550115327",
            "messages": [
                {
                    "severity": "INFO",
                    "message": "Successfully activated all ingestion-specification, if there is any, in the package"
                },
                {
                    "severity": "INFO",
                    "message": "Successfully activated all message classes, if there is any, in the package"
                },
                {
                    "severity": "INFO",
                    "message": "Successfully activated all buckets, if there is any, in the package"
                },
                {
                    "severity": "INFO",
                    "message": "Successfully activated all metadata instance, if there is any, in the package"
                },
                {
                    "severity": "INFO",
                    "message": "Successfully activated all types, if there is any, in the package"
                },
                {
                    "severity": "INFO",
                    "message": "Successfully activated all parsers, if there is any, in the package"
                }
            ]
        },
        {
            "code": "DELETED",
            "updatedTime": "1742567553260",
            "messages": [
                {
                    "severity": "INFO",
                    "message": "Successfully deleted all parsers, if there is any, in the package"
                },
                {
                    "severity": "INFO",
                    "message": "Successfully deleted all message classes, if there is any, in the package"
                },
                {
                    "severity": "INFO",
                    "message": "Successfully deleted all types, if there is any, in the package"
                },
                {
                    "severity": "INFO",
                    "message": "Successfully activated all metadata instance, if there is any, in the package"
                },
                {
                    "severity": "INFO",
                    "message": "Successfully deleted all buckets, if there is any, in the package"
                },
                {
                    "severity": "INFO",
                    "message": "Successfully deleted all ingestion-specification, if there is any, in the package"
                }
            ]
        }
    ]
}

控制台

  1. 点击 Cloud 配置
  2. 选择要删除的配置软件包。
  3. 点击操作
  4. 点击删除

    删除配置软件包

  5. 点击移除 ,确认您确定要删除所选的配置软件包。

确认删除配置软件包