Giter Site home page Giter Site logo

docker-dumb-app's Introduction

Dumb App AWS Deployment

Infra creation

Prereqs

  • packages : jq, terraform
  • local ssh key pair

Creation

  1. terraform init
  2. terraform apply [auto-approve]

Open ports are : 80, 8080, 22, 3000

Appli deployment

Bare VM

  1. Prereqs installation on ec2 instance
    1. node7 repo curl -sL https://rpm.nodesource.com/setup_7.x | bash -
    2. node7 package (! package manager aligned to AMI image used = yum) sudo yum update && sudo yum install -y nodejs
  2. App Deposit - Push app file scp app.js <ip>
  3. Launch App node app.js &

Docker (Preferred)

  1. Prereqs installation on ec2 instance
    • docker, git packages (! package manager aligned to AMI image used = yum)
  2. Image building
    1. git clone repo
    2. docker build on ec2 instance
  3. App deployment
    1. stop and suppr old container
    2. run new one

Cloud Builds (GCP)

Cloud Builds - Container Engine

Il va permettre de construire l'image docker à chaque commit sur le repo spécifié (ici Github)

Pour ce faire il faut connecter le dépôt Github sur GCP > Cloud Build

  • Authoriser Cloud Build à pull Github
  • Installer l'app Cloud Build dans le repo
  • Valider en créant un déclencheur le repo

L'output sera une image hebergée dans la registry GCP Test: en passant l'image de Privée à Publique, je peux la lancer en local

Il est possible ensuite de déployer cette image dans GCP GCE, GKE, ou Cloud Run

Configurer manuellement un déploiement sur Cloud Run est OK Il est possible d'activer un déploiement continu via Cloud Build Celui-ci va se déclencher au commit sur le Github, construire l'image et la déployer dans Cloud Run

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.