Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding new way to docker big graphite ! (#538)
* Adding new way to docker big graphite ! * Expose more ports in the docker launch script + add missing config file. Co-authored-by: crto-es-vyg <57795163+crto-es-vyg@users.noreply.github.com> Co-authored-by: Harold Dost <github@hdost.com>
- Loading branch information
1 parent
cda45ef
commit 5dc2b88
Showing
10 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM bg-image | ||
RUN pip install carbon | ||
ENTRYPOINT ["bg-carbon-cache"] | ||
CMD ["--debug","--nodaemon","--conf=/conf/carbon.conf","start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[cache] | ||
BG_DATA_DRIVER = cassandra | ||
BG_METADATA_DRIVER = elasticsearch | ||
DATABASE = biggraphite | ||
BG_CASSANDRA_KEYSPACE = biggraphite | ||
BG_CASSANDRA_CONTACT_POINTS = cassandra | ||
BG_CASSANDRA_CONTACT_POINTS_METADATA = | ||
BG_CACHE = memory | ||
STORAGE_DIR = /tmp | ||
BG_ELASTICSEARCH_HOSTS = elasticsearch | ||
BG_ELASTICSEARCH_PORT = 9200 | ||
#BG_ELASTICSEARCH_INDEX_SUFFIX = _%Y-w%W |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM python:3.6 | ||
COPY . /bg/ | ||
WORKDIR /bg | ||
ENV GRAPHITE_NO_PREFIX=true | ||
RUN pip install -r requirements.txt && pip install -e . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
docker build ../ -t bg-image -f bg-image/Dockerfile | ||
docker build aggregator-cache/ -t aggregator-cache -f aggregator-cache/Dockerfile | ||
docker build graphite-web/ -t graphite-web -f graphite-web/Dockerfile | ||
docker network create biggraphite-network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM bg-image | ||
RUN pip install graphite-web | ||
COPY local_settings.py /usr/local/lib/python3.6/site-packages/graphite/ | ||
COPY start-graphite-web.sh /bg | ||
RUN chmod +x /bg/start-graphite-web.sh | ||
ENTRYPOINT /bg/start-graphite-web.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
DEBUG = True | ||
LOG_DIR = '/tmp' | ||
STORAGE_DIR = '/tmp' | ||
STORAGE_FINDERS = ['biggraphite.plugins.graphite.Finder'] | ||
TAGDB = 'biggraphite.plugins.tags.BigGraphiteTagDB' | ||
# Cassandra configuration | ||
BG_CASSANDRA_KEYSPACE = 'biggraphite' | ||
BG_CASSANDRA_CONTACT_POINTS = 'cassandra' | ||
BG_DATA_DRIVER = 'cassandra' | ||
BG_CACHE = 'memory' | ||
WEBAPP_DIR = '/usr/local/webapp/' | ||
## Elasticsearch configuration | ||
BG_METADATA_DRIVER = 'elasticsearch' | ||
BG_ELASTICSEARCH_HOSTS = 'elasticsearch' | ||
BG_ELASTICSEARCH_PORT = '9200' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
export DJANGO_SETTINGS_MODULE=graphite.settings | ||
django-admin migrate | ||
django-admin migrate --run-syncdb | ||
cd /usr/local/lib/python3.6/site-packages/graphite && run-graphite-devel-server.py /usr/local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
set -x | ||
set -e | ||
docker run --network=biggraphite-network --rm -d --name cassandra cassandra:3.11.3 | ||
sleep 20 | ||
docker exec cassandra cqlsh -e "CREATE KEYSPACE IF NOT EXISTS biggraphite WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = false;" localhost --cqlversion="3.4.4" | ||
docker run -p 9200:9200 --rm --name elasticsearch -d --network=biggraphite-network docker.elastic.co/elasticsearch/elasticsearch:6.3.2 | ||
sleep 20 | ||
docker run -d --rm --name kibana -p 5601:5601 --network=biggraphite-network docker.elastic.co/kibana/kibana:6.3.2 | ||
docker run -d --rm --name aggregator-cache -p 2003:2003 --network=biggraphite-network -v $(pwd)/aggregator-cache/:/conf aggregator-cache | ||
docker run -d --rm --name graphite-web -p 8080:8080 --network=biggraphite-network graphite-web |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker stop $(docker container ls -q) |