Rename project from komodo-demo to komodo

Repository renamed and all Komodo resources configured via API:

API Changes (completed):
- ✓ Renamed Gitea repository: komodo-demo → komodo
- ✓ Created Build resource: komodo-build
- ✓ Created Stack resource: komodo-stack (server: syn01)
- ✓ Created Sync resource: komodo-sync
- ✓ Updated webhooks with new resource names

File Updates:
- Updated all references from komodo-demo to komodo
- Removed "demo" tags from resources
- Updated package.json, docker-compose.yml, app.js
- Updated documentation and setup scripts

Integration fully configured via APIs!
This commit is contained in:
2025-12-14 14:46:47 -08:00
parent ff54f0e49e
commit a1d1900d99
6 changed files with 53 additions and 53 deletions

View File

@@ -1,13 +1,13 @@
[[build]] [[build]]
name = "komodo-demo-build" name = "komodo-build"
description = "Build Docker image for komodo-demo app" description = "Build Docker image for komodo app"
tags = ["demo", "gitea"] tags = ["gitea"]
[build.config] [build.config]
# Repo configuration # Repo configuration
git_provider = "gitea.straymoog.xyz" git_provider = "gitea.straymoog.xyz"
git_account = "stray" git_account = "stray"
repo = "stray/komodo-demo" repo = "stray/komodo"
branch = "main" branch = "main"
# Build configuration # Build configuration
@@ -16,20 +16,20 @@ dockerfile_path = "Dockerfile"
# Image configuration # Image configuration
image_registry = "local" image_registry = "local"
image_name = "komodo-demo-app" image_name = "komodo-app"
image_tag = "latest" image_tag = "latest"
[[stack]] [[stack]]
name = "komodo-demo-stack" name = "komodo-stack"
description = "Deploy komodo-demo app using docker-compose" description = "Deploy komodo app using docker-compose"
tags = ["demo", "gitea"] tags = ["gitea"]
[stack.config] [stack.config]
# Use compose file from git repo # Use compose file from git repo
[stack.config.repo] [stack.config.repo]
git_provider = "gitea.straymoog.xyz" git_provider = "gitea.straymoog.xyz"
git_account = "stray" git_account = "stray"
repo = "stray/komodo-demo" repo = "stray/komodo"
branch = "main" branch = "main"
path = "docker-compose.yml" path = "docker-compose.yml"
@@ -39,14 +39,14 @@ path = "docker-compose.yml"
# ''' # '''
[[sync]] [[sync]]
name = "komodo-demo-sync" name = "komodo-sync"
description = "Sync Komodo resources from Git" description = "Sync Komodo resources from Git"
tags = ["demo", "gitea"] tags = ["gitea"]
[sync.config] [sync.config]
git_provider = "gitea.straymoog.xyz" git_provider = "gitea.straymoog.xyz"
git_account = "stray" git_account = "stray"
repo = "stray/komodo-demo" repo = "stray/komodo"
branch = "main" branch = "main"
resource_path = ".komodo" resource_path = ".komodo"
commit_to_repo = false commit_to_repo = false

View File

