Skip to content

Commit

Permalink
Merge pull request #23 from pkarkazis/master
Browse files Browse the repository at this point in the history
replace Mysql with Postgres
  • Loading branch information
pkarkazis authored Jan 25, 2017
2 parents f26fefb + 7b924fd commit 6c7585e
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ To contribute to the development of the SONATA gui you have to fork the reposito
## Installation
```
docker run -d --name son-monitor-influxdb -p 8086:8086 son-monitor-influxdb
docker run -d --name son-monitor-mysql -e MYSQL_ROOT_PASSWORD=user -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=dbname -p 3306:3306 son-monitor-mysql
docker run -d --name son-monitor-postgres -e POSTGRES_DB=dbname -e POSTGRES_USER=user -e POSTGRES_PASSWORD=pass -p 5433:5432 ntboes/postgres-uuid
docker run -d --name son-monitor-pushgateway -p 9091:9091 son-monitor-pushgateway
docker run -d --name son-monitor-prometheus -p 9090:9090 -p 9089:9089 -e RABBIT_URL=<son-broker-ip>:5671 --add-host pushgateway:127.0.0.1 --add-host influx:127.0.0.1 son-monitor-prometheus
docker run -d --name son-monitor-manager --add-host mysql:127.0.0.1 --add-host prometheus:127.0.0.1 -p 8000:8000 son-monitor-manager
docker run -d --name son-monitor-manager --add-host postgsql:127.0.0.1 --add-host prometheus:127.0.0.1 -p 8000:8000 son-monitor-manager
```

## Usage
Expand Down
2 changes: 1 addition & 1 deletion manager/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:14.04

RUN apt-get update && apt-get -y upgrade && \
apt-get -y install apache2 python2.7 python-pip libmysqlclient-dev python2.7-dev libyaml-dev libapache2-mod-wsgi
apt-get -y install apache2 python2.7 python-pip libmysqlclient-dev python2.7-dev libpq-dev libyaml-dev libapache2-mod-wsgi

RUN mkdir /opt/Monitoring
COPY ./ /opt/Monitoring
Expand Down
6 changes: 3 additions & 3 deletions manager/ManagerSrv/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'monitoring',
'USER': 'monitoringuser',
'PASSWORD': 'sonata',
'HOST': 'mysql',
'PORT': 3306,
'HOST': 'postgsql',
'PORT': 5433,
}
}

Expand Down
1 change: 1 addition & 0 deletions manager/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ Markdown==2.6.5
mysqlclient==1.3.7
Pygments==2.1.1
PyYAML==3.11
psycopg2==2.6.2
2 changes: 1 addition & 1 deletion manager/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
echo "Wait for sqlDB...."
while ! nc -z mysql 3306; do
while ! nc -z postgsql 5433; do
sleep 1 && echo -n .; # waiting for mysql
done;
python /opt/Monitoring/manage.py makemigrations && \
Expand Down
1 change: 0 additions & 1 deletion mysql/Dockerfile

This file was deleted.

0 comments on commit 6c7585e

Please sign in to comment.