-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
Garot Conklin edited this page Feb 6, 2025
·
3 revisions
This guide provides detailed instructions for installing and setting up the DataDog Dashboard Deployer package.
Before installing the package, ensure you have:
- Python 3.8 or higher installed
- pip package manager
- A DataDog account with API and Application keys
- Git installed (for development setup)
pip install datadog-dashboard-deployergit clone https://github.com/fleXRPL/datadog-dashboard-deployer.git
cd datadog-dashboard-deployer
pip install -e .-
Clone the repository:
git clone https://github.com/fleXRPL/datadog-dashboard-deployer.git cd datadog-dashboard-deployer -
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install development dependencies:
pip install -r requirements-dev.txt
-
Set up DataDog credentials:
export DATADOG_API_KEY='your-api-key' export DATADOG_APP_KEY='your-application-key'
-
Create a basic configuration file:
# config/dashboard_config.yaml dashboards: - name: "My First Dashboard" description: "Example dashboard" layout_type: "ordered" widgets: - title: "Example Widget" type: "timeseries" query: "avg:system.cpu.user{*}"
-
Add DataDog credentials as GitHub Secrets:
- Go to your repository settings
- Navigate to Secrets and Variables > Actions
- Add the following secrets:
DATADOG_API_KEYDATADOG_APP_KEY
-
Create the workflow file:
# .github/workflows/deploy.yml name: Deploy Dashboards on: push: branches: [main] workflow_dispatch: jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v2 with: python-version: "3.x" - name: Install dependencies run: | pip install datadog-dashboard-deployer - name: Deploy dashboards env: DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }} DATADOG_APP_KEY: ${{ secrets.DATADOG_APP_KEY }} run: | datadog-dashboard-deploy config/dashboard_config.yaml
-
Verify installation:
python -c "import datadog_dashboard_deployer; print(datadog_dashboard_deployer.__version__)" -
Test configuration:
datadog-dashboard-deploy --validate config/dashboard_config.yaml
-
API Authentication Errors
- Verify API and Application keys are correct
- Check environment variables are properly set
- Ensure keys have proper permissions
-
Installation Errors
- Update pip:
pip install --upgrade pip - Check Python version compatibility
- Verify all dependencies are installed
- Update pip:
-
Configuration Errors
- Validate YAML syntax
- Check configuration schema
- Ensure all required fields are present
- Check the GitHub Issues
- Review the Documentation
- Join our Discussions
- Read the Configuration Guide for detailed configuration options
- Check the Examples for common use cases
- Review Security best practices