Commit 5221257c by Armen Donigian

Build test v.2.

parent 24aede08
{
"name":"Clipper",
"type":"prometheus",
"typeLogoUrl":"public/app/plugins/datasource/prometheus/img/prometheus_logo.svg",
"access":"direct",
"url":"http://localhost:9090",
"password":"",
"user":"",
"database":"",
"basicAuth":false,
"isDefault":true,
"jsonData":{
"timeInterval":"5s"
}
}
import signal
import requests
import docker
import json
import time
import sys
def signal_handler(signal, frame):
print("Stopping Grafana...")
docker_client = client.from_env()
try:
grafana = [
c for c in docker_client.containers.list()
if c.attrs['Config']['Image'] == "grafana/grafana"
][0]
grafana.stop()
except Exception as e:
pass
sys.exit(0)
if __name__ == '__main__':
signal.signal(signal.SIGINT, signal_handler)
print("(1/3) Initializing Grafana")
client = docker.from_env()
container = client.containers.run(
"grafana/grafana:latest", ports={'3000/tcp': 3000}, detach=True)
print("(2/3) Grafana Initialized")
time.sleep(3)
with open('Clipper_DataSource.json', 'r') as f:
datasource = json.load(f)
requests.post(
'http://admin:admin@localhost:3000/api/datasources', data=datasource)
print('(3/3) Clipper Data Source Added')
print(
'Please login to http://localhost:3000 using username and password "admin"'
)
print('''
After Login, Click "Home" -> "Import Dashboard" -> "Upload json File" -> "Clipper_Dashboard.json"
''')
while True:
time.sleep(1)
......@@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## todo"
"## Data Versioning Example"
]
},
{
......@@ -107,7 +107,9 @@
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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