Skip to content

Commit

Permalink
Added Kibana in elasticsearch container (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
pct960 authored Aug 23, 2018
1 parent a0bfb89 commit aa6b79b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
Binary file modified config/webserver/cdxapis.jar
Binary file not shown.
6 changes: 3 additions & 3 deletions modules/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def docker_setup(log_file, config_path="/etc/ideam/ideam.conf"):

output_ok("Created RabbitMQ docker instance. \n " + details)

ip, details = create_instance("elasticsearch", "ideam/elasticsearch-nokibana",
ip, details = create_instance("elasticsearch", "ideam/elasticsearch",
storage_host="elk-data",
storage_guest="/home/ideam/elasticsearch-6.2.4",
log_file=log_file,
Expand Down Expand Up @@ -413,7 +413,7 @@ def create_instance(server, image, log_file, storage_host="", storage_guest="",
# exit()

cmd = "docker run -d --net=mynet " \
"--hostname={0} --cap-add=NET_ADMIN --name={0} {1}".format(server, image, kibana)
"--hostname={0} --cap-add=NET_ADMIN -p 127.0.0.1:{2}:5601 --name={0} {1}".format(server, image, kibana)
try:
out, err = subprocess_popen(cmd,
log_file,
Expand Down Expand Up @@ -518,7 +518,7 @@ def limit_install(list):

for container in list:
output_info("Starting {0} installation".format(container))
subprocess.call('tasks/{0}/setup.sh',shell=True)
subprocess.call('tasks/{0}/setup.sh'.format(container),shell=True)
output_ok("Installed {0}".format(container))


Expand Down
10 changes: 10 additions & 0 deletions tasks/elasticsearch/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,13 @@ if [ $? -eq 0 ]; then
else
echo -e "${RED}[ ERROR ]${NC} Failed to start Logstash"
fi

echo -e "${YELLOW}[ INFO ]${NC} Starting Kibana"

tmux new-session -d -s kibana '/home/ideam/kibana-6.2.4-linux-x86_64/bin/kibana'

if [ $? -eq 0 ]; then
echo -e "${GREEN}[ OK ]${NC} Started Kibana"
else
echo -e "${RED}[ ERROR ]${NC} Failed to start Kibana"
fi
2 changes: 1 addition & 1 deletion ubuntu/config/kong/share.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def bind(queue, exchange, key, consumer_id, apikey):


def unbind(queue, exchange, key, consumer_id, apikey):
url = 'http://webserver:8080/cdx/cbind/'+queue+'/'+exchange
url = 'http://webserver:8080/cdx/bind/'+queue+'/'+exchange
headers = {'X-Consumer-Username': consumer_id, 'Apikey': apikey,'routingKey':key}
r = requests.delete(url, headers=headers)
print(r.text)
Expand Down

0 comments on commit aa6b79b

Please sign in to comment.