add more files

pull/1/head
Baohua Yang 2015-08-10 16:14:51 +08:00
parent 0101a74980
commit ecd78f51b6
6 changed files with 110 additions and 0 deletions

View File

@ -22,3 +22,15 @@ Start 1 mongo instance and a mongo-express web tool to watch it.
The mongo instance will store data into local /opt/data/mongo_home. The mongo instance will store data into local /opt/data/mongo_home.
The web UI will listen on local 8081 port. The web UI will listen on local 8081 port.
## nginx_auth
Use nginx as a proxy with authentication for backend application.
## registry_mirror
docker registry mirror, with redis as the backend cache.
## elk
Elk cluster, with netflow support
```sh
docker-compose scale es=3
```

View File

@ -0,0 +1,46 @@
# This compose file will boot a elk cluster.
# es will listen on local 9200, and can be scale out.
# logstash will liten on local udp 2055.
# kibana will liten on local 5601.
# https://github.com/yeasy/docker-compose-files
# scale this with docker-compose scale es=3
es:
image: elasticsearch:1.7
expose:
- "9200"
- "9300"
#elasticsearch configuration node, should not be scaled
#config is under /usr/share/elasticsearch/config
#data is under /usr/share/elasticsearch/data
elasticsearch:
image: yeasy/elasticsearch:latest
hostname: elasticsearch
links:
- es:es
ports:
- "9200:9200"
expose:
- "9300"
volumes:
- /opt/data/elasticsearch:/usr/share/elasticsearch/data
command: sh -c "sleep 10; curl -XPUT es:9200/_template/logstash_netflow -d@'/tmp/logstash_netflow.json';elasticsearch"
kibana:
image: kibana:4.1
ports:
- "5601:5601"
links:
- elasticsearch:elasticsearch
logstash:
image: yeasy/logstash
ports:
- "2055/udp:2055/udp"
links:
- elasticsearch:elasticsearch
volumes:
- $PWD:/config-dir
command: logstash agent -f /config-dir/logstash_netflow.conf

View File

@ -0,0 +1,12 @@
input {
udp {
port => 2055
codec => netflow {
definitions => "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-codec-netflow-1.0.0/lib/logstash/codecs/netflow/netflow.yaml"}}
}
output {
#stdout { codec => rubydebug}
elasticsearch {
index => "logstash_netflow-%{+YYYY.MM.dd}"
host => elasticsearch}}

Binary file not shown.

View File

@ -0,0 +1,4 @@
#!/bin/sh
echo "Start the registry service using docker-compose"
docker-compose -p registry -f docker-compose.yml up -d

View File

@ -0,0 +1,36 @@
# This compose file will start 2 containers: registry and redis.
# registry container will listen on host port 5000,
# and depend on the redis container as the cache scheme.
registry:
image: registry:latest
cpu_shares: 10
environment:
- STANDALONE=false
- MIRROR_SOURCE=https://registry-1.docker.io
- MIRROR_SOURCE_INDEX=https://index.docker.io
- CACHE_REDIS_HOST=redis
- CACHE_REDIS_PORT=6379
- DEBUG=false
hostname: docker-registry
links:
- redis:redis
mem_limit: 512m
ports:
- "5000:5000"
privileged: false
restart: always
user: root
volumes:
- /opt/data/registry:/tmp/registry
redis:
image: redis:3.0
cpu_shares: 10
expose:
- "6379"
mem_limit: 512m
restart: always
volumes:
- /opt/data/redis:/data