azure - 在 Azure 容器实例上运行 Superset

标签 azure apache-superset azure-container-instances azure-storage-account azure-storage-files

我正在尝试在 Azure 容器实例上运行超集,并在 Azure 文件共享存储上进行卷映射。当我使用以下命令构建容器时,容器实例进入运行状态,但我无法启动超集 url。

az 容器创建 --resource-group $ACI_PERS_RESOURCE_GROUP --name superset01 --image superset-image:v1 --dns-name-label superset01 --ports 8088 --azure-file-volume-account-名称 $ACI_PERS_STORAGE_ACCOUNT_NAME --azure-file-volume-account-key $STORAGE_KEY --azure-file-volume-share-name $ACI_PERS_SHARE_NAME --azure-file-volume-mount-path "/app/superset_home/"

我还可以看到卷映射文件是在文件共享上创建的,但它不会增长到 superset.db 的初始大小。

Name                 Content Length    Type    Last Modified
-------------------  ----------------  ------  ---------------
cache/                                 dir
superset.db          0                 file
superset.db-journal  0                 file

请问对此有何意见?

最佳答案

我在我的环境中进行了测试,它对我来说工作得很好。我正在使用 superset images 来自docker hub并推送到容器注册表。

使用以下命令从 dockerhub 中提取超集镜像

docker pull apache/superset

enter image description here

标记要推送到容器注册表中的 Superset 镜像

docker tag 15e66259003c testmyacr90.azurecr.io/superset

enter image description here

现在登录容器注册表

docker login testmyacr90.azurecr.io

然后将镜像推送到Container Repositoty

enter image description here enter image description here

您可以使用以下 cmdlet 创建容器实例并挂载到FileShare

az container create --resource-group $ACI_PERS_RESOURCE_GROUP --name mycontainerman --image $ACR_LOGIN_SERVER/superset:latest --registry-login-server $ACR_LOGIN_SERVER --registry-username $ACR_USERNAME --registry-password $ACR_PASSWORD --dns-name-label aci-demo-7oi --ports 80 --azure-file-volume-account-name $ACI_PERS_STORAGE_ACCOUNT_NAME --azure-file-volume-account-key $STORAGE_KEY --azure-file-volume-share-name $ACI_PERS_SHARE_NAME --azure-file-volume-mount-path /aci/logs/

enter image description here enter image description here

建议您使用容器实例的FDQNPublic IPAddress在浏览器上点击并能够看到来自容器实例的响应。

更新-----

我已按照您的操作在 "/app/superset_home/ 处安装了 fileShare,并获得了与您相同的输出。

enter image description here

根据上图,建议您不要在 /app/superset_home/ 挂载文件共享,因为此处 superset. dbsuperset.db-journal 驻留。如果我们安装到这个位置,就会发生冲突。因此最好建议您安装在 /aci/logs/ 或任何您想要的位置,而不是 /app/superset_home/

更新2--------

因为我使用与之前安装到 /app/superset_home/ 的卷相同的存储帐户来将 vloume 安装在 /aci/logs/ 上。

和你一样的错误

enter image description here

灵魂:为了避免此类问题,请创建一个新的存储帐户并与 in 共享文件,并将卷挂载到 /aci/logs/

一旦我这样做了,我就解决了我的问题

enter image description here

关于azure - 在 Azure 容器实例上运行 Superset,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71066153/

相关文章:

Azure容器实例: image from public docker leads to InaccessibleImage error

azure - 如何获取运行Kubernet服务的VM的外部IP

azure - 如果我在 MS Azure 中删除图像 A,共享图像库中的图像 B 是否仍然有效(如果它基于 A)?

azure - 使用 COPY 通过 Azure ARM 模板创建多个 ACI 时出错

supertest - 如何在 Apache 超集中添加大于过滤器?

docker - 带有 SQLAlchemy 的 Docker 中 Clickhouse 的超集

azure - 在 Azure 容器实例中安装卷时出错

asp.net-mvc - 遥测初始化程序失败 : Could not load "Microsoft.AspNet.TelemetryCorrelation"

Java - 访问在 Windows Azure 上运行的 MongoDB 服务器

超集个人仪表板权限