-
Notifications
You must be signed in to change notification settings - Fork 959
feat: Add helm to core #578
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
c572e27
2de364b
8ebd9a7
9d0d96e
b4088be
b670697
bfe039d
6bc4f6a
96adcfb
c06c28d
edd681f
02b0109
a91e83e
326c418
92602aa
f2d0909
97465f1
73662b8
90d96aa
3a88b94
11442df
1dfb0dd
4c4723b
846c45e
2c0bfc8
62d2d76
57630ee
0516d6e
bacfb01
6e17fdf
a9f8ab4
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 |
|---|---|---|
| @@ -0,0 +1,162 @@ | ||
| # Byte-compiled / optimized / DLL files | ||
| __pycache__/ | ||
| *.py[cod] | ||
| *$py.class | ||
|
|
||
| # C extensions | ||
| *.so | ||
|
|
||
| # Distribution / packaging | ||
| .Python | ||
| build/ | ||
| develop-eggs/ | ||
| dist/ | ||
| downloads/ | ||
| eggs/ | ||
| .eggs/ | ||
| lib/ | ||
| lib64/ | ||
| parts/ | ||
| sdist/ | ||
| var/ | ||
| wheels/ | ||
| share/python-wheels/ | ||
| *.egg-info/ | ||
| .installed.cfg | ||
| *.egg | ||
| MANIFEST | ||
|
|
||
| # PyInstaller | ||
| # Usually these files are written by a python script from a template | ||
| # before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
| *.manifest | ||
| *.spec | ||
|
|
||
| # Installer logs | ||
| pip-log.txt | ||
| pip-delete-this-directory.txt | ||
|
|
||
| # Unit test / coverage reports | ||
| htmlcov/ | ||
| .tox/ | ||
| .nox/ | ||
| .coverage | ||
| .coverage.* | ||
| .cache | ||
| nosetests.xml | ||
| coverage.xml | ||
| *.cover | ||
| *.py,cover | ||
| .hypothesis/ | ||
| .pytest_cache/ | ||
| cover/ | ||
|
|
||
| # Translations | ||
| *.mo | ||
| *.pot | ||
|
|
||
| # Django stuff: | ||
| *.log | ||
| local_settings.py | ||
| db.sqlite3 | ||
| db.sqlite3-journal | ||
|
|
||
| # Flask stuff: | ||
| instance/ | ||
| .webassets-cache | ||
|
|
||
| # Scrapy stuff: | ||
| .scrapy | ||
|
|
||
| # Sphinx documentation | ||
| docs/_build/ | ||
|
|
||
| # PyBuilder | ||
| .pybuilder/ | ||
| target/ | ||
|
|
||
| # Jupyter Notebook | ||
| .ipynb_checkpoints | ||
|
|
||
| # IPython | ||
| profile_default/ | ||
| ipython_config.py | ||
|
|
||
| # pyenv | ||
| # For a library or package, you might want to ignore these files since the code is | ||
| # intended to run in multiple environments; otherwise, check them in: | ||
| # .python-version | ||
|
|
||
| # pipenv | ||
| # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
| # However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
| # having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
| # install all needed dependencies. | ||
| #Pipfile.lock | ||
|
|
||
| # poetry | ||
| # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. | ||
| # This is especially recommended for binary packages to ensure reproducibility, and is more | ||
| # commonly ignored for libraries. | ||
| # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control | ||
| #poetry.lock | ||
|
|
||
| # pdm | ||
| # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. | ||
| #pdm.lock | ||
| # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it | ||
| # in version control. | ||
| # https://pdm.fming.dev/latest/usage/project/#working-with-version-control | ||
| .pdm.toml | ||
| .pdm-python | ||
| .pdm-build/ | ||
|
|
||
| # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm | ||
| __pypackages__/ | ||
|
|
||
| # Celery stuff | ||
| celerybeat-schedule | ||
| celerybeat.pid | ||
|
|
||
| # SageMath parsed files | ||
| *.sage.py | ||
|
|
||
| # Environments | ||
| .env | ||
| .venv | ||
| env/ | ||
| venv/ | ||
| ENV/ | ||
| env.bak/ | ||
| venv.bak/ | ||
|
|
||
| # Spyder project settings | ||
| .spyderproject | ||
| .spyproject | ||
|
|
||
| # Rope project settings | ||
| .ropeproject | ||
|
|
||
| # mkdocs documentation | ||
| /site | ||
|
|
||
| # mypy | ||
| .mypy_cache/ | ||
| .dmypy.json | ||
| dmypy.json | ||
|
|
||
| # Pyre type checker | ||
| .pyre/ | ||
|
|
||
| # pytype static type analyzer | ||
| .pytype/ | ||
|
|
||
| # Cython debug symbols | ||
| cython_debug/ | ||
|
|
||
| # PyCharm | ||
| # JetBrains specific template is maintained in a separate JetBrains.gitignore that can | ||
| # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore | ||
| # and can be added to the global gitignore or merged into this file. For a more nuclear | ||
| # option (not recommended) you can uncomment the following to ignore the entire idea folder. | ||
| #.idea/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| apiVersion: v2 | ||
| name: cognee-chart | ||
| description: A helm chart of the cognee backend deployment on Kubernetes environment | ||
|
|
||
| # A chart can be either an 'application' or a 'library' chart. | ||
| # | ||
| # Application charts are a collection of templates that can be packaged into versioned archives | ||
| # to be deployed. | ||
| # | ||
| # Library charts provide useful utilities or functions for the chart developer. They're included as | ||
| # a dependency of application charts to inject those utilities and functions into the rendering | ||
| # pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
| type: application | ||
|
|
||
| # This is the chart version. This version number should be incremented each time you make changes | ||
| # to the chart and its templates, including the app version. | ||
| # Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
| version: 0.1.0 | ||
|
|
||
| # This is the version number of the application being deployed. This version number should be | ||
| # incremented each time you make changes to the application. Versions are not expected to | ||
| # follow Semantic Versioning. They should reflect the version the application is using. | ||
| # It is recommended to use it with quotes. | ||
| appVersion: "1.16.0" |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,45 @@ | ||||||||||||||
| FROM python:3.11-slim | ||||||||||||||
|
|
||||||||||||||
| # Set build argument | ||||||||||||||
| ARG DEBUG | ||||||||||||||
|
|
||||||||||||||
| # Set environment variable based on the build argument | ||||||||||||||
| ENV DEBUG=${DEBUG} | ||||||||||||||
| ENV PIP_NO_CACHE_DIR=true | ||||||||||||||
| ENV PATH="${PATH}:/root/.poetry/bin" | ||||||||||||||
|
|
||||||||||||||
| RUN apt-get update && apt-get install | ||||||||||||||
|
|
||||||||||||||
| RUN apt-get install -y \ | ||||||||||||||
| gcc \ | ||||||||||||||
| libpq-dev | ||||||||||||||
|
Comment on lines
+11
to
+15
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. 🛠️ Refactor suggestion Critical: Merge Update and Install Commands - RUN apt-get update && apt-get install
-
- RUN apt-get install -y \
- gcc \
- libpq-dev
+ RUN apt-get update && apt-get install -y gcc libpq-dev📝 Committable suggestion
Suggested change
|
||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| WORKDIR /app | ||||||||||||||
| COPY pyproject.toml poetry.lock /app/ | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| RUN pip install poetry | ||||||||||||||
|
|
||||||||||||||
| # Don't create virtualenv since docker is already isolated | ||||||||||||||
| RUN poetry config virtualenvs.create false | ||||||||||||||
|
|
||||||||||||||
| # Install the dependencies | ||||||||||||||
| RUN poetry install --all-extras --no-root --no-dev | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| # Set the PYTHONPATH environment variable to include the /app directory | ||||||||||||||
| ENV PYTHONPATH=/app | ||||||||||||||
|
|
||||||||||||||
| COPY cognee/ /app/cognee | ||||||||||||||
|
|
||||||||||||||
| # Copy Alembic configuration | ||||||||||||||
| COPY alembic.ini /app/alembic.ini | ||||||||||||||
| COPY alembic/ /app/alembic | ||||||||||||||
|
|
||||||||||||||
| COPY entrypoint.sh /app/entrypoint.sh | ||||||||||||||
| RUN chmod +x /app/entrypoint.sh | ||||||||||||||
|
|
||||||||||||||
| RUN sed -i 's/\r$//' /app/entrypoint.sh | ||||||||||||||
|
|
||||||||||||||
| ENTRYPOINT ["/app/entrypoint.sh"] | ||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
|
|
||
| # cognee-infra-helm | ||
| General infrastructure setup for Cognee on Kubernetes using a Helm chart. | ||
|
|
||
| ## Prerequisites | ||
| Before deploying the Helm chart, ensure the following prerequisites are met: | ||
|
|
||
| **Kubernetes Cluster**: A running Kubernetes cluster (e.g., Minikube, GKE, EKS). | ||
|
|
||
| **Helm**: Installed and configured for your Kubernetes cluster. You can install Helm by following the [official guide](https://helm.sh/docs/intro/install/). | ||
|
|
||
| **kubectl**: Installed and configured to interact with your cluster. Follow the instructions [here](https://kubernetes.io/docs/tasks/tools/install-kubectl/). | ||
|
|
||
| Clone the Repository Clone this repository to your local machine and navigate to the directory. | ||
|
|
||
| ## Deploy Helm Chart: | ||
|
|
||
| ```bash | ||
| helm install cognee ./cognee-chart | ||
| ``` | ||
|
|
||
| **Uninstall Helm Release**: | ||
| ```bash | ||
| helm uninstall cognee | ||
| ``` |
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.
Fix formatting issue.
Add a space after the equals sign.
📝 Committable suggestion