-
Notifications
You must be signed in to change notification settings - Fork 26
Add template for local deployment #173
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ env/ | |
| venv/ | ||
| cache/ | ||
| config.py | ||
| docker-compose* | ||
| docker-compose*.yml | ||
| error.log | ||
| *.ipynb | ||
| derby.log | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think |
||
| docker-compose -f docker-compose-katappa.yml up kronos | ||
| ``` | ||
|
|
||
| ## To Test Locally | ||
|
|
||
| `python -m unittest discover tests -v` | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| version: "2" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| 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" | ||
Uh oh!
There was an error while loading. Please reload this page.
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.
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.