docker 安装后无法登录 Octopus Deploy
Cannot sign-in to Octopus Deploy after docker installation
我正在尝试使用 linux docker 图像设置章鱼。创建容器后,我看到了登录页面,但我无法使用管理员登录名和密码登录(“无效的用户名或密码。”)。你有什么错误的建议吗?
这是我的 docker-compose 文件:
version: '3.7'
services:
octopus:
image: octopusdeploy/octopusdeploy
hostname: octopus
container_name: octopus
privileged: true
environment:
ACCEPT_EULA: Y
OCTOPUS_SERVER_NODE_NAME: ${OCTOPUS_SERVER_NODE_NAME}
DB_CONNECTION_STRING: ${MSSQL_DB_CONNECTION_STRING}
ADMIN_USERNAME: ${OCT_ADMIN_USERNAME}
ADMIN_PASSWORD: ${OCT_ADMIN_PASSWORD}
ADMIN_EMAIL: ${OCT_ADMIN_EMAIL}
OCTOPUS_SERVER_BASE64_LICENSE: ${OCTOPUS_SERVER_BASE64_LICENSE}
MASTER_KEY: ${OCT_MASTER_KEY}
ADMIN_API_KEY: ${OCT_ADMIN_API_KEY}
ports:
- "8086:8080"
- "10943:10943"
expose:
- "443"
depends_on:
- octopus_mssql
volumes:
- ./octopus/octopus/repository:/repository
- ./octopus/octopus/artifacts:/artifacts
- ./octopus/octopus/taskLogs:/taskLogs
- ./octopus/octopus/cache:/cache
networks:
- tech-network
octopus_mssql:
image: mcr.microsoft.com/mssql/server:2017-latest-ubuntu
hostname: octopus_mssql
container_name: octopus_mssql
environment:
SA_PASSWORD: ${MSSQL_SA_PASSWORD}
ACCEPT_EULA: Y
# Prevent SQL Server from consuming the defult of 80% physical memory.
MSSQL_MEMORY_LIMIT_MB: 2048
MSSQL_PID: Express
expose:
- "1433"
healthcheck:
test: [ "CMD", "/opt/mssql-tools/bin/sqlcmd", "-U", "sa", "-P", "${MSSQL_SA_PASSWORD}", "-Q", "select 1"]
interval: 10s
retries: 10
volumes:
- ./octopus/mssql/data:/var/opt/mssql
networks:
- tech-network
Env 文件(某些值如 values 和 API KEY 已更改):
MSSQL_SA_PASSWORD=_passtomssql_
OCT_ADMIN_USERNAME=admin
OCT_ADMIN_PASSWORD=_adminPassword_
OCT_ADMIN_EMAIL=octopus@g.com
OCTOPUS_SERVER_NODE_NAME=octopus
MSSQL_DB_CONNECTION_STRING=Server=octopus_mssql,1433;Database=OctopusDeploy;User=sa;Password=_passtomssql_
OCTOPUS_SERVER_BASE64_LICENSE=_license in base64_
OCT_MASTER_KEY=_master key_
OCT_ADMIN_API_KEY=API-1234567890E1F1234567
我尝试更改章鱼容器中管理员的密码:
/Octopus/Octopus.服务器管理员 --username=admin --password=NewPassword1234
命令成功,但我仍然无法从UI登录:
Checking the Octopus Master Key has been configured.
Making sure it's safe to upgrade the database schema...
Ensuring pre-conditions for upgrading the database are satisfied...
Searching for indexes that might upset the database upgrade process...
- PASS: All columns use the default collation.
- PASS: Your Octopus Server will be compliant with your license after upgrading.
- PASS: We've done our best to remove any unexpected database indexes.
- PASS: The version of your SQL Server satisfies Octopus Server installation requirements.
Executing always run pre scripts...
Executing TSQL Database Server script 'Octopus.Core.UpgradeScriptsAlwaysPre.Script0000 - Set highest available compatibility level.sql'
Current COMPATIBILITY_LEVEL for OctopusDeploy is set to 140
Ensuring COMPATIBILITY_LEVEL for OctopusDeploy is set to 140
COMPATIBILITY_LEVEL for OctopusDeploy is already 140 or higher
Checking to see if database schema upgrade is required...
Database already has the expected schema. No changes are required.
Executing always run post scripts...
Executing TSQL Database Server script 'Octopus.Core.UpgradeScriptsAlwaysPost.Script0000 - Refresh Views.sql'
Refreshing view dbo.Dashboard
Refreshing view dbo.IdsInUse
Refreshing view dbo.MultiTenancyDashboard
Refreshing view dbo.Release_WithDeploymentProcess
Refreshing view dbo.RunbookSnapshot_WithRunbookProcess
Refreshing view dbo.TenantProject
Creating or modifying administrator 'admin'
Setting password for user admin
Done.
两个suggestions/questions:
- 尝试删除 Admin API 密钥。如果您指定了 API 密钥和密码,它应该可以工作,但如果这里出现问题,可能是管理员用户被创建为服务帐户。
- Linux 的 octopusdeploy/octopusdeploy 的最新标签在撰写本文时似乎已损坏。您可以将 2020.4 标签添加到您的图像中吗? "octopusdeploy/octopusdeploy:2020.4"
只需删除 API 键也适用于 octopusdeploy/octopusdeploy:2020.6 也
我正在尝试使用 linux docker 图像设置章鱼。创建容器后,我看到了登录页面,但我无法使用管理员登录名和密码登录(“无效的用户名或密码。”)。你有什么错误的建议吗?
这是我的 docker-compose 文件:
version: '3.7'
services:
octopus:
image: octopusdeploy/octopusdeploy
hostname: octopus
container_name: octopus
privileged: true
environment:
ACCEPT_EULA: Y
OCTOPUS_SERVER_NODE_NAME: ${OCTOPUS_SERVER_NODE_NAME}
DB_CONNECTION_STRING: ${MSSQL_DB_CONNECTION_STRING}
ADMIN_USERNAME: ${OCT_ADMIN_USERNAME}
ADMIN_PASSWORD: ${OCT_ADMIN_PASSWORD}
ADMIN_EMAIL: ${OCT_ADMIN_EMAIL}
OCTOPUS_SERVER_BASE64_LICENSE: ${OCTOPUS_SERVER_BASE64_LICENSE}
MASTER_KEY: ${OCT_MASTER_KEY}
ADMIN_API_KEY: ${OCT_ADMIN_API_KEY}
ports:
- "8086:8080"
- "10943:10943"
expose:
- "443"
depends_on:
- octopus_mssql
volumes:
- ./octopus/octopus/repository:/repository
- ./octopus/octopus/artifacts:/artifacts
- ./octopus/octopus/taskLogs:/taskLogs
- ./octopus/octopus/cache:/cache
networks:
- tech-network
octopus_mssql:
image: mcr.microsoft.com/mssql/server:2017-latest-ubuntu
hostname: octopus_mssql
container_name: octopus_mssql
environment:
SA_PASSWORD: ${MSSQL_SA_PASSWORD}
ACCEPT_EULA: Y
# Prevent SQL Server from consuming the defult of 80% physical memory.
MSSQL_MEMORY_LIMIT_MB: 2048
MSSQL_PID: Express
expose:
- "1433"
healthcheck:
test: [ "CMD", "/opt/mssql-tools/bin/sqlcmd", "-U", "sa", "-P", "${MSSQL_SA_PASSWORD}", "-Q", "select 1"]
interval: 10s
retries: 10
volumes:
- ./octopus/mssql/data:/var/opt/mssql
networks:
- tech-network
Env 文件(某些值如 values 和 API KEY 已更改):
MSSQL_SA_PASSWORD=_passtomssql_
OCT_ADMIN_USERNAME=admin
OCT_ADMIN_PASSWORD=_adminPassword_
OCT_ADMIN_EMAIL=octopus@g.com
OCTOPUS_SERVER_NODE_NAME=octopus
MSSQL_DB_CONNECTION_STRING=Server=octopus_mssql,1433;Database=OctopusDeploy;User=sa;Password=_passtomssql_
OCTOPUS_SERVER_BASE64_LICENSE=_license in base64_
OCT_MASTER_KEY=_master key_
OCT_ADMIN_API_KEY=API-1234567890E1F1234567
我尝试更改章鱼容器中管理员的密码:
/Octopus/Octopus.服务器管理员 --username=admin --password=NewPassword1234
命令成功,但我仍然无法从UI登录:
Checking the Octopus Master Key has been configured.
Making sure it's safe to upgrade the database schema...
Ensuring pre-conditions for upgrading the database are satisfied...
Searching for indexes that might upset the database upgrade process...
- PASS: All columns use the default collation.
- PASS: Your Octopus Server will be compliant with your license after upgrading.
- PASS: We've done our best to remove any unexpected database indexes.
- PASS: The version of your SQL Server satisfies Octopus Server installation requirements.
Executing always run pre scripts...
Executing TSQL Database Server script 'Octopus.Core.UpgradeScriptsAlwaysPre.Script0000 - Set highest available compatibility level.sql'
Current COMPATIBILITY_LEVEL for OctopusDeploy is set to 140
Ensuring COMPATIBILITY_LEVEL for OctopusDeploy is set to 140
COMPATIBILITY_LEVEL for OctopusDeploy is already 140 or higher
Checking to see if database schema upgrade is required...
Database already has the expected schema. No changes are required.
Executing always run post scripts...
Executing TSQL Database Server script 'Octopus.Core.UpgradeScriptsAlwaysPost.Script0000 - Refresh Views.sql'
Refreshing view dbo.Dashboard
Refreshing view dbo.IdsInUse
Refreshing view dbo.MultiTenancyDashboard
Refreshing view dbo.Release_WithDeploymentProcess
Refreshing view dbo.RunbookSnapshot_WithRunbookProcess
Refreshing view dbo.TenantProject
Creating or modifying administrator 'admin'
Setting password for user admin
Done.
两个suggestions/questions:
- 尝试删除 Admin API 密钥。如果您指定了 API 密钥和密码,它应该可以工作,但如果这里出现问题,可能是管理员用户被创建为服务帐户。
- Linux 的 octopusdeploy/octopusdeploy 的最新标签在撰写本文时似乎已损坏。您可以将 2020.4 标签添加到您的图像中吗? "octopusdeploy/octopusdeploy:2020.4"
只需删除 API 键也适用于 octopusdeploy/octopusdeploy:2020.6 也