-
-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from sherifabdlnaby/v2.1.0
V2.1.0
- Loading branch information
Showing
10 changed files
with
114 additions
and
22 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
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,33 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# A sample workflow which checks out the code, builds a container | ||
# image using Docker and scans that image for vulnerabilities using | ||
# Snyk. The results are then uploaded to GitHub Security Code Scanning | ||
# | ||
# For more examples, including how to limit scans to only high-severity | ||
# issues, monitor images for newly disclosed vulnerabilities in Snyk and | ||
# fail PR checks for new vulnerabilities, see https://github.com/snyk/actions/ | ||
|
||
name: Build | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ main ] | ||
|
||
jobs: | ||
Run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build & Deploy | ||
run: make setup && make up | ||
- name: Test Elasticsearch | ||
run: timeout 240s sh -c "until curl https://elastic:changeme@localhost:9200 --insecure --silent; do echo 'Elasticsearch Not Up, Retrying...'; sleep 3; done" && echo 'Elasticsearch is up' | ||
- name: Test Kibana | ||
run: timeout 240s sh -c "until curl https://localhost:5601 --insecure --silent; do echo 'Kibana Not Ready, Retrying...'; sleep 3; done" && echo 'Kibana is up' | ||
|
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
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,12 @@ | ||
ARG ELK_VERSION | ||
|
||
# https://github.com/elastic/elasticsearch-docker | ||
FROM docker.elastic.co/elasticsearch/elasticsearch:${ELK_VERSION} | ||
|
||
# Add healthcheck | ||
COPY scripts/docker-healthcheck . | ||
HEALTHCHECK CMD sh ./docker-healthcheck | ||
|
||
# Add your elasticsearch plugins setup here | ||
# Example: RUN elasticsearch-plugin install analysis-icu | ||
#RUN elasticsearch-plugin install --batch repository-s3 |
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,14 @@ | ||
#!/bin/bash | ||
set -eo pipefail | ||
|
||
host="$(hostname --ip-address || echo '127.0.0.1')" | ||
|
||
if health="$(curl -fsSL "http://$ELASTIC_USERNAME:$ELASTIC_PASSWORD@$host:9200/_cat/health?h=status")"; then | ||
health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ") | ||
if [ "$health" = 'green' ] || [ "$health" = "yellow" ]; then | ||
exit 0 | ||
fi | ||
echo >&2 "unexpected health status: $health" | ||
fi | ||
|
||
exit 1 |
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,8 @@ | ||
ARG ELK_VERSION | ||
|
||
# https://github.com/elastic/kibana-docker | ||
FROM docker.elastic.co/kibana/kibana:${ELK_VERSION} | ||
ARG ELK_VERSION | ||
|
||
# Add your kibana plugins setup here | ||
# Example: RUN kibana-plugin install <name|url> |
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 @@ | ||
ARG ELK_VERSION | ||
|
||
# https://github.com/elastic/logstash-docker | ||
FROM docker.elastic.co/logstash/logstash:${ELK_VERSION} | ||
|
||
HEALTHCHECK --interval=240s --timeout=120s --retries=5 \ | ||
CMD curl -s -XGET 'http://127.0.0.1:9600' | ||
|
||
# Add your logstash plugins setup here | ||
# Example: RUN logstash-plugin install logstash-filter-json |