Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
penghuo committed Dec 19, 2019
1 parent 47410cd commit f5fa972
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM amazon/opendistro-for-elasticsearch:1.3.0

RUN rm -rf /usr/share/elasticsearch/plugins/opendistro_security
RUN rm -rf /usr/share/elasticsearch/plugins/opendistro_performance_analyzer
RUN rm -rf /usr/share/elasticsearch/plugins/opendistro_alerting
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
# sql-demo
Opendistro SQL Demo

## Files
1. buildsepc.xml tell CodeBuild how to do that
2. Dockerfile

## Reference
Refer https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-cd-pipeline.html
27 changes: 27 additions & 0 deletions buildspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: 0.2

phases:
pre_build:
commands:
- echo Logging in to Amazon ECR...
- aws --version
- $(aws ecr get-login --region $AWS_DEFAULT_REGION --no-include-email)
- REPOSITORY_URI=483560928347.dkr.ecr.us-west-2.amazonaws.com/opendistro/sql
# - COMMIT_HASH=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | cut -c 1-7)
- IMAGE_TAG=latest
build:
commands:
- echo Build started on `date`
- echo Building the Docker image...
# - docker build -t $REPOSITORY_URI:latest .
# - docker tag $REPOSITORY_URI:latest $REPOSITORY_URI:$IMAGE_TAG
post_build:
commands:
- echo Build completed on `date`
- echo Pushing the Docker images...
- docker push $REPOSITORY_URI:latest
- docker push $REPOSITORY_URI:$IMAGE_TAG
- echo Writing image definitions file...
- printf '[{"name":"es-container","imageUri":"%s"}]' $REPOSITORY_URI:$IMAGE_TAG > imagedefinitions.json
artifacts:
files: imagedefinitions.json

0 comments on commit f5fa972

Please sign in to comment.