# test-netserver **Repository Path**: dxsup/test-netserver ## Basic Information - **Project Name**: test-netserver - **Description**: 一个引入了多种协议的集成服务端程序,方便用来测试 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-08-10 - **Last Updated**: 2022-08-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # How To Build In K8S --- Http * Build Docker Image ```shell docker build -t testdemo:latest . ``` * Deploy K8S ```shell kubectl apply -f deploy-testdemo2.yaml kubectl apply -f deploy-testdemo1.yaml ``` # How To Build In K8S --- Dubbo * Build Docker Image ```shell docker build -t testdemo:latest . ``` * Create Namesapce ```shell kubectl create ns hcmine ``` * Create ConfigMap ```shell kubectl create cm dubbo-config --from-file protocol/dubbo/cfg -n hcmine ``` * Deploy K8S ```shell kubectl apply -f deploy-dubbo-zookeeper.yaml kubectl apply -f deploy-dubbo-testdemo2.yaml kubectl apply -f deploy-dubbo-testdemo1.yaml ``` # Env | Module | 使用角色 | 环境变量 | 类型 | 说明 | |:------------------------:|------------------|-------------------------|--------|-----------------------------------------------| | 定时 | Client | QUARTZ | bool | 是否开启定时发送,每秒发送1条数据给各中间件 | | HTTP | Client / Server | HTTP_PORT | int | 暴露的HTTP服务端口 | | | Client | HTTP_SERVER_ADDRESS_2 | string | 远端的HTTP地址 | | Kafka | Server | KAFKA_PRODUCER_INIT | bool | 是否开启Kafka服务端 | | | Client | KAFKA_CONSUMER_INIT | bool | 是否开启Kafka客户端 | | | Client / Server | KAFKA_BROKER_LIST | int | Kafaka中间件的brokerList | | | Client / Server | KAFKA_PROTOCOL | string | 默认是plaintext,可选sasl_ssl、sasl_plaintext | | | Client / Server | KAFKA_MECHANISM | string | 默认是PLAIN,可选SCRAM-SHA-256 | | | Client / Server | KAFKA_USERNAME | string | Kafaka用户名 | | | Client / Server | KAFKA_PASSWORD | string | Kafaka密码 | | MySql | Client | MYSQL_CLIENT_INIT | bool | 是否开启MySql客户端 | | | Client | MYSQL_ADDRESS | string | MySql访问地址 | | | Client | MYSQL_USERNAME | string | MySql访问帐号 | | | Client | MYSQL_PASSWORD | string | MySql访问密码 | | Redis | Client | REDIS_CLIENT_INIT | bool | 是否开启Redis客户端 | | | Client | REDIS_ADDRESS | string | Redis访问地址 | | | Client | REDIS_PASSWORD | string | Redis访问密码 | | GRPC | Server | GRPC_PORT | int | 暴露的GRPC服务端口 | | | Client | GRPC_SERVER_ADDRESS | string | 远端的GRPC地址 | | Dubbo | Server | CONF_PROVIDER_FILE_PATH | string | Dubbo服务端的配置文件地址 | | | Client | CONF_CONSUMER_FILE_PATH | string | Dubbo客户端的配置文件地址 | | | Client /Server | APP_LOG_CONF_FILE | string | Dubbo日志文件 | | Postgres | Client | POSTGRES_CLIENT_INIT | bool | 是否开启Postgres客户端 | | | Client | POSTGRES_HOST | string | Postgres访问主机 | | | Client | POSTGRES_PORT | string | Postgres访问端口 | | | Client | POSTGRES_USERNAME | string | Postgres访问帐号 | | | Client | POSTGRES_PASSWORD | string | Postgres访问密码 |