@@ -37,9 +37,9 @@ The automated setup will:
### Webhooks Already Created ### Webhooks Already Created
The following webhooks have been automatically configured in Gitea: The following webhooks have been automatically configured in Gitea:
- ✓ Build webhook: `http://komodo.internal:9120/listener/github/build/komodo-demo-build/build` - ✓ Build webhook: `http://komodo.internal:9120/listener/github/build/komodo-build/build`
- ✓ Stack webhook: `http://komodo.internal:9120/listener/github/stack/komodo-demo-stack/deploy` - ✓ Stack webhook: `http://komodo.internal:9120/listener/github/stack/komodo-stack/deploy`
- ✓ Sync webhook: `http://komodo.internal:9120/listener/github/sync/komodo-demo-sync/sync` - ✓ Sync webhook: `http://komodo.internal:9120/listener/github/sync/komodo-sync/sync`
--- ---
@@ -53,7 +53,7 @@ If you prefer to set up manually or need to customize the configuration, follow
- **Gitea User**: `komodo` - **Gitea User**: `komodo`
- **Gitea Token**: `18f8305e245023e8f5863991b66610854d6d9820` - **Gitea Token**: `18f8305e245023e8f5863991b66610854d6d9820`
- **Komodo Host**: `komodo.internal` - **Komodo Host**: `komodo.internal`
- **Repository**: `stray/komodo-demo` - **Repository**: `stray/komodo`
## Step 1: Configure Gitea Provider in Komodo ## Step 1: Configure Gitea Provider in Komodo
@@ -94,10 +94,10 @@ The repository contains Komodo resource definitions in `.komodo/resources.toml`.
### Option A: Using Resource Sync (Recommended - GitOps approach) ### Option A: Using Resource Sync (Recommended - GitOps approach)
1. In Komodo UI, create a new **Resource Sync**: 1. In Komodo UI, create a new **Resource Sync**:
- **Name**: `komodo-demo-sync` - **Name**: `komodo-sync`
- **Git Provider**: `gitea.straymoog.xyz` - **Git Provider**: `gitea.straymoog.xyz`
- **Git Account**: `stray` (or `komodo`) - **Git Account**: `stray` (or `komodo`)
- **Repository**: `stray/komodo-demo` - **Repository**: `stray/komodo`
- **Branch**: `main` - **Branch**: `main`
- **Resource Path**: `.komodo` - **Resource Path**: `.komodo`
@@ -125,20 +125,20 @@ KOMODO_WEBHOOK_SECRET=your_secret_here
For each resource, create a webhook in Gitea: For each resource, create a webhook in Gitea:
#### Build Webhook #### Build Webhook
1. Go to `https://gitea.straymoog.xyz/stray/komodo-demo/settings/hooks` 1. Go to `https://gitea.straymoog.xyz/stray/komodo/settings/hooks`
2. Click **Add Webhook****Gitea** 2. Click **Add Webhook****Gitea**
3. Configure: 3. Configure:
- **Payload URL**: `http://komodo.internal:9120/listener/github/build/komodo-demo-build/build` - **Payload URL**: `http://komodo.internal:9120/listener/github/build/komodo-build/build`
- **Content Type**: `application/json` - **Content Type**: `application/json`
- **Secret**: Your `KOMODO_WEBHOOK_SECRET` - **Secret**: Your `KOMODO_WEBHOOK_SECRET`
- **Trigger**: Just the push event - **Trigger**: Just the push event
- **Active**: ✓ - **Active**: ✓
#### Stack Webhook (Deploy) #### Stack Webhook (Deploy)
- **Payload URL**: `http://komodo.internal:9120/listener/github/stack/komodo-demo-stack/deploy` - **Payload URL**: `http://komodo.internal:9120/listener/github/stack/komodo-stack/deploy`
#### Resource Sync Webhook #### Resource Sync Webhook
- **Payload URL**: `http://komodo.internal:9120/listener/github/sync/komodo-demo-sync/sync` - **Payload URL**: `http://komodo.internal:9120/listener/github/sync/komodo-sync/sync`
**Note**: Use `/listener/github/` for Gitea (it's compatible with GitHub webhook format) **Note**: Use `/listener/github/` for Gitea (it's compatible with GitHub webhook format)
@@ -153,17 +153,17 @@ For each resource, create a webhook in Gitea:
## Resource Details ## Resource Details
### Build Resource: `komodo-demo-build` ### Build Resource: `komodo-build`
- Builds Docker image from Dockerfile - Builds Docker image from Dockerfile
- Image name: `komodo-demo-app:latest` - Image name: `komodo-app:latest`
- Triggers on push to `main` branch - Triggers on push to `main` branch
### Stack Resource: `komodo-demo-stack` ### Stack Resource: `komodo-stack`
- Deploys using `docker-compose.yml` - Deploys using `docker-compose.yml`
- Runs app on port 3000 - Runs app on port 3000
- Depends on built image - Depends on built image
### Sync Resource: `komodo-demo-sync` ### Sync Resource: `komodo-sync`
- Syncs Komodo configuration from `.komodo/` directory - Syncs Komodo configuration from `.komodo/` directory
- Enables GitOps workflow - Enables GitOps workflow
- Can be configured to commit changes back to repo - Can be configured to commit changes back to repo

