GithubHelp home page GithubHelp logo

simple-api's Introduction

Simple-API

Sample API for Automation Project

Features

Branch protection:

  • Protection rules are enabled for main ( Production ) and development branches, ensuring no one can commit directly to them. Instead, a new branch has to be created for each new feature as pull requests are the only thing accepted in protected branches.

Github actions:

  • Tests: This script workflow ensures that the docker image can be built correctly and is in charge of running the tests. It executes on every push to development branch and in pull requests to main.

  • Docker_build_and_push: This workflow executes whenever the main is modified and is in charge of pushing the new production images to dockerhub repository updating its tags. It uses github secrets for logging to docker hub and github.run_number to update tags.

Tests:

  • Sample tests with pytest for a more realistic CI/CD workflow.

Docker:

  • Container based project for reproducibility, maintainability, and fit into a microservices ecosystem. The dockerfile is written using best practices, for better readability, maintainability, and shorter build times.

Kubernetes:

  • Kubernetes manifests that deploy and manage the API, create a service and an ingress load balancer that exposes the api and assing the /api endpoint.
  • Kubernetes manifests that create and manage jenkins and sonarqube
  • configmaps, pv, pvc, deployments, services, secrets...

AWS:

  • t3.medium instance to ensure we dont run low on resources.
  • Instance type = spot instance (74% savings compared to aun demand EC2)
  • run.sh script used on the first boot of the instance.
  • Security group assigned to the instance that ensures that i am the only one taht can acces via ssh, thus guaranteeing the safety of this.
  • Minikube as kubernetes cluster.

Terraform:

  • Used to automate the creation of AWS EC2 spot instance.
  • It makes use of vars and a local file named terraform.tfvars(not uploaded) that contains the keys and passwords required to generate the instance with my IAM user, this is an important security feature.

Shell scripts:

  • This allows us to deploy and setup all the project with just a sh run.sh command.

Problems found:

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.