Spring Cloud Alibaba project practice

gitlab

1. gitlab installation

Tsinghua source address https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/

1.下载安装包
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-15.9.1-ce.0.el7.x86_64.rpm   --no-check-certificate
2.安装
rpm -ivh  gitlab-ce-15.9.1-ce.0.el7.x86_64.rpm
3.修改配置
external_url 'http://172.17.11.235:28080'
gitlab_rails['time_zone'] = 'Asia/Shanghai'
puma['worker_processes'] = 2
sidekiq['max_concurrency'] = 8
postgresql['shared_buffers'] = "128MB"   #缓存
postgresql['max_worker_processes'] = 4
prometheus_monitoring['enable'] = false

4.更新配置并重启
gitlab-ctl reconfigure
gitlab-ctl restart

insert image description here

#查看初始化密码: 
cat /etc/gitlab/initial_root_password

#浏览器访问
http://172.17.11.235:28080/users/sign_in

[root@master scripts]# cat /etc/gitlab/initial_root_password
# WARNING: This value is valid only in the following conditions
#          1. If provided manually (either via `GITLAB_ROOT_PASSWORD` environment variable or via `gitlab_rails['initial_root_password']` setting in `gitlab.rb`, it was provided before database was seeded for the first time (usually, the first reconfigure run).
#          2. Password hasn't been changed manually, either via UI or via command line.
#
#          If the password shown here doesn't work, you must reset the admin password following https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password.

Password: UlIZfAZ4BezPDMgQVGO4mlgB7n0qybS5Y/qsBJP+Yf4=

# NOTE: This file will be automatically deleted in the first reconfigure run after 24 hours.

2. Page configuration

#修改系统配置:
	左上角三横 >> admin
	

insert image description here

insert image description here
Avatar OFF:
insert image description here
Disable user registration function:
insert image description here
Enable webhook external access:

Settings >> network >> Outbound requests >> Allow requests to the local 
network from web hooks and services 勾选

insert image description here
insert image description here
Set the language to Chinese (global)

Settings >> Preferences >> Localization >> Default language >> 选择简体中文  >>  save changes 

insert image description here
Set the current user language to Chinese



insert image description here

insert image description here

3. Configure secret

insert image description here

4. Configure webhook for the project

5. Uninstall

harbor

1. Installation

Private mirror warehouse harbor build link: private mirror warehouse harbor build

Two, configure the secret

insert image description here

SonarQube

Basic static code specification check

sonarqube 是一个代码质量管理平台
可通过安装不同的插件集成测试工具、代码质量分析工具、持续集成等多种功能。

sonarqube 目前最新版为 8.0,最新稳定版本为 7.9,由于性能原因,sonar 从 7.9 之后就不再 支持 MySQL,替代方案为 PostgreSQL。

这里选择 postgres:12 和 sonarqube:7.9-community 两个 docker 镜像,使用 docker-compose 配置并启动

1. Installation

insert image description here

2. Create a webhook service

insert image description here
insert image description here

3. Create a project

jenkins

insert image description here
install plugin

Build Authorization Token Root   # 自动生成token
GitLab  #gitlab插件
SonarQube ScannerVersion  #代码扫描
Node and Label parameterVersion   #配置节点标签   The node and label parameter plugin allows the node for a job to be selected dynamically.
Kubernetes  #K8S插件
Config File Provider
Git Parameter

After installing the plug-in, configure it
insert image description here
insert image description hereinsert image description here
insert image description hereinsert image description here
insert image description hereinsert image description here
insert image description here

insert image description here

sprint-boot demo

Guess you like

Origin blog.csdn.net/weixin_45720992/article/details/131128510