项目简介
建木是一个面向DevOps领域的极易扩展的开源无代码(图形化)/低代码(GitOps)工具。可以帮助用户轻松编排各种DevOps流程并分发到不同平台执行。
安装环境
工具 | 版本 |
---|---|
系统 | CentOS 7 |
Docker | 25.0.4 |
Docker-Compose | 2.24.7 |
建木 | 2.7.2 |
安装步骤
安装Docker
具体安装步骤见:Docker安装教程
安装docker-compose
具体安装步骤见:Docker-Compose安装教程
安装建木
新建目录
mkdir -p /你的路径/jianmu/jianmu/data /你的路径/jianmu/mysql/data
下载docker-compose.yml文件
在jianmu目录下下载docker-compose.yml文件
wget https://gitee.com/jianmu-dev/jianmu-deploy/raw/master/docker-compose.yml
根据自己的需求修改,如数据库密码,路径映射等信息
version: '3'
services:
jianmu-mysql:
image: docker.jianmuhub.com/library/mysql:8.0.31
command: --init-connect='SET NAMES utf8' --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=1200 --max-user-connections=1000
restart: always
environment:
MYSQL_ROOT_PASSWORD: xxxxxx
MYSQL_DATABASE: "jianmu"
TZ: "Asia/Shanghai"
volumes:
- $PWD/mysql/data:/var/lib/mysql
ci-server:
image: docker.jianmuhub.com/jianmu/jianmu-server:v2.7.2
restart: always
environment:
SPRING_PROFILES_ACTIVE: dev
SPRING_DATASOURCE_URL: jdbc:mysql://jianmu-mysql:3306/jianmu?useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: xxxxxx
JIANMU_WORKER_SECRET: worker-secret
JIANMU_API_ADMINPASSWD: xxxxxx
# REGISTRY_AK:
# REGISTRY_SK:
volumes:
- $PWD/jianmu/data:/home/jianmu/data
depends_on:
- jianmu-mysql
entrypoint: ["wait-for-it.sh", "jianmu-mysql:3306", "-t", "0", "--", "java", "-Duser.timezone=Asia/Shanghai", "-jar", "jianmu-server.jar"]
worker:
image: docker.jianmuhub.com/jianmu/jianmu-worker-docker:v1.0.9
restart: always
environment:
JIANMU_SRV_ADDRESS: http://ci-server:8081
JIANMU_SRV_SECRET: worker-secret
JIANMU_WORKER_ID: worker1
# 可同时并发的容器数量,默认为2
JIANMU_WORKER_CAPACITY: 5
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- jianmu-mysql
- ci-server
web:
image: docker.jianmuhub.com/jianmu/jianmu-ui:v2.7.2
ports:
- "80:80"
- "443:443"
restart: always
depends_on:
- jianmu-mysql
- ci-server
networks:
default:
ipam:
config:
- subnet: 10.1.0.0/16
启动容器
在docker-compose.yml文件所在目录下执行
docker-compose up -d
实时查看日志:
docker-compose logs -f
至此建木就安装好了,访问对应的IP/域名
默认用户名:admin
默认密码: docker-compose.yml中的 JIANMU_API_ADMINPASSWD
的值
反向代理(非必须)
我们这里使用Nginx
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name xxx.xxx.com;
charset utf-8;
access_log off;
ssl_certificate /home/cert/fullchain.cer;
ssl_certificate_key /home/cert/xxx.com.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://localhost:80;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
server {
listen 80;
listen [::]:80;
server_name xxx.xxx.com;
# 核心代码
rewrite ^(.*)$ https://${server_name}$1 permanent;
}
评论区