Skip to content

Commit

Permalink
feat: COS integration (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanksyoon committed Sep 21, 2023
1 parent 1f5716a commit f24cc02
Show file tree
Hide file tree
Showing 22 changed files with 9,359 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/integration_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ jobs:
./tests/integration/pre_run_script.sh"
extra-arguments: |
--kube-config ${GITHUB_WORKSPACE}/kube-config
modules: '["test_jenkins.py", "test_k8s_agent.py", "test_machine_agent.py", "test_plugins.py", "test_proxy.py"]'
modules: '["test_jenkins.py", "test_k8s_agent.py", "test_machine_agent.py", "test_plugins.py", "test_proxy.py", "test_cos.py"]'

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
Expand Down
44 changes: 43 additions & 1 deletion docs/reference/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### agent

_Interface_: jenkins_agent_v0
_Interface_: jenkins_agent_v0
_Supported charms_: [jenkins-agent-k8s](https://charmhub.io/jenkins-agent-k8s),
[jenkins-agent](https://charmhub.io/jenkins-agent)

Expand All @@ -25,3 +25,45 @@ localhost
[lxd controller](https://juju.is/docs/olm/get-started-with-juju#heading--prepare-your-cloud).

`juju relate jenkins-k8s:agent localhost:admin/jenkins-vm-model.jenkins-agent`

### logging

_Interface_: loki_push_api
_Supported charms_: [loki-k8s](https://charmhub.io/loki-k8s)

Logging relation provides a way to scrape logs produced from the Jenkins server charm. The Jenkins
server logs are stored at `/var/lib/jenkins/jenkins.log`. These logs are the same logs as the logs
emitted to the standard output. A promtail worker is spawned and will periodically push logs to
Loki.

Example agent relate command: `juju relate jenkins-k8s:logging loki-k8s:logging`

### metrics-endpoint

_Interface_: prometheus_scrape
_Supported charms_: [prometheus-k8s](https://charmhub.io/prometheus-k8s)

Metrics-endpoint relation allows scraping the `/prometheus` endpoint provided by Jenkins
`prometheus` plugin on port 8080. The `/metrics` endpoint is reserved for `metrics` plugin, which
is a dependency of `prometheus` plugin. The metrics are exposed in the open metrics format and will
only be scraped by Prometheus once the relation becomes active. For more information about the
metrics exposed, please refer to the
[`prometheus` plugin documentation](https://plugins.jenkins.io/prometheus/).

Example metrics-endpoint relate command:
`juju relate jenkins-k8s:metrics-endpoint prometheus-k8s:metrics-endpoint`

### grafana-dashboard

_Interface_: grafana_dashboard
_Supported charms_: [grafana-k8s](https://charmhub.io/grafana-k8s)

Grafana-dashboard relation enables quick dashboard access already tailored to fit the needs of
operators to monitor the charm. The template for the Grafana dashboard for jenkins-k8s charm can be
found at `/src/grafana_dashboards/jenkins.json`. In Grafana UI, it can be found as “Jenkins:
Performance and Health Overview” under the General section of the dashboard browser
(`/dashboards`). Modifications to the dashboard can be made but will not be persisted upon
restart/redeployment of the charm.

Grafana-Prometheus relate command: `juju relate grafana-k8s:grafana-source prometheus-k8s:grafana-source`
Grafana-dashboard relate command: `juju relate jenkins-k8s:grafana-dashboard grafana-k8s:grafana-dashboard`
Loading

0 comments on commit f24cc02

Please sign in to comment.