GithubHelp home page GithubHelp logo

goexpertsfrontend's Introduction

Repo for GoExperts frontend sources without a pipeline. You need to construct a new one.

  1. The resources for deployment the frontend should be first constructed by IaC tools like Terraform, CloudFormation, Ansible etc.
  2. DO NOT operate on the main branch directly. Checkout your own branch instead, e.g. feature/new_pipeline
  3. Compose your pipeline file and put them into cicd
  4. Build up a pipeline on cicd platforms like Jenkins, Travis CI, Github Actions and have a test. ...

P3项目开展建议

与developers共同参与开展P3项目,对DevOps来说是一次不可多得的锻炼机会。在时间允许情况下,DevOps可以自由选择部署工具(Jenkins, Github Action)、平台(AWS, GCP, Azure)、架构(EC2, ECS, GKE, AKS)和内容(frontend, backend, lambda),也可以选择手动或者通过IaC工具(Terraform, CloudFormation)完成资源的搭建,还可以搭建自己的监控系统来对上述资源和服务进行监控。

由于P3项目一般在2~3个月内完成,建议从易到难分成三个阶段:

Stage 1: Setup pipeline

(1) 选择一个cloud platform(AWS,GCP,Azure),手动建立前端、后端、lambda等cloud资源,如:

**前端:**bucket (S3/GCS..) + CloudFront + Route 53 + CloudWatch

**后端:**ECS+ALB+EC2(or Fargate) ASG+Route53+CloudWatch

Lambda: Api Gateway+ Lambda+ CloudWatch

(2) 编写pipeline(Jenkinsfile),能够实现手动运行代码拉取、build、docker镜像制作、以及服务的部署发布,并且测试前端和后端功能正常。建议顺序:frontend→backend→lambda

前端pipeline Stages:

image

后端pipeline Stages:

image

(3) pipeline实现代码merge能够自动触发执行(注意bitbucket和github中设置触发Jenkins的方式不同)

Stage 2: Buildup the resource through Terraform

在完成Stage 1基础上,通过Terraform实现Stage 1所有cloud资源(bucket, EC2,ECS等)的自动构建,把Stage 1的pipeline移植为把服务自动部署到Terraform搭建的资源中。

Terraform建议用modules+applications结构,把一些可复用模块放到modules中,部署文件放到applications中

image

Stage 3(挑战): Setup monitoring

搭建Elastic Stack,实现对上述平台和服务的监控

其它建议:

  1. AWS平台必做,有余力Azure和GCP再选一个实现
  2. Lambda的部署至少实现一个函数,有余力可以把整个backend做成lambda
  3. 至少实现一个cluster结构的backend,ECS(AWS,EKS因AWS free tier不涵盖,会产生费用,土豪随意), GKE(GCP,利用新用户3个月US$300的credit), AKS(Azure,新用户1个月US$200的credit)。
  4. CloudWatch尽量加上,有问题方便developers定位

样例架构1: AWS ECS with Fargate

image

样例架构2 AWS+GCP

image

goexpertsfrontend's People

Contributors

oyang21 avatar williamdjr 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.