Article Directory
- 1. Start the Hyper-V service
- Two, install docker
- 3. Prepare docker and docker-compose environment
- 4. cd runnergo to enter the directory
- 5. Modify the configuration file config.env, the default can basically not be changed
- 6. Modify the port number exposed by the application
- 7. Start RunnerGo
- 8. Close RunnerGo
- Nine, delete
- 10. Log in and use
Reference address: https://wiki.runnergo.cn/docs/
1. Start the Hyper-V service
Method 1: win+r, enter
optionalfeatures
, open "Turn Windows features on or off", check Hyper-V;
Method 2: Open the control panel, click "Uninstall a program", click "Turn Windows features on or off", check Hyper-V V;
Remarks: If Windows 11 Home Chinese Edition does not have Hyper-V, you can refer to this method to solve it: https://blog.csdn.net/qq_37515374/article/details/129642068
Two, install docker
Docker download address : http://docker.p2hp.com/
1. Search the Docker official website to enter the official website, find the download link of Docker-desktop to download the installation package, and directly open the installation package for installation (it is best to close the firewall before installation) (restart after installation); 2. You need to manually enter the system BIOS to
enable Virtualization technology, and the Hyper-V service needs to be started at system startup;
3. The recommended system is Windows 10 or above (both professional and home editions are acceptable);
4. Input in the cmd windowdocker --help
and the following display means the installation is successful.
Remarks: A pop-up prompt "Docker Desktop requires a newer WSL kernel version." can be resolved by referring to this method: https://blog.csdn.net/qq_37515374/article/details/129642609
3. Prepare docker and docker-compose environment
Download the open source version of RunnerGo from GitHub or Gitee. (The location where the command line is executed is the installation location)
git clone https://github.com/Runner-Go-Team/RunnerGo.git
git clone https://gitee.com/Runner-Go-Team/RunnerGo.git
Remarks: When the error "fatal: unable to access 'https://github.com/Runner-Go-Team/RunnerGo.git/': Recv failure: Connection was reset" is reported, you can refer to this method to solve it: https://blog. csdn.net/qq_37515374/article/details/129644151
4. cd runnergo to enter the directory
Directory description:
├── config.env # 环境变量配置文件
├── docker-compose.yaml # docker-compose 文件
├── mongo # mongo 初始化相关脚本
│ └── init-mongo.sh
└── mysql # MySQL相关配置和脚本
├── mysql.cnf
└── mysql.sql
Remarks: It is necessary to confirm whether the path is entered correctly, and the command can be successful only if the command is executed in this directory.
5. Modify the configuration file config.env, the default can basically not be changed
# 数据库root密码
MYSQL_ROOT_PASSWORD=123456
# runnergo 使用的数据库名
MYSQL_DATABASE=runnergo
# redis 初始话
REDIS_PASSWD=mypassword
# Mongo数据管理员的用户名
MONGO_INITDB_ROOT_USERNAME=root
# Mongo 数据库管理员的账号
MONGO_INITDB_ROOT_PASSWORD=root
# runnergo Mongo使用的数据库名
MONGO_INITDB_DATABASE=runnergo
# runnergo Mongo库的用户名
MONGO_INITDB_USERNAME=runnergo
# runnergo Mongo库的密码
MONGO_INITDB_PASSWORD=hello123456
# 最大并非数
MAX_RUNNER_CONCURRENCY=1000
# 上传文件端口号(非必要不要改,这是容器里的)
FILE_SERVER_PORT=80
# Runnergo 应用mongo 配置
RG_MONGO_DSN=mongodb://${
MONGO_INITDB_USERNAME}:${
MONGO_INITDB_PASSWORD}@mongo-db:27017/${
MONGO_INITDB_DATABASE}
RG_MONGO_DATABASE=${
MONGO_INITDB_DATABASE}
RG_REDIS_ADDRESS=redis-db:6379
RG_REDIS_PASSWORD=${
REDIS_PASSWD}
RG_REDIS_DB=0
# kafka Topic
RG_KAFKA_TOPIC=report
# kafka 地址(如果使用容器不要更改)
RG_KAFKA_ADDRESS=kafka:9092
# kafka 端口号
RG_KAFKA_PORT=9092
# kafka 分区数,(同时并行跑多少任务)
RG_KAFKA_NUM=2
# engine 日志路径
RG_ENGINE_LOG_PATH=/dev/stdout
# collector 日志路径
RG_COLLECTOR_LOG_PATH=/dev/stdout
# 内部互通参数(不要更改)
RG_MANAGEMENT_NOTIFY_STOP_STRESS=http://manage:30000/management/api/v1/plan/notify_stop_stress
RG_MANAGEMENT_NOTIFY_RUN_FINISH=http://manage:30000/management/api/v1/auto_plan/notify_run_finish
RG_DOMAIN=
# mysql 地址
RG_MYSQL_HOST=mysql-db
# mysql 用户
RG_MYSQL_USERNAME=root
# MySQL 密码
RG_MYSQL_PASSWORD=${
MYSQL_ROOT_PASSWORD}
# mysql 数据库
RG_MYSQL_DBNAME=${
MYSQL_DATABASE}
# JWT
RG_JWT_ISSUER=asfdasfasdfasfd
RG_JWT_SECRET=sdfaswerwrwerwerwer
# MONG
RG_MONGO_PASSWORD=${
MONGO_INITDB_PASSWORD}
# 内部互通参数(不要更改)
RG_CLIENTS_ENGINE_RUN_API=http://engine:30000/runner/run_api
RG_CLIENTS_ENGINE_RUN_SCENE=http://engine:30000/runner/run_scene
RG_CLIENTS_ENGINE_STOP_SCENE=http://engine:30000/runner/stop_scene
RG_CLIENTS_ENGINE_RUN_PLAN=http://engine:30000/runner/run_plan
RG_CLIENTS_ENGINE_STOP_PLAN=http://engine:30000/runner/stop
RG_REDIS_REPORT_ADDRESS=redis-db:6379
# #初始化压力机可使用分区
RG_CAN_USE_PARTITION_TOTAL_NUM=${
RG_KAFKA_NUM}
## KAFKA 配置
KAFKA_ZOOKEEPER_CONNECT="zookeeper:2181/kafka"
KAFKA_LISTENERS="PLAINTEXT://:9092"
KAFKA_BROKER_ID=0
KAFKA_CREATE_TOPICS="${RG_KAFKA_TOPIC}:${RG_KAFKA_NUM}:1"
6. Modify the port number exposed by the application
The default use is the 9999 port number of tcp, which can be modified. At present, users can only modify the port number for external access. We also use the two port numbers tcp58888``58889 here, which cannot be modified temporarily. If there is a local conflict, you need to check whether the two port numbers conflict.
7. Start RunnerGo
Order: docker-compose up -d
Since there are many middlewares started, please wait patiently for 2 minutes and then use the command docker-compose ps
to check whether they are started successfully.
8. Close RunnerGo
Order:docker-compose stop
Nine, delete
Order:docker-compose down -v
10. Log in and use
After the installation is successful, open the following address page in the browser, follow the instructions on the webpage to complete the registration process, and you can use RunnerGo.
You can use to curl -L tool.lu/ip && curl ipinfo.io
view the external network address of the machine ( note: the ip detected in this step cannot be connected, Windows can use ipconfig to view the IPv4 address in WSL, which can be used instead of the external network address)
address:http://本机外网地址:9999