GitLab
をテンプレートにして作成
[
トップ
] [
タイトル一覧
|
ページ一覧
|
新規
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
* GitLab [#h4c33028]
- 衝撃の読み方「ギットラブ」!!
** Getting Started [#w3337f79]
*** 起動 [#cd57f833]
- サービス: gitlab-runsvdir.service
*** 設定変更 [#i8291931]
- gitlab-ctl reconfigure
- gitlab-ctl restart
*** リポジトリ & レジストリ [#o259be52]
- /var/opt/gitlab/git-data
- /var/opt/gitlab/gitlab-rails/shared/registry
*** LDAP [#a604dcae]
- /etc/gitlab/[[gitlab.rb>./ldap_gitlab.rb]]
- 変更の反映
-- # gitlab-ctl reconfigure
- チェック
-- # gitlab-rake gitlab:ldap:check RAILS_ENV=production
*** TLS [#xaa72418]
- CentOS7 だと TLS1.2 しか使えない.
- /etc/gitlab/[[gitlab.rb>./ldap_gitlab.rb]]
- 変更の反映
-- # gitlab-ctl reconfigure
*** HTTPS [#n6ae08c0]
# pwd
/etc/gitlab/ssl
# ls -l
-rw-r--r--. 1 root root 1070 2月 19 15:14 gitlab.nsl.tu...
-r--------. 1 root root 1679 2月 19 15:14 gitlab.nsl.tu...
-r--------. 1 root root 1675 2月 19 15:14 gitlab.nsl.tu...
*** [[Let's Encrypt]] [#n65ca20d]
- 自動でやってくれるらしい
- /etc/gitlab/gitlab.rb
external_url 'https://gitlab.nsl.tuis.ac.jp'
nginx['redirect_http_to_https'] = true
nginx['redirect_http_to_https_port'] = 80
nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.crt"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.k...
letsencrypt['enable'] = true
letsencrypt['contact_emails'] = ['iseki@rsch.tuis.ac.jp'...
letsencrypt['group'] = 'root'
letsencrypt['key_size'] = 2048
letsencrypt['owner'] = 'root'
letsencrypt['wwwroot'] = '/var/opt/gitlab/nginx/www'
# See http://docs.gitlab.com/omnibus/settings/ssl.html#a...
letsencrypt['auto_renew'] = true
letsencrypt['auto_renew_hour'] = 1
letsencrypt['auto_renew_minute'] = 0 # Should be a numbe...
letsencrypt['auto_renew_day_of_month'] = "*/1"
letsencrypt['auto_renew_log_directory'] = '/var/log/gitl...
- Log: /var/log/gitlab/lets-encrypt/*
*** 更新 [#h1a70160]
gitlab-ctl upgrade
gitlab-ctl renew-le-certs
gitlab-ctl restart
*** Docker Registry [#c60d80a9]
- registry ディレクトリのパーミッションが固定:drwxrwx---...
-- repository 用のディレクトリ(drwxrwx--- 3 registry git...
- 格納するイメージ名はある程度固定される.
-- ホスト名:5050/ユーザ名/プロジェクト名(大文字は小文字...
*** /etc/gitlab/gitlab.rb [#r3858d65]
########################################################...
## Container Registry settings
##! Docs: https://docs.gitlab.com/ee/administration/cont...
########################################################...
registry_external_url 'https://gitlab.nsl.tuis.ac.jp:505...
### Settings used by GitLab application
#gitlab_rails['registry_enabled'] = true
#gitlab_rails['registry_host'] = "gitlab.nsl.tuis.ac.jp"
#gitlab_rails['registry_port'] = "5050"
#gitlab_rails['registry_path'] = "/var/opt/gitlab/gitlab...
gitlab_rails['registry_path'] = "/opt/data/registry"
*** login [#e8f12cb7]
docker login gitlab.nsl.tuis.ac.jp:5050
~/.docker ができる.
- LDAP ユーザのログイン方法は?
*** push [#w5bfae09]
- user: root , Project name : DockerRegistry
docker tag jupyterhub/singleuser-ltids:21092013 gitlab....
docker push gitlab.nsl.tuis.ac.jp:5050/root/dockerregis...
#br
*** pull [#m7e1a85f]
docker pull gitlab.nsl.tuis.ac.jp:5050/root/dockerregist...
#br
** 運用 [#mce91faa]
*** 新規プロジェクト [#x547ac2c]
- Create blank project
-- Create
- clone でダウンロード.それを上書き.
- add
- commit
- push
** TroubleShooting [#y0073385]
*** いつの間にか動かなくなっていた! [#p3cfe593]
- ソフトウェアの更新が上手くいっていない可能性がある.
- 順にバージョンを上げる必要がある.
/etc/yum.repos.d/gitlab_gitlab-ce.repo をチェック
# yum install gitlab-ce-5.1.*
# gitlab-ctl reconfigure
# yum install gitlab-ce-5.2.*
# gitlab-ctl reconfigure
# yum install gitlab-ce-5.3.*
# gitlab-ctl reconfigure
# ........
- gitlab-ce-5.18 で蹴躓く
#br
*** LDAP でログイン時にエラー [#xb711372]
- Could not authenticate you from Ldapmain because "Undef...
- LDAPのユーザ属性(posixAccount)に mailアドレスを追加す...
#br
*** root のパスワードを忘れた [#p7d291e4]
- # gitlab-rails console -e production
-- user = User.where(id: 1).first
-- user.password = '********'
-- user.password_confirmation = '********'
-- user.save!
-- exit
--------------------------------------------------------...
Ruby: ruby 2.7.2p137 (2020-10-01 revision 5445e...
GitLab: 14.0.1 (76b84b42f64) FOSS
GitLab Shell: 13.19.0
PostgreSQL: 12.6
--------------------------------------------------------...
Loading production environment (Rails 6.1.3.2)
irb(main):001:0> user = User.where(id: 1).first
=> #<User id:1 @root>
irb(main):002:0> user.password = '********'
=> "********"
irb(main):003:0> user.password_confirmation = '********'
=> "********"
irb(main):004:0> user.save!
Enqueued ActionMailer::MailDeliveryJob (Job ID: 529eea94...
=> true
irb(main):005:0> exit
終了行:
* GitLab [#h4c33028]
- 衝撃の読み方「ギットラブ」!!
** Getting Started [#w3337f79]
*** 起動 [#cd57f833]
- サービス: gitlab-runsvdir.service
*** 設定変更 [#i8291931]
- gitlab-ctl reconfigure
- gitlab-ctl restart
*** リポジトリ & レジストリ [#o259be52]
- /var/opt/gitlab/git-data
- /var/opt/gitlab/gitlab-rails/shared/registry
*** LDAP [#a604dcae]
- /etc/gitlab/[[gitlab.rb>./ldap_gitlab.rb]]
- 変更の反映
-- # gitlab-ctl reconfigure
- チェック
-- # gitlab-rake gitlab:ldap:check RAILS_ENV=production
*** TLS [#xaa72418]
- CentOS7 だと TLS1.2 しか使えない.
- /etc/gitlab/[[gitlab.rb>./ldap_gitlab.rb]]
- 変更の反映
-- # gitlab-ctl reconfigure
*** HTTPS [#n6ae08c0]
# pwd
/etc/gitlab/ssl
# ls -l
-rw-r--r--. 1 root root 1070 2月 19 15:14 gitlab.nsl.tu...
-r--------. 1 root root 1679 2月 19 15:14 gitlab.nsl.tu...
-r--------. 1 root root 1675 2月 19 15:14 gitlab.nsl.tu...
*** [[Let's Encrypt]] [#n65ca20d]
- 自動でやってくれるらしい
- /etc/gitlab/gitlab.rb
external_url 'https://gitlab.nsl.tuis.ac.jp'
nginx['redirect_http_to_https'] = true
nginx['redirect_http_to_https_port'] = 80
nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.crt"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.k...
letsencrypt['enable'] = true
letsencrypt['contact_emails'] = ['iseki@rsch.tuis.ac.jp'...
letsencrypt['group'] = 'root'
letsencrypt['key_size'] = 2048
letsencrypt['owner'] = 'root'
letsencrypt['wwwroot'] = '/var/opt/gitlab/nginx/www'
# See http://docs.gitlab.com/omnibus/settings/ssl.html#a...
letsencrypt['auto_renew'] = true
letsencrypt['auto_renew_hour'] = 1
letsencrypt['auto_renew_minute'] = 0 # Should be a numbe...
letsencrypt['auto_renew_day_of_month'] = "*/1"
letsencrypt['auto_renew_log_directory'] = '/var/log/gitl...
- Log: /var/log/gitlab/lets-encrypt/*
*** 更新 [#h1a70160]
gitlab-ctl upgrade
gitlab-ctl renew-le-certs
gitlab-ctl restart
*** Docker Registry [#c60d80a9]
- registry ディレクトリのパーミッションが固定:drwxrwx---...
-- repository 用のディレクトリ(drwxrwx--- 3 registry git...
- 格納するイメージ名はある程度固定される.
-- ホスト名:5050/ユーザ名/プロジェクト名(大文字は小文字...
*** /etc/gitlab/gitlab.rb [#r3858d65]
########################################################...
## Container Registry settings
##! Docs: https://docs.gitlab.com/ee/administration/cont...
########################################################...
registry_external_url 'https://gitlab.nsl.tuis.ac.jp:505...
### Settings used by GitLab application
#gitlab_rails['registry_enabled'] = true
#gitlab_rails['registry_host'] = "gitlab.nsl.tuis.ac.jp"
#gitlab_rails['registry_port'] = "5050"
#gitlab_rails['registry_path'] = "/var/opt/gitlab/gitlab...
gitlab_rails['registry_path'] = "/opt/data/registry"
*** login [#e8f12cb7]
docker login gitlab.nsl.tuis.ac.jp:5050
~/.docker ができる.
- LDAP ユーザのログイン方法は?
*** push [#w5bfae09]
- user: root , Project name : DockerRegistry
docker tag jupyterhub/singleuser-ltids:21092013 gitlab....
docker push gitlab.nsl.tuis.ac.jp:5050/root/dockerregis...
#br
*** pull [#m7e1a85f]
docker pull gitlab.nsl.tuis.ac.jp:5050/root/dockerregist...
#br
** 運用 [#mce91faa]
*** 新規プロジェクト [#x547ac2c]
- Create blank project
-- Create
- clone でダウンロード.それを上書き.
- add
- commit
- push
** TroubleShooting [#y0073385]
*** いつの間にか動かなくなっていた! [#p3cfe593]
- ソフトウェアの更新が上手くいっていない可能性がある.
- 順にバージョンを上げる必要がある.
/etc/yum.repos.d/gitlab_gitlab-ce.repo をチェック
# yum install gitlab-ce-5.1.*
# gitlab-ctl reconfigure
# yum install gitlab-ce-5.2.*
# gitlab-ctl reconfigure
# yum install gitlab-ce-5.3.*
# gitlab-ctl reconfigure
# ........
- gitlab-ce-5.18 で蹴躓く
#br
*** LDAP でログイン時にエラー [#xb711372]
- Could not authenticate you from Ldapmain because "Undef...
- LDAPのユーザ属性(posixAccount)に mailアドレスを追加す...
#br
*** root のパスワードを忘れた [#p7d291e4]
- # gitlab-rails console -e production
-- user = User.where(id: 1).first
-- user.password = '********'
-- user.password_confirmation = '********'
-- user.save!
-- exit
--------------------------------------------------------...
Ruby: ruby 2.7.2p137 (2020-10-01 revision 5445e...
GitLab: 14.0.1 (76b84b42f64) FOSS
GitLab Shell: 13.19.0
PostgreSQL: 12.6
--------------------------------------------------------...
Loading production environment (Rails 6.1.3.2)
irb(main):001:0> user = User.where(id: 1).first
=> #<User id:1 @root>
irb(main):002:0> user.password = '********'
=> "********"
irb(main):003:0> user.password_confirmation = '********'
=> "********"
irb(main):004:0> user.save!
Enqueued ActionMailer::MailDeliveryJob (Job ID: 529eea94...
=> true
irb(main):005:0> exit
ページ名: