Giter Club home page Giter Club logo

node-3tier-app's Introduction

Node Three Tier Application

About

This repo contains code for a Node.js multi-tier application.

The application overview is as follows

web <=> api <=> db

The folders web and api respectively describe how to install and run each app.

Preperation

  • [ ] Dockerfile
  • [ ] Terraform codebase
  • [ ] gcloud automation
    • [ ] project creation
    • [ ] permission fixes
    • [ ] enable api
  • [ ] Automate gitlab ci variables
  • [ ] Instrumentation
    • [ ] prometheus

Technology Used

itemsremarks
GKEfree (300$ credits) and more mature than EKS
terraformeasier to build cluster from code, test it and nuke it later
Makefileeasier to prepare and streamline the demo
cloudsqlavoid dealing with persistent state onk8s cluster and other HA configuration
gitlab-cieasy and straight forward ci/cd also free for demo
CloudBuildto build the container images
stackdriverlog the error on application
Google CDNcaching the static resources
lokijust for tryout, its simple straight forward logging solution

CI Configs

variables

Since we use rely on env vars for ci/cd on .gitlab-ci.yml, set thes on Setting -> CI/CD on gitlab.

  • CERTIFICATE_AUTHORITY_DATA
  • SERVER
  • USER_TOKEN
  • GCLOUD_SERVICE_KEY

Code build

We are using google cloud codebuild, to do the setup,

  • create a service account for ci_builder on gcloud console. Needed permission are: container builder, storage reader and log viewer
  • generate/download a json key somewhere: like /tmp/key.json
  • use its base64 encode version on gitlab ci_cd variable: GCLOUD_SERVICE_KEY
    base64 -w 0 /tmp/key.json
        

node-3tier-app's People

Contributors

thapakazi avatar namikplivcic avatar

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.