Commit 57e58a20 authored by Simon Volpert's avatar Simon Volpert 🐧 Committed by Joerg Domaschka

Initial commit

parent 6fd6b101
build:
image: docker:latest
stage: build
script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker build --pull -t "$CI_REGISTRY_IMAGE" .
- docker push "$CI_REGISTRY_IMAGE"
- docker tag "$CI_REGISTRY_IMAGE" "$CI_REGISTRY_IMAGE":"$CI_COMMIT_REF_SLUG"
- docker push "$CI_REGISTRY_IMAGE":"$CI_COMMIT_REF_SLUG"
\ No newline at end of file
FROM alpine:3.9
RUN apk add -U curl bash
VOLUME /etc/grafana/provisioning/dashboards
VOLUME /var/lib/grafana/dashboards
VOLUME /etc/grafana/provisioning/datasources
VOLUME /etc/grafana/provisioning/notifiers
ADD dashboards /var/lib/grafana/dashboards
ADD dashboards-config /etc/grafana/provisioning/dashboards
ADD datasources /etc/grafana/provisioning/datasources
ADD notifiers /etc/grafana/provisioning/notifiers
ADD entry /bin/entry
RUN chmod +x /bin/entry
CMD /bin/entry
\ No newline at end of file
apiVersion: 1
providers:
- name: 'Prometheus'
orgId: 1
folder: ''
type: file
disableDeletion: false
updateIntervalSeconds: 10 #how often Grafana will scan for changed dashboards
options:
path: /var/lib/grafana/dashboards
\ No newline at end of file
This diff is collapsed.
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
url: http://prometheus:9090
#!/bin/bash
fetchstatus() {
curl \
-o /dev/null \
--silent \
--head \
--write-out '%{http_code}' \
"http://grafana:3000/login"
}
echo "Waitung until Grafana is ready..."
urlstatus=$(fetchstatus) # initialize to actual value before we sleep even once
until [ "$urlstatus" = 200 ]; do # until our result is success...
sleep 1 # wait a second...
urlstatus=$(fetchstatus) # then poll again.
echo $urlstatus
done
echo "Grafana is ready"
curl --request POST \
--url http://grafana:3000/api/admin/users \
--header 'authorization: Basic YWRtaW46V3hQWVZ4NTM=' \
--header 'content-type: application/json' \
--data '{
"name":"OMI",
"email":"no@example-com",
"login":"guest",
"password":"kiz123"
}'
apiVersion: 1
notifiers:
- name: Mail
type: email
uid: mailadm
org_id: 1
is_default: true
settings:
addresses: omi-adm@lists.uni-ulm.de
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment