Raynet One Data Hub 14.0 images are now available from Docker registry. At the time of writing, there is no specific image for labelled USU Discovery Hub variant. This tutorial describes, how to create images for USU Discovery Hub branding.
Requirements and introduction
There are no requirements other than standard DataHub prerequisites. Refer to github pages for more information about our images:
This guide assumes the reader has a basic knowledge of Docker, and is familiar with basic commands (building, starting, composing).
Step 1: Preparing customized Docker images
To prepare a customized Docker image, create a new file, insert the following content and save it somewhere under the file name dockerfile
. In the following example, 14.0
is used as the base version:
FROM raynetgmbh/rayventory-datahub:14.0
RUN mv -f "/app/wwwroot/assets/theming/theme_variables_usu.css" "/app/wwwroot/assets/theming/theme_variables.css" && \
mv -f "/app/wwwroot/assets/images/favicon/favicon_usu.ico" "/app/wwwroot/assets/images/favicon/favicon.ico"
This will use the default image as a base, and make adjustments which represent what the original USUTheme.mst
does to the original MSI-based installation.
Step 2: Building the image
Build the image using the following command:
docker build <path-to-directory-with-dockerfile> -t usu-discovery-data-hub
This will build the dockerfile
prepared in the first step and tag it with the name usu-discovery-data-hub
.
Step 3: Starting the container
You can take the default docker-compose.yml
from the original repository, but the image name needs to be changed to the new one, like in the following example:
version: "3.7"
services:
database:
image: mcr.microsoft.com/mssql/server:2019-latest
ports:
- "1434"
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=Start123!@#
- MSSQL_PID=Express
restart: always
volumes:
- sql_data:/var/opt/mssql
web:
image: usu-discovery-data-hub
ports:
- "81:8080"
depends_on:
- database
restart: always
environment:
- connectionStrings__System=Server=database,1433;Database=datahub;User ID=sa;Password=Start123!@#;Encrypt=False
- connectionStrings__ReportDatabase=Server=database,1433;Initial Catalog=master;User ID=sa;Password=Start123!@#;Encrypt=False
- connectionStrings__Driver=mssql
- TasksManagement__LogsDirectory=/app/raynet/datahub/task-logs
- KotlinDirectoryPath=/app/raynet/datahub/kotlin
- InitialTenantId={72ba6fc2-d5fa-49ee-8281-841e762aea05}
- Logging__LogLevel__Default=Warning
- BASEURL=http://localhost:8080
- TokenManagement__secret=Set-New-Secret-With-Minimum-32-Symbols
- ASPNETCORE_URLS=http://+:8080
- ASPNETCORE_HTTP_PORTS=8080
- Seeding__DefaultApiKey=AHE5M61-MWDM5MQ-KXHNQA0-0ZSNG74
- DataHub_WebHelpUrl=https://docs.raynet.de/usu/discovery/14.0/user-guide/en/index.html
volumes:
- ./host-logs:/app/raynet/datahub/task-logs
agent:
image: raynetgmbh/rayventory-datahub-agent:14.0
depends_on:
- web
restart: always
environment:
- DataHubUrl=http://web:8080
- TenantId={72ba6fc2-d5fa-49ee-8281-841e762aea05}
- KotlinDirectoryPath=/app/raynet/datahub-agent/kotlin
- DataHubApiKey=AHE5M61-MWDM5MQ-KXHNQA0-0ZSNG74
volumes:
sql_data:
Additionally, pay attention to extra line
- DataHub_WebHelpUrl=https://docs.raynet.de/usu/discovery/14.0/user-guide/en/index.html
which ensures, that the base URL for the documentation is not standard Data Hub help, but the branded one USU Discovery Hub. You can also change this URL to anything hosted on-prem or at USU.
To start the containers, navigate to the folder containing the docker-compose.yml
, and execute the following command:
docker compose up -d
This command starts the containers in daemon mode, so that it returns immediately to the caller.
Once executed, Data Hub will be started. This may take some time (usually under 60 seconds). Once everything is set up, open the following URL in your browser:
Customization
Port, connection string to database and few other settings can be changed directly in the YML file. It is recommended to either use a custom password (remember to change in both places: SQL server service and in the connection string) or to use a SQL server outside the container (see Notes).
Notes
This is a full setup which also brings the SQL Server database and Data Hub Agent. In many cases, neither of these is required (for example, Windows agents are used, and a custom on-prem SQL server is used). In this case, the compose file would be simplified and only contain the web
service, for example:
version: "3.7"
services:
web:
image: usu-discovery-data-hub
ports:
- "81:8080"
depends_on:
- database
restart: always
environment:
- connectionStrings__System=Server=database,1433;Database=datahub;User ID=sa;Password=Start123!@#;Encrypt=False
- connectionStrings__ReportDatabase=Server=database,1433;Initial Catalog=master;User ID=sa;Password=Start123!@#;Encrypt=False
- connectionStrings__Driver=mssql
- TasksManagement__LogsDirectory=/app/raynet/datahub/task-logs
- KotlinDirectoryPath=/app/raynet/datahub/kotlin
- InitialTenantId={72ba6fc2-d5fa-49ee-8281-841e762aea05}
- Logging__LogLevel__Default=Warning
- BASEURL=http://localhost:8080
- TokenManagement__secret=Set-New-Secret-With-Minimum-32-Symbols
- ASPNETCORE_URLS=http://+:8080
- ASPNETCORE_HTTP_PORTS=8080
- DataHub_WebHelpUrl=https://docs.raynet.de/usu/discovery/12.6/user-guide/en/index.html
Source files
Comments