locust游戏压测示例
https://github.com/lizijie/locust_example
原文:
https://lizijie.github.io/2024/12/02/locust%E6%B8%B8%E6%88%8F%E5%8E%8B%E6%B5%8B%E7%A4%BA%E4%BE%8B.html
作者github:
https://github.com/lizijie
Click to read more ...
docker容器和数据据迁移
[TOC]
数据存储
官方建议,进行数据迁移的容器最好使用volume。这是因为volume完全由Docker管理,迁移更为便捷。而bind mounts依赖于宿主机的文件系统结构,迁移时可能会引发兼容性问题。更多关于volume的迁移信息,可以参考官方文档
Volumes are the preferred mechanism for persisting data generated by and used by Docker containers. While bind mounts are dependent on the directory structure and OS of the host machine, volumes are completely m...
Click to read more ...
git打标签脚本
[TOC]
用git做发布管理至少涉及到两类分支:开发分支和发布分支。每次发布新内容都会基于指定的发布分支打一个tag,而tag通常会以1.0.0的形式命名。
若发布内容存在差异,则需要管理多个发布分支
releasse_x/1.0.0
releasse_y/1.1.0
releasse_z/1.1.5
...
git打标签的流程
# 1. 切换到目标分支
git checkout [需要打标签的分支]
# 2. 合并各项修改内容到分支
git merge feat-xxx
git merge bug-xxx
...
# 3. 定义标签
git tag [标签名称/版本号]
# 4. 该标签提交到哪个仓库
git push --set-upstream origin [标签名称]...
Click to read more ...
git笔记
目录
官方文档
设置 SSH Proxy
设置http&https Proxy
换行符设置
git命令行中显示中文字符
忽略文件权限变化检查
status和log命令显示中文字符
git fetch时报错would clobber existing tag
rebase
pull的行为
子模块的在父工程引用的问题
github flow
cherry-pick
工作目录与裸仓库
HEAD
特殊的符号
tag间的差异内容
vimdiff&vimmerge常用命令
以密钥访问Git
用使用lefthook管理git hook
git常用大杂烩
不要对git抱有信仰
git要适配工作流,...
Click to read more ...
wsl2搭建centos、docker mongo
wsl安装centos
wsl推出的早期,官方并没有提供centos镜像,民间方案大多是使用CentWSL。wsl2推出后,官方有了centos方案Import any Linux distribution to use with WSL,安装过程需要一些动手能力,安装说明非常详尽,本文不用过多复述。PS:截至到2024.3.1,centos并未上架microsoft store。
以下几点需要非常注意:
确保你的window系统版本支持wsl2 WSL enabled with a Linux distribution installed running WSL 2,从未安装参考官方文档How to install Linux on Windows with WSL
确保...
Click to read more ...
docker笔记
[TOC]
debian 12 安装docker官方说明文档
centos 7|8|9 安装docker官方说明文档
镜像
查询镜像是否存在 docker search IMAGE_NAME
拉取网上镜像 docker pull IMAGE_NAME:TAG
删除镜像 docker rmi [IMAGE_NAME/IMAGE_ID]
查看镜像 docker images
保存镜像 docker save IMAGE_ID > OUT_PUT_FILENAME.tar
加载镜像 docker load -i OUT_PUT_FILENAME.tar
利用Dockerfile文件创建镜像
在当前目录查找dockerfile,并以TAG_NAME来命名新创建的镜像
...
Click to read more ...
jenkins插件Active Choices Plug-in使用心得
软件环境
Active Choices Plug-in 2.7.2
Jenkins 2.414.1 (docker: jenkins/jenkins:lts-jdk11)
Groovy中调用shell
// Choice下拉列出当前工作目录的所在子目录
def proc = "ls".execute()
proc.waitFor()
def output = proc.in.text
return output.split("\n") as ArrayList
Input text box 不可编辑
Input text box是Active Choices Reactive Reference Parameter里的一个选项,但它的使用非常奇怪。官方wi...
Click to read more ...