Repository navigation
7. OraklLearn CLI How to
Audience: Azure administrators and Windows server operators.
Purpose: useolto create or reuse Azure and Microsoft Entra ID resources, write the deployment configuration bundle, optionally build or download images, and deploy OraklLearn.
- Before you start
- What do I need before running ol?
- How do I prepare the repository?
- Which run should I choose?
- In what order does ol ask questions?
- Where are the generated files?
- What happens during Docker build, download, and deployment?
- How do I inspect or operate an existing deployment manually?
- How do I troubleshoot common problems?
- Which configuration file controls defaults?
- Security and usage notice
ol is the olcli project in the OraklLearn repository. It is an interactive operator tool, not an application installed globally on Windows. Run it from the repository root:
dotnet run --project olcliThe command accepts only these options:
ol [-silent] [-artifacts <folder>]
-silent Accept available saved or computed defaults.
-artifacts <folder> Artifact subdirectory; required with -silent.
-h, --help Show help without changing anything.
Examples:
# Show the supported options.
dotnet run --project olcli -- --help
# Use saved defaults from the selected artifact folder where possible.
# Values with no saved default, especially secrets, remain interactive.
dotnet run --project olcli -- -silent -artifacts test-ca-artifacts identifies a single child folder under .generated-config; do not pass a path such as C:\temp\test-ca. If the selected folder does not exist, ol creates it automatically.
| Requirement | Why it is required | Download / access |
|---|---|---|
| Windows workstation or server with outbound HTTPS | Access to Azure, Microsoft Graph, Azure Storage, Docker Hub, and OpenAI. | Windows 11 download |
| Git and the repository |
ol runs from the checked-out source tree and uses its deployment templates. |
Git for Windows · OraklLearn repository |
| .NET SDK 10 | Builds and runs olcli; the .NET runtime alone is insufficient. |
.NET 10 SDK |
Azure CLI (az) |
Provides the interactive Azure sign-in used by the tool. | Install Azure CLI on Windows |
| Azure subscription Owner role | Required to provision resources and register required Azure resource providers. | Azure portal |
| Microsoft Entra permissions |
Application Administrator or Cloud Application Administrator manages registrations; Privileged Role Administrator or Global Administrator is required for tenant-wide delegated-scope consent. |
Microsoft Entra admin center |
| OpenAI API key | Entered as a secret for the generation services. An OpenAI API usage tier of at least Tier 3 is recommended. | OpenAI API keys |
| Docker Desktop in Windows-container mode | Required only for image build, image download, or deployment. The media-generation workload requires Windows containers. | Install Docker Desktop for Windows |
For Docker Desktop, enable the Windows features required by Docker Desktop and use Windows containers. If ol detects Linux containers, it offers to switch the engine before it proceeds.
Use a working directory that is protected from unauthorized access because the generated artifacts contain secrets.
New-Item -ItemType Directory -Path 'C:\Projects' -Force | Out-Null
Set-Location 'C:\Projects'
git clone 'https://github.com/jimmybourque/OraklLearnProject.git'
Set-Location '.\OraklLearnProject'All examples in this page assume the current PowerShell directory is the repository root.
| Objective | Configuration artifacts | Image action | Deploy services |
|---|---|---|---|
| First environment or changed infrastructure | Yes | Build or download an official version | Optional |
| Refresh secrets or generated configuration only | Yes | Build or download an official version is still selected, then decline deployment | No |
| Build and optionally publish a new image release | No, when a valid artifact bundle already exists | Build | Optional |
| Deploy a known official release | No, when a valid artifact bundle already exists | Download an official version | Yes |
| Inspect the tool safely | No | Do not start a run; use --help
|
No |
The image action is always requested, even in silent mode. It has only two choices in the current version:
- Build images — builds all OraklLearn images from the current source.
- Official version — downloads an existing version from Docker Hub.
There is no separate latest action. The tool downloads a selected, published semantic version.
The following is the current runtime order. A question marked conditional appears only when its stated condition is met.
| Question | When it appears | Meaning / answer |
|---|---|---|
Generate new configuration artifacts (y/n) |
Every run | Choose y to provision or update Azure, Entra, and configuration artifacts. Choose n only when the selected artifact folder already contains docker-compose.yml. |
Image action (1 = build images, 2 = official version) |
Every run | Select 1 for a source build or 2 to use a published Docker Hub version. This selection must be explicit. |
Push built Docker images to Docker Hub (y/n) |
Only with action 1
|
Choose y only when publishing the images is intended. The default is n. |
Docker Hub organization access token |
Only with action 2
|
Enter a read-only organization access token for Docker Hub. It is masked and saved in the selected artifact folder. |
Docker image tag |
Action 1 or 2
|
For builds, confirm or replace the proposed MAJOR.MINOR.PATCH version. For downloads, choose one of the official versions listed by the tool. |
Release channel (stable or preview) |
Only with action 1
|
Used by the project author to choose the additional release tag. For example, 1.4.0 with preview becomes 1.4.0-preview. |
Deploy Docker services (y/n) |
Every run | Choose whether the selected images should be started after preparation. The default is y. |
Configuration artifacts subdirectory |
When -artifacts was not supplied |
Enter one folder name, for example test-ca. It is created or reused beneath .generated-config. |
If artifact generation is n, the tool loads the selected existing folder, verifies that it contains docker-compose.yml, and performs only the chosen Docker actions. Azure authentication and provisioning are skipped in that path.
This section appears only when artifact generation is y.
- Answer
ytoDo you have the Owner role on the target Azure subscription (y/n). - If no Azure CLI session exists, complete the browser sign-in opened by
az login. - Complete any MFA or claims-challenge sign-in requested by Microsoft Entra.
- Select one of the Enabled subscriptions in the active Azure CLI tenant.
The tool uses Azure CLI for interactive authentication, then uses the Azure SDK and Microsoft Graph for management operations. It checks and registers, where needed, Microsoft.Resources, Microsoft.Storage, Microsoft.ServiceBus, Microsoft.OperationalInsights, and Microsoft.Insights.
| Question | When it appears | Explanation |
|---|---|---|
App registration name prefix |
Every artifact-generation run | The tool looks for <PREFIX>-ORAKLLEARN-FRONTEND and <PREFIX>-ORAKLLEARN-CATALOG. |
Do you have the required Microsoft Entra roles (y/n) |
Only when neither registration exists | Required before the tool creates the two registrations and their service principals. |
The tool reuses both registrations when they exist. If only one is found, it stops rather than modifying a partial configuration. It creates or renews the Frontend client secret when it is missing, invalid, or within 90 days of expiry, while leaving the older valid secret available until its expiry. Schedule a reminder and redeploy within the final 90 days before the secret expires so ol can create and distribute a replacement secret.
It configures the User and Admin OpenID Connect sign-in callback URIs, assigns the first administrator as an owner of both registrations and Enterprise applications, and assigns both user.all and admin.all to that administrator.
Important — sign-out callback: Microsoft Entra must also allow the signed-out callback URL for each public portal:
https://<host>/signout-callback-oidc. This is distinct from the sign-in callback (/signin-oidc). The application redirects from that callback to the configured promotional page, for examplehttps://localhost:31443/promo/index.htmlduring local debugging.
| Question | Example | Rules |
|---|---|---|
Azure resource group |
rg-orakllearn-test-ca |
Created when absent. |
Azure region |
canadacentral |
Must support Storage, Service Bus, Log Analytics, and Application Insights. |
Azure Service Bus namespace name |
sb-orakllearn-test-ca |
Globally unique; 6–50 letters, digits, or hyphens; cannot start or end with a hyphen. |
Azure Storage account name |
storakllearntestca |
Globally unique; 3–24 lowercase letters or digits. |
To see regions available to the selected subscription:
az account list-locations --query '[].name' --output tsvThe tool creates or reuses the following resources:
- A Standard_LRS StorageV2 account and private Blob containers:
profile,catalog,transaction-tracing,exam-revision-project,exam-editor-caching,book-editor-caching,transaction-working,indexer, andmutex. - The default cost profile in
profile/system/default-cost.jsonwhen absent. - A Service Bus Basic namespace and the
slow,moderated,fast, andindexingqueues. - Queue-scoped SAS policies: User API can send to all queues; Admin API sends to
indexing; Generator listens toslow,moderated, andfast; Indexer listens toindexing. -
<service-bus-name>-logsLog Analytics workspace and<service-bus-name>-insightsworkspace-based Application Insights resource.
This section appears only when no profile exists beneath profile/user/ in the target Storage account.
| Question | Explanation |
|---|---|
Administrator last name |
First administrator’s surname. |
Administrator first name |
First administrator’s given name. |
Administrator user id (email) |
Must be a valid email address for an existing Microsoft Entra user. |
Initial credits |
Non-negative value; defaults to 0 unless a prior saved value exists. |
Administrator user ID (UPN) |
Asked only if the tool cannot derive the owner UPN from the created or existing profile. |
The tool resolves the Entra object ID before creating the profile. If an account already exists, it deliberately does not create another initial administrator.
These questions occur after Azure and Entra values have been derived.
| Question | Example | Explanation |
|---|---|---|
Public domain |
contoso.ca or localhost
|
Host name only; no protocol or path. Enter localhost for a direct local deployment. |
Endpoint > User Portal URL |
https://orakllearn.contoso.ca |
Absolute URL used for the User portal and generated User OIDC callback. |
Endpoint > Admin Portal URL |
https://admin-orakllearn.contoso.ca |
Absolute URL used for the Admin portal and generated Admin OIDC callback. |
Catalog user identity claim |
preferred_username |
Claim that uniquely identifies the user. |
Catalog user display-name claim |
name |
Claim used as the user-facing name. |
OpenAI API key |
sk-… |
Masked secret. Do not place this value in source control. |
The User and Admin CORS origins are derived from the corresponding portal URLs in the current version; they are not separate interactive questions.
For an artifact folder named test-ca, ol writes:
.generated-config/
└── test-ca/
├── .artifacts-inputs.json
├── docker-compose.yml
├── admin/
│ ├── admin.env
│ ├── admin_secrets.env
│ └── appsettings.secrets.json
├── user/
│ ├── user.env
│ ├── user_secrets.env
│ └── appsettings.secrets.json
├── generator/
├── indexer/
└── catalog/
Each runtime directory contains its non-secret .env, generated secret .env, and generated appsettings.secrets.json files. The root docker-compose.yml references them with paths relative to the artifact folder.
Important
.artifacts-inputs.jsonstores prior answers and sensitive values such as connection strings, client secrets, Docker Hub token, and OpenAI key. Treat the complete.generated-configtree as secret material: do not commit it, email it, or copy it to an unsecured share.
Re-running ol with the same artifact subdirectory updates the files it manages and retains unrelated files in that folder.
With image action 1, the tool:
- Verifies Docker Desktop is reachable and uses Windows containers.
- Verifies the Docker DNS prerequisite required for builds.
- Runs
docker compose buildwith the selected image version and release channel. - Adds the release-channel tag locally when applicable.
- Pushes the images only when
Push built Docker images to Docker Hubwas answeredy. - Deploys only when
Deploy Docker serviceswas answeredy.
With image action 2, the tool:
- Requests a read-only Docker Hub organization access token.
- Lists the common published semantic versions across the required OraklLearn images.
- Accepts only one of those listed versions.
- Downloads an image only when the required version is not already present locally.
- Deploys it only when deployment was selected.
For a selected deployment, the tool runs Compose with up --detach --force-recreate, waits up to three minutes for each service to be running—and healthy when it has a health check—then smoke-tests both portal URLs for up to two minutes. When successful, it opens the User promotional page at /promo/index.html in the default browser.
If Windows HNS reports a network error, the tool asks the operator to restart Docker Desktop and retries once. It does not run a global Docker network prune. After a first successful deployment or a portal smoke-test timeout, it can offer a Windows restart; the default response is n.
Use the Compose file in the selected artifact folder:
$artifacts = '.\.generated-config\test-ca'
# Rebuild images with the configuration in this artifact folder.
docker compose -f "$artifacts\docker-compose.yml" build
# Start or update the services.
docker compose -f "$artifacts\docker-compose.yml" up --detach --force-recreate
# See service state and health.
docker compose -f "$artifacts\docker-compose.yml" ps --all
# Inspect a single service’s logs.
docker compose -f "$artifacts\docker-compose.yml" logs --tail 200 <service-name>Use the portal URL stored in the generated configuration. For the User promotional landing page, append /promo/index.html to the User portal origin.
| Symptom | Check or safe action |
|---|---|
az is unavailable or login fails |
Install Azure CLI, ensure it is on PATH, then run az login. |
| No subscription is listed | Run az account show; verify the active tenant and that the target subscription is enabled. |
| Provisioning stops at Owner confirmation | Obtain Azure subscription Owner access before running the tool again. |
| Entra registration initialization fails | Confirm the required Entra administrator role and tenant-wide-consent authority. |
| Only one OraklLearn registration exists | Resolve the partial registration state manually; the tool intentionally does not alter it. |
Local sign-out does not return to /promo/index.html
|
Register the matching /signout-callback-oidc URI in Entra, then confirm the final logout redirect in the generated User settings. |
| Docker cannot be reached | Start Docker Desktop and answer y to recheck, or end the Docker portion of the run. |
| Docker reports Linux containers | Allow the tool to switch to Windows containers, or switch Docker Desktop manually and rerun. |
| HNS network error | Restart Docker Desktop, wait for the Windows engine, and allow the one retry. Do not use global network cleanup. |
| Services do not become ready | Run docker compose ... ps --all and inspect the affected service logs. |
| Portal smoke test times out | Confirm the services are running, review their logs, and restart Windows only if the tool indicates the Docker network stack needs it. |
olcli/appsettings.json is the source of defaults packaged with the tool:
-
RuntimeConfigurationcontains public URL templates, runtime callback and logout templates, Docker defaults, and common prompt defaults. -
LocalJsonConfigurationprovides local Visual Studio callback and logout values written into generatedappsettings.secrets.jsonfiles. -
InitialAdministratorprovides the default initial credit balance.
Update this file when changing the supported deployment topology. Do not edit generated secrets as a substitute for correcting the source configuration; regenerate the affected artifact bundle instead.
ol is intended for personal, non-profit, or test environments. Commercial use requires an explicit commercial licence. The tool and documentation do not create a support or production-service commitment; use in a commercial or production environment requires an explicit authorising agreement.

https://orakllearn.com · Author: Jimmy Bourque · https://jbti-evolution.com
- Main page
- Overview
- Foundation
- Integration
- Flow
- Using OraklLearn
- Configuration
- Monitoring