Deployment
First, to launch the relevant extension services, the namespace must be consistent, set example as the namespace, create a database example for MongoDB, and deploy in the following order:
If you have higher security needs, you can change the following environment variables and ConfigMap to Secret and then mount them.
Create Collector
Set up the database and NATS cluster you need to connect to, or add multiple replicas to it.
apiVersion: apps/v1
kind: Deployment
metadata:
name: collector
spec:
selector:
matchLabels:
app: collector
template:
metadata:
labels:
app: collector
spec:
containers:
- image: registry.cn-shenzhen.aliyuncs.com/weplanx/collector:latest
imagePullPolicy: Always
name: collector
env:
- name: MODE
value: release
- name: NATS_HOSTS
value: nats://nats.nats.svc:4222
- name: NATS_NKEY
value: <*** your nats nkey***>
- name: DATABASE_URL
value: mongodb+srv://example:123456@exp.xxxx.mongodb.net/?readPreference=secondaryPreferred&tls=true&authSource=example
- name: DATABASE_NAME
value: exampleCreate Schedule
Add a 0 Schedule Node, NODE definitions must remain unique.
Create Worker
Also add multiple replicas.
Create ConfigMap
Define default.values.yml.
The configuration name is the Snake Case of dynamic configuration, for example:
Define environment variables
Create Initializer
Mounting initialize configuration, and fill in the relevant environement variables to start initialize Job.
Create Administrator
Continue the previous Job to modify part of the configuration, and then start
uUsername, must be emailpInitial password
Create App
Fill in the relevant environement variables, start the application, and add multiple replicas to it
Apply Service
Apply Service for App Pods
Apply Ingress
Setting up Traefik security headers and cross-domain middleware for application Ingress
Apply Ingress, integration middleware and services
If XAPI must go through extranet, you can use ipWhiteList and basicAuth middleware, for example
Set Ingress again
Front-end static pages
There is no need for SEO, the SSR method is not considered.
The front-end uses static PWAs, so you need to clone the console project and install dependency.
Modify the configuration that needs to be deployed in the project environments/environment.ts, and execute the build
After that, any static deployment method can be used https://angular.io/guide/deployment.
You can also use object storage, and then use the CDN back to the source to speed up its implementation.
Last updated
Was this helpful?