-
-
Notifications
You must be signed in to change notification settings - Fork 465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker revamp #19
Open
heyqule
wants to merge
58
commits into
shirosaidev:master
Choose a base branch
from
heyqule:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Docker revamp #19
Changes from 6 commits
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
b292b6d
Add docker compose for kibana and elasticsearch
heyqule 4aef0a3
Merge remote-tracking branch 'upstream/master'
heyqule 8ee20b8
Add support for multiple set of nltk tokens. Controls by --index
heyqule 9dca234
Fequency adjustment
heyqule 74e6b36
Fully automate the build with docker
heyqule 53408c9
Add support to bypass fetching stock price outside of regular hours.
heyqule d5393e7
Fix time display
heyqule 4dc0238
Optimization
heyqule b7cda28
Fix hour() error
heyqule a8bf22a
Fix Cache Cleaning issue
heyqule aea6a59
Change startup.sh to startup.sample.sh
heyqule 64ddc35
Add Curl to python instance for cleaning purposes.
heyqule 004c17c
Clean cache
heyqule 3cd6de0
Change Kibana template
heyqule fde9181
Move news out of original sentiment script
heyqule 92a9447
Break down News SA
heyqule 4205c8c
remove exposed ports
heyqule ff5a8cf
Elasticsearch / Kibana 7.3 change
heyqule e310886
Add ndjson importer
heyqule 10502c8
Add ndjson importer
heyqule 7675154
Remove kibana 5.6 export
heyqule c2a7010
Fix kibana importer
heyqule cb42d10
Update Copyright
heyqule fd9fe56
Change to wt
heyqule 3a3b452
Change Mapping to 7.3 format
heyqule f3c1895
Disable twitter sentiment stream in start.sh
heyqule e6c9f1b
Rename original py to og.py
heyqule 3fc49a6
Change config handling
heyqule e86efe7
Fix twitter
heyqule 5f1d87f
Since it's single node insance, disable replica
heyqule 3e862ec
Refactors
heyqule 84c6324
Minor Import script adjustment
heyqule 4cd6af4
Index structure change
heyqule 622eae1
Fix message body
heyqule baa9d5f
Optimiaztion
heyqule 040887b
Add delay before fetching from elasticsearch .
heyqule 56901dc
Kibana change
heyqule abbc740
Kibana - remove legend
heyqule a6002ac
Add kibana listener
heyqule c6cf17b
Revert ndjson
heyqule bda22a4
Attempt to fix stock price operant error
heyqule b7226d4
Fix elastic mapping
heyqule 5cde9c9
Add delay for Seek Alpha
heyqule c3431c4
Add delay for Seek Alpha
heyqule d086bc6
- Separate sentiment for message and title
heyqule f84a379
- Kibana adjustment
heyqule 60e06fc
- Config adjustment
heyqule 0d7c7a4
- Improve Kibana dashboard
heyqule fb6bea1
- Improve Kibana Dashboard
heyqule 097c774
- Additonal Readme change
heyqule efc7387
- Fix kibana tmp folder issue
heyqule 175dd61
- Minor change to spawn timers
heyqule a178733
Minor Refactor
heyqule 9c55d3d
Merge branch 'master' into master
shirosaidev 6f38025
Fix issue found by shaggy63
heyqule 5d17a6c
Merge remote-tracking branch 'origin/master'
heyqule 646b0d9
Disable unnecessary exposed ports
heyqule b985410
Add copyright blocks to non-py files
heyqule File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,11 @@ | ||
FROM python:3 | ||
|
||
WORKDIR /usr/src/app | ||
|
||
ADD requirements.txt ./requirements.txt | ||
|
||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
RUN [ "python", "-c", "import nltk; nltk.download('punkt')" ] | ||
|
||
ENTRYPOINT ["sh","startup.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
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,40 @@ | ||
# ./docker-compose.yml | ||
|
||
version: '3' | ||
|
||
services: | ||
elasticsearch: | ||
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.16 | ||
environment: | ||
- cluster.name=docker-cluster | ||
- bootstrap.memory_lock=true | ||
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | ||
volumes: | ||
- ./data:/usr/share/elasticsearch/data | ||
ulimits: | ||
memlock: | ||
soft: -1 | ||
hard: -1 | ||
nofile: | ||
soft: 65536 | ||
hard: 65536 | ||
nproc: | ||
soft: 2048 | ||
hard: 2048 | ||
#expose this for local dev only! | ||
#ports: | ||
# - "9200:9200" | ||
kibana: | ||
image: docker.elastic.co/kibana/kibana:5.6.16 | ||
depends_on: | ||
- elasticsearch | ||
ports: | ||
- "5601:5601" | ||
python3: | ||
build: | ||
context: ./ | ||
dockerfile: Python.Dockerfile | ||
depends_on: | ||
- elasticsearch | ||
volumes: | ||
- ./src:/usr/src/app |
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,114 @@ | ||
[ | ||
{ | ||
"_id": "amd-stock-dashboard", | ||
"_type": "dashboard", | ||
"_source": { | ||
"title": "amd_dashboard", | ||
"hits": 0, | ||
"description": "", | ||
"panelsJSON": "[{\"col\":1,\"id\":\"amd-stock-visualization-2\",\"panelIndex\":1,\"row\":3,\"size_x\":3,\"size_y\":3,\"type\":\"visualization\"},{\"col\":9,\"id\":\"amd-stock-visualization-4\",\"panelIndex\":2,\"row\":3,\"size_x\":4,\"size_y\":3,\"type\":\"visualization\"},{\"col\":1,\"columns\":[\"author\",\"location\",\"message\",\"polarity\",\"subjectivity\",\"sentiment\"],\"id\":\"amd-stock-search\",\"panelIndex\":3,\"row\":6,\"size_x\":12,\"size_y\":4,\"sort\":[\"date\",\"desc\"],\"type\":\"search\"},{\"col\":1,\"id\":\"amd-stock-visualization-5\",\"panelIndex\":4,\"row\":10,\"size_x\":12,\"size_y\":4,\"type\":\"visualization\"},{\"col\":4,\"id\":\"amd-stock-visualization-3\",\"panelIndex\":5,\"row\":3,\"size_x\":5,\"size_y\":3,\"type\":\"visualization\"},{\"col\":1,\"id\":\"amd-stock-visualization-1\",\"panelIndex\":6,\"row\":1,\"size_x\":12,\"size_y\":2,\"type\":\"visualization\"}]", | ||
"optionsJSON": "{\"darkTheme\":true}", | ||
"uiStateJSON": "{\"P-2\":{\"vis\":{\"legendOpen\":true}},\"P-6\":{\"vis\":{\"defaultColors\":{\"0 - 1\":\"rgb(0,104,55)\"}}}}", | ||
"version": 1, | ||
"timeRestore": false, | ||
"kibanaSavedObjectMeta": { | ||
"searchSourceJSON": "{\"filter\":[{\"query\":{\"match_all\":{}}}],\"highlightAll\":true,\"version\":true}" | ||
} | ||
} | ||
}, | ||
{ | ||
"_id": "amd-stock-search", | ||
"_type": "search", | ||
"_source": { | ||
"title": "amd_savesearch", | ||
"description": "", | ||
"hits": 0, | ||
"columns": [ | ||
"author", | ||
"location", | ||
"message", | ||
"polarity", | ||
"subjectivity", | ||
"sentiment" | ||
], | ||
"sort": [ | ||
"date", | ||
"desc" | ||
], | ||
"version": 1, | ||
"kibanaSavedObjectMeta": { | ||
"searchSourceJSON": "{\"index\":\"amd\",\"highlightAll\":true,\"version\":true,\"query\":{\"match_all\":{}},\"filter\":[{\"meta\":{\"index\":\"amd\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"_type\",\"value\":\"tweet\"},\"query\":{\"match\":{\"_type\":{\"query\":\"tweet\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}]}" | ||
} | ||
} | ||
}, | ||
{ | ||
"_id": "amd-stock-visualization-1", | ||
"_type": "visualization", | ||
"_source": { | ||
"title": "amd_polarity", | ||
"visState": "{\"title\":\"amd_polarity\",\"type\":\"metric\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"gauge\",\"gauge\":{\"verticalSplit\":false,\"autoExtend\":false,\"percentageMode\":false,\"gaugeType\":\"Metric\",\"gaugeStyle\":\"Full\",\"backStyle\":\"Full\",\"orientation\":\"vertical\",\"colorSchema\":\"Green to Red\",\"gaugeColorMode\":\"None\",\"useRange\":false,\"colorsRange\":[{\"from\":0,\"to\":1}],\"invertColors\":false,\"labels\":{\"show\":true,\"color\":\"black\"},\"scale\":{\"show\":false,\"labels\":false,\"color\":\"#333\",\"width\":2},\"type\":\"simple\",\"style\":{\"fontSize\":\"24\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\"},\"extendRange\":false}},\"aggs\":[{\"id\":\"5\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"1\",\"enabled\":true,\"type\":\"avg\",\"schema\":\"metric\",\"params\":{\"field\":\"polarity\"}},{\"id\":\"4\",\"enabled\":true,\"type\":\"median\",\"schema\":\"metric\",\"params\":{\"field\":\"polarity\",\"percents\":[50]}},{\"id\":\"2\",\"enabled\":true,\"type\":\"min\",\"schema\":\"metric\",\"params\":{\"field\":\"polarity\"}},{\"id\":\"3\",\"enabled\":true,\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"polarity\"}}],\"listeners\":{}}", | ||
"uiStateJSON": "{\"vis\":{\"defaultColors\":{\"0 - 1\":\"rgb(0,104,55)\"}}}", | ||
"description": "", | ||
"version": 1, | ||
"kibanaSavedObjectMeta": { | ||
"searchSourceJSON": "{\"index\":\"amd\",\"query\":{\"match_all\":{}},\"filter\":[]}" | ||
} | ||
} | ||
}, | ||
{ | ||
"_id": "amd-stock-visualization-2", | ||
"_type": "visualization", | ||
"_source": { | ||
"title": "amd_sentinel", | ||
"visState": "{\"title\":\"amd_sentinel\",\"type\":\"pie\",\"params\":{\"addLegend\":true,\"addTooltip\":true,\"isDonut\":false,\"legendPosition\":\"bottom\",\"type\":\"pie\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"sentiment.keyword\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}],\"listeners\":{}}", | ||
"uiStateJSON": "{}", | ||
"description": "", | ||
"version": 1, | ||
"kibanaSavedObjectMeta": { | ||
"searchSourceJSON": "{\"index\":\"amd\",\"query\":{\"match_all\":{}},\"filter\":[]}" | ||
} | ||
} | ||
}, | ||
{ | ||
"_id": "amd-stock-visualization-3", | ||
"_type": "visualization", | ||
"_source": { | ||
"title": "amd_stockprice", | ||
"visState": "{\"title\":\"amd_stockprice\",\"type\":\"line\",\"params\":{\"grid\":{\"categoryLines\":false,\"style\":{\"color\":\"#eee\"}},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"truncate\":100},\"title\":{\"text\":\"date per 30 seconds\"}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Avg of price_last\"}}],\"seriesParams\":[{\"show\":\"true\",\"type\":\"line\",\"mode\":\"normal\",\"data\":{\"label\":\"Avg of price_last\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"showCircles\":true},{\"show\":true,\"mode\":\"normal\",\"type\":\"line\",\"drawLinesBetweenPoints\":true,\"showCircles\":true,\"data\":{\"id\":\"3\",\"label\":\"Avg of price_high\"},\"valueAxis\":\"ValueAxis-1\"},{\"show\":true,\"mode\":\"normal\",\"type\":\"line\",\"drawLinesBetweenPoints\":true,\"showCircles\":true,\"data\":{\"id\":\"4\",\"label\":\"Avg of price_low\"},\"valueAxis\":\"ValueAxis-1\"}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"bottom\",\"times\":[],\"addTimeMarker\":false,\"type\":\"line\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"avg\",\"schema\":\"metric\",\"params\":{\"field\":\"price_last\"}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"date\",\"interval\":\"auto\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"3\",\"enabled\":true,\"type\":\"avg\",\"schema\":\"metric\",\"params\":{\"field\":\"price_high\"}},{\"id\":\"4\",\"enabled\":true,\"type\":\"avg\",\"schema\":\"metric\",\"params\":{\"field\":\"price_low\"}}],\"listeners\":{}}", | ||
"uiStateJSON": "{}", | ||
"description": "", | ||
"version": 1, | ||
"kibanaSavedObjectMeta": { | ||
"searchSourceJSON": "{\"index\":\"amd\",\"query\":{\"match_all\":{}},\"filter\":[{\"meta\":{\"index\":\"amd\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"_type\",\"value\":\"stock\"},\"query\":{\"match\":{\"_type\":{\"query\":\"stock\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}]}" | ||
} | ||
} | ||
}, | ||
{ | ||
"_id": "amd-stock-visualization-4", | ||
"_type": "visualization", | ||
"_source": { | ||
"title": "amd_tweets", | ||
"visState": "{\"title\":\"amd_tweets\",\"type\":\"line\",\"params\":{\"grid\":{\"categoryLines\":false,\"style\":{\"color\":\"#eee\"}},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"truncate\":100},\"title\":{\"text\":\"date per 30 seconds\"}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":\"true\",\"type\":\"line\",\"mode\":\"normal\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"showCircles\":true,\"interpolate\":\"linear\"}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"bottom\",\"times\":[],\"addTimeMarker\":false,\"type\":\"line\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{\"customLabel\":\"\"}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"date\",\"interval\":\"auto\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{}}}],\"listeners\":{}}", | ||
"uiStateJSON": "{}", | ||
"description": "", | ||
"version": 1, | ||
"kibanaSavedObjectMeta": { | ||
"searchSourceJSON": "{\"index\":\"amd\",\"query\":{\"match_all\":{}},\"filter\":[]}" | ||
} | ||
} | ||
}, | ||
{ | ||
"_id": "amd-stock-visualization-5", | ||
"_type": "visualization", | ||
"_source": { | ||
"title": "amd_wordcloud", | ||
"visState": "{\n \"title\": \"amd_wordcloud\",\n \"type\": \"tagcloud\",\n \"params\": {\n \"scale\": \"linear\",\n \"orientation\": \"single\",\n \"minFontSize\": 14,\n \"maxFontSize\": 36,\n \"type\": \"tagcloud\"\n },\n \"aggs\": [\n {\n \"id\": \"1\",\n \"enabled\": true,\n \"type\": \"count\",\n \"schema\": \"metric\",\n \"params\": {}\n },\n {\n \"id\": \"2\",\n \"enabled\": true,\n \"type\": \"terms\",\n \"schema\": \"segment\",\n \"params\": {\n \"field\": \"message.keyword\",\n \"size\": 25,\n \"order\": \"desc\",\n \"orderBy\": \"1\"\n }\n }\n ],\n \"listeners\": {}\n}", | ||
"uiStateJSON": "{}", | ||
"description": "", | ||
"version": 1, | ||
"kibanaSavedObjectMeta": { | ||
"searchSourceJSON": "{\n \"index\": \"amd\",\n \"query\": {\n \"match_all\": {}\n },\n \"filter\": []\n}" | ||
} | ||
} | ||
} | ||
] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when this is exposed permanently?