Git Product home page Git Product logo

gunicorn-k8s-operator's Introduction

CharmHub Badge Publish to edge Promote charm Discourse Status

Gunicorn-k8s Operator

A Juju charm deploying docker images using gunicorn as default.

This charm simplifies docker image deployment management, allowing us to inject variables to the environment as we see fit. It allows for deployment on many different Kubernetes platforms, from MicroK8s to Charmed Kubernetes to public cloud Kubernetes offerings.

As such, the charm makes it easy for those looking to take control of their docker images, use them in a juju environment without having to write a charm from scratch and gives them the freedom to deploy on the Kubernetes platform of their choice.

For DevOps or SRE teams this charm will make docker image testing easier and more manageable. It will allow easy deployment into multiple environments for testing of changes, and supports scaling out for enterprise deployments.

Deployment options overview

For overall concepts related to using Juju see the Juju overview page. For easy local testing we recommend this how to on using MicroK8s with Juju.

Please generate src documentation for every commit. See the section below for more details.

Generating src docs for every commit

Run the following command:

echo -e "tox -e src-docs\ngit add src-docs\n" >> .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit

How to deploy this charm (quick guide)

To deploy the charm and relate it to the PostgreSQL K8s charm within a Juju Kubernetes model:

juju deploy postgresql-k8s
juju deploy gunicorn-k8s
juju relate postgresql-k8s:db gunicorn-k8s:pg

The charm also supports the ingress relation, which can be used with nginx-ingress-integrator.

juju deploy nginx-ingress-integrator
juju relate gunicorn-k8s:ingress nginx-ingress-integrator:ingress

Once the deployment has completed and the "gunicorn-k8s" workload state in juju status has changed to "active" you can visit http://gunicorn-k8s in a browser (assuming gunicorn-k8s resolves to the IP(s) of your k8s ingress) or the juju unit's (gunicorn-k8s) assigned IP, and you'll be presented with a screen that details all the environment variables used by the deployed docker image.

Using your own image

You can, of course, supply our own OCI image. To do so, specify --resource gunicorn-image='image-location' at deploy time, or use juju attach-resource if you want to switch images after initial deployment. Gunicorn is expected to listen on port 8080 by default, but you can configure your own port if needed via the juju config external_port option.

For further details, see the charm's detailed documentation.

gunicorn-k8s-operator's People

Contributors

gtrkiller avatar mthaddon avatar axinojolais avatar github-actions[bot] avatar renovate[bot] avatar arturo-seijas avatar amandahla avatar jdkandersson avatar merkata avatar gregory-schiano avatar weiiwang01 avatar

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.