Deploy
Deploy the Compiler app to Kubernetes via Helm or integrate into your CI/CD pipeline.
Step 1: Prerequisites
| Requirement | Description |
|---|---|
| Log10x License | Your license key (get one) |
| Helm | Helm CLI installed (for k8s deployment) |
| kubectl | Configured to access your cluster (for k8s deployment) |
| Git Token | Access token for your Git provider (GitHub, GitLab, Bitbucket, etc.) with repository read access |
| Docker Credentials | Registry credentials if pulling from private registries |
Step 2: Choose Deployment Method
The Helm chart deploys a CronJob that periodically compiles symbols from source code and container images.
Best for: Scheduled symbol compilation in production environments.
Add the Helm repository:
Verify the chart appears:
Run the compiler as a docker run step in your CI/CD pipeline (GitHub Actions, GitLab CI, Jenkins). The compiler image pulls source repos, scans for symbols, and pushes the compiled symbol library back to your config repository.
Best for: Event-driven compilation triggered by code commits. No Kubernetes required.
Step 3: Configure Deployment Settings
Create a new file called my-compiler.yaml in your working directory. This Helm values file will be used in all subsequent steps.
Configuration is passed via environment variables and command-line arguments in the docker run command. See the complete platform examples in Step 6.
Step 4: Load Configuration
Load the 10x engine config folder to customize which sources the compiler scans and where it writes output. If you skip this step, the default configuration bundled with the Log10x image is used.
For Kubernetes CronJob deployments, load the config folder into the cluster using one of the methods below.
An init container clones your configuration repository before each CronJob run. Works with GitHub, GitLab, Bitbucket, or any HTTPS-accessible Git provider.
- Fork the Config Repository
- Create a branch for your configuration changes
- Edit the app configuration to specify your source inputs and symbol outputs
Add to your Helm values:
gitToken: "YOUR-GIT-TOKEN"
jobs:
- name: compiler-job
# ... (previous config)
config:
git:
enabled: true
url: "https://github.com/YOUR-ACCOUNT/REPO-NAME.git"
branch: "my-compiler-config" # Optional: defaults to main
For production, store the token in a Kubernetes Secret rather than in the values file.
Mount an existing PersistentVolumeClaim containing your configuration directory. This approach works in air-gapped environments and requires no external network access.
- Create a PVC containing your configuration files (cloned from the Config Repository)
- Reference it in your Helm values:
For CI/CD pipelines, the config folder is loaded at runtime via the @github launch macro or a local volume mount. The complete CI/CD examples in Step 6 include config loading inline.
The engine clones the config repo at startup:
Step 5: Configure Secrets
Store sensitive credentials in Kubernetes Secrets rather than plain files.
Important: Only add secrets for source repositories you've configured in your Compiler app configuration.
Create the secret:
kubectl create secret generic compiler-credentials \
--from-literal=github-token=YOUR_GITHUB_TOKEN \
--from-literal=docker-username=YOUR_DOCKER_USERNAME \
--from-literal=docker-token=YOUR_DOCKER_TOKEN
Add secret references to your my-compiler.yaml:
jobs:
- name: compiler-job
# ... (previous config)
extraEnv:
# For GitHub source repositories
- name: GH_TOKEN
valueFrom:
secretKeyRef:
name: compiler-credentials
key: github-token
# For Docker registries
- name: DOCKER_USERNAME
valueFrom:
secretKeyRef:
name: compiler-credentials
key: docker-username
- name: DOCKER_TOKEN
valueFrom:
secretKeyRef:
name: compiler-credentials
key: docker-token
# For Artifactory repositories
# - name: ARTIFACTORY_TOKEN
# valueFrom:
# secretKeyRef:
# name: compiler-credentials
# key: artifactory-token
Configure secrets in your CI platform:
| Secret | Description |
|---|---|
GH_TOKEN |
GitHub PAT with repo scope |
DOCKER_USERNAME |
Container registry username |
DOCKER_TOKEN |
Container registry token |
ARTIFACTORY_TOKEN |
Artifactory token (if used) |
Go to Settings > Secrets and variables > Actions > Secrets and add the secrets above.
Go to Settings > CI/CD > Variables and add the secrets above.
Go to Manage Jenkins > Credentials and add credential IDs: github-token, docker-username, docker-token.
Step 6: Deploy
Add a docker run step to your CI/CD pipeline. Select your platform below.
Create .github/workflows/compile.yml:
name: 10x Compile
on:
push:
branches: [main]
jobs:
compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run 10x Compiler
run: |
docker run --rm \
-v $(pwd):/work \
-e GH_TOKEN=${{ secrets.GH_TOKEN }} \
-e DOCKER_USERNAME=${{ secrets.DOCKER_USERNAME }} \
-e DOCKER_TOKEN=${{ secrets.DOCKER_TOKEN }} \
log10x/pipeline-10x:latest \
'@github={"token": "${{ secrets.GH_TOKEN }}", "repo": "my-user/my-config"}' \
@apps/compiler
Create .gitlab-ci.yml:
stages:
- compile
tenx_compile:
stage: compile
image: docker:latest
services:
- docker:dind
script:
- docker run --rm \
-e GH_TOKEN=$GH_TOKEN \
-e DOCKER_USERNAME=$DOCKER_USERNAME \
-e DOCKER_TOKEN=$DOCKER_TOKEN \
log10x/pipeline-10x:latest \
'@github={"token": "'$GH_TOKEN'", "repo": "my-user/my-config"}' \
@apps/compiler
Create Jenkinsfile:
pipeline {
agent any
stages {
stage('TenX Compile') {
steps {
withCredentials([
string(credentialsId: 'github-token', variable: 'GH_TOKEN'),
string(credentialsId: 'docker-username', variable: 'DOCKER_USERNAME'),
string(credentialsId: 'docker-token', variable: 'DOCKER_TOKEN')
]) {
sh '''
docker run --rm \
-e GH_TOKEN=$GH_TOKEN \
-e DOCKER_USERNAME=$DOCKER_USERNAME \
-e DOCKER_TOKEN=$DOCKER_TOKEN \
log10x/pipeline-10x:latest \
'@github={"token": "'$GH_TOKEN'", "repo": "my-user/my-config"}' \
@apps/compiler
'''
}
}
}
}
}
Step 7: Verify
Verify no errors appear in the log file.
Check output files:
Verify symbol files were generated in your configured outputSymbolFolder and outputSymbolLibraryFile paths.
Step 8: Distribute Output Symbol Libraries
The compiler pushes output symbol files to your config repository. Edge and cloud apps pull these files at startup and poll for updates periodically.
Quickstart Full Sample
log10xLicense: "YOUR-LICENSE-KEY-HERE"
gitToken: "YOUR-GIT-TOKEN"
jobs:
- name: compiler-job
runtimeName: my-compiler
schedule: "*/30 * * * *"
args:
- "@apps/compiler"
config:
git:
enabled: true
url: "https://github.com/YOUR-ACCOUNT/REPO-NAME.git"
branch: "my-compiler-config"
extraEnv:
- name: GH_TOKEN
valueFrom:
secretKeyRef:
name: compiler-credentials
key: github-token
- name: DOCKER_USERNAME
valueFrom:
secretKeyRef:
name: compiler-credentials
key: docker-username
- name: DOCKER_TOKEN
valueFrom:
secretKeyRef:
name: compiler-credentials
key: docker-token
See the Deploy step above for complete CI/CD configuration examples for GitHub Actions, GitLab CI, and Jenkins.