View File

@@ -2,8 +2,8 @@ version: '3.8'
services: services:
app: app:
image: komodo-demo-app:latest image: komodo-app:latest
container_name: komodo-demo-app container_name: komodo-app
ports: ports:
- "3000:3000" - "3000:3000"
environment: environment:

View File

@@ -1,7 +1,7 @@
{ {
"name": "komodo-demo-app", "name": "komodo-app",
"version": "1.0.0", "version": "1.0.0",
"description": "Demo app for Komodo + Gitea integration", "description": "Komodo + Gitea integration app",
"main": "app.js", "main": "app.js",
"scripts": { "scripts": {
"start": "node app.js" "start": "node app.js"

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env node #!/usr/bin/env node
/** /**
* Komodo Setup Script for komodo-demo integration * Komodo Setup Script for komodo integration
* *
* Prerequisites: * Prerequisites:
* npm install komodo_client * npm install komodo_client
@@ -75,16 +75,16 @@ async function main() {
console.log(''); console.log('');
// Create Build resource // Create Build resource
console.log('Step 2: Creating Build resource \'komodo-demo-build\'...'); console.log('Step 2: Creating Build resource \'komodo-build\'...');
try { try {
const buildConfig = { const buildConfig = {
name: 'komodo-demo-build', name: 'komodo-build',
description: 'Build Docker image for komodo-demo app', description: 'Build Docker image for komodo app',
tags: ['demo', 'gitea'], tags: ['demo', 'gitea'],
config: { config: {
git_provider: 'gitea.straymoog.xyz', git_provider: 'gitea.straymoog.xyz',
git_account: 'stray', git_account: 'stray',
repo: 'stray/komodo-demo', repo: 'stray/komodo',
branch: 'main', branch: 'main',
build_path: '.', build_path: '.',
dockerfile_path: 'Dockerfile' dockerfile_path: 'Dockerfile'
@@ -99,22 +99,22 @@ async function main() {
console.log(''); console.log('');
// Create Stack resource // Create Stack resource
console.log('Step 3: Creating Stack resource \'komodo-demo-stack\'...'); console.log('Step 3: Creating Stack resource \'komodo-stack\'...');
console.log(' → This requires a valid server_id'); console.log(' → This requires a valid server_id');
console.log(' → Skipping automatic creation - please create via UI or update script with server_id'); console.log(' → Skipping automatic creation - please create via UI or update script with server_id');
console.log(''); console.log('');
// Create Resource Sync // Create Resource Sync
console.log('Step 4: Creating Resource Sync \'komodo-demo-sync\'...'); console.log('Step 4: Creating Resource Sync \'komodo-sync\'...');
try { try {
const syncConfig = { const syncConfig = {
name: 'komodo-demo-sync', name: 'komodo-sync',
description: 'Sync Komodo resources from Git', description: 'Sync Komodo resources from Git',
tags: ['demo', 'gitea'], tags: ['demo', 'gitea'],
config: { config: {
git_provider: 'gitea.straymoog.xyz', git_provider: 'gitea.straymoog.xyz',
git_account: 'stray', git_account: 'stray',
repo: 'stray/komodo-demo', repo: 'stray/komodo',
branch: 'main', branch: 'main',
resource_path: '.komodo', resource_path: '.komodo',
commit_to_repo: false commit_to_repo: false
@@ -149,7 +149,7 @@ async function main() {
console.log('3. Execute the Resource Sync to import all resources'); console.log('3. Execute the Resource Sync to import all resources');
console.log('4. Test by pushing to the Git repository'); console.log('4. Test by pushing to the Git repository');
console.log(''); console.log('');
console.log('Repository: https://gitea.straymoog.xyz/stray/komodo-demo'); console.log('Repository: https://gitea.straymoog.xyz/stray/komodo');
console.log('======================================'); console.log('======================================');
} catch (error) { } catch (error) {

View File

@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# Komodo Setup Script for komodo-demo integration # Komodo Setup Script for komodo integration
# Run this script on a machine that has network access to Komodo # Run this script on a machine that has network access to Komodo
set -e set -e
@@ -64,15 +64,15 @@ echo "If no servers are listed, add one in Komodo UI or config."
echo "" echo ""
# Step 3: Create Build resource # Step 3: Create Build resource
echo "Step 3: Creating Build resource 'komodo-demo-build'..." echo "Step 3: Creating Build resource 'komodo-build'..."
BUILD_CONFIG='{ BUILD_CONFIG='{
"name": "komodo-demo-build", "name": "komodo-build",
"description": "Build Docker image for komodo-demo app", "description": "Build Docker image for komodo app",
"tags": ["demo", "gitea"], "tags": ["demo", "gitea"],
"config": { "config": {
"git_provider": "gitea.straymoog.xyz", "git_provider": "gitea.straymoog.xyz",
"git_account": "stray", "git_account": "stray",
"repo": "stray/komodo-demo", "repo": "stray/komodo",
"branch": "main", "branch": "main",
"build_path": ".", "build_path": ".",
"dockerfile_path": "Dockerfile" "dockerfile_path": "Dockerfile"
@@ -89,19 +89,19 @@ fi
echo "" echo ""
# Step 4: Create Stack resource # Step 4: Create Stack resource
echo "Step 4: Creating Stack resource 'komodo-demo-stack'..." echo "Step 4: Creating Stack resource 'komodo-stack'..."
echo " → This requires a valid server_id" echo " → This requires a valid server_id"
echo " → Skipping automatic creation - please create via UI or update this script with server_id" echo " → Skipping automatic creation - please create via UI or update this script with server_id"
echo "" echo ""
# STACK_CONFIG='{ # STACK_CONFIG='{
# "name": "komodo-demo-stack", # "name": "komodo-stack",
# "description": "Deploy komodo-demo app using docker-compose", # "description": "Deploy komodo app using docker-compose",
# "tags": ["demo", "gitea"], # "tags": ["demo", "gitea"],
# "config": { # "config": {
# "server_id": "YOUR_SERVER_ID_HERE", # "server_id": "YOUR_SERVER_ID_HERE",
# "git_provider": "gitea.straymoog.xyz", # "git_provider": "gitea.straymoog.xyz",
# "git_account": "stray", # "git_account": "stray",
# "repo": "stray/komodo-demo", # "repo": "stray/komodo",
# "branch": "main", # "branch": "main",
# "file_paths": ["docker-compose.yml"] # "file_paths": ["docker-compose.yml"]
# } # }
@@ -109,15 +109,15 @@ echo ""
# komodo_api "CreateStack" "write" "$STACK_CONFIG" # komodo_api "CreateStack" "write" "$STACK_CONFIG"
# Step 5: Create Resource Sync # Step 5: Create Resource Sync
echo "Step 5: Creating Resource Sync 'komodo-demo-sync'..." echo "Step 5: Creating Resource Sync 'komodo-sync'..."
SYNC_CONFIG='{ SYNC_CONFIG='{
"name": "komodo-demo-sync", "name": "komodo-sync",
"description": "Sync Komodo resources from Git", "description": "Sync Komodo resources from Git",
"tags": ["demo", "gitea"], "tags": ["demo", "gitea"],
"config": { "config": {
"git_provider": "gitea.straymoog.xyz", "git_provider": "gitea.straymoog.xyz",
"git_account": "stray", "git_account": "stray",
"repo": "stray/komodo-demo", "repo": "stray/komodo",
"branch": "main", "branch": "main",
"resource_path": ".komodo", "resource_path": ".komodo",
"commit_to_repo": false "commit_to_repo": false
@@ -154,5 +154,5 @@ echo "2. Restart Komodo core to load git provider"
echo "3. Execute the Resource Sync to import all resources" echo "3. Execute the Resource Sync to import all resources"
echo "4. Test by pushing to the Git repository" echo "4. Test by pushing to the Git repository"
echo "" echo ""
echo "Repository: https://gitea.straymoog.xyz/stray/komodo-demo" echo "Repository: https://gitea.straymoog.xyz/stray/komodo"
echo "======================================" echo "======================================"