当前位置: 首页 > 软件库 > 云计算 > 云原生 >

Microservices-with-Node-JS-and-React

授权协议 Readme
开发语言 Google Go
所属分类 云计算、 云原生
软件类型 开源软件
地区 不详
投 递 者 司马洲
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

[Stephen Grider] Microservices with Node JS and React [ENG, 2020]

Build, deploy, and scale an E-Commerce app using Microservices built with Node, React, Docker and Kubernetes


My Updatable Version of the final project from this course



How to run apps

I am working in ubuntu linux 18.04.

Minikube, Kubectl, Docker, Skaffold should be installed.


Skaffold installation

$ curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64

$ chmod +x skaffold
$ sudo mv skaffold /usr/local/bin

Run minikube

$ {
minikube --profile my-profile config set memory 8192
minikube --profile my-profile config set cpus 4

// minikube --profile my-profile config set vm-driver virtualbox
minikube --profile my-profile config set vm-driver docker

minikube --profile my-profile config set kubernetes-version v1.18.2
minikube start --profile my-profile
}

// Enable ingress
$ minikube addons --profile my-profile enable ingress

$ minikube --profile my-profile ip
172.17.0.2

$ sudo vi /etc/hosts
#---------------------------------------------------------------------
# Minikube
#---------------------------------------------------------------------
172.17.0.2 posts.com
172.17.0.2 ticketing.dev

How to run the final app1


$ 04_Orchestrating_Collections_of_Services_with_Kubernetes
$ cd skaffold

$ docker login

Need to update my docker image name webmakaka/grider-ms-app1*** to your in scripts from skaffold and k8s folders.

$ skaffold dev

$ kubectl get pods
NAME                              READY   STATUS    RESTARTS   AGE
client-depl-99b7fcdcb-jhttp       1/1     Running   0          3m22s
comments-depl-69578db79c-jzdnh    1/1     Running   0          3m22s
event-bus-depl-7c5b75b7f4-m5qw6   1/1     Running   0          3m22s
moderation-depl-d7b49bfbc-cgl2l   1/1     Running   0          3m22s
posts-depl-78647cffd4-7gtzx       1/1     Running   0          3m22s
query-depl-656f9b6b58-bv7g7       1/1     Running   0          3m22s

browser --> posts.com


How to run the final app2


$ kubectl create secret generic jwt-secret --from-literal=JWT_KEY=asdf

// <STRIPE_SECRET_KEY> from stripe.com
$ kubectl create secret generic stripe-secret --from-literal=STRIPE_KEY=<STRIPE_SECRET_KEY>

$ cd 22_Back_to_the_Client
$ cd skaffold

$ docker login

Need to update my docker image name webmakaka/grider-ms-app2*** to your in scripts from skaffold and k8s folders.

$ skaffold dev

$ kubectl get pods
NAME                                           READY   STATUS    RESTARTS   AGE
auth-deployment-57d779fd9-48s9v                1/1     Running   0          24s
auth-mongo-deployment-579c6dbd8f-69jbv         1/1     Running   0          23s
client-deployment-f5cfc5b8d-k2lxp              1/1     Running   0          23s
expiration-deployment-6bb67856b4-jkkbl         1/1     Running   0          23s
expiration-redis-deployment-5b58b869fd-hmq5f   1/1     Running   0          23s
nats-deployment-76479997ff-lpss8               1/1     Running   0          23s
orders-deployment-5c68dff5c9-dq6hl             1/1     Running   0          23s
orders-mongo-deployment-6896c8b9-42vpd         1/1     Running   0          23s
payments-deployment-68d4c7f4ff-nfsxb           1/1     Running   0          23s
payments-mongo-deployment-c89cb4fc7-4ggn7      1/1     Running   0          23s
tickets-deployment-7b746fff9-tvhzw             1/1     Running   0          23s
tickets-mongo-deployment-54f456bd95-hv9fb      1/1     Running   0          22s

chrome browser --> https://ticketing.dev/


type: thisisunsafe in the browser window with security warning.


Expected result:


Delete minikube with project

$ minikube --profile my-profile stop && minikube --profile my-profile delete


Development step by step


App1

02. A Mini-Microservices App

03. Running Services with Docker (Docker Basics. Nothing Interesting)

04. Orchestrating Collections of Services with Kubernetes


App2

05. Architecture of Multi-Service Apps

06. Leveraging a Cloud Environment for Development (Optional Section, Skipped)

07. Response Normalization Strategies

08. Database Management and Modeling

09. Authentication Strategies and Options

10. Testing Isolated Microservices

11. Integrating a Server-Side-Rendered React App

12. Code Sharing and Reuse Between Services

13. Create-Read-Update-Destroy Server Setup

14. NATS Streaming Server - An Event Bus Implementation

15. Connecting to NATS in a Node JS World

16. Managing a NATS Client

17. Cross-Service Data Replication In Action

18. Understanding Event Flow

19. Listening for Events and Handling Concurrency Issues

20. Worker Services

21. Handling Payments

22. Back to the Client

23. CI/CD (I will not deploy app to clouds)




Marley

Any questions in english: Telegram Chat
Любые вопросы на русском: Телеграм чат

 相关资料
  • Problem You want to test your web.py application. Solution from paste.fixture import TestApp from nose.tools import * from code import app class TestCode(): def test_index(self): middlewa

  • 我有一句台词是这样的: $CAS是包含1到n个元素的数组,目前搜索工作不正常。有没有办法将orFilterWhere与数组一起使用,或者我必须使用foreach循环?

  • Utilities for working with threads and Futures. Futures are a pattern for concurrent programming introduced in Python 3.2 in the package. This package defines a mostly-compatible class designed for us

  • 8.1 Models and Planning By amodelof the environment we mean anything that an agent can use to predict how the environment will respond to its actions The wordplanningis used in several different ways

  • Vert.x Service Discovery Vert.x Circuit Breaker Vert.x Config

  • When training a model, it’s often valuable to track and evaluate progress in real time. In this tutorial, you’ll learn how to use TensorFlow’s logging capabilities and the Monitor API to audit the in-