This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
инструмент_gitlab [2026/02/07 05:00] val [Тестирование] |
инструмент_gitlab [2026/02/16 14:15] (current) val [Подключение через API] |
||
|---|---|---|---|
| Line 58: | Line 58: | ||
| gitlab_rails['registry_port'] = "5050" | gitlab_rails['registry_port'] = "5050" | ||
| registry['registry_http_addr'] = "0.0.0.0:5050" | registry['registry_http_addr'] = "0.0.0.0:5050" | ||
| + | #gitlab_rails['env'] = { 'SKIP_RAISE_ON_INITIALIZE_CONNECTIONS' => 'true' } | ||
| ports: | ports: | ||
| - '443:443' | - '443:443' | ||
| Line 119: | Line 120: | ||
| <code> | <code> | ||
| - | kube1:~/gitlab# cat adduser.sh | + | client1$ cat adduser.sh |
| </code><code> | </code><code> | ||
| GITLAB_URL="https://gitlab.corpX.un" | GITLAB_URL="https://gitlab.corpX.un" | ||
| - | PRIVATE_TOKEN="NNNNNNNNNNNN" | + | PRIVATE_TOKEN=NNNNNNNNNNNN |
| USER_EMAIL="user1@corpX.un" | USER_EMAIL="user1@corpX.un" | ||
| Line 150: | Line 151: | ||
| <code> | <code> | ||
| ### docker exec -it root_web_1 bash | ### docker exec -it root_web_1 bash | ||
| + | ### kubectl -n my-gitlab-ns exec -ti pods/gitlab-<TAB> -- bash | ||
| + | |||
| + | # ###gitlab-ctl status | ||
| + | # ###gitlab-rake gitlab:check | ||
| + | # ###gitlab-ctl tail sidekiq | ||
| # gitlab-ctl show-config | # gitlab-ctl show-config | ||
| Line 158: | Line 164: | ||
| ... | ... | ||
| </code> | </code> | ||
| + | ==== Настройка отправки почты ==== | ||
| + | * [[Утилита msmtp#sendmail без mta]] | ||
| + | <code> | ||
| + | root@gitlab:/# gitlab-rails console | ||
| + | irb(main):001> Notify.test_email('student@corp15.un', 'Message Subject', 'Message Body').deliver_now | ||
| + | </code> | ||
| ==== GitLab Docker Registry ==== | ==== GitLab Docker Registry ==== | ||
| Line 294: | Line 306: | ||
| ## Может занять 2 часа ## | ## Может занять 2 часа ## | ||
| - | # ###curl -LJO "https://s3.dualstack.us-east-1.amazonaws.com/gitlab-runner-downloads/latest/deb/gitlab-runner-helper-images.deb" | + | # ###curl -LJO "https://s3.dualstack.us-east-1.amazonaws.com/gitlab-runner-downloads/v18.6.2/deb/gitlab-runner-helper-images.deb" |
| - | # ###curl -LJO "https://s3.dualstack.us-east-1.amazonaws.com/gitlab-runner-downloads/latest/deb/gitlab-runner_amd64.deb" | + | # ###curl -LJO "https://s3.dualstack.us-east-1.amazonaws.com/gitlab-runner-downloads/v18.6.2/deb/gitlab-runner_amd64.deb" |
| # ###dpkg -i gitlab-runner-helper-images.deb gitlab-runner_amd64.deb | # ###dpkg -i gitlab-runner-helper-images.deb gitlab-runner_amd64.deb | ||
| </code> | </code> | ||
| Line 446: | Line 458: | ||
| <code> | <code> | ||
| - | Settings -> CI/CD -> Variables -> Add variable -> Masked and hidden ... ANS_V_SEC или VAULT_ADDR | + | Settings -> CI/CD -> Variables -> Add variable -> Masked and hidden ... ANS_V_SEC или VAULT_ADDR/VAULT_TOKEN |
| снять Protect variable | снять Protect variable | ||
| Line 453: | Line 465: | ||
| </code> | </code> | ||
| <code> | <code> | ||
| - | Administrator@Ra-master ~/openvpn1 (test) | + | ~/openvpn1# cat .gitlab-ci.yml |
| - | λ touch .gitlab-ci.yml | + | |
| или | или | ||
| Build -> Pipeline editor -> Configure Pipelines | Build -> Pipeline editor -> Configure Pipelines | ||
| Line 466: | Line 477: | ||
| - ansible-playbook openvpn1.yaml -i inventory.yaml -e "variable_host=test_nodes" | - ansible-playbook openvpn1.yaml -i inventory.yaml -e "variable_host=test_nodes" | ||
| # - echo $ANS_V_SEC | ansible-playbook openvpn1.yaml -i inventory2.yaml --vault-password-file=/bin/cat -e "variable_host=test_nodes" | # - echo $ANS_V_SEC | ansible-playbook openvpn1.yaml -i inventory2.yaml --vault-password-file=/bin/cat -e "variable_host=test_nodes" | ||
| - | # - sops exec-file --no-fifo inventory4.yaml 'ansible-playbook openvpn1.yaml -i {} -e "variable_host=test_nodes"' | + | # - sops exec-file --no-fifo inventory.yaml 'ansible-playbook openvpn1.yaml -i {} -e "variable_host=test_nodes"' |
| tags: | tags: | ||
| - ansible | - ansible | ||
| Line 477: | Line 488: | ||
| - ansible-playbook openvpn1.yaml -i inventory.yaml | - ansible-playbook openvpn1.yaml -i inventory.yaml | ||
| # - echo $ANS_V_SEC | ansible-playbook openvpn1.yaml -i inventory2.yaml --vault-password-file=/bin/cat | # - echo $ANS_V_SEC | ansible-playbook openvpn1.yaml -i inventory2.yaml --vault-password-file=/bin/cat | ||
| - | # - sops exec-file --no-fifo inventory4.yaml 'ansible-playbook openvpn1.yaml -i {}' | + | # - sops exec-file --no-fifo inventory.yaml 'ansible-playbook openvpn1.yaml -i {}' |
| tags: | tags: | ||
| - ansible | - ansible | ||