我正在尝试在 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
标记要推送到容器注册表中的 Superset 镜像
docker tag 15e66259003c testmyacr90.azurecr.io/superset
现在登录容器注册表
docker login testmyacr90.azurecr.io
然后将镜像推送到Container Repositoty
您可以使用以下 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/
建议您使用容器实例的FDQN
或Public IPAddress
在浏览器上点击并能够看到来自容器实例的响应。
更新-----
我已按照您的操作在 "/app/superset_home/
处安装了 fileShare,并获得了与您相同的输出。
根据上图,建议您不要在 /app/superset_home/
挂载文件共享,因为此处 superset. db
和 superset.db-journal
驻留。如果我们安装到这个位置,就会发生冲突。因此最好建议您安装在 /aci/logs/
或任何您想要的位置,而不是 /app/superset_home/
更新2--------
因为我使用与之前安装到 /app/superset_home/
的卷相同的存储帐户来将 vloume 安装在 /aci/logs/
上。
和你一样的错误
灵魂:为了避免此类问题,请创建一个新的存储帐户并与 in 共享文件,并将卷挂载到 /aci/logs/
。
一旦我这样做了,我就解决了我的问题
关于azure - 在 Azure 容器实例上运行 Superset,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71066153/