当前位置: 首页 > news >正文

gitlab配置备忘

版本

gitlab 14.6.2

gitlab备份上传到阿里云oss

### Backup Settings
###! Docs: https://docs.gitlab.com/omnibus/settings/backups.html# gitlab_rails['manage_backup_path'] = true
# gitlab_rails['backup_path'] = "/var/opt/gitlab/backups"###! Docs: https://docs.gitlab.com/ee/raketasks/backup_restore.html#backup-archive-permissions
# gitlab_rails['backup_archive_permissions'] = 0644# gitlab_rails['backup_pg_schema'] = 'public'###! The duration in seconds to keep backups before they are allowed to be deleted
# gitlab_rails['backup_keep_time'] = 604800
gitlab_rails['backup_keep_time'] = 1209600
# gitlab_rails['backup_upload_connection'] = {
#   'provider' => 'AWS',
#   'region' => 'eu-west-1',
#   'aws_access_key_id' => 'AKIAKIAKI',
#   'aws_secret_access_key' => 'secret123'
# }
# gitlab_rails['backup_upload_remote_directory'] = 'my.s3.bucket'
# gitlab_rails['backup_multipart_chunk_size'] = 104857600gitlab_rails['backup_upload_connection'] = {'provider' => 'aliyun','aliyun_accesskey_id' => 'xxxxx','aliyun_accesskey_secret' => 'xxxxx','aliyun_oss_endpoint' => 'http://oss-cn-shenzhen-internal.aliyuncs.com','aliyun_oss_bucket' => 'xxxxbackup','aliyun_oss_location' => 'shenzhen'}gitlab_rails['backup_upload_remote_directory'] = 'gitlab'
###! **Turns on AWS Server-Side Encryption with Amazon S3-Managed Keys for
###!   backups**
# gitlab_rails['backup_encryption'] = 'AES256'
###! The encryption key to use with AWS Server-Side Encryption.
###! Setting this value will enable Server-Side Encryption with customer provided keys;
###!   otherwise S3-managed keys are used.
# gitlab_rails['backup_encryption_key'] = '<base64-encoded encryption key>'###! **Specifies Amazon S3 storage class to use for backups. Valid values
###!   include 'STANDARD', 'STANDARD_IA', and 'REDUCED_REDUNDANCY'**
# gitlab_rails['backup_storage_class'] = 'STANDARD'###! Skip parts of the backup. Comma separated.
###! Docs: https://docs.gitlab.com/ee/raketasks/backup_restore.html#excluding-specific-directories-from-the-backup
#gitlab_rails['env'] = {
#    "SKIP" => "db,uploads,repositories,builds,artifacts,lfs,registry,pages"
#}

gitlab自动备份

[root@gitlab backups]# crontab -l
0 2 * * * /usr/bin/gitlab-rake gitlab:backup:create

gitlab集成openladp

gitlab_rails['ldap_enabled'] = true
gitlab_rails['prevent_ldap_sign_in'] = false
gitlab_rails['ldap_servers'] = YAML.load <<-'EOS'main: # 'main' is the GitLab 'provider ID' of this LDAP serverlabel: 'mxLDAP'           # 显示在登录页面上的名称host: '172.16.123.223'      # LDAP服务地址port: 389               # LDAP服务端口,如果LDAP基于SSL在端口通常为636uid: 'sAMAccountName'   # LDAP中用户名对应的属性,通常为'sAMAccountName'bind_dn: 'admin@xxx.com'password: 'xxxxx'     # 同步用户信息的账户密码encryption: 'plain'     # 'start_tls' or 'simple_tls' or 'plain'verify_certificates: false  # 如果使用SSL,则设为trueactive_directory: false     # 如果是 Active Directory LDAP server 则设为trueallow_username_or_email_login: true  # 是否允许email登录lowercase_usernames: false            # 是否将用户名转为小写block_auto_created_users: false       # 是否自动创建用户base: 'ou=people,dc=xxxxx,dc=com' # 搜索LDAP用户是的BaseDNuser_filter: ''
EOS

gitlab重新加载配置

gitlab-ctl reconfigure
http://www.lryc.cn/news/139909.html

相关文章:

  • 基于Centos搭建k8s仓库
  • 浅谈泛在电力物联网发展形态与技术挑战
  • git reset --soft 用法
  • 哪些测试仪器可以用于检测静电中和设备的性能
  • 浅析 GlusterFS 与 JuiceFS 的架构异同
  • ARM开发,stm32mp157a-A7核PWM实验(驱动蜂鸣器,风扇,马达工作)
  • 群狼调研(长沙眼镜店神秘顾客)|消费者需求研究方案
  • 电脑入门:宽带路由器常见故障排除技巧
  • 基于云原生网关的流量防护实践
  • 开源与云计算:新的合作模式
  • 前端需要理解的跨平台知识
  • 《基于 Vue 组件库 的 Webpack5 配置》3.将 CSS 提取到单独的文件
  • 2023CCF图形学启明星计划夏令营感想记录
  • 如何解决“缺失msvcp110.dll”错误,msvcp110.dll丢失要怎样才能修复
  • 激活函数总结(二十):激活函数补充(SQNL、PLU)
  • Docker【部署 04】Docker Compose下载安装及实例Milvus Docker compose(CPU)使用说明分享
  • 23种设计模式-7种结构模式
  • 大数据Flink(六十七):SQL Table 简介及运行环境
  • WPF使用依赖注入
  • 玩转科技|了解AI平台桌面客户端—ChatBox
  • visual studio 2022.NET Core 3.1 未显示在目标框架下拉列表中
  • 人工智能项目集合推荐(数据集 模型训练 C++和Android部署)
  • C# 服务HTTPS 对 请求被中止: 未能创建 SSL/TLS 安全通道报错
  • 二级MySQL(七)——表格数据修改
  • 【日常积累】Linux下sftp搭建
  • 【深入浅出C#】章节 9: C#高级主题:多线程编程和并发处理
  • Windows Server服务器安全加固基线配置
  • 基于NXP i.MX 6ULL核心板的物联网模块开发案例(4)
  • 英语——强调
  • 全流程R语言Meta分析核心技术教程