Coder Social home page Coder Social logo

laurensramandt / inventree-kubernetes Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 6 KB

Manifests to deploy InvenTree, an open-source inventory management system, on Kubernetes

License: MIT License

inventory inventory-management inventory-management-system inventree kubernetes containerd docker

inventree-kubernetes's Introduction

Deploying InvenTree on Kubernetes

This repository provides manifests for easily deploying InvenTree (stable version) on Kubernetes.

This repository is provided under the MIT License.

Disclaimer

Please note: Please note that the provided manifests will deploy all components to the Kubernetes default namespace, unless changed.

Initial Setup

To create the nginx configuration used by the inventree-proxy, run the following command from the root of the repository:

kubectl create configmap inventree-nginx-config --from-file=config/ --dry-run=client -o=yaml | kubectl apply -f -

Warning: This command will create or overwrite a ConfigMap named inventree-nginx-config.

Configuration

Before deploying, you will need to manually update the following variables in inventree-config-configmap.yaml:

  • INVENTREE_DB_ENGINE: "mysql" or "postgresql"
  • INVENTREE_DB_HOST
  • INVENTREE_DB_PORT
  • INVENTREE_DB_NAME
  • INVENTREE_DB_USER
  • INVENTREE_DB_PASSWORD
  • INVENTREE_ADMIN_USER
  • INVENTREE_ADMIN_EMAIL
  • INVENTREE_ADMIN_PASSWORD

Here's an example configuration:

INVENTREE_DB_ENGINE: "mysql"
INVENTREE_DB_HOST: "your_database_host"
INVENTREE_DB_PORT: "your_database_port"
INVENTREE_DB_NAME: "inventree"
INVENTREE_DB_USER: "your_database_user"
INVENTREE_DB_PASSWORD: "your_database_password"
INVENTREE_ADMIN_USER: "your_admin_username"
INVENTREE_ADMIN_EMAIL: "your_admin_email"
INVENTREE_ADMIN_PASSWORD: "your_admin_password"

Replace the example values with your actual configuration.

Deployment

After you have updated the configuration, use kubectl apply -f on each of these files:

  • inventree-app-deployment.yaml
  • inventree-app-service.yaml
  • inventree-cache-deployment.yaml
  • inventree-cache-service.yaml
  • inventree-config-configmap.yaml
  • inventree-data-persistentvolumeclaim.yaml
  • inventree-worker-deployment.yaml

The container will automatically run any required database migrations upon startup.

Additional Information

The inventree-app-deployment.yaml contains both inventree-server, which serves the actual application, and inventree-proxy, which serves static assets such as scripts and images. This is because some environments only provide persistent volumes that cannot be mounted to multiple pods simultaneously (e.g. hcloud).

This repository also includes an ingress-example.yaml file. However, this file assumes that you are using nginx as the ingress class and a LetsEncrypt ClusterIssuer. You will still need to specify your public hostname and set up the appropriate DNS records.

Please note, some users might require a LoadBalancer resource instead of an Ingress. This is not included in the repository and will need to be configured separately as per your environment and requirements.

inventree-kubernetes's People

Contributors

laurensramandt avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

inventree-kubernetes's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.