diff --git a/docker/docker-compose-examples/analytics/.env b/docker/docker-compose-examples/analytics/.env deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/docker/docker-compose-examples/analytics/README.md b/docker/docker-compose-examples/analytics/README.md index b327fbd0b5b7..8e8f3921b268 100644 --- a/docker/docker-compose-examples/analytics/README.md +++ b/docker/docker-compose-examples/analytics/README.md @@ -1,294 +1,11 @@ -# dotCMS Analytics Complete Stack +# Content Analytics Infrastructure -This docker-compose setup provides a complete dotCMS instance pre-configured with the full analytics stack including CubeJS, ClickHouse, Jitsu, and Keycloak. +The Docker Compose setup for the dotCMS Content Analytics infrastructure +(ClickHouse cluster + `ca-event-manager`) lives in its own repository to avoid +duplicating configuration files across repos: -## Architecture Overview +**https://github.com/dotCMS/dot-ca-event-manager** -``` -┌─────────────┐ ┌──────────────────┐ ┌─────────────────┐ -│ dotCMS │────│ Analytics Stack │────│ Data Layer │ -│ │ │ │ │ │ -│ - dotCMS │ │ - Keycloak (IDP) │ │ - ClickHouse │ -│ - OpenSearch│ │ - Jitsu (Events) │ │ - PostgreSQL │ -│ - Database │ │ - Cube (Read) │ │ - Redis │ -└─────────────┘ │ - Configurator │ └─────────────────┘ - └──────────────────┘ -``` - -## Services and Ports - -### Core dotCMS Services -- **dotCMS**: http://localhost:8082 (HTTPS: 8443) -- **dotCMS Database**: PostgreSQL (internal only) -- **OpenSearch**: http://localhost:9200 (internal + external) -- **Glowroot**: http://localhost:4000 (monitoring) - -### Analytics Services -- **Keycloak (IDP)**: http://localhost:61111 -- **dotCMS Analytics Configurator**: http://localhost:8088 -- **Jitsu (Event Collection)**: http://localhost:8081 -- **CubeJS (Analytics Read)**: http://localhost:4001 -- **ClickHouse (Data Warehouse)**: http://localhost:8124 -- **Analytics Database**: PostgreSQL (internal only) - -## Pre-configured Analytics Settings - -The dotCMS instance is pre-configured with the following analytics settings via environment variables: - -### Internal URLs (Container-to-Container) -```bash -ANALYTICS_IDP_URL="http://keycloak:8080/realms/dotcms/protocol/openid-connect/token" -ANALYTICS_APP_CONFIG_URL="http://dotcms-analytics:8080/c/customer1/cluster1/keys" -ANALYTICS_APP_WRITE_URL="http://jitsu:8001/api/v1/event" -ANALYTICS_APP_READ_URL="http://cube:4000" -``` - -### External URLs (Host Access) -For browser/external access, these map to: -```bash -ANALYTICS_IDP_URL="http://localhost:61111/realms/dotcms/protocol/openid-connect/token" -ANALYTICS_APP_CONFIG_URL="https://localhost:8088/c/customer1/cluster1/keys" -ANALYTICS_APP_WRITE_URL="https://localhost:8081/api/v1/event" -ANALYTICS_APP_READ_URL="https://localhost:4001" -``` - -### Client Configuration (customer1:cluster1) -```bash -Analytics Client ID: "analytics-customer-customer1" -Analytics Client Secret: "testsecret" -Analytics Key: [Auto-generated by configurator] -``` - -## Getting Started - -### Quick Start Options - -Choose your startup method based on your needs: - -#### Option 1: Using the Startup Script (Recommended) -```bash -# Analytics services only (faster startup, less resources) -./start-analytics.sh --analytics-only - -# Full stack with dotCMS (complete development environment) -./start-analytics.sh - -# Force recreate containers (required for environment variable changes) -./start-analytics.sh --force-recreate -./start-analytics.sh --analytics-only --force-recreate - -# Show help and service details -./start-analytics.sh --help -``` - -#### Option 2: Using Docker Compose Directly -```bash -# Analytics services only -docker-compose up -d - -# Full stack with dotCMS -docker-compose --profile full up -d - -# Force recreate containers (for environment variable changes) -docker-compose up -d --force-recreate -docker-compose --profile full up -d --force-recreate - -# Stop everything (including dotCMS services) -docker-compose --profile full down -``` - -### Startup Modes - -**Analytics Only Mode** (`--analytics-only`): -- Faster startup and lower resource usage -- Includes: Keycloak, Analytics API, Jitsu, Cube, ClickHouse, Redis, PostgreSQL -- Best for: Analytics development, testing API integrations - -**Full Stack Mode** (Default): -- Complete development environment -- Includes: All analytics services + dotCMS + OpenSearch + dotCMS Database -- Best for: End-to-end testing, content + analytics workflows - -### Wait for Services - -```bash -# Check service health -docker-compose ps - -# Monitor startup logs -docker-compose logs -f keycloak dotcms-analytics - -# For full stack, monitor dotCMS startup -docker-compose logs -f dotcms -``` - -### Access Your Services - -**Analytics Services (Always Available):** -- **Keycloak Admin**: http://localhost:61111 (admin:keycloak) -- **Analytics API**: http://localhost:8088 -- **Cube Analytics**: http://localhost:4001 -- **Jitsu Events**: http://localhost:8081 -- **ClickHouse**: http://localhost:8124 - -**dotCMS Services (Full Stack Only):** -- **dotCMS**: http://localhost:8082 (admin@dotcms.com:admin) -- **Glowroot**: http://localhost:4000 - -### Verify Analytics Configuration (Full Stack) - -1. Access dotCMS at http://localhost:8082 -2. Navigate to: Apps → dotExperiments-config -3. Analytics should be pre-configured with the URLs above -4. Test connection to verify all services are communicating - -## Network Architecture - -### Networks -- **dotcms-net**: Isolated network for dotCMS core services (dotCMS, database, OpenSearch) -- **analytics-net**: Isolated network for analytics services (Keycloak, Jitsu, CubeJS, ClickHouse) -- **Bridge**: dotCMS connects to both networks to communicate with analytics services - -### Security -- Internal service communication uses container names (e.g., `keycloak:8080`) -- External access uses host ports (e.g., `localhost:61111`) -- Databases are isolated and only accessible within their respective networks -- Analytics uses JWT-based authentication with Keycloak - -## Environment Variables - -Key environment variables that can be customized: - -```bash -# Ports -KEYCLOAK_HOST_PORT=61111 -DOTCMS_ANALYTICS_HOST_PORT=8088 -JITSU_HOST_PORT=8081 -CUBE_HOST_PORT=4001 -CH_HOST_PORT=8124 - -# Database -POSTGRESQL_DB=postgres -POSTGRESQL_USER=postgres -POSTGRESQL_PASS=postgres - -# ClickHouse -CH_DB=clickhouse_test_db -CH_USER=clickhouse_test_user -CH_PWD=clickhouse_password - -# Keycloak -KEYCLOAK_ADMIN=admin -KEYCLOAK_ADMIN_PASSWORD=keycloak - -# dotCMS Experiment Features -DOT_ENABLE_EXPERIMENTS_AUTO_JS_INJECTION=true -``` - -### ⚠️ Important: Environment Variable Changes - -**Environment variables are set when containers are first created and are NOT automatically updated when you restart services.** - -To apply changes to environment variables: - -1. **Stop and recreate containers:** - ```bash - docker-compose down - docker-compose up -d --force-recreate - ``` - -2. **Or use the startup script with force recreate:** - ```bash - ./start-analytics.sh --force-recreate - ./start-analytics.sh --analytics-only --force-recreate - ``` - -3. **For individual services:** - ```bash - docker-compose up -d --force-recreate [service-name] - ``` - -**Why this happens:** Docker containers bake environment variables into the container at creation time. Simply restarting (`docker-compose restart`) keeps the existing container with old environment variables. You must recreate the container to pick up new environment variables from the docker-compose.yml file. - -## Key Features - -### ✅ Complete Analytics Integration -- **Pre-configured dotCMS** with analytics URLs and client credentials -- **Defense-in-depth security** with multi-layer filtering -- **ClickHouse optimization** for customer partition elimination -- **JWT-based authentication** via Keycloak - -### ✅ Development Ready -- **Hot-reload** CubeJS schema changes via volume mounts -- **Debug logging** enabled for troubleshooting -- **Health checks** for all critical services -- **Glowroot monitoring** for performance analysis - -### ✅ Production Patterns -- **Separate databases** for dotCMS and analytics -- **Network isolation** between service layers -- **Persistent volumes** for data retention -- **Environment-based configuration** - -## Troubleshooting - -### Common Issues - -1. **Services not starting:** - ```bash - # Check logs - docker-compose logs [service-name] - - # Restart specific service - docker-compose restart [service-name] - ``` - -2. **Analytics connection issues:** - - Verify all services are running: `docker-compose ps` - - Check network connectivity: `docker-compose exec dotcms ping keycloak` - - Verify URLs in dotCMS analytics configuration - -3. **Permission issues:** - ```bash - # Fix volume permissions - sudo chown -R 1000:1000 ./setup/ - ``` - -4. **Port conflicts:** - - Modify port mappings in docker-compose.yml - - Update corresponding environment variables - -### Useful Commands - -```bash -# View service logs -docker-compose logs -f dotcms -docker-compose logs -f cube - -# Access service shells -docker-compose exec dotcms bash -docker-compose exec analytics-postgres psql -U postgres - -# Restart specific services -docker-compose restart dotcms keycloak - -# Clean restart -docker-compose down -v -docker-compose up -d -``` - -## Next Steps - -1. **Configure A/B Testing**: Set up experiments in dotCMS -2. **Create Dashboards**: Build analytics dashboards using CubeJS -3. **Monitor Performance**: Use Glowroot for application monitoring -4. **Scale Services**: Add replicas for high availability -5. **Production Hardening**: Implement proper secrets management and SSL certificates - -## Security Considerations - -- Change default passwords in production -- Use proper SSL certificates for external access -- Implement proper firewall rules -- Regular security updates for all services -- Monitor access logs and authentication attempts \ No newline at end of file +Refer to the `docker/` directory in that repository for the full setup, +including the ClickHouse keeper, replica nodes, initialization scripts, and +the event manager service. \ No newline at end of file diff --git a/docker/docker-compose-examples/experiments/README.md b/docker/docker-compose-examples/experiments/README.md new file mode 100644 index 000000000000..46997fac3471 --- /dev/null +++ b/docker/docker-compose-examples/experiments/README.md @@ -0,0 +1,289 @@ +# dotCMS Experiments Complete Stack + +This docker-compose setup provides a complete dotCMS instance pre-configured with the full analytics stack including CubeJS, ClickHouse, Jitsu, and Keycloak. + +## Architecture Overview + +``` +┌─────────────┐ ┌──────────────────┐ ┌─────────────────┐ +│ dotCMS │────│ Analytics Stack │────│ Data Layer │ +│ │ │ │ │ │ +│ - dotCMS │ │ - Keycloak (IDP) │ │ - ClickHouse │ +│ - OpenSearch│ │ - Jitsu (Events) │ │ - PostgreSQL │ +│ - Database │ │ - Cube (Read) │ │ - Redis │ +└─────────────┘ │ - Configurator │ └─────────────────┘ + └──────────────────┘ +``` + +## Services and Ports + +### Core dotCMS Services +- **dotCMS**: http://localhost:8082 (HTTPS: 8443) +- **dotCMS Database**: PostgreSQL (internal only) +- **OpenSearch**: http://localhost:9200 (internal + external) +- **Glowroot**: http://localhost:4000 (monitoring) + +### Experiments Services +- **Keycloak (IDP)**: http://localhost:61111 +- **dotCMS Analytics Configurator**: http://localhost:8088 +- **Jitsu (Event Collection)**: http://localhost:8081 +- **CubeJS (Analytics Read)**: http://localhost:4001 +- **ClickHouse (Data Warehouse)**: http://localhost:8124 +- **Analytics Database**: PostgreSQL (internal only) + +## Pre-configured Experiments Settings + +The dotCMS instance is pre-configured with the following analytics settings via environment variables: + +### dotCMS Experiments URLs + +dotCMS reaches analytics services via `host.docker.internal`, routing through the host machine to the exposed container ports: + +```bash +DOT_ANALYTICS_IDP_URL="http://host.docker.internal:61111/realms/dotcms/protocol/openid-connect/token" +DOT_ANALYTICS_APP_CONFIG_URL="http://host.docker.internal:8088/c/customer1/cluster1/keys" +DOT_ANALYTICS_APP_WRITE_URL="http://host.docker.internal:8081/api/v1/s2s/event" +DOT_ANALYTICS_APP_READ_URL="http://host.docker.internal:4001" +``` + +### Client Configuration (customer1:cluster1) +```bash +DOT_ANALYTICS_APP_CLIENT_ID="analytics-customer-customer1" +DOT_ANALYTICS_APP_CLIENT_SECRET="testsecret" +Analytics Key: [Auto-generated by configurator] +``` + +## Getting Started + +### Quick Start Options + +Choose your startup method based on your needs: + +#### Option 1: Using the Startup Script (Recommended) +```bash +# Experiments services only (faster startup, less resources) +./start-experiments.sh --experiments-only + +# Full stack with dotCMS (complete development environment) +./start-experiments.sh + +# Force recreate containers (required for environment variable changes) +./start-experiments.sh --force-recreate +./start-experiments.sh --experiments-only --force-recreate + +# Show help and service details +./start-experiments.sh --help +``` + +#### Option 2: Using Docker Compose Directly +```bash +# Experiments services only +docker-compose up -d + +# Full stack with dotCMS +docker-compose --profile full up -d + +# Force recreate containers (for environment variable changes) +docker-compose up -d --force-recreate +docker-compose --profile full up -d --force-recreate + +# Stop everything (including dotCMS services) +docker-compose --profile full down +``` + +### Startup Modes + +**Experiments Only Mode** (`--experiments-only`): +- Faster startup and lower resource usage +- Includes: Keycloak, Analytics API, Jitsu, Cube, ClickHouse, Redis, PostgreSQL +- Best for: Analytics development, testing API integrations + +**Full Stack Mode** (Default): +- Complete development environment +- Includes: All analytics services + dotCMS + OpenSearch + dotCMS Database +- Best for: End-to-end testing, content + analytics workflows + +### Wait for Services + +```bash +# Check service health +docker-compose ps + +# Monitor startup logs +docker-compose logs -f keycloak dotcms-analytics + +# For full stack, monitor dotCMS startup +docker-compose logs -f dotcms +``` + +### Access Your Services + +**Experiments Services (Always Available):** +- **Keycloak Admin**: http://localhost:61111 (admin:keycloak) +- **Analytics API**: http://localhost:8088 +- **Cube Analytics**: http://localhost:4001 +- **Jitsu Events**: http://localhost:8081 +- **ClickHouse**: http://localhost:8124 + +**dotCMS Services (Full Stack Only):** +- **dotCMS**: http://localhost:8082 (admin@dotcms.com:admin) +- **Glowroot**: http://localhost:4000 + +### Verify Experiments Configuration (Full Stack) + +1. Access dotCMS at http://localhost:8082 +2. Navigate to: Apps → dotExperiments-config +3. Experiments should be pre-configured with the URLs above +4. Test connection to verify all services are communicating + +## Network Architecture + +### Networks +- **dotcms-net**: Isolated network for dotCMS core services (dotCMS, database, OpenSearch) +- **analytics-net**: Isolated network for analytics services (Keycloak, Jitsu, CubeJS, ClickHouse) +- **Bridge**: dotCMS connects to both networks to communicate with analytics services + +### Security +- Internal service communication uses container names (e.g., `keycloak:8080`) +- External access uses host ports (e.g., `localhost:61111`) +- Databases are isolated and only accessible within their respective networks +- Analytics uses JWT-based authentication with Keycloak + +## Environment Variables + +Key environment variables that can be customized: + +```bash +# Ports +KEYCLOAK_HOST_PORT=61111 +DOTCMS_ANALYTICS_HOST_PORT=8088 +JITSU_HOST_PORT=8081 +CUBE_HOST_PORT=4001 +CH_HOST_PORT=8124 +POSTGRESQL_HOST_PORT=54321 + +# Database +POSTGRESQL_DB=postgres +POSTGRESQL_USER=postgres +POSTGRESQL_PASS=postgres + +# ClickHouse +CH_DB=clickhouse_test_db +CH_USER=clickhouse_test_user +CH_PWD=clickhouse_password + +# Keycloak +KEYCLOAK_ADMIN=admin +KEYCLOAK_ADMIN_PASSWORD=keycloak + +# dotCMS Experiment Features +DOT_ENABLE_EXPERIMENTS_AUTO_JS_INJECTION=true +``` + +### ⚠️ Important: Environment Variable Changes + +**Environment variables are set when containers are first created and are NOT automatically updated when you restart services.** + +To apply changes to environment variables: + +1. **Stop and recreate containers:** + ```bash + docker-compose down + docker-compose up -d --force-recreate + ``` + +2. **Or use the startup script with force recreate:** + ```bash + ./start-experiments.sh --force-recreate + ./start-experiments.sh --experiments-only --force-recreate + ``` + +3. **For individual services:** + ```bash + docker-compose up -d --force-recreate [service-name] + ``` + +**Why this happens:** Docker containers bake environment variables into the container at creation time. Simply restarting (`docker-compose restart`) keeps the existing container with old environment variables. You must recreate the container to pick up new environment variables from the docker-compose.yml file. + +## Key Features + +### ✅ Complete Experiments Integration +- **Pre-configured dotCMS** with analytics URLs and client credentials +- **Defense-in-depth security** with multi-layer filtering +- **ClickHouse optimization** for customer partition elimination +- **JWT-based authentication** via Keycloak + +### ✅ Development Ready +- **Hot-reload** CubeJS schema changes via volume mounts +- **Debug logging** enabled for troubleshooting +- **Health checks** for all critical services +- **Glowroot monitoring** for performance analysis + +### ✅ Production Patterns +- **Separate databases** for dotCMS and analytics +- **Network isolation** between service layers +- **Persistent volumes** for data retention +- **Environment-based configuration** + +## Troubleshooting + +### Common Issues + +1. **Services not starting:** + ```bash + # Check logs + docker-compose logs [service-name] + + # Restart specific service + docker-compose restart [service-name] + ``` + +2. **Analytics connection issues:** + - Verify all services are running: `docker-compose ps` + - Check network connectivity: `docker-compose exec dotcms ping keycloak` + - Verify URLs in dotCMS analytics configuration + +3. **Permission issues:** + ```bash + # Fix volume permissions + sudo chown -R 1000:1000 ./setup/ + ``` + +4. **Port conflicts:** + - Modify port mappings in docker-compose.yml + - Update corresponding environment variables + +### Useful Commands + +```bash +# View service logs +docker-compose logs -f dotcms +docker-compose logs -f cube + +# Access service shells +docker-compose exec dotcms bash +docker-compose exec analytics-postgres psql -U postgres + +# Restart specific services +docker-compose restart dotcms keycloak + +# Clean restart +docker-compose down -v +docker-compose up -d +``` + +## Next Steps + +1. **Configure A/B Testing**: Set up experiments in dotCMS +2. **Create Dashboards**: Build analytics dashboards using CubeJS +3. **Monitor Performance**: Use Glowroot for application monitoring +4. **Scale Services**: Add replicas for high availability +5. **Production Hardening**: Implement proper secrets management and SSL certificates + +## Security Considerations + +- Change default passwords in production +- Use proper SSL certificates for external access +- Implement proper firewall rules +- Regular security updates for all services +- Monitor access logs and authentication attempts \ No newline at end of file diff --git a/docker/docker-compose-examples/analytics/docker-compose.yml b/docker/docker-compose-examples/experiments/docker-compose.yml similarity index 94% rename from docker/docker-compose-examples/analytics/docker-compose.yml rename to docker/docker-compose-examples/experiments/docker-compose.yml index 81d9642976b8..7558a65592ff 100644 --- a/docker/docker-compose-examples/analytics/docker-compose.yml +++ b/docker/docker-compose-examples/experiments/docker-compose.yml @@ -97,7 +97,7 @@ services: - analytics-net restart: always - # dotCMS with Analytics Pre-configured + # dotCMS with Experiments Pre-configured dotcms: profiles: ["full"] container_name: dotcms @@ -118,20 +118,20 @@ services: GLOWROOT_WEB_UI_ENABLED: 'true' DOT_ALLOW_ACCESS_TO_PRIVATE_SUBNETS: 'true' - # Analytics Configuration (Environment Variables Override) + # Experiments Configuration (Environment Variables Override) # Internal URLs (container-to-container communication) DOT_FEATURE_FLAG_EXPERIMENTS: "true" DOT_ENABLE_EXPERIMENTS_AUTO_JS_INJECTION: "true" DOT_FEATURE_FLAG_CONTENT_ANALYTICS_AUTO_INJECT: "true" DOT_FEATURE_FLAG_CONTENT_ANALYTICS: "true" - DOT_ANALYTICS_IDP_URL: "http://keycloak:8080/realms/dotcms/protocol/openid-connect/token" - DOT_ANALYTICS_APP_CONFIG_URL: "http://dotcms-analytics:8080/c/customer1/cluster1/keys" - DOT_ANALYTICS_APP_WRITE_URL: "http://jitsu:8001/api/v1/event" - DOT_ANALYTICS_APP_READ_URL: "http://cube:4000" - - # Analytics Client Configuration (customer1:cluster1) + + # Experiments Client Configuration (customer1:cluster1) + DOT_ANALYTICS_IDP_URL: "http://host.docker.internal:61111/realms/dotcms/protocol/openid-connect/token" DOT_ANALYTICS_APP_CLIENT_ID: "analytics-customer-customer1" DOT_ANALYTICS_APP_CLIENT_SECRET: "testsecret" + DOT_ANALYTICS_APP_CONFIG_URL: "http://host.docker.internal:8088/c/customer1/cluster1/keys" + DOT_ANALYTICS_APP_WRITE_URL: "http://host.docker.internal:8081/api/v1/s2s/event" + DOT_ANALYTICS_APP_READ_URL: "http://host.docker.internal:4001" depends_on: dotcms-db: @@ -295,6 +295,5 @@ volumes: analytics-db-data: ch_data: redis-data: - redis_ur_data: cube_metastore: workspace: diff --git a/docker/docker-compose-examples/analytics/get-token.sh b/docker/docker-compose-examples/experiments/get-token.sh similarity index 97% rename from docker/docker-compose-examples/analytics/get-token.sh rename to docker/docker-compose-examples/experiments/get-token.sh index ea0bf41c4f23..5b0f21ed3157 100755 --- a/docker/docker-compose-examples/analytics/get-token.sh +++ b/docker/docker-compose-examples/experiments/get-token.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Keycloak JWT Token Generator for Analytics +# Keycloak JWT Token Generator for Experiments # # Usage: # ./get-token.sh # Use defaults @@ -27,7 +27,7 @@ OUTPUT_JSON=false DECODE_TOKEN=false show_help() { - echo "Keycloak JWT Token Generator for dotCMS Analytics" + echo "Keycloak JWT Token Generator for dotCMS Experiments" echo "" echo "Usage:" echo " ./get-token.sh Generate token with defaults" @@ -49,7 +49,7 @@ show_help() { echo " # Get token and copy to clipboard" echo " ./get-token.sh | pbcopy" echo "" - echo " # Use with Analytics API" + echo " # Use with Experiments API" echo " curl -H \"Authorization: Bearer \$(./get-token.sh)\" \\" echo " \"http://localhost:8088/c/customer1/cluster1/keys\"" echo "" @@ -195,7 +195,7 @@ else echo "" >&2 echo "💡 Usage examples:" >&2 - echo " # Analytics API:" >&2 + echo " # Experiments API:" >&2 echo " curl -H \"Authorization: Bearer TOKEN\" http://localhost:8088/c/customer1/cluster1/keys" >&2 echo "" >&2 echo " # CubeJS Security Context:" >&2 diff --git a/docker/docker-compose-examples/analytics/setup/config/dev/clickhouse/clickhouse-issue-15638.xml b/docker/docker-compose-examples/experiments/setup/config/dev/clickhouse/clickhouse-issue-15638.xml similarity index 100% rename from docker/docker-compose-examples/analytics/setup/config/dev/clickhouse/clickhouse-issue-15638.xml rename to docker/docker-compose-examples/experiments/setup/config/dev/clickhouse/clickhouse-issue-15638.xml diff --git a/docker/docker-compose-examples/analytics/setup/config/dev/cube/cube.js b/docker/docker-compose-examples/experiments/setup/config/dev/cube/cube.js similarity index 100% rename from docker/docker-compose-examples/analytics/setup/config/dev/cube/cube.js rename to docker/docker-compose-examples/experiments/setup/config/dev/cube/cube.js diff --git a/docker/docker-compose-examples/analytics/setup/config/dev/cube/schema/ContentAttribution.js b/docker/docker-compose-examples/experiments/setup/config/dev/cube/schema/ContentAttribution.js similarity index 100% rename from docker/docker-compose-examples/analytics/setup/config/dev/cube/schema/ContentAttribution.js rename to docker/docker-compose-examples/experiments/setup/config/dev/cube/schema/ContentAttribution.js diff --git a/docker/docker-compose-examples/analytics/setup/config/dev/cube/schema/Conversion.js b/docker/docker-compose-examples/experiments/setup/config/dev/cube/schema/Conversion.js similarity index 100% rename from docker/docker-compose-examples/analytics/setup/config/dev/cube/schema/Conversion.js rename to docker/docker-compose-examples/experiments/setup/config/dev/cube/schema/Conversion.js diff --git a/docker/docker-compose-examples/analytics/setup/config/dev/cube/schema/EngagementDaily.js b/docker/docker-compose-examples/experiments/setup/config/dev/cube/schema/EngagementDaily.js similarity index 100% rename from docker/docker-compose-examples/analytics/setup/config/dev/cube/schema/EngagementDaily.js rename to docker/docker-compose-examples/experiments/setup/config/dev/cube/schema/EngagementDaily.js diff --git a/docker/docker-compose-examples/analytics/setup/config/dev/cube/schema/EventSummary.js b/docker/docker-compose-examples/experiments/setup/config/dev/cube/schema/EventSummary.js similarity index 100% rename from docker/docker-compose-examples/analytics/setup/config/dev/cube/schema/EventSummary.js rename to docker/docker-compose-examples/experiments/setup/config/dev/cube/schema/EventSummary.js diff --git a/docker/docker-compose-examples/analytics/setup/config/dev/cube/schema/Events.js b/docker/docker-compose-examples/experiments/setup/config/dev/cube/schema/Events.js similarity index 100% rename from docker/docker-compose-examples/analytics/setup/config/dev/cube/schema/Events.js rename to docker/docker-compose-examples/experiments/setup/config/dev/cube/schema/Events.js diff --git a/docker/docker-compose-examples/analytics/setup/config/dev/cube/schema/Request.js b/docker/docker-compose-examples/experiments/setup/config/dev/cube/schema/Request.js similarity index 100% rename from docker/docker-compose-examples/analytics/setup/config/dev/cube/schema/Request.js rename to docker/docker-compose-examples/experiments/setup/config/dev/cube/schema/Request.js diff --git a/docker/docker-compose-examples/analytics/setup/config/dev/cube/schema/SessionsByBrowserDaily.js b/docker/docker-compose-examples/experiments/setup/config/dev/cube/schema/SessionsByBrowserDaily.js similarity index 100% rename from docker/docker-compose-examples/analytics/setup/config/dev/cube/schema/SessionsByBrowserDaily.js rename to docker/docker-compose-examples/experiments/setup/config/dev/cube/schema/SessionsByBrowserDaily.js diff --git a/docker/docker-compose-examples/analytics/setup/config/dev/cube/schema/SessionsByDeviceDaily.js b/docker/docker-compose-examples/experiments/setup/config/dev/cube/schema/SessionsByDeviceDaily.js similarity index 100% rename from docker/docker-compose-examples/analytics/setup/config/dev/cube/schema/SessionsByDeviceDaily.js rename to docker/docker-compose-examples/experiments/setup/config/dev/cube/schema/SessionsByDeviceDaily.js diff --git a/docker/docker-compose-examples/analytics/setup/config/dev/cube/schema/SessionsByLanguageDaily.js b/docker/docker-compose-examples/experiments/setup/config/dev/cube/schema/SessionsByLanguageDaily.js similarity index 100% rename from docker/docker-compose-examples/analytics/setup/config/dev/cube/schema/SessionsByLanguageDaily.js rename to docker/docker-compose-examples/experiments/setup/config/dev/cube/schema/SessionsByLanguageDaily.js diff --git a/docker/docker-compose-examples/analytics/setup/config/dev/jitsu/server/config/eventnative.yaml b/docker/docker-compose-examples/experiments/setup/config/dev/jitsu/server/config/eventnative.yaml similarity index 100% rename from docker/docker-compose-examples/analytics/setup/config/dev/jitsu/server/config/eventnative.yaml rename to docker/docker-compose-examples/experiments/setup/config/dev/jitsu/server/config/eventnative.yaml diff --git a/docker/docker-compose-examples/analytics/setup/config/dev/keycloak/keycloak-keystore.jks b/docker/docker-compose-examples/experiments/setup/config/dev/keycloak/keycloak-keystore.jks similarity index 100% rename from docker/docker-compose-examples/analytics/setup/config/dev/keycloak/keycloak-keystore.jks rename to docker/docker-compose-examples/experiments/setup/config/dev/keycloak/keycloak-keystore.jks diff --git a/docker/docker-compose-examples/analytics/setup/config/dev/keycloak/test-realm.json b/docker/docker-compose-examples/experiments/setup/config/dev/keycloak/test-realm.json similarity index 100% rename from docker/docker-compose-examples/analytics/setup/config/dev/keycloak/test-realm.json rename to docker/docker-compose-examples/experiments/setup/config/dev/keycloak/test-realm.json diff --git a/docker/docker-compose-examples/analytics/setup/db/clickhouse/init-scripts/init.sql b/docker/docker-compose-examples/experiments/setup/db/clickhouse/init-scripts/init.sql similarity index 100% rename from docker/docker-compose-examples/analytics/setup/db/clickhouse/init-scripts/init.sql rename to docker/docker-compose-examples/experiments/setup/db/clickhouse/init-scripts/init.sql diff --git a/docker/docker-compose-examples/analytics/setup/db/mssql/entrypoint.sh b/docker/docker-compose-examples/experiments/setup/db/mssql/entrypoint.sh similarity index 100% rename from docker/docker-compose-examples/analytics/setup/db/mssql/entrypoint.sh rename to docker/docker-compose-examples/experiments/setup/db/mssql/entrypoint.sh diff --git a/docker/docker-compose-examples/analytics/setup/db/mssql/init-scripts/init.sql b/docker/docker-compose-examples/experiments/setup/db/mssql/init-scripts/init.sql similarity index 100% rename from docker/docker-compose-examples/analytics/setup/db/mssql/init-scripts/init.sql rename to docker/docker-compose-examples/experiments/setup/db/mssql/init-scripts/init.sql diff --git a/docker/docker-compose-examples/analytics/setup/db/postgres/init-scripts/init-config.sh b/docker/docker-compose-examples/experiments/setup/db/postgres/init-scripts/init-config.sh similarity index 100% rename from docker/docker-compose-examples/analytics/setup/db/postgres/init-scripts/init-config.sh rename to docker/docker-compose-examples/experiments/setup/db/postgres/init-scripts/init-config.sh diff --git a/docker/docker-compose-examples/analytics/setup/db/postgres/init-scripts/init.sql b/docker/docker-compose-examples/experiments/setup/db/postgres/init-scripts/init.sql similarity index 100% rename from docker/docker-compose-examples/analytics/setup/db/postgres/init-scripts/init.sql rename to docker/docker-compose-examples/experiments/setup/db/postgres/init-scripts/init.sql diff --git a/docker/docker-compose-examples/analytics/start-analytics.sh b/docker/docker-compose-examples/experiments/start-experiments.sh similarity index 58% rename from docker/docker-compose-examples/analytics/start-analytics.sh rename to docker/docker-compose-examples/experiments/start-experiments.sh index 04fb47f2388a..f3a2cebf200b 100755 --- a/docker/docker-compose-examples/analytics/start-analytics.sh +++ b/docker/docker-compose-examples/experiments/start-experiments.sh @@ -1,31 +1,31 @@ #!/bin/bash -# Analytics Docker Compose Startup Script +# Experiments Docker Compose Startup Script # # Usage: -# ./start-analytics.sh # Full stack (default) -# ./start-analytics.sh --analytics-only # Analytics only -# ./start-analytics.sh --force-recreate # Full stack, recreate containers -# ./start-analytics.sh --help # Show this help +# ./start-experiments.sh # Full stack (default) +# ./start-experiments.sh --experiments-only # Experiments only +# ./start-experiments.sh --force-recreate # Full stack, recreate containers +# ./start-experiments.sh --help # Show this help set -e show_help() { - echo "Analytics Docker Compose Startup Script" + echo "Experiments Docker Compose Startup Script" echo "" echo "Usage:" - echo " ./start-analytics.sh Start full stack (default)" - echo " ./start-analytics.sh --analytics-only Start analytics services only" - echo " ./start-analytics.sh --force-recreate Start full stack, recreate containers" - echo " ./start-analytics.sh --analytics-only --force-recreate Analytics only, recreate containers" - echo " ./start-analytics.sh --help Show this help message" + echo " ./start-experiments.sh Start full stack (default)" + echo " ./start-experiments.sh --experiments-only Start experiments services only" + echo " ./start-experiments.sh --force-recreate Start full stack, recreate containers" + echo " ./start-experiments.sh --experiments-only --force-recreate Experiments only, recreate containers" + echo " ./start-experiments.sh --help Show this help message" echo "" echo "Options:" echo " --force-recreate Force recreate containers (required for environment variable changes)" echo "" - echo "Analytics Services:" - echo " - PostgreSQL (analytics data)" + echo "Experiments Services:" + echo " - PostgreSQL (experiments data)" echo " - Keycloak (authentication)" - echo " - dotCMS Analytics API" + echo " - dotCMS Experiments API" echo " - Jitsu (event collection)" echo " - Redis (cache)" echo " - Cube (analytics queries)" @@ -41,7 +41,7 @@ show_help() { } # Parse arguments -ANALYTICS_ONLY=false +EXPERIMENTS_ONLY=false FORCE_RECREATE=false for arg in "$@"; do @@ -50,8 +50,8 @@ for arg in "$@"; do show_help exit 0 ;; - --analytics-only) - ANALYTICS_ONLY=true + --experiments-only) + EXPERIMENTS_ONLY=true ;; --force-recreate) FORCE_RECREATE=true @@ -66,7 +66,7 @@ done # Build docker-compose command COMPOSE_CMD="docker-compose" -if [[ "$ANALYTICS_ONLY" == "false" ]]; then +if [[ "$EXPERIMENTS_ONLY" == "false" ]]; then COMPOSE_CMD="$COMPOSE_CMD --profile full" fi @@ -76,19 +76,19 @@ if [[ "$FORCE_RECREATE" == "true" ]]; then fi # Execute the appropriate command -if [[ "$ANALYTICS_ONLY" == "true" ]]; then +if [[ "$EXPERIMENTS_ONLY" == "true" ]]; then if [[ "$FORCE_RECREATE" == "true" ]]; then - echo "📊 Starting analytics stack only (force recreating containers)..." + echo "📊 Starting Experiments stack only (force recreating containers)..." echo "⚠️ This will recreate containers to pick up environment variable changes." else - echo "📊 Starting analytics stack only..." + echo "📊 Starting Experiments stack only..." fi else if [[ "$FORCE_RECREATE" == "true" ]]; then - echo "🚀 Starting full analytics + dotCMS stack (force recreating containers)..." + echo "🚀 Starting full Experiments + dotCMS stack (force recreating containers)..." echo "⚠️ This will recreate containers to pick up environment variable changes." else - echo "🚀 Starting full analytics + dotCMS stack..." + echo "🚀 Starting full Experiments + dotCMS stack..." fi fi @@ -101,12 +101,12 @@ docker-compose ps --format "table {{.Name}}\t{{.Status}}\t{{.Ports}}" echo "" echo "🌐 Access URLs:" echo " - Keycloak Admin: http://localhost:61111 (admin:keycloak)" -echo " - Analytics API: http://localhost:8088" +echo " - Experiments API: http://localhost:8088" echo " - Cube Analytics: http://localhost:4001" echo " - Jitsu Events: http://localhost:8081" echo " - ClickHouse: http://localhost:8124" -if [[ "$1" != "--analytics-only" ]]; then +if [[ "$1" != "--experiments-only" ]]; then echo " - dotCMS: http://localhost:8082 (admin:admin)" echo " - Glowroot: http://localhost:4000" fi \ No newline at end of file