diff --git a/.env-example b/.env-example new file mode 100644 index 0000000..f4e0057 --- /dev/null +++ b/.env-example @@ -0,0 +1,11 @@ +# Grafana Environment Variables, update these with secure values +GF_SECURITY_ADMIN_USER=admin +GF_SECURITY_ADMIN_PASSWORD=admin + +# Install the required datasource plugin +GF_INSTALL_PLUGINS=grafana-clickhouse-datasource + +# Passwords for the Clickhouse users, update these with secure values +OTEL_COLLECTOR_CLICKHOUSE_PASSWORD=SET_THIS_TO_YOUR_VALUE +GRAFANA_CLICKHOUSE_PASSWORD=SET_THIS_TO_YOUR_VALUE +ANALYZER_CLICKHOUSE_PASSWORD=SET_THIS_TO_YOUR_VALUE \ No newline at end of file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..52d8615 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,15 @@ +# Lines starting with '#' are comments. +# Each line is a file pattern followed by one or more owners. + +# More details are here: https://help.github.com/articles/about-codeowners/ + +# The '*' pattern is global owners. + +# Order is important. The last matching pattern has the most precedence. +# The folders are ordered as follows: + +# In each subsection folders are ordered first by depth, then alphabetically. +# This should make it easy to add new rules without breaking existing ones. + +# Global rule: +* @f5devcentral/application-study-tool-owners \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..3568fad --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,33 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' (Which dashboards / panels it effects. ) +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here + diff --git a/.github/workflows/push-image.yml b/.github/workflows/push-image.yml new file mode 100644 index 0000000..6fcf4a5 --- /dev/null +++ b/.github/workflows/push-image.yml @@ -0,0 +1,37 @@ +name: Push Image to ghcr.io +run-name: ${{ github.actor }} is running this workflow +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' +jobs: + Pull-From_Gitlab: + runs-on: ubuntu-latest + steps: + - name: "Checkout source code" + uses: "actions/checkout@v1" + - name: Login to GitLab + uses: docker/login-action@v3 + with: + registry: registry.gitlab.com + username: ${{ secrets.GITLAB_USERNAME }} + password: ${{ secrets.GITLAB_PASSWORD }} + - name: Set variables + run: | + VER=$(cat VERSION) + echo "VERSION=$VER" >> $GITHUB_ENV + - name: Pull Gitlab Image + run: docker pull registry.gitlab.com/f5/greenhouse/apps/api-discovery-log-analyzer/api_discovery_log_analyzer:${{ env.VERSION }} + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Push to Github + run: + | + docker tag registry.gitlab.com/f5/greenhouse/apps/api-discovery-log-analyzer/api_discovery_log_analyzer:${{ env.VERSION }} ghcr.io/f5devcentral/ast-api-discovery/api_discovery_log_analyzer/api_discovery_log_analyzer:${{ env.VERSION }} + docker tag registry.gitlab.com/f5/greenhouse/apps/api-discovery-log-analyzer/api_discovery_log_analyzer:${{ env.VERSION }} ghcr.io/f5devcentral/ast-api-discovery/api_discovery_log_analyzer/api_discovery_log_analyzer:latest + docker push ghcr.io/f5devcentral/ast-api-discovery/api_discovery_log_analyzer/api_discovery_log_analyzer:${{ env.VERSION }} + docker push ghcr.io/f5devcentral/ast-api-discovery/api_discovery_log_analyzer/api_discovery_log_analyzer:latest diff --git a/docker-compose.yaml b/docker-compose.yaml index 21e1564..cbc80b4 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -25,14 +25,13 @@ services: - api_discovery_tool otel-collector: - image: ghcr.io/f5devcentral/application-study-tool/otel_custom_collector:v0.4.0 + image: ghcr.io/f5devcentral/application-study-tool/otel_custom_collector:v0.7.0 restart: unless-stopped volumes: - ./services/otel_collector:/etc/otel-collector-config command: ["--config=/etc/otel-collector-config/config.yaml"] env_file: - ".env" - - ".env.device-secrets" environment: CLICKHOUSE_PASSWORD: ${OTEL_COLLECTOR_CLICKHOUSE_PASSWORD} ports: @@ -43,6 +42,7 @@ services: depends_on: clickhouse: condition: service_healthy + grafana: image: grafana/grafana:11.2.0 restart: unless-stopped