xconfadmin

command module
v1.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

README ΒΆ

XConf Admin

License Go Version Build Status

XConf Admin is a comprehensive configuration management server designed for RDK (Reference Design Kit) devices. It provides a centralized platform for managing device configurations, firmware updates, telemetry settings, and various administrative functions across RDK deployments.

πŸš€ Features

  • Configuration Management: Centralized management of device configurations
  • Firmware Management: Control firmware distribution and updates
  • Telemetry Services: Manage telemetry profiles and data collection
  • Device Control Manager (DCM): Handle device control and settings
  • Feature Management: Control feature flags and rules
  • Authentication & Authorization: JWT-based security with role-based access control
  • RESTful API: Comprehensive REST API for all operations
  • Metrics & Monitoring: Built-in Prometheus metrics support
  • Canary Deployments: Support for gradual rollouts

πŸ“‹ Prerequisites

  • Go 1.23+: This project requires Go version 1.23 or later
  • Cassandra: For data persistence (configure in config file)
  • Git: For version control and building

πŸ› οΈ Installation

1. Clone the Repository
git clone https://github.com/rdkcentral/xconfadmin.git
cd xconfadmin
2. Install Dependencies
go mod download
3. Build the Application
make build

This will create a binary bin/xconfadmin-{OS}-{ARCH} (e.g., bin/xconfadmin-linux-amd64)

βš™οΈ Configuration

Environment Variables

Set the following required environment variables:

export SAT_CLIENT_ID='your_client_id'
export SAT_CLIENT_SECRET='your_client_secret'
export SECURITY_TOKEN_KEY='your_security_token_key'
Configuration File

Create a configuration file based on the sample provided:

cp config/sample_xconfadmin.conf config/xconfadmin.conf

Edit the configuration file to match your environment settings including:

  • Server port and timeouts
  • Database connection details
  • Logging configuration
  • Authentication settings
  • Service endpoints

πŸš€ Running the Application

1. Create Log Directory
mkdir -p /app/logs/xconfadmin
2. Start the Server
bin/xconfadmin-linux-amd64 -f config/xconfadmin.conf
3. Verify Installation

Test the server is running:

curl http://localhost:9001/api/v1/version

Expected response:

{
  "status": 200,
  "message": "OK",
  "data": {
    "code_git_commit": "abc123",
    "build_time": "2025-09-08T10:00:00Z",
    "binary_version": "v1.0.0",
    "binary_branch": "main",
    "binary_build_time": "2025-09-08_10:00:00_UTC"
  }
}

πŸ“– API Documentation

The XConf Admin server provides several API endpoints organized by functionality:

Core APIs
  • Version: GET /api/v1/version - Get application version info
  • Health: GET /health - Health check endpoint
  • Metrics: GET /metrics - Prometheus metrics
Administrative APIs
  • Authentication: /auth/* - Authentication and authorization
  • Firmware: /firmware/* - Firmware management
  • DCM: /dcm/* - Device Control Manager
  • Telemetry: /telemetry/* - Telemetry configuration
  • Features: /feature/* - Feature management
  • Settings: /setting/* - Various device settings
Example API Calls
# Get firmware configurations
curl -H "Authorization: Bearer <token>" http://localhost:9001/api/firmware/configs

# Update device settings
curl -X POST -H "Authorization: Bearer <token>" \
     -H "Content-Type: application/json" \
     -d '{"key":"value"}' \
     http://localhost:9001/api/dcm/settings

πŸ—οΈ Project Structure

xconfadmin/
β”œβ”€β”€ adminapi/           # Admin API handlers and services
β”‚   β”œβ”€β”€ auth/          # Authentication and authorization
β”‚   β”œβ”€β”€ canary/        # Canary deployment management
β”‚   β”œβ”€β”€ change/        # Change management
β”‚   β”œβ”€β”€ dcm/           # Device Control Manager
β”‚   β”œβ”€β”€ firmware/      # Firmware management
β”‚   β”œβ”€β”€ queries/       # Query handlers
β”‚   β”œβ”€β”€ rfc/           # Remote Feature Control
β”‚   β”œβ”€β”€ setting/       # Settings management
β”‚   └── telemetry/     # Telemetry services
β”œβ”€β”€ common/            # Common utilities and constants
β”œβ”€β”€ config/            # Configuration files
β”œβ”€β”€ http/              # HTTP utilities and middleware
β”œβ”€β”€ shared/            # Shared components
β”œβ”€β”€ taggingapi/        # Tagging API
└── util/              # Utility functions

πŸ§ͺ Testing

Run All Tests
make test
Run Tests Locally
make localtest
Generate Coverage Report
make cover
make html

πŸ”§ Development

Build for Development
make build
Clean Build Artifacts
make clean
Release Build
make release

πŸ“Š Monitoring

XConf Admin includes built-in monitoring capabilities:

  • Prometheus Metrics: Available at /metrics endpoint
  • Health Checks: Available at /health endpoint
  • Structured Logging: JSON-formatted logs with configurable levels
  • Request Tracing: Optional OpenTelemetry integration

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Workflow
  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Run the test suite
  6. Submit a pull request

πŸ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

πŸ†˜ Support

For support and questions:

  • Create an issue in the GitHub repository
  • Check the documentation
  • Review existing issues and discussions

Note: This is a configuration management server for RDK devices. Ensure proper security measures are in place when deploying in production environments.

Documentation ΒΆ

Overview ΒΆ

Copyright 2025 Comcast Cable Communications Management, LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

SPDX-License-Identifier: Apache-2.0