GithubHelp home page GithubHelp logo

allefebv / cloud-1 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 11.36 MB

:books: devops - iac

Shell 0.08% PHP 56.32% Dockerfile 0.58% JavaScript 29.29% CSS 1.05% HCL 12.31% Python 0.38%
iac devops deployment provisionning ansible terraform aws kubernetes

cloud-1's Introduction

cloud-1

📚 school project to discover cloud environments (provisioning / configuration / deployment)

Overview

This project uses various technologies to deploy a previously realized school project website (camagru) in kubernetes, both locally and in the cloud, on AWS.

Technologies used

  • Vagrant
  • Terraform
  • Ansible
  • Kubernetes (Kubeadm, Flannel, Ingress-nginx, Metallb)
  • AWS (Route53, RDS, EC2, ELB, S3, ACM, KMS)

Provisionning

local

I wanted to deploy a local k8s cluster that would mimic closely a cloud k8s cluster.
To achieve that, I chose vagrant to spin up vms, 1 for the master, 2 as nodes (workers)

cloud

I chose AWS as it's the most used cloud provider as of today.
I used terraform to provision AWS resources neccessary to deploy a minimal self-managed k8s cluster (2 t2.micro ec2, 1 master, 1 node)

Configuration and Deployment

I used ansible to configure k8s and deploy my app to local and cloud environments, with two main roles and subroles :

  • configuration : k8s cluster creation
  • deployment: spin up the k8s resources to make the app run

playbook usefull tags

  • --skip-tags
    • cloud
    • local
    • first-run
  • --tags
    • config
    • deployment
      • db
      • pma
      • dashboard
      • app

cloud-1's People

Contributors

allefebv avatar

Watchers

 avatar

Forkers

tonystark0122

cloud-1's Issues

Local k8s cluster initialization

Networking troobleshooting

Pods on the same node can communicate through IP directly
Pods on different nodes cannot communicate through IP

Same node == bridge
Different node == flannel
=> FLANNEL ISSUE

Was using the default interface, eth0, instead of eth1

automate this in the ansible files

Real SSL Certificate

  • ok for app manually

    • ingress-controller config TODO in file definition
  • ok for pma

    • but error message
  • dashboard not working

  • config for cloud only, make it variable local/cloud

Nice to have :

  • Php code compatible local and cloud
  • SSL between DB <-> app/pma
  • kubeadm config in file instead of cmd line
  • Dashboard in cloud

Ingress + domain name

SECURITY

  • Use git filter branch to delete sensitive informations

  • AWS keys

  • DockerHUB keys

  • No passwords in clear

  • DB is not accessible from the internet

Externalize config variables as much as possible

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.