feat jenkins cicd
This commit is contained in:
60
Public/Publish/doc.txt
Normal file
60
Public/Publish/doc.txt
Normal file
@@ -0,0 +1,60 @@
|
||||
这是部署文档,记录部署需要做哪些东西
|
||||
|
||||
|
||||
frps、frpc:
|
||||
git - https://github.com/fatedier/frp
|
||||
frps启动命令(没有做成服务):nohup ./frps -c ./frps.toml &
|
||||
frpc设置成服务,开机自启:
|
||||
1. 配置文件:/etc/systemd/system/frpc.service
|
||||
[Unit]
|
||||
Description=FRP Client
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/home/pi/Desktop/frp_0.65.0_linux_arm64/frpc -c /home/pi/Desktop/frp_0.65.0_linux_arm64/frpc.toml
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
2. 启动命令:
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable frpc # 开机自启
|
||||
sudo systemctl start frpc # 立即启动
|
||||
3. 查看日志
|
||||
sudo journalctl -u frpc
|
||||
|
||||
|
||||
安装Docker
|
||||
curl -fsSL https://get.docker.com -o get-docker.sh
|
||||
sudo sh get-docker.sh
|
||||
|
||||
Docker代理(Docker不管全局代理,必须在这里设置):
|
||||
1. 配置文件:/etc/systemd/system/docker.service.d/proxy.conf
|
||||
[Service]
|
||||
Environment="HTTP_PROXY=http://192.168.31.150:7890"
|
||||
Environment="HTTPS_PROXY=http://192.168.31.150:7890"
|
||||
Environment="NO_PROXY=localhost,127.0.0.1,.local,192.168.0.0/16"
|
||||
2. 启动命令:
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart docker
|
||||
|
||||
以下服务需要给存档权限
|
||||
sudo chown -R 1000:1000 jenkins/
|
||||
sudo chown -R 472:472 grafana/
|
||||
sudo chown -R 65534:65534 prometheus/
|
||||
sudo chown -R 1000:1000 gitea/
|
||||
|
||||
nginx auth:
|
||||
nginx验证:printf "admin:$(openssl passwd -crypt uF8uY4eM0nS9dA4iZ1bV4hE6)\n" >>./prometheus_passwd
|
||||
registry验证:htpasswd -Bbn admin pD4hC1jY1bB0pY4kF4tC > ./registry_passwd
|
||||
↑没有工具安装这个:sudo yum install -y httpd-tools
|
||||
|
||||
Jenkins账密:admin 4f848ffe54ef45eda56eebd62bc90ea0
|
||||
Grafana账密:admin pT1rA0yL0mK3iA8tJ4kE
|
||||
|
||||
ssh -L 2379:localhost:2379 root@47.108.184.184 yT1vU8fH5mP0rQ6h
|
||||
|
||||
|
||||
registry命令:
|
||||
curl -XGET -u admin:pD4hC1jY1bB0pY4kF4tC http://127.0.0.1:5000/v2/_catalog
|
||||
curl -XGET -u admin:pD4hC1jY1bB0pY4kF4tC http://127.0.0.1:5000/v2/server-gateway/tags/list
|
||||
Reference in New Issue
Block a user