Deployment Preparation
Before deployment, the following resources need to be prepared:
Server Resources
| Resource | Configuration | Version | Notes |
|---|---|---|---|
| K8S Platform | namespace resource quota: 8C16G or above | 1.20+ | |
| MySQL | CPU: 8 cores Memory: 16GB Storage: 200GB | 5.7/8.0+ | Deployment mode: Master-slave Database name: finclip # Separate database, other names can be used User: finclip # Has all privileges on finclip database, other usernames can be used Character set: utf8mb4 Collation: Case-insensitive |
| Redis | Memory: 16GB | 6.2 | Single master-slave or sharded cluster mode |
| S3 Object Storage | Storage: 200GB | - | Requires the following information Connection address bucket access_key secret_key |
| Network | External access port: 30001 | - | Access port needs to be opened, can be modified |
| Domain (optional) | - | - | Domain name resolution needs to be configured in advance |
| HTTPS Certificate (optional) | - | - | Certificate needs to be prepared in advance |
- FinClip Component Image Package
bash
Request the latest version from FinClip personnel;- FinClip Helm Chart
bash
Request the latest version from FinClip personnel;- License file
bash
Issued and provided by FinClip personnel;- Deployment Tools
bash
Linux operations server
docker, kubectl, helm toolsOffline Image Import (Private Registry)
After copying FinClip Component Image Package and FinClip chart package to the operations server, log in to the operations server
- Import offline images
bash
## Replace registry.finogeeks.internal:5000/mop/ with internal registry address, use the following command to batch import
for i in `docker load -i images.tgz |awk '{print $NF}'` ; do docker tag $i `echo $i|awk -F '/' '{print "registry.finogeeks.internal:5000/mop/"$NF}'` ; docker push `echo $i|awk -F '/' '{print "registry.finogeeks.internal:5000/mop/"$NF}'` ;done- Create namespace finclip
bash
kubectl create namespace finclipCreate imagePullSecrets (credentials for pulling private registry images)
secret name: finclipro, or use existing credentials
bash
kubectl create secret generic finclipro --from-file=.dockerconfigjson=/root/.docker/config.json --type=kubernetes.io/dockerconfigjson -n finclipModify Configuration Files
Extract FinClip chart package and enter the relevant directory
- Modify license file
bash
License is provided by FinClip personnel, simply copy and paste the content- Modify values.yaml deployment file
bash
# 1. Modify image address
## Replace docker.finogeeks.club/mop with internal registry address
## For example
apps:
access_api: docker.finogeeks.club/mop/access-api:v1.15.1
## Change to
apps:
access_api: registry.finogeeks.internal:5000/mop/access-api:v1.15.1
# 2. Modify image pull credentials (imagePullSecrets)
imagePullSecrets:
- name: finclipro # Change to corresponding credential name
# 3. Modify data service account password
cdn:
enabled: false
url: https://cdn.aliyun.com # Change to CDN address, CDN address points directly to origin
uri: /api/v1/mop/runtime/download/ # Default path, no modification needed
# 4. Modify data service account password
gateway:
gw_node_port: 30001 # Open all routes
gw_api_node_port: 30002 # Only open mini-program runtime related interfaces
# 5. Modify data service account password
## MySQL configuration modification
mysql:
host: mysql # Database address, e.g., 192.168.1.1
port: 3306 # Database port number, default is 3306
username: 'finclip' # Database login account
password: 'password' # Database login password
dbname: finclip # Database name, stores application data
## Redis configuration modification
redis:
mode: single # Redis running mode, choose single (single node) or cluster (cluster mode)
addr: redis:6379 # Redis address information. For single node mode: `<host>:<port>`, for cluster mode: multiple addresses separated by commas, e.g.: 192.168.1.1:7000,192.168.1.1:7001,192.168.1.2:7000,192.168.1.2:7001,192.168.1.3:7000,192.168.1.3:7001
password: password # Redis password, leave empty if Redis doesn't have password authentication enabled
username: "" # Default is empty
## Storage configuration modification, following is minio mode configuration
storage:
mode: minio # Storage type, options: minio (local object storage), tencent_cos (Tencent Cloud COS), ali_oss (Alibaba Cloud OSS), aws_s3 (Amazon S3)
endpoint: minio:9000 # Object storage access address, e.g., MinIO service address and port
bucket: finclip # Object storage bucket name, must be created with appropriate permissions
access_key: finclip # Object storage access key (Access Key), must match storage service configuration
secret_key: password # Object storage secret key (Secret Key), used to authorize access to storage service
use_ssl: false # Whether to enable SSL secure access, default is false. If storage service has HTTPS enabled, set this to true
#region: ap-northeast-1 # aws configurationHelm Deployment
After completing configuration modifications, use helm command to start finclip services
bash
# Install finclip
helm install finclip . -n finclip
## View pods
kubectl -n finclip get podAccess Verification
- Check container status is Running
kubectl get pod -n finclip
- Login verification, service exposes port 30001 via nodeport
| Website Name | Access Link | Initial Account | Description |
|---|---|---|---|
| Operations Center | http://IP:PORT/ops/ | admin | PORT: Port number, default 30001, IP: K8S server IP address, e.g.: 172.217.163.46 |
| Dev Center | http://IP:PORT/dev/ | Self-register |
