Skip to content
中文

Deploy Middleware

1. Deployment Preparation

Before deployment, prepare the following resources:

Control Node

  • Requires root or equivalent privileged account;
  • All deployment packages and tools used during deployment must be uploaded to this server;
  • This server does not require internet access;
  • Requires CentOS 7.9 or Ubuntu 22.04 or later;
  • Requires Intel x86_64 architecture hardware;
  • The control node must maintain all port connectivity with all "deployment targets" (or minimum state).

Installation Packages

  • Ansible offline dependency package:
bash
Centos: https://temp-1251849568.cos.ap-guangzhou.myqcloud.com/download/ansible/os/centos/ansible-centos-7-x86-1.0.1.tar.gz

Ubuntu: https://temp-1251849568.cos.ap-guangzhou.myqcloud.com/download/ansible/debian/ansible-ubuntu-x86-22.04.20240628.tar.gz
  • Ansible Playbook:
bash
https://temp-1251849568.cos.ap-guangzhou.myqcloud.com/download/ansible/finclip-deploy-ansible-master.tar.gz
  • RKE2 installation package:
bash
https://temp-1251849568.cos.ap-guangzhou.myqcloud.com/download/ansible/rke2/1.26.12-rke2r1.tar.gz
  • Rancher image package:
bash
https://temp-1251849568.cos.ap-guangzhou.myqcloud.com/download/ansible/images/rancher-images-x86-2.7.10.tar.gz
  • Infrastructure service image package:
bash
https://temp-1251849568.cos.ap-guangzhou.myqcloud.com/download/ansible/images/stateful-images-x86-1.0.2.tar.gz
  • FinClip component image package
bash
Please request the latest version from FinoGeeks personnel;
  • FinClip orchestration Helm Chart
bash
Please request the latest version from FinoGeeks personnel;
  • License certificate file
bash
Provided by FinoGeeks personnel;

2. Environment Initialization

After uploading the Ansible Playbook, Rancher image package, middleware image package, FinClip component image package, and FinClip orchestration Helm provided by FinoGeeks to the control node, execute the following commands in sequence to install dependencies:

  • Extract and move compressed packages
bash
# Create deployment directory
mkdir -p /data/finclip-installation
# Extract playbook
tar xvf finclip-deploy-ansible-master.tar.gz -C /data/finclip-installation
# Centos
tar xvf ansible-centos-7-x86-1.0.1.tar.gz -C /data/finclip-installation/finclip-deploy-ansible-master/
# Ubuntu
tar xvf ansible-ubuntu-x86-22.04.20240628.tar.gz -C /data/finclip-installation/finclip-deploy-ansible-master/
# Move image packages
mv 1.26.12-rke2r1.tar.gz rancher-images-x86-2.7.10.tar.gz stateful-images-x86-1.0.2.tar.gz monitor-57.2.0.tar.gz log-image.tar.gz /data/finclip-installation/finclip-deploy-ansible-master/
  • Switch to deployment directory
bash
cd /data/finclip-installation/finclip-deploy-ansible-master/
  • Install Python3, pip3, and related dependencies
bash
bash /data/finclip-installation/finclip-deploy-ansible-master/files/install_python3-with-pip.sh
  • Install Ansible and related dependencies
bash
bash /data/finclip-installation/finclip-deploy-ansible-master/files/install_ansible.sh
  • Environment check

After installation is complete, you can use the command pip3 -V to verify whether pip3 was installed successfully.

Ansible can be verified using ansible --version to check if installation was successful.

3. Configure Ansible Playbook

Configure Ansible Playbook on the control node

Return to the installation package directory and execute the following commands in sequence to prepare Ansible Playbook

  1. Switch to directory

cd /data/finclip-installation/finclip-deploy-ansible-master/

  1. Copy inventory file

cp inventory.example inventory

  1. Open inventory file and assign IPs under [Role]
RoleDescriptionMinimum Nodes / Recommended Nodes
registryPrivate Docker image registry1 / 1
redis_clusterRedis cluster0 / 3 or more
mysqlMySQL cluster0 / 2 or more
minioMinIO cluster + erasure coding mode0 / 4 or more
rke_workerKubernetes cluster Worker nodes0 / 3 or more
rke_controlplaneKubernetes cluster control nodes0 / 3 or more

Minimum: Indicates that the component can accept running with this number of nodes;

Recommended: Indicates that for standard deployment, it is recommended to deploy with this number of nodes;

registry: Private Docker image registry used during deployment. This is a temporary component. After deployment is complete, it is recommended to transfer all images to your own image registry;

More: Represents the service indicated by the role. If there are special needs, you can allocate more nodes than this quantity.

Prepare SSH Authentication Information

Execute the following commands in sequence to prepare SSH authentication information

  • Generate SSH Public Key

Execute command on control node: ssh-keygen, follow the command prompts. If no custom configuration is needed, continuously press [ENTER] to set defaults. When the following randomart image appears, it means the SSH Public Key has been generated successfully.

  • Distribute SSH Public Key

Execute command: ssh-copy-id -i /root/.ssh/id_rsa.pub [user]@[IP address]

All machines need distribution. Please replace [user] and [IP address] according to actual situation, e.g., root@10.0.0.1.

  • Switch to Ansible directory

Execute command: cd /data/finclip-installation/finclip-deploy-ansible-master/

  • Test SSH connectivity

Execute command: ansible all -m ping

Confirm all responses show "[IP address] | SUCCESS" and "ping: pong".

Standardized Infrastructure Deployment

By default, all content is deployed under the /data/finclip directory

If modification is needed: Edit /data/finclip-installation/finclip-deploy-ansible-master/roles/deploy/vars/default.yaml file, modify the persistent_dir_prefixe: "/data/finclip" variable

After confirming the role assignment in the inventory file is correct, execute the following commands to automatically deploy middleware and infrastructure services through Ansible

  • Switch to Ansible directory

cd /data/finclip-installation/finclip-deploy-ansible-master/

  • Execute Ansible Playbook for deployment

ansible-playbook deploy.yaml | tee setup.log

Deployment typically takes 30-40 minutes. If the following information appears, it indicates deployment is complete:

After deployment completes, logs are saved in the current directory's setup.log file

Get authentication and connection address information for MySQL, Redis, Registry, MinIO, and other middleware

cat /data/finclip-installation/finclip-deploy-ansible-master/note.txt

Get key information for Rancher, Grafana, etc.;

cat /data/finclip-installation/finclip-deploy-ansible-master/.secret.yaml

Get authentication information for ElasticSearch, where the "elastic" user is the business user.

cat /root/esAuth

Note: For Helm deployment of FinClip, you only need to view the information in note.txt.

Deploy FinClip

1. FinClip Deployment Resource Preparation

Import Images

Return to the installation package directory. Execute the following command on the control node to import the FinClip component image package provided by FinoGeeks and upload to the Registry repository:

bash
for i in `docker load -i images.tgz |awk '{print $NF}'` ; do docker tag $i `echo $i|awk -F '/' '{print "registry.finogeeks.internal:5000/"$(NF-1)"/"$NF}'` ; docker push `echo $i|awk -F '/' '{print "registry.finogeeks.internal:5000/"$(NF-1)"/"$NF}'` ;done

Create finclip namespace

Execute the following command on the control node:

kubectl create namespace finclip

Create imagePullSecrets

Create required credentials for pulling container images from the Registry repository. Execute the following command on the control node to create:

kubectl create secret generic finclipro --from-file=.dockerconfigjson=/root/.docker/config.json --type=kubernetes.io/dockerconfigjson -n finclip

2. Deploy FinClip

Modify Helm Deployment Files

Return to the installation package directory and extract the Helm chart package provided by FinoGeeks personnel.

Connection information and authentication need to be modified to match actual environment requirements.

  1. Edit license file

Enter the FinClip orchestration Helm chart directory and modify the "FinoGeeks-POC-F-01_20240513_license.txt" file with the correct license key

  1. Edit values.yaml

Enter the FinClip orchestration Helm chart directory, edit the values.yaml file, delete old data service information, copy redis, mysql, objectStorage, and elasticsearch information from /data/finclip-installation/finclip-deploy-ansible-master/note.txt and paste directly into the values.yaml file.

Use sed command to modify repository address

bash
sed -i 's@docker.finogeeks.club/mop@registry.finogeeks.internal:5000/mop@g' values.yaml
sed -i 's@docker.finogeeks.club/infra@registry.finogeeks.internal:5000/infra@g' values.yaml

Start FinClip Service

Execute on deployment machine (control node)

Use cd command to switch to FinClip orchestration Helm chart directory: finclip-chart (directory name varies by version)

Execute command to start service: Helm install finclip . -n finclip

After startup completes, check if pod status is running: kubectl get pod -n finclip

Other Command Reference:

Update after configuration changes: Helm upgrade finclip . -n finclip

Uninstall: Helm uninstall finclip -n finclip

Access Verification

Portal NameAccess LinkInitial AccountDescription
Operations Centerhttp://IP:PORT/ops#/adminPORT: port number, default 30001, IP: server IP address, e.g., 172.217.163.46
Developer Centerhttp://IP:PORT/dev#/Self-registration

Video Tutorial

Access URL: Cluster Deployment

Digital Ecosystem Infrastructure.