Automating Deployment of Flask and PostgreSQL on KVM with Terraform and Ansible

This page summarizes the projects mentioned and recommended in the original post on dev.to

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
Sevalla - Deploy and host your apps and databases, now with $50 credit!
Sevalla is the PaaS you have been looking for! Advanced deployment pipelines, usage-based pricing, preview apps, templates, human support by developers, and much more!
sevalla.com
featured
  1. terraform-provider-libvirt

    Terraform provider to provision infrastructure with Linux's KVM using libvirt

    we will use the libvirt provider with Terraform to deploy a KVM Virtual Machine.

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. Ansible

    Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy and maintain. Automate everything from code deployment to network configuration to cloud management, in a language that approaches plain English, using SSH, with no agents to install on remote systems. https://docs.ansible.com.

    Hi, in this post, we will use Libvirt with Terraform to provision 2 KVM locally and after that, we will Deploy Flask App & PostgreSQL using Ansible.

  4. Docker Compose

    Define and run multi-container applications with Docker

    --- - name: Run update ansible.builtin.apt: name: aptitude state: latest update_cache: true - name: Install dependencies ansible.builtin.apt: name: - net-tools - apt-transport-https - ca-certificates - curl - software-properties-common - python3-pip - virtualenv - python3-setuptools - gnupg-agent - autoconf - dpkg-dev - file - g++ - gcc - libc-dev - make - pkg-config - re2c - wget state: present update_cache: true - name: Add Docker GPG apt Key ansible.builtin.apt_key: url: https://download.docker.com/linux/ubuntu/gpg state: present - name: Add repository into sources list ansible.builtin.apt_repository: repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename }} stable state: present filename: docker - name: Install Docker ansible.builtin.apt: name: - docker-ce - docker-ce-cli state: present update_cache: true - name: Add non-root to docker group user: name: ubuntu groups: [docker] append: true - name: Install Docker module for Python ansible.builtin.pip: name: docker - name: Install Docker-Compose ansible.builtin.get_url: url: https://github.com/docker/compose/releases/download/1.29.2/docker-compose-Linux-x86_64 dest: /usr/local/bin/docker-compose mode: '755' - name: Create Docker-Compose symlink ansible.builtin.command: cmd: ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose creates: /usr/bin/docker-compose - name: Restart Docker ansible.builtin.service: name: docker state: restarted enabled: true

  5. Flask_TODO

    Next, create main.yml in tasks. With this file we will clone flask project, add compose file, replace config.py and create new container using docker compose:

  6. that-i-write

    Nb: Project Repo: danielcristho/that-i-write

  7. Sevalla

    Deploy and host your apps and databases, now with $50 credit! Sevalla is the PaaS you have been looking for! Advanced deployment pipelines, usage-based pricing, preview apps, templates, human support by developers, and much more!

    Sevalla logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Introducing DevOps Toolkit CLI 🐳

    2 projects | dev.to | 31 Aug 2024
  • Flask Application Load Balancing using Docker Compose and Nginx

    2 projects | dev.to | 30 Jul 2023
  • My Django blog website doesn't have a 'like' button. How can I add one?

    1 project | /r/django | 1 Jan 2023
  • Need some theoretical clarity on Terraform vs AWS CDK

    1 project | /r/Terraform | 12 Dec 2022
  • Scenario based question for DevOps Engineers out there

    2 projects | /r/devops | 22 Nov 2022

Did you know that Python is
the 2nd most popular programming language
based on number of references?