User Tools

Site Tools


инструмент_gitlab

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
инструмент_gitlab [2022/06/20 12:51]
val [GitLab CI/CD]
инструмент_gitlab [2022/07/13 08:52]
val [GitLab CI/CD]
Line 8: Line 8:
   * [[https://​about.gitlab.com/​install/​|Install self-managed GitLab]]   * [[https://​about.gitlab.com/​install/​|Install self-managed GitLab]]
   * Доступно из РФ: [[https://​packages.gitlab.com/​gitlab/​gitlab-ce]]   * Доступно из РФ: [[https://​packages.gitlab.com/​gitlab/​gitlab-ce]]
- 
   * [[https://​www.techbeatly.com/​configure-custom-ssl-to-secure-gitlab-server/​|Configure Custom SSL to Secure GitLab Server]]   * [[https://​www.techbeatly.com/​configure-custom-ssl-to-secure-gitlab-server/​|Configure Custom SSL to Secure GitLab Server]]
 +
 +===== Подключение =====
 +
 +  * [[https://​stackoverflow.com/​questions/​60062065/​gitlab-initial-root-password|gitlab initial root password]]
 +
 +<​code>​
 +# cat /​etc/​gitlab/​initial_root_password
 +</​code>​
 +
 +
  
 ===== Настройка ===== ===== Настройка =====
  
 +==== Файл конфигурации ====
 <​code>​ <​code>​
 # cat /​etc/​gitlab/​gitlab.rb # cat /​etc/​gitlab/​gitlab.rb
 +</​code><​code>​
 +# gitlab-ctl reconfigure
 +</​code>​
 +
 +==== GitLab Docker Registry ====
 +<​code>​
 +# cat /​etc/​gitlab/​gitlab.rb
 +</​code><​code>​
 +...
 +registry_external_url '​http://​server.corpX.un'​
 +...
 +gitlab_rails['​registry_enabled'​] = true
 +...
 +gitlab_rails['​registry_host'​] = "​server.corpX.un"​
 +...
 +registry['​registry_http_addr'​] = "​server.corpX.un:​5000"​
 +...
 +</​code>​
 +
 +==== GitLab Grafana ====
 +<​code>​
 +# cat /​etc/​gitlab/​gitlab.rb
 +</​code><​code>​
 +...
 +grafana['​http_addr'​] = '​0.0.0.0'​
 +...
 +</​code>​
 +==== Управление пользователями ====
 +
 +=== Использование LDAP ===
 +
 +  * [[https://​docs.gitlab.com/​ee/​administration/​auth/​ldap/​index.html|Integrate LDAP with GitLab]]
 +  * [[Установка и настройка OpenLDAP]]
 +  * [[Хранение учетных записей UNIX в LDAP]] !!! с атрибутом почты и паролем
 +
 +<​code>​
 +# cat /​etc/​gitlab/​gitlab.rb
 +</​code><​code>​
 +...
 +gitlab_rails['​ldap_enabled'​] = true
 +
 +gitlab_rails['​ldap_servers'​] = YAML.load <<​-'​EOS'​
 +  main:
 +    label: '​LDAP'​
 +    host: '​server.corpX.un'​
 +    port: 389
 +#    port: 636
 +    uid: '​uid'​
 +    bind_dn: '​cn=admin,​dc=corpX,​dc=un'​
 +    password: '​secret'​
 +    encryption: '​plain'​
 +#    encryption: '​simple_tls'​
 +    active_directory:​ false
 +    base: '​ou=People,​dc=corpX,​dc=un'​
 +...
 </​code>​ </​code>​
  
-==== GitLab Runner ====+===== GitLab Runner ​=====
  
   * [[https://​docs.gitlab.com/​runner/​install/​linux-manually.html|Install GitLab Runner manually on GNU/Linux]]   * [[https://​docs.gitlab.com/​runner/​install/​linux-manually.html|Install GitLab Runner manually on GNU/Linux]]
Line 27: Line 92:
 <​code>​ <​code>​
 root@node2:​~#​ gitlab-runner register root@node2:​~#​ gitlab-runner register
-shell+shell или docker
  
 root@node2:​~#​ cat /​etc/​gitlab-runner/​config.toml root@node2:​~#​ cat /​etc/​gitlab-runner/​config.toml
 log_level = "​debug"​ log_level = "​debug"​
 ... ...
-</​code>​ +</​code><​code>​
-  * Технология Docker [[Технология Docker#​Предоставление прав непривилегированным пользователям]] +
-<​code>​+
 root@node2:​~#​ systemctl start gitlab-runner root@node2:​~#​ systemctl start gitlab-runner
 </​code>​ </​code>​
  
-==== GitLab CI/CD ====+===== GitLab CI/CD =====
  
   * [[https://​docs.gitlab.com/​ee/​ci/​examples/#​cicd-templates|CI/​CD templates]]   * [[https://​docs.gitlab.com/​ee/​ci/​examples/#​cicd-templates|CI/​CD templates]]
 +  * [[https://​stackoverflow.com/​questions/​64725914/​how-to-disable-auto-pipelines-in-gitlab|How to disable auto pipelines in gitlab]]
  
-=== Пример ​===+==== Пример ​shell make ====
  
 <​code>​ <​code>​
Line 65: Line 129:
 </​code>​ </​code>​
  
-=== Пример ​===+==== Пример ​shell ansible ====
  
 <​code>​ <​code>​
Line 91: Line 155:
 </​code>​ </​code>​
  
-=== Пример ​===+==== Пример ​docker ​===
 + 
 +  * Технология Docker [[Технология Docker#​Предоставление прав непривилегированным пользователям]]
  
 <​code>​ <​code>​
Line 113: Line 179:
 </​code>​ </​code>​
  
-==== Управление пользователями ==== +===== Сервер OAuth2 ​=====
- +
-=== Использование LDAP === +
- +
-  * [[https://​docs.gitlab.com/​ee/​administration/​auth/​ldap/​index.html|Integrate LDAP with GitLab]] +
-  * [[Установка и настройка OpenLDAP]] +
-  * [[Хранение учетных записей UNIX в LDAP]] !!! с атрибутом почты и паролем +
- +
-<​code>​ +
-# cat /​etc/​gitlab/​gitlab.rb +
-</​code><​code>​ +
-... +
-gitlab_rails['​ldap_enabled'​] = true +
- +
-gitlab_rails['​ldap_servers'​] = YAML.load <<​-'​EOS'​ +
-  main: +
-    label: '​LDAP'​ +
-    host: '​server.corpX.un'​ +
-    port: 389 +
-#    port: 636 +
-    uid: '​uid'​ +
-    bind_dn: '​cn=admin,​dc=corpX,​dc=un'​ +
-    password: '​secret'​ +
-    encryption: '​plain'​ +
-#    encryption: '​simple_tls'​ +
-    active_directory:​ false +
-    base: '​ou=People,​dc=corpX,​dc=un'​ +
-... +
-</​code><​code>​ +
-# gitlab-ctl reconfigure +
-</​code>​ +
- +
-==== Сервер OAuth2 ====+
  
   * !!! URL без финального "/"​ !!!   * !!! URL без финального "/"​ !!!
инструмент_gitlab.txt · Last modified: 2024/05/08 10:38 by val