-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fbe6e8f
Showing
12 changed files
with
1,557 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,5 @@ | ||
streamsets/data/pipelines/ | ||
streamsets/data/runInfo/ | ||
streamsets/data/sdc.id | ||
streamsets/data/tutorial_data/ccsample | ||
.idea |
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,7 @@ | ||
#Inserting data | ||
FROM alpine:3.3 | ||
MAINTAINER Angel Alvarado "angel.angelio@gmail.com" | ||
COPY ./start.sh / | ||
RUN apk update | ||
RUN apk add curl | ||
RUN chmod +x /start.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,24 @@ | ||
#/bin/sh | ||
|
||
sleep 15 | ||
echo "Creating ElasticSearch index" | ||
ElasticActive=0 | ||
while [ $ElasticActive -eq 0 ] | ||
do | ||
wget elasticsearch:9200 -O - > /bin/null | ||
isESactive=$? | ||
wget elasticsearch:9200/logs -O - > /bin/null | ||
isLogsIndex=$? | ||
if [ $isESactive -eq 0 -a $isLogsIndex -ne 0 ] | ||
then | ||
echo "Creating ElasticSearch cclogs index" | ||
curl -XPUT 'elasticsearch:9200/cclogs' -d '{"mappings":{"cclogs":{"properties":{"transaction_date":{"type":"date"},"card_expiry_date":{"type":"string","index":"not_analyzed"},"card_number":{"type":"string","index":"not_analyzed"},"card_security_code":{"type":"integer","index":"not_analyzed"},"description":{"type":"string","index":"not_analyzed"},"purchase_amount":{"type":"integer","index":"not_analyzed"}}}}}' | ||
ElasticActive=1 | ||
elif [ $isESactive -eq 0 -a $isLogsIndex -eq 0 ] | ||
then | ||
echo "cclogs index already in ElasticSearch" | ||
ElasticActive=1 | ||
else | ||
echo "Trying to insert ElasticSearch logs Index" | ||
fi | ||
done |
Oops, something went wrong.