Commit 5b9f8f51 authored by Spiros Koulouzis's avatar Spiros Koulouzis

Added properties

parent 1f2b284f
......@@ -40,6 +40,8 @@ public class MongoConfig extends AbstractMongoConfiguration {
@Value("${db.name}")
private String dbName;
@Value("${db.host}")
private String dbHost;
@Value("${db.username}")
private String dbUsername;
@Value("${db.password}")
......@@ -56,7 +58,7 @@ public class MongoConfig extends AbstractMongoConfiguration {
@Override
public Mongo mongo() throws Exception {
return new MongoClient("127.0.0.1", 27017);
return new MongoClient(dbHost, 27017);
}
@Override
......
message.broker.host=127.0.0.1
dbHost=127.0.0.1
db.name=drip
db.username=drip-user
db.password=drip-pass
......@@ -10,8 +10,14 @@ import docker_engine
import docker_swarm
import control_agent
print sys.argv
if len(sys.argv) > 1:
rabbitmq_host = sys.argv[1]
else:
rabbitmq_host = '127.0.0.1'
connection = pika.BlockingConnection(pika.ConnectionParameters(host='127.0.0.1'))
connection = pika.BlockingConnection(pika.ConnectionParameters(host=rabbitmq_host))
channel = connection.channel()
channel.queue_declare(queue='deployer_queue')
......
......@@ -15,12 +15,14 @@ import random
import time
import json
print "---------"
print sys.argv
if len(sys.argv) > 1:
rabbitmq_host = sys.argv[1]
else:
rabbitmq_host = '127.0.0.1'
print "Trying to connect to: %s" %rabbitmq_host
connection = pika.BlockingConnection(pika.ConnectionParameters(host=rabbitmq_host))
channel = connection.channel()
......
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