Skip to content

Focuses on enabling telemetry, CI/CD, and high-availability through various DevOps tools for a simple Python Bottle server.

License

Notifications You must be signed in to change notification settings

robert-7/DevOps-Example

Repository files navigation

DevOps-Example

Focuses on setting up a highly available Python Bottle web app. This includes:

  • a mutliple-instanced Bottle web app behind an nginx acting as the load-balancer
  • a MySQL cluster behind a MySQL router

NOTES

  • This repo heavily uses neumayer's innodb-cluster setup and modifies it for our needs.
  • the service built with Python is really primitive and doesn't do much

Getting Set Up for Local Development and Testing

Please see the setup documentation regarding this.

Deploying using docker-compose

Please see the deployment documentation regarding this.

Things that are still missing

  • haven't tested running this on a remote machine (i.e. the cloud), but it's supposed to accept all traffic... ¯\_(ツ)_/¯
  • I would've preferred to use Ansible for this, but I stuck with docker-compose as I saw some boilerplate code I could use for bringing up a MySQL cluster and just rolled with it
    • I would've liked to take this a step further with Terraform or Kubernetes, but I don't know Terraform and I didn't think I'd have time to set up the help charts for deploying to Kubernetes and testing
  • only listens on port 80 (needs to still work on port 443)
  • There containers are brought up incorrectly. Although dependencies are set in the docker-compose file, because we have no healthchecks set up, Docker is assuming my MySQL server containers are finished being spun up when they're not and so the MySQL shell container complains when it can't connect. This requires using a "wait-for" script to properly wait for containers to be set up.
  • I can also clean up the repo to bring more organization
  • the service built with Python is really primitive and doesn't do much. This can be enhanced, but I just need something that tests basic DB connections
  • the Python image is huge and can be simplified by building app as a standalone binary in a builder image and copying it into a minimal docker image
    • the pip install command in Dockerfile installs a lot of unnecessary packages that are necessary for deving locally but not for packaging the app

About

Focuses on enabling telemetry, CI/CD, and high-availability through various DevOps tools for a simple Python Bottle server.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published