diff --git a/Dockerfile b/Dockerfile index 73fe9eba2..71bfb734a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:latest -EXPOSE 3000 9090 9001-9002 8500 80 +EXPOSE 80 9001 WORKDIR /opt @@ -13,6 +13,7 @@ RUN apt-get -y update && apt-get install -y \ curl \ git \ unzip \ + nginx \ mysql-server \ python \ supervisor @@ -21,9 +22,9 @@ RUN apt-get -y update && apt-get install -y \ # Prometheus # # ########## # -ADD https://github.com/prometheus/prometheus/releases/download/0.19.1/prometheus-0.19.1.linux-amd64.tar.gz /opt/ +ADD https://github.com/prometheus/prometheus/releases/download/0.19.2/prometheus-0.19.2.linux-amd64.tar.gz /opt/ RUN mkdir prometheus && \ - tar xfz prometheus-0.19.1.linux-amd64.tar.gz --strip-components=1 -C prometheus + tar xfz prometheus-0.19.2.linux-amd64.tar.gz --strip-components=1 -C prometheus COPY prometheus.yml /opt/prometheus/ # ####### # @@ -50,13 +51,13 @@ RUN chgrp grafana /etc/grafana/grafana.ini && \ # Percona Query Analytics # # ####################### # -ADD https://www.percona.com/downloads/TESTING/pmm/percona-qan-api-1.0.0-x86_64.tar.gz \ - https://www.percona.com/downloads/TESTING/pmm/percona-qan-app-1.0.0.tar.gz \ +ADD https://www.percona.com/downloads/TESTING/pmm/percona-qan-api.tar.gz \ + https://www.percona.com/downloads/TESTING/pmm/percona-qan-app.tar.gz \ /opt/ RUN mkdir qan-api && \ - tar zxf percona-qan-api-1.0.0-x86_64.tar.gz --strip-components=1 -C qan-api && \ + tar zxf percona-qan-api.tar.gz --strip-components=1 -C qan-api && \ mkdir qan-app && \ - tar zxf percona-qan-app-1.0.0.tar.gz --strip-components=1 -C qan-app + tar zxf percona-qan-app.tar.gz --strip-components=1 -C qan-app COPY install-qan.sh /opt RUN /opt/install-qan.sh @@ -72,6 +73,12 @@ ADD https://releases.hashicorp.com/consul/0.6.4/consul_0.6.4_linux_amd64.zip /op RUN unzip consul_0.6.4_linux_amd64.zip && \ mkdir -p /opt/consul-data +# ##### # +# Nginx # +# ##### # + +COPY nginx.conf /etc/nginx + # ############ # # Landing page # # ############ # diff --git a/add-grafana-datasource.sh b/add-grafana-datasource.sh index 45261dfa9..76d9e179b 100755 --- a/add-grafana-datasource.sh +++ b/add-grafana-datasource.sh @@ -4,7 +4,7 @@ service grafana-server start for i in `seq 30`; do if curl -s http://admin:admin@localhost:3000/api/datasources; then - curl http://admin:admin@localhost:3000/api/datasources -X POST -H 'Content-Type: application/json' --data-binary '{"name":"Prometheus","type":"prometheus","url":"http://localhost:9090","access":"proxy","isDefault":true}' + curl http://admin:admin@localhost:3000/api/datasources -X POST -H 'Content-Type: application/json' --data-binary '{"name":"Prometheus","type":"prometheus","url":"http://localhost:9090/prometheus/","access":"proxy","isDefault":true}' echo "Added Prometheus data source to Grafana" break else diff --git a/docker-compose.yml b/docker-compose.yml index f8d96d6c3..67a893468 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,10 +16,7 @@ services: container_name: pmm-server image: percona/pmm-server ports: - - "9001-9002:9001-9002" - - "3000:3000" - - "9090:9090" - - "8500:8500" + - "9001:9001" - "80:80" volumes_from: - pmm-data diff --git a/grafana.ini b/grafana.ini index 8d14a34e9..ca9b9ecef 100644 --- a/grafana.ini +++ b/grafana.ini @@ -41,6 +41,7 @@ # The full public facing url ;root_url = %(protocol)s://%(domain)s:%(http_port)s/ +root_url = %(protocol)s://%(domain)s:%(http_port)s/graph # Log web requests ;router_logging = false diff --git a/install-qan.sh b/install-qan.sh index b53e082de..2863c6a8d 100755 --- a/install-qan.sh +++ b/install-qan.sh @@ -8,6 +8,3 @@ service mysql start cd /opt/qan-api START="no" SYSINT="no" ./install - -cd /opt/qan-app -START="no" SYSINT="no" LISTEN="0.0.0.0:9002" ./install diff --git a/landing-page/index.html b/landing-page/index.html index b3f23035c..25ccf5fa8 100644 --- a/landing-page/index.html +++ b/landing-page/index.html @@ -81,14 +81,8 @@