### Example Start Setting JSON Structure Source: https://next.informat.cn/doc/guide/script/bpmn.html An example JSON object representing the structure of the BpmnStartSetting returned by the getStartSetting function. This illustrates the configuration options for starting a process, including form settings and variable lists. ```json { "activityUserList": [], "enableStartForm": true, "formSetting": { "completeSetVarList": [], "enableShowProcessInfo": false, "formDesignerFieldSettingList": [], "id": "form", "localVariable": false, "tableFieldSettingList": [ { "editable": true, "id": "y68l84iidbr9l", "visible": true }, { "editable": true, "id": "vn4v208530vfj", "visible": true }, { "editable": true, "id": "gjkb3rq7q44wu", "visible": true }, { "editable": true, "id": "ceumuggdjze5i", "visible": true }, { "editable": true, "id": "t9416rt5uv818", "visible": true }, { "editable": true, "id": "a3rumke2j97m6", "visible": true } ], "tableId": "skwl7tkdsh650", "toolBarButtonList": [] }, "instanceToolbarButtonList": [], "startFormToolbarButtonList": [], "startVarList": [] } ``` -------------------------------- ### ceph-nano Cluster Start Command Help Source: https://next.informat.cn/doc/guide/install/example/installCephS3.html Displays help information and examples for the `cn cluster start` command, including options for specifying work directory, image, data storage, and size. ```bash [root@localhost ~]./cn cluster start -h Examples: cn cluster start mycluster cn cluster start mycluster -f tiny cn cluster start mycluster --work-dir /tmp cn cluster start mycluster --image ceph/daemon:latest-luminous cn cluster start mycluster -b /dev/sdb cn cluster start mycluster -b /srv/nano -s 20GB Flags: -d, --work-dir string Directory to work from (default "/usr/share/ceph-nano") -i, --image string USE AT YOUR OWN RISK. Ceph container image to use, format is 'registry/username/image:tag'. The image name could also be an alias coming from the hardcoded values or the configuration file. Use 'image show-aliases' to list all existing aliases. (default "ceph/daemon") -b, --data string Configure Ceph Nano underlying storage with a specific directory or physical block device. Block device support only works on Linux running under 'root', only also directory might need running as 'root' if SeLinux is enabled. -s, --size string Configure Ceph Nano underlying storage size when using a specific directory -f, --flavor string Select the container flavor. Use 'flavors ls' command to list available flavors. (default "default") --help help for start ``` -------------------------------- ### Get Start Setting using JavaScript Source: https://next.informat.cn/doc/guide/script/bpmn.html Fetches the starting configuration settings for a process definition. It requires the module key and the process definition ID. The function returns a BpmnStartSetting object containing details about how the process can be initiated. ```javascript informat.bpmn.getStartSetting(moduleKey, defineId); ``` -------------------------------- ### Setup ceph-nano Utility Source: https://next.informat.cn/doc/guide/install/example/installCephS3.html Locates the ceph-nano binary and moves it to the system path to enable global command-line access. ```shell find / -name "cn" mv /root/cn /usr/local/bin/ cn ``` -------------------------------- ### Execute HTTP GET and POST Requests Source: https://next.informat.cn/doc/guide/script/http.html Examples demonstrating how to perform standard GET and POST requests, including handling query parameters and form data. ```javascript // POST Example const req = { url: 'https://demo.api.com/api', method: 'POST', timeout: 1000, form: { 'p1': 1, 'p2': 'str' } } const rsp = informat.http.request(req); console.log(rsp.body()); // GET Example const getReq = { url: 'https://demo.api.com/api', method: 'GET', timeout: 1000, form: { a: 'zhangsan', b: 'lisi' } } const ctx = informat.http.request(getReq) console.log(ctx.body()); ``` -------------------------------- ### Launching vLLM Server with Installed Custom Parser (Bash) Source: https://next.informat.cn/doc/guide/install/deploy/deepseek_model_deploy.html This bash command starts the vLLM OpenAI API server after the custom parser has been installed into the vLLM directory. It specifies the model to use, the custom tool parser by its registered name (`qwen_custom`), and enables automatic tool choice. This is a convenient way to use the custom parser once it's integrated with the vLLM installation. ```bash python -m vllm.entrypoints.openai.api_server \ --model /data/models/Qwen2.5-Coder-32B-Instruct \ --tool-call-parser qwen_custom \ --enable-auto-tool-choice ``` -------------------------------- ### Complete SFTP Workflow Example Source: https://next.informat.cn/doc/guide/script/sftp.html A comprehensive example demonstrating the lifecycle of an SFTP operation: initialization, login, directory creation, file upload, download, and safe disconnection. ```javascript var host = "192.168.1.120"; var port = 22; var userName = "sftpuser"; var password = "123456"; var client = null; try { client = informat.sftp.createClient(); client.login(userName, password, host, port); console.log(client.pwd()); client.mkdir('test/d'); client.put("logo.jpg", 'test/d/logo.jpg'); client.downloadFile("test/d/logo.jpg", "sftp/logo.jpg"); } finally { if (client != null) { client.disconnect(); } } ``` -------------------------------- ### Install Informat Services Source: https://next.informat.cn/doc/guide/install/deploy/cluster_install.html Command to initialize and install the Informat services, including account and business logic services. This script requires the virtual IP (VIP) and a list of node hostnames. The status of individual Informat services can be verified after installation. ```bash ./informat/install.sh -v {VIP} -n {node1} -n {node2} -n {node3} # Check Account service status systemctl status informat-account # Check Biz service status systemctl status informat-biz ``` -------------------------------- ### Initialize Informat Next Database Source: https://next.informat.cn/doc/guide/install/example/huawei_k8s.html Commands and configuration properties for initializing the Informat Next database. This process involves downloading the installer, defining database connection parameters in a properties file, and executing the Java-based installer. ```bash curl -O https://git.itit.io/api/v4/projects/21/packages/generic/informat2-installer/docker/informat_next_installer.zip unzip informat_next_installer.zip cd informat_next_installer vi init_db.properties ./jdk/bin/java -jar InformatNextInstaller-1.0.0.jar init_db.properties ``` ```properties #安装包目录 package-path=../informat_next_2.7.zip # 不安装数据库 db.install=false # 创建account数据库 db.create-account=true # 创建biz数据库 db.create-biz=true # 初始化account数据库 db.init-account=true # 初始化biz数据库 db.init-biz=true # 更新account db.upgrade-account=true # 更新biz db.upgrade-biz=true # 数据库地址 db.host=127.0.0.1 # 数据库端口 db.port=5432 # 数据库用户 db.user=postgres # 数据库密码 db.password={password} # 默认操作库 db.opt-db-name=postgres ``` -------------------------------- ### Start ceph-nano Cluster Source: https://next.informat.cn/doc/guide/install/example/installCephS3.html Starts a ceph-nano cluster using a specified working directory. This command may take time on initial run as it pulls the container image. It outputs endpoint, dashboard, and access keys. ```bash # ./cn cluster start -d /tmp [cluster] [root@localhost ~] ./cn cluster start -d /tmp my-first-cluster Running ceph-nano... The container image is not present, pulling it. This operation can take a few minutes...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... Endpoint: http://10.36.116.164:8000 Dashboard: http://10.36.116.164:5001 // 控制面板 Access key is: 9ZU1QBYX13KPLXXDDCY2 Secret key is: nthNG1xb7ta5IDKiJKM8626pQitqsalEo0ta7B9E Working directory: /usr/share/ceph-nano // 工作目录 ``` -------------------------------- ### Install Application - JavaScript Source: https://next.informat.cn/doc/guide/script/company.html Installs a new application. Requires an InstallAppRequest object containing the groupId and the imrUrl of the application. Returns the ID of the newly installed application as a string. ```javascript informat.company.installApp(req); ``` ```javascript let company = informat.company.getCompany(); informat.company.installApp({ 'groupId': company.id, 'imrUrl':'https://next.inforamt.cn/test.imr' }); ``` -------------------------------- ### JavaScript: Example - Create User and Get Return Value Source: https://next.informat.cn/doc/guide/script/jdbc.html Demonstrates creating a user record using a stored procedure and retrieving the generated `userId` and `points` using INOUT parameters. It also shows how to generate a unique record ID. ```javascript var conn = informat.jdbc.systemConnection(); // 生成唯一ID var recordId = informat.jdbc.nextRecordId(); var params = [ { value: recordId, isOut: false }, { value: 'zhangsan', isOut: false }, { value: 'zhang@test.com', isOut: false }, { value: 25, sqlType: 4, isOut: false }, { name: 'userId', value: null, sqlType: 12, // VARCHAR isOut: true, isOutOnly: false }, { name: 'points', ``` -------------------------------- ### Start Form and Process Settings Source: https://next.informat.cn/doc/guide/script/bpmn.html Configures the initial settings for starting a process, including user lists, draft and instance name variables, and form settings. It specifies the form type, fields, and toolbar buttons. ```json { "startSetting": { "activityUserList": [], "draftNameVar": "${String.concat(User.user(initiator).name,'的请假申请草稿')}", "enableStartForm": true, "formSetting": { "completeSetVarList": [], "enableShowProcessInfo": false, "formDesignerFieldSettingList": [], "formType": "Form", "id": "form", "localVariable": false, "tableFieldSettingList": [ { "editable": false, "id": "leaveNo", "visible": true }, { "editable": false, "id": "applicant", "visible": true }, { "editable": true, "id": "leaveType", "visible": true }, { "editable": true, "id": "startDate", "visible": true }, { "editable": true, "id": "endDate", "visible": true }, { "editable": true, "id": "totalDays", "visible": true }, { "editable": true, "id": "reason", "visible": true }, { "editable": true, "id": "attachment", "visible": true }, { "editable": false, "id": "status", "visible": true } ], "tableId": "leaveApplication", "toolBarButtonList": [] }, "instanceNameVar": "${String.concat(User.user(initiator).name,'的请假申请')}", "instanceToolbarButtonList": [], "startFormToolbarButtonList": [], "startVarList": [] } } ``` -------------------------------- ### Install Application Source: https://next.informat.cn/doc/guide/script/company.html Installs an application into a specified group. ```APIDOC ## POST /api/apps/install ### Description Installs an application into a specified group. ### Method POST ### Endpoint /api/apps/install ### Parameters #### Request Body - **req** (InstallAppRequest) - Required - The installation request object containing group ID and IMR URL. ### Request Example ```javascript let company = informat.company.getCompany(); informat.company.installApp({ 'groupId': company.id, 'imrUrl':'https://next.inforamt.cn/test.imr' }); ``` ### Response #### Success Response (200) - **String** - The ID of the newly installed application. #### Response Example ```text uzafvisn1whcq ``` ``` -------------------------------- ### Installing Custom Parser into vLLM Directory (Python) Source: https://next.informat.cn/doc/guide/install/deploy/deepseek_model_deploy.html This Python script installs the custom tool parser (`qwen_custom_parser.py`) into the vLLM library's `tool_parsers` directory. It locates the vLLM installation path and copies the parser file. After installation, the custom parser can be used directly when launching the vLLM API server without needing a separate startup script. ```python #!/usr/bin/env python3 # install_parser.py import shutil import vllm import os # 查找vLLM安装路径 vllm_path = os.path.dirname(vllm.__file__) parser_dir = os.path.join(vllm_path, "tool_parsers") # 复制解析器文件 shutil.copy( "qwen_custom_parser.py", os.path.join(parser_dir, "qwen_custom_parser.py") ) print(f"✅ 解析器已安装到: {parser_dir}") ``` -------------------------------- ### Install Nginx Service Source: https://next.informat.cn/doc/guide/install/deploy/cluster_install.html Command to initialize and install the Nginx service. This script requires the virtual IP (VIP) and a list of node hostnames as arguments. After installation, the service status can be checked. ```bash ./nginx/install.sh -v {VIP} -n {node1} -n {node2} -n {node3} # Check service status systemctl status nginx ``` -------------------------------- ### Verify ceph-nano Installation Source: https://next.informat.cn/doc/guide/install/example/installCephS3.html Executes the installed ceph-nano binary to display its version and available commands, confirming a successful installation. ```bash [root@localhost ~]./cn Ceph Nano - One step S3 in container with Ceph. *((((((((((((( ((((((((((((((((((( ((((((((* ,(((((((* (((((( (((((( *((((, ,((((/ ((((, ((((((/ *(((( (((( ((((((((( (((( /((( ((((((((( (((( (((. ((((((( /(((/ ((( *(((( .((( ((((( ,(((((((* /((( .((((( ((( (/ // ((( /(((. /((((( /((((( .((((/ (/ Usage: cn [command] Available Commands: cluster Interact with a particular Ceph cluster s3 Interact with a particular S3 object server image Interact with cn's container image(s) version Print the version of cn kube Outputs cn kubernetes template (cn kube > kube-cn.yml) update-check Print cn current and latest version number flavors Interact with flavors completion Generates bash completion scripts Flags: -h, --help help for cn Use "cn [command] --help" for more information about a command. ``` -------------------------------- ### Launching vLLM Server with Custom Parser (Bash) Source: https://next.informat.cn/doc/guide/install/deploy/deepseek_model_deploy.html This bash command executes the Python startup script created in the previous example. It initiates the vLLM OpenAI API server with the custom Qwen tool parser registered and enabled, allowing the model to process tool calls according to the custom parsing logic. ```bash python start_vllm_custom.py ``` -------------------------------- ### informat.date.getStartOfDay Source: https://next.informat.cn/doc/guide/script/date.html Gets the start of the day (midnight) for the current date or a specified date. ```APIDOC ## getStartOfDay ### Description Gets the start of the day (midnight: 00:00:00) for the current date or a specified date. ### Method `informat.date.getStartOfDay([date])` ### Parameters #### Path Parameters - **date** (Date) - Optional - The date object to get the start of the day for. If omitted, the current date is used. ### Response #### Success Response (200) - **Date** - The Date object representing the start of the day. ### Request Example ```javascript informat.date.getStartOfDay() // For current date informat.date.getStartOfDay(new Date()) // For a specific date ``` ### Response Example ```text Tue Apr 06 00:00:00 CST 2025 ``` ``` -------------------------------- ### Registering Custom Parser via Startup Script (Python) Source: https://next.informat.cn/doc/guide/install/deploy/deepseek_model_deploy.html This Python script demonstrates how to register a custom tool parser, `QwenCustomToolParser`, with vLLM. It inserts the parser's directory into the system path, registers the parser using `ToolParserManager.register_tool_parser`, and then launches the vLLM OpenAI API server with the custom parser enabled. This method is suitable for development or when you need fine-grained control over the startup process. ```python #!/usr/bin/env python3 import sys sys.path.insert(0, '/path/to/parser') # 解析器文件所在目录 # 注册自定义解析器 from vllm.tool_parsers.abstract_tool_parser import ToolParserManager from qwen_custom_parser import QwenCustomToolParser ToolParserManager.register_tool_parser("qwen_custom", QwenCustomToolParser) print("✅ 自定义解析器已注册") # 启动vLLM import os os.environ["VLLM_CONFIGURE_LOGGING"] = "1" sys.argv = [ "vllm.entrypoints.openai.api_server", "--model", "/data/models/Qwen2.5-Coder-32B-Instruct", "--host", "0.0.0.0", "--port", "8000", "--api-key", "sk-your-secret-key-here", "--trust-remote-code", "--tool-call-parser", "qwen_custom", "--enable-auto-tool-choice", ] from vllm.entrypoints.openai.api_server import run_server run_server() ``` -------------------------------- ### 启动 vLLM API 服务器并进行性能调优 Source: https://next.informat.cn/doc/guide/install/deploy/deepseek_model_deploy.html 使用 `vllm.entrypoints.openai.api_server` 启动 OpenAI 兼容的 API 服务器,并调整关键性能参数以优化吞吐量和显存利用率。推荐参数包括 GPU 显存利用率、批处理 token 数、最大并发请求数以及是否启用前缀缓存和禁用请求日志。 ```bash python -m vllm.entrypoints.openai.api_server \ --model /data/models/Qwen2.5-Coder-32B-Instruct \ --port 8000 \ --gpu-memory-utilization 0.95 \ --max-num-batched-tokens 8192 \ --max-num-seqs 256 \ --enable-prefix-caching \ --disable-log-requests ``` -------------------------------- ### GET /open/bpmn/instance/{appId}/{moduleId}/start Source: https://next.informat.cn/doc/guide/open/bpmn 发起一个新的工作流实例。 ```APIDOC ## GET /open/bpmn/instance/{appId}/{moduleId}/start ### Description 发起一个新的工作流实例。 ### Method GET ### Endpoint https://{hostname}/open/bpmn/instance/{appId}/{moduleId}/start?__if_token={token}&processId={processId}&resubmit={resubmit} ### Parameters #### Path Parameters - **appId** (string) - Required - 工作流归属的应用 ID - **moduleId** (string) - Required - 工作流归属的工作流模块 ID #### Query Parameters - **hostname** (string) - Required - 服务部署访问的域名或 ip:port - **token** (string) - Required - 平台用户认证 token - **processId** (string) - Required - 工作流 ID - **resubmit** (string) - Optional - 是否需要再次提交,值为 'on' 时提交后重新展示表单 ``` -------------------------------- ### Manage Ceph Nano Clusters Source: https://next.informat.cn/doc/guide/install/example/installCephS3.html Commands to start a temporary cluster with specific resource configurations, commit the state to a new Docker image, and purge the cluster. ```bash ./cn cluster start temp -f huge docker commit ceph-nano-temp ceph-nano ./cn cluster purge temp --yes-i-am-sure ``` -------------------------------- ### 执行织信安装脚本 Source: https://next.informat.cn/doc/guide/install/deploy/custom_install.html 授予install.sh脚本执行权限并运行它来安装织信。默认情况下,织信将被安装在根目录下。 ```shell sudo chmod +x install.sh | ./install.sh ``` -------------------------------- ### Require npm Package in Server-Side Script Source: https://next.informat.cn/doc/guide/script/index.html Demonstrates how to use the 'require' syntax to import and use a package installed via npm within a server-side script. This example shows importing the 'crypto-js' library for SHA256 hashing. ```javascript let SHA256 = require("crypto-js/sha256"); console.log(SHA256("Message")); ``` -------------------------------- ### Get User Login Type - JavaScript Source: https://next.informat.cn/doc/guide/script/app.html Queries the current user's login type. This function returns a string indicating how the user is currently authenticated. The example demonstrates calling the function and logging the result to the console. ```javascript informat.app.userLoginType() ``` ```javascript const userLoginType = informat.app.userLoginType(); console.log(userLoginType); ``` -------------------------------- ### Initialize FTP Client Source: https://next.informat.cn/doc/guide/script/ftp.html Creates and returns a new FtpClient instance to manage FTP server interactions. ```javascript informat.ftp.createClient() ``` -------------------------------- ### Get Designer User List - JavaScript Source: https://next.informat.cn/doc/guide/script/app.html Retrieves the list of user IDs associated with a specific application designer permission type. The function takes the permission type as an argument and returns an array of user IDs. The example shows how to retrieve users with 'access' permissions. ```javascript informat.app.getDesignerUserList(type) ``` ```javascript informat.app.getDesignerUserList('access') ``` -------------------------------- ### Initialize SFTP Client Source: https://next.informat.cn/doc/guide/script/sftp.html Creates a new instance of an SFTP client to begin server interactions. ```javascript informat.sftp.createClient() ``` -------------------------------- ### Install Docker on RHEL Source: https://next.informat.cn/doc/guide/install/example/installCephS3.html Comprehensive steps to remove conflicting packages, configure the official Docker repository, install the Docker engine, and verify the installation on RHEL 8 or 9. ```bash sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine podman runc sudo yum install -y yum-utils sudo yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin sudo systemctl start docker sudo docker run hello-world ``` -------------------------------- ### JavaScript Component Setup and Event Handling Source: https://next.informat.cn/doc/guide/formdesigner/script/methods.html This JavaScript snippet demonstrates setting up a Vue.js component, defining props and data, and handling various lifecycle events and custom methods. It includes examples of API calls, form manipulation, and event listeners for form fields, buttons, and dialogs. Dependencies include the 'informat' library for system and app functionalities. ```javascript { props: { // 定义页面属性 uname:{ type:String; } }, data: function () { return { // 定义下拉框的可选数据项列表 sexList: [ { key: 'f', label: '男' }, { key: 'm', label: '女' } ] }; }, // 页面组件创建实例时 created: function () { }, // 页面挂载完成后执行业务逻辑 mounted: function () { var that = this; setTimeout(function () { that.setup(); }, 0); }, // 页面组件销毁前 beforeDestroy: function () { }, methods: { // 页面挂载完成后执行自定义处理 setup: function () { var that = this; // 输出上下文的属性 console.log(this.uname); // 设置当前表单字段(name)的数据 that.form.name = '张三'; // 调用脚本绑定的API函数 informat.system.getToken().then(res => { console.log(res); }); // 全局监听页面字段数据变化 that.onEvent('onChange', function (data) { console.log('onChange', data); }); // 监听页面按钮(buttonSubmit)点击事件 that.onEvent('onClick', function (data) { that.getData(true).then((res) => { informat.app.callAutomatic({ automaticId: 'formdesignerInvoker', args: [res] }); // console.log('onClick.getData',res); }); }, 'buttonSubmit'); // 监听页面按钮(buttonAdd)点击事件后,弹出对话框(dialog_e2duygzp) that.onEvent('onClick', function (data) { that.dialogOpen('dialog_e2duygzp'); }, 'buttonAdd'); // 监听页面按钮(buttonCancel)点击事件后,重置表单 that.onEvent('onClick', function (data) { that.reset(); }, 'buttonCancel'); // 指定监听页面字段(name)数据变化 that.onceEvent('onChange', function (data) { console.log('onNameChange', data); // 获取当前全部的表单数据 console.log('onNameChange.form', that.form); }, 'name'); // 指定监听页面对话框(dialog_e2duygzp)点击取消时间 that.onceEvent('onDialogCancel', function (data) { console.log('onDialogCancel', data); that.dialogClose('dialog_e2duygzp'); }, 'dialog_e2duygzp'); } } } ``` -------------------------------- ### Extract Substring by Start and Length - JavaScript Source: https://next.informat.cn/doc/guide/expression/string.html Extracts a portion of a string 's' starting from index 'start' for a length of 'len'. If 'start' or 'len' is null, they default to 0. Negative 'start' values are handled. Returns the extracted substring or null if the input string is null. ```javascript String.substr(s, start, len) ``` -------------------------------- ### createInstance Source: https://next.informat.cn/doc/guide/script/bpmn.html Creates a new workflow instance. ```APIDOC ## POST informat.bpmn.createInstance ### Description Initializes and creates a new workflow instance. ### Method POST ### Endpoint informat.bpmn.createInstance(moduleId, processDefineId, startUserId, form, vars) ### Parameters #### Request Body - **moduleId** (String) - Required - Module identifier - **processDefineId** (String) - Required - Process definition ID - **startUserId** (String) - Required - Initiator user ID - **form** (Object) - Required - Form data record - **vars** (Object) - Required - Startup variables ### Response #### Success Response (200) - **instanceId** (String) - The created workflow instance ID ``` -------------------------------- ### Install Ceph Nano CLI Source: https://next.informat.cn/doc/guide/install/example/installCephS3.html Downloads and installs the Ceph Nano binary for Linux amd64 or arm64 architectures. Requires execution permissions after download. ```bash curl -L https://github.com/ceph/cn/releases/download/v2.3.1/cn-v2.3.1-linux-amd64 -o cn && chmod +x cn ``` ```bash curl -L https://github.com/ceph/cn/releases/download/v2.3.1/cn-v2.3.1-linux-arm64 -o cn && chmod +x cn ``` -------------------------------- ### Start vLLM API Server Source: https://next.informat.cn/doc/guide/install/deploy/deepseek_model_deploy.html Commands to launch the vLLM OpenAI-compatible API server with specific model paths, network settings, and security configurations. ```bash python -m vllm.entrypoints.openai.api_server \ --model /data/models/DeepSeek-Coder-V2-Lite-Instruct \ --host 0.0.0.0 \ --port 8000 \ --api-key sk-your-secret-key-here ``` -------------------------------- ### Install ceph-nano CLI for Linux arm64 Source: https://next.informat.cn/doc/guide/install/example/installCephS3.html Downloads and makes executable the ceph-nano command-line interface for Linux arm64 architecture. Ensure you have curl installed. ```bash [root@localhost ~]curl -L https://github.com/ceph/cn/releases/download/v2.3.1/cn-v2.3.1-linux-arm64 -o cn && chmod +x cn ``` -------------------------------- ### 更新数据库密码脚本 Source: https://next.informat.cn/doc/guide/install/deploy/custom_install.html 更新install_db.sh脚本中的数据库密码。确保PGPASSWORD环境变量被正确设置,以允许安装脚本访问数据库。 ```shell export PGPASSWORD="INFORMAT_2024" ``` -------------------------------- ### Install ceph-nano CLI for Linux amd64 Source: https://next.informat.cn/doc/guide/install/example/installCephS3.html Downloads and makes executable the ceph-nano command-line interface for Linux amd64 architecture. Ensure you have curl installed. ```bash [root@localhost ~]curl -L https://github.com/ceph/cn/releases/download/v2.3.1/cn-v2.3.1-linux-amd64 -o cn && chmod +x cn ``` -------------------------------- ### Create Workflow Instance Source: https://next.informat.cn/doc/guide/script/bpmn.html Initializes a new workflow instance using a specific module, process definition, start user, form data, and startup variables. Returns the unique workflow instance ID. ```javascript let form = { level: 1, sex: 'man', idNo: '450323111111111111', post: '刚刚', biographicalNote: { 'id': 'qqc5uxend8j5zg8annd6w.crx', 'md5': '0b3df75922df4b125309577c93645d0b', 'name': 'JSON-handle_0.6.1.crx', 'path': 'do5u69j9ff3ap/jcn3qaf48z6dh/qqc5uxend8j5zg8annd6w.crx', 'size': 197147 }, name: '肖建宇', status: 'atInterview' }; let vars = { startTime: new Date() }; informat.bpmn.createInstance('flow', 'insertUser', 'yvkc2kwpy3xzr', form, vars); ``` -------------------------------- ### Restart Services (Bash) Source: https://next.informat.cn/doc/guide/install/ops_shell.html 使用systemctl命令重启各项服务,包括数据库(postgresql-13)、缓存(redis)、文件存储(seaweedfs)、消息队列(rabbitmq-server)、文件预览(supervisord/supervisor)、搜索引擎(elasticsearch)、Nginx以及织信核心服务(informat-account/informat-biz)。对于旧版本安装器,则使用自定义的./informat restart命令。 ```bash systemctl restart postgresql-13.service ``` ```bash systemctl restart redis.service ``` ```bash systemctl restart seaweedfs.service ``` ```bash systemctl restart rabbitmq-server.service ``` ```bash systemctl restart supervisord.service ``` ```bash systemctl restart supervisor.service ``` ```bash systemctl restart elasticsearch.service ``` ```bash systemctl restart nginx.service ``` ```bash systemctl restart informat-account systemctl restart informat-biz ``` ```bash cd {informat-next} ls instance ps -ef|grep {instanceName} ./informat restart informat-account ./informat restart informat-biz ``` -------------------------------- ### MinIO集群磁盘初始化 Source: https://next.informat.cn/doc/guide/install/deploy/cluster_install.html 此命令用于初始化MinIO集群所需的数据磁盘。`lsblk`和`fdisk -l`用于查看磁盘信息,然后运行`init.sh`脚本,指定数据盘符(`{device}`)和参与集群的节点IP(`-n {nodeX}`)。 ```bash #查看磁盘情况 lsblk #查看分区情况 fdisk -l # minio集群需要一个单独的磁盘作为minio数据目录,初始化minio磁盘,运行以下命令 ./minio-cluster/init.sh -d {device} -n {node1} -n {node2} -n {node3} ``` -------------------------------- ### 进行 GPU 和系统性能诊断 Source: https://next.informat.cn/doc/guide/install/deploy/deepseek_model_deploy.html 通过 `nvidia-smi` 命令可以监控 GPU 的使用情况,包括显存占用、利用率等。`watch -n 1 nvidia-smi` 可实现实时监控。`free -h` 命令用于查看系统的内存使用情况。 ```bash # 监控GPU使用 watch -n 1 nvidia-smi # 详细GPU指标 nvidia-smi dmon -s pucvmet # 查看进程GPU使用 nvidia-smi pmon # 内存使用情况 free -h ``` -------------------------------- ### Verify oracle_fdw Installation Source: https://next.informat.cn/doc/guide/table/table_datasource_fdw.html SQL commands to verify the successful installation and activation of the oracle_fdw extension within the PostgreSQL database. ```bash sudo -u postgres psql ``` ```sql CREATE EXTENSION IF NOT EXISTS oracle_fdw; \dx oracle_fdw ``` -------------------------------- ### Bash: vLLM Quantization Acceleration Source: https://next.informat.cn/doc/guide/install/deploy/deepseek_model_deploy.html This bash script illustrates how to enable quantization for vLLM to accelerate inference. It provides examples for using AWQ and GPTQ quantization methods by specifying the `--quantization` argument when launching the API server. AWQ is recommended for its performance benefits. ```bash # AWQ量化 (推荐) python -m vllm.entrypoints.openai.api_server \ --model /data/models/Qwen2.5-Coder-32B-Instruct \ --quantization awq \ --port 8000 # GPTQ量化 python -m vllm.entrypoints.openai.api_server \ --model /data/models/Qwen2.5-Coder-32B-Instruct \ --quantization gptq \ --port 8000 ``` -------------------------------- ### Install and Configure oracle_fdw Source: https://next.informat.cn/doc/guide/table/table_datasource_fdw.html Commands to extract, configure, and execute the installation script for oracle_fdw, including setting the PostgreSQL directory. ```bash unzip oracle_fdw.zip cd oracle_fdw vim install.sh PG_DIR="/usr/pgsql-13" sudo chmod +x install.sh sudo ./install.sh ``` -------------------------------- ### Numeric Summary Value Example Source: https://next.informat.cn/doc/guide/table/table_transform_record.html Shows an example of a numeric value used for summary fields, which can be an Integer or Double. ```text 12.56 ``` -------------------------------- ### 重启织信服务 (Shell) Source: https://next.informat.cn/doc/guide/install/after_deploy.html 使用`systemctl restart`命令来重启织信服务的关键组件,包括`informat-account`和`informat-biz`。这是在修改配置或解决服务问题后常用的操作。 ```shell systemctl restart informat-account systemctl restart informat-biz ``` -------------------------------- ### Geographical Coordinate Example Source: https://next.informat.cn/doc/guide/table/table_transform_record.html Provides an example of the TableCoordinate object, including longitude, latitude, and address string for a geographical location. ```javascript { "lng":114.057201, "lat":22.538136, "address":"广东省深圳市福田区福田站" } ```