Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ env/
venv/
cache/
config.py
docker-compose*
docker-compose*.yml
Copy link
Contributor

@CermakM CermakM Jan 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we should use *.yml instead of the *.template and preserve it in git scope, since this would be part of master branch and it may change during development (i.e adding more environment variables). See comments below.

error.log
*.ipynb
derby.log
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
* [Apollo](/analytics_platform/kronos/apollo)
* [Uranus](/analytics_platform/kronos/uranus)

## To Deploy Locally:

```bash
cp docker-compose-katappa.template docker-compose-katappa.yml
Copy link
Contributor

@CermakM CermakM Jan 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest not to use this approach to modify any of native files present in the upstream directory in this way. See comments below.

#Add the necessary key-values in docker-compose.yml.
docker build -t kronos -f Dockerfile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think docker-compose build command should be used instead of simple docker command to avoid contributor confusion and preserve version accordance of the command.

docker-compose -f docker-compose-katappa.yml up kronos
```

## To Test Locally

`python -m unittest discover tests -v`
Expand Down
23 changes: 23 additions & 0 deletions docker-compose-katappa.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: "2"
Copy link
Contributor

@CermakM CermakM Jan 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sara-02 Any specific reason to use the version "2" instead of "3"?

services:
kronos:
build:
context: .
dockerfile: Dockerfile
image: kronos:latest
network_mode: bridge
entrypoint:
- /bin/entrypoint.sh
environment:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't be better to use "env file" here? https://docs.docker.com/compose/environment-variables/#the-env-file

Copy link
Contributor Author

@sara-02 sara-02 Jan 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@msrb we already have that in our backlog to use env instead, but we never time to get back to it.
Discussion can be seen here: #121 (review)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sara-02 @msrb I do believe env file usage would be much more suitable for this purpose, as it would eliminate the renaming issue, as well as it would be more compact for a potential contributor.

AWS_S3_ACCESS_KEY_ID: "<>"
AWS_S3_SECRET_ACCESS_KEY: "<>"
KRONOS_SCORING_REGION: "<maven/pypi/npm one of the ecosystems>"
DEPLOYMENT_PREFIX: "<DEV/STAGE/PROD> affects where the data and log for training gets stored."
SERVICE_PORT: "6006"
SERVICE_TIMEOUT: "900"
SPARK_HOME: "/usr/local/spark"
PY4J_VERSION: "py4j-0.10.4-src.zip"
GREMLIN_REST_URL: "<url>:<port>"
FLASK_LOGGING_LEVEL: "DEBUG"
ports:
- "6006:6006"