Configure FastReport Corporate Server settings
Products: FastReport Corporate Server
This section describes how to configure the report server. It covers general information. For fine-tuning the server, please refer to admi_configguide. The configuration is saved in a secure Kubernetes repository. It is optimal to perform this operation before running the containers described in the fr-corporate-server section.
The basic parameters of the report server are defined below. For convenience, they are shown in a separate section. Possible options: put this fragment in a separate file and use dot operation to embed them in the configuration script. Or copy this fragment directly into the configuration script. It is possible to add export before each variable and export to environment variables.
The value of the MONGO_HOST (or FERRET_HOST) variable can be checked in Kubernetes Dashboard - it corresponds to the service name and its namespace separated by a dot. To successfully start the report server, you need a license - a special string describing the rights to use the report server. You can obtain it from the Fast Reports Inc. company.
The values of MONGO_USER and MONGO_PASS (or FERRET_USER and FERRET_PASS) parameters must correspond to the same parameters specified when installing MongoDB.
MongoDB variant:
NAMESPACE=fr-corporate-server
CLOUD_ENV=prod
## You can set any password and username you want, as long as they match the ones you set when installing MongoDB.
## MONGO_DB must be admin.
## However, there are rules for setting the host name¾it is formed from the service name and the namespace in which MongoDB is registered.
MONGO_HOST=fr-mongo-mongodb.mongo
MONGO_USER=root
MONGO_PASS=mxzgrkGvvk
MONGO_DB=admin
## The following parameters are best left unchanged HERE. The host and username are set automatically, and the
## password for RabbitMQ is generated automatically during installation and stored in the Kubernetes secrets repository.
RABBITMQ_HOST=rabbitmq.rabbitmq.svc.cluster.local
# RABBITMQ_HOST=rabbitmq-0.rabbitmq-headless.rabbitmq
RABBITMQ_USER=user
RABBITMQ_PASS=$(kubectl get secret --namespace rabbitmq rabbitmq -o jsonpath="{.data.rabbitmq-password}" | base64 --decode)
## The developers claim that any sequence of characters can be here. And the length is not defined.
## The following values were used for the test and the installation was successful
DESIGNER_SECRET=yXgQDpNzohhN3dAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHrXiepieQtOaLwdqfRijMaZwy5p27tho7XK4C
WORKER_SECRET=9bYuYu4cvt73oWD3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5Z6i6pRzkR8mKGL1pTRnns3P0cIxzTuVu
GATEWAY_SECRET=R0jEINg6OA4TssyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY46ZtsYowI7gB9yteZNMSvPoL6sGgiWC4
SCHEDULER_SECRET=fcfFZNWC3zyBmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5gD2MeexV3svLdy87qC6bX3bM2W6mZjRC
## The license obtained from Fast Reports Inc. must be entered in this variable. Unfortunately, the report server will not work without a license.
## Do not use quotation marks.
LICENSE=
## The MongoDB connection string is automatically generated based on the previously defined variables. It is better not to change anything here.
MONGO_ACCESS="mongodb://$MONGO_USER:$MONGO_PASS@$MONGO_HOST:27017/"
CONNECTION_STRING="$MONGO_ACCESS?authSource=$MONGO_DB&readPreference=primary&appname=MongoDB%20Compass&ssl=false&maxPoolSize=100&waitQueueMultiple=100"
FerretDB variant:
NAMESPACE=fr-corporate-server
CLOUD_ENV=prod
## You can set any password and username you want, as long as they match the ones you set when installing FerretDB.
## FERRET_DB must be admin.
## However, there are rules for setting the host name¾it is formed from the service name and the namespace in which FerretDB is registered.
FERRET_HOST=fr-ferret.ferret
FERRET_USER=any_name
FERRET_PASS=ferret_password
FERRET_DB=admin
## The following parameters are best left unchanged HERE. The host and username are set automatically, and the
## password for RabbitMQ is generated automatically during installation and stored in the Kubernetes secrets repository.
RABBITMQ_HOST=rabbitmq.rabbitmq.svc.cluster.local
# RABBITMQ_HOST=rabbitmq-0.rabbitmq-headless.rabbitmq
RABBITMQ_USER=user
RABBITMQ_PASS=$(kubectl get secret --namespace rabbitmq rabbitmq -o jsonpath="{.data.rabbitmq-password}" | base64 --decode)
## The developers claim that any sequence of characters can be here. And the length is not defined.
## The following values were used for the test and the installation was successful
DESIGNER_SECRET=yXgQDpNzohhN3dAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHrXiepieQtOaLwdqfRijMaZwy5p27tho7XK4C
WORKER_SECRET=9bYuYu4cvt73oWD3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5Z6i6pRzkR8mKGL1pTRnns3P0cIxzTuVu
GATEWAY_SECRET=R0jEINg6OA4TssyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY46ZtsYowI7gB9yteZNMSvPoL6sGgiWC4
SCHEDULER_SECRET=fcfFZNWC3zyBmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5gD2MeexV3svLdy87qC6bX3bM2W6mZjRC
## The license obtained from Fast Reports Inc. must be entered in this variable. Unfortunately, the report server will not work without a license.
## Do not use quotation marks.
LICENSE=
## The FerretDB connection string is automatically generated based on the previously defined variables. It is better not to change anything here.
FERRET_ACCESS="mongodb://$FERRET_USER:$FERRET_PASS@$FERRET_HOST:27017/"
CONNECTION_STRING="$FERRET_ACCESS?authSource=$FERRET_DB&readPreference=primary&appname=MongoDB%20Compass&ssl=false&maxPoolSize=100&waitQueueMultiple=100"
Register the report server namespace in the cluster:
kubectl create namespace $NAMESPACE
Create the minimum configuration of the report server:
cat <<EOF | kubectl apply -n $NAMESPACE -f -
apiVersion: v1
kind: ConfigMap
metadata:
name: fast-report-config
data:
appsettings.Production.json: |
{
"Auth": {
"UseOpenId": false,
"UseLocal": true
},
"MainConfig": {
"InternalHeaders": {
"$WORKER_SECRET": "000000000000000000000001",
"$DESIGNER_SECRET": "000000000000000000000002",
"$GATEWAY_SECRET": "000000000000000000000003",
"$SCHEDULER_SECRET": "000000000000000000000004"
},
"License": "$LICENSE",
"Server": {
"Title": "FastReport Corporate Server",
"CorporateServerMode" : true
},
"Rabbit": {
"Host": "$RABBITMQ_HOST",
"Port": 5672,
"UserName": "$RABBITMQ_USER",
"Password": "$RABBITMQ_PASS",
"QueueName": "ReportProcessQueue",
"DirectExchangeName": "DirectEx",
"AlternateExchangeName": "AExchange",
"UnroutedQueueName": "Default",
"Capacity": 1
},
"Database": {
"ConnectionString": "$CONNECTION_STRING",
"DatabaseName": "$MONGO_DB"
}
},
"Gateway": {
"BackendUrl": "http://fr-backend.$NAMESPACE:80",
"InternalKey": "$GATEWAY_SECRET",
"SignInPagePath": "/account/signin?r={0}",
"MaxConcurrentRequests": 200,
"RequestQueueLimit": 5000
},
"Serilog": {
"MinimumLevel": {
"Default": "Debug"
}
},
"Services": {
"Items": {
"OnlineDesigner": {
"Namespace": "$NAMESPACE"
},
"Backend": {
"Namespace": "$NAMESPACE"
},
"FrontendApp": {
"Namespace": "$NAMESPACE"
},
"Fonts": {
"Namespace": "$NAMESPACE"
},
"StaticPreviewApp": {
"K8sServiceName": "fr-s-preview",
"Namespace": "$NAMESPACE",
"HostType": "WebApp",
"PathBase": "/staticpreview",
"Type": "K8s",
"PingPath": "/staticpreview/",
"IsSignInRequired": false,
"Priority": 21
},
"Default": {
"Namespace": "$NAMESPACE"
},
"HomerApp": {
"Namespace": "$NAMESPACE",
"WhiteListClaims": {
"cloud_service_access": "super_user"
}
}
}
},
"Designer": {
"BackendUrl": "http://fr-backend.$NAMESPACE:80",
"InternalKey": "$DESIGNER_SECRET"
},
"WorkerCore": {
"BackendUrl": "http://fr-backend.$NAMESPACE:80",
"InternalKey": "$WORKER_SECRET"
},
"Scheduler": {
"BackendUrl": "http://fr-backend.$NAMESPACE:80",
"InternalKey": "$SCHEDULER_SECRET"
}
}
EOF
Using FerretDB change
"Database": {
"ConnectionString": "$CONNECTION_STRING",
"DatabaseName": "$MONGO_DB"
}
to
"Database": {
"ConnectionString": "$CONNECTION_STRING",
"DatabaseName": "$FERRET_DB"
}
Please note, the above shell script contains basic settings that have been tested by the developers. When deploying the report server for the first time, it is recommended to use them to make sure that the server works. Before changing the settings, save this version, thus you will save a lot of time when fine-tuning the server using the parameters described in the admin_config section.