{"id":345370,"date":"2023-02-13T09:03:36","date_gmt":"2023-02-13T09:03:36","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=345370"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2023-02-13T09:03:36","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=345370","title":{"rendered":"<span>\u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 CI\/CD<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041e\u0434\u043d\u0430\u0436\u0434\u044b \u043f\u043e\u0434\u0441\u043b\u0443\u0448\u0430\u043d\u043e:<\/p>\n<p>\u2014 \u0410\u2026 \u0410\u00a0\u0447\u0442\u043e\u00a0\u043c\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u0434\u0435\u043b\u0430\u0435\u043c?<\/p>\n<p>\u2014 \u0414\u0435\u043f\u043b\u043e\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u2014 \u0410\u00a0\u0447\u0442\u043e\u00a0\u0442\u0430\u043a\u043e\u0435 \u0434\u0435\u043f\u043b\u043e\u0439?<\/p>\n<p>\u2014 \u0414\u0435\u043f\u043b\u043e\u0439\u2026 \u041d\u0443 \u044d\u0442\u043e \u0434\u0435\u043f\u043b\u043e\u0439, \u0447\u0442\u043e\u00a0\u0442\u0443\u0442 \u043d\u0435\u00a0\u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0433\u043e?<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/212\/6ac\/d79\/2126acd7963d0a6952eaf6e7335e2d79.png\" width=\"624\" height=\"454\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/212\/6ac\/d79\/2126acd7963d0a6952eaf6e7335e2d79.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0418 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0432 \u201c\u0442\u0435\u043c\u0435\u201d, \u0432\u0441\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e &#8212; \u0431\u0435\u0440\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 Python, \u0437\u0430\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0432 Docker, \u043a\u043b\u0430\u0434\u0435\u043c \u0432 GitLab, \u0432\u044b\u043a\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0447\u0435\u0440\u0435\u0437 CI\/CD \u0432 \u041aubernetes. \u041d\u043e \u0442\u0435\u043c, \u043a\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0447\u0438\u0442\u0441\u044f, \u0441 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0438\u043b\u0438\u0435\u043c \u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0435\u043b\u0435\u0433\u043a\u043e. \u041c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0441 \u043a\u0430\u0442\u0430\u043d\u0438\u0435\u043c \u043d\u0430 \u0441\u043d\u043e\u0443\u0431\u043e\u0440\u0434\u0435 &#8212; \u043f\u043e\u043a\u0430 \u201c\u0433\u043e\u043b\u043e\u0432\u0430\u201d \u0438 \u201c\u0442\u0435\u043b\u043e\u201d \u043d\u0435 \u043e\u0441\u0432\u043e\u044f\u0442 \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0445 \u043d\u0430\u0432\u044b\u043a\u043e\u0432 &#8212; \u0432\u0434\u043e\u0432\u043e\u043b\u044c \u201c\u043d\u0430\u0432\u0430\u043b\u044f\u0435\u0448\u044c\u0441\u044f\u201d:) \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0438 \u0432 \u0441\u043d\u043e\u0443\u0431\u043e\u0440\u0434\u0435, \u0438 \u0432 \u043b\u044e\u0431\u043e\u043c \u0434\u0440\u0443\u0433\u043e\u043c \u0432\u0438\u0434\u0435 \u0441\u043f\u043e\u0440\u0442\u0430 \u0435\u0441\u0442\u044c \u201c\u043f\u043e\u0434\u0432\u043e\u0434\u044f\u0449\u0438\u0435\u201d \u0443\u043f\u0440\u0430\u0436\u043d\u0435\u043d\u0438\u044f \u0438 \u044f \u0445\u043e\u0447\u0443 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043e\u0434\u043d\u043e \u0438\u0437 \u0442\u0430\u043a\u0438\u0445.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0431\u0443\u0434\u0443 \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0431\u044b\u0442\u0443\u044e\u0449\u0435\u0433\u043e \u043c\u043d\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u0432 \u201c\u0434\u0435\u0432\u043e\u043f\u0441\u044b\u201d \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0434\u0443\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 Python \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 proxy Squid, \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0435\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0432 GitLab \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c CI\/CD \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0427\u0442\u043e\u0431\u044b \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0431\u044b\u043b\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c\u044b\u043c, \u043e\u043f\u0438\u0448\u0443 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0448\u0430\u0433\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0435\u043d\u0434\u0430 \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b (VM) \u0432 VirtualBox.<\/p>\n<h3>\u0428\u0430\u0433 1. \u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 VM<\/h3>\n<p>\u0421\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 VirtualBox:<\/p>\n<p><a href=\"https:\/\/www.virtualbox.org\/wiki\/Downloads\" rel=\"noopener noreferrer nofollow\">https:\/\/www.virtualbox.org\/wiki\/Downloads<\/a><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 VM, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0432 \u043a \u043d\u0435\u0439 \u043e\u0431\u0440\u0430\u0437 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p><a href=\"https:\/\/www.debian.org\/download\" rel=\"noopener noreferrer nofollow\">https:\/\/www.debian.org\/download<\/a><\/p>\n<p>\u0418\u043b\u0438, \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u043e\u0438\u043c:<\/p>\n<p><a href=\"https:\/\/val.bmstu.ru\/unix\/img\/My%20Documents\/debian_11.1_64_01.ova\" rel=\"noopener noreferrer nofollow\">https:\/\/val.bmstu.ru\/unix\/img\/My%20Documents\/debian_11.1_64_01.ova<\/a><\/p>\n<p>\u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0430\u0437\u043d\u0430\u0447\u044c\u0442\u0435 \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 4096 \u041c\u0411 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 (4GB RAM), \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u201c\u043c\u043e\u0441\u0442\u043e\u043c\u201d \u043a \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u0435 \u0412\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 (\u0445\u043e\u0441\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u044b), \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 VM.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u044d\u043a\u0440\u0430\u043d\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e (GUI \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d) \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0441\u0435\u0440\u0432\u0438\u0441 SSH. \u041c\u043e\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e (\u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0440\u0432\u0438\u0441 DHCP) \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f ip \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u041f\u043e\u0441\u043b\u0435 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043a \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u0443\u0437\u043d\u0430\u0439\u0442\u0435 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0435\u0439 ip \u0430\u0434\u0440\u0435\u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<p><code>ip a<\/code><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043c\u043e\u0439 \u043e\u0431\u0440\u0430\u0437, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u043a\u043e\u043d\u0441\u043e\u043b\u0438 VM \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 (\u0443\u0447\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c student\/password), \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438, \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 ip \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u043e dhcp, \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 ip, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code>student@debian:~$ sudo -i  debian:~# nano \/etc\/network\/interfaces<\/code><\/pre>\n<pre><code>auto lo   iface lo inet loopback  auto eth0   iface eth0 inet dhcp<\/code><\/pre>\n<pre><code>debian:~# ifup eth0  debian:~# echo 127.0.1.1 $(hostname) >> \/etc\/hosts<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043d\u0443\u0436\u043d\u0430 \u0434\u043b\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c ip \u043f\u043e hostname \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 sudo \u0438 proxy Squid (\u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430 2-\u043c \u0448\u0430\u0433\u0435, \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0432 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a VM \u043f\u043e SSH).<\/p>\n<h3>\u0428\u0430\u0433 2. \u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441 Squid<\/h3>\n<p>\u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043a VM \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f SSH \u043a\u043b\u0438\u0435\u043d\u0442. \u0415\u0441\u043b\u0438 \u0443 \u0412\u0430\u0441 Windows \u043d\u0430 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c PuTTY:<\/p>\n<p><a href=\"https:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/latest.html\" rel=\"noopener noreferrer nofollow\">https:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/latest.html<\/a><\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 Squid, \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0444\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 (\u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c proxy \u0431\u0443\u0434\u0435\u0442 \u201c\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u201d \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0430\u0439\u0442\u044b, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0430), \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c \u0432 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0435\u0440\u0432\u0438\u0441, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code>student@debian:~$ sudo -i  debian:~# apt update  debian:~# apt install squid -y  debian:~# nano \/etc\/squid\/permit_domains.txt<\/code><\/pre>\n<pre><code>.debian.org .linux.org.ru<\/code><\/pre>\n<pre><code>debian:~# nano \/etc\/squid\/conf.d\/my.conf<\/code><\/pre>\n<pre><code>acl permit_domains dstdomain \"\/etc\/squid\/permit_domains.txt\" http_access allow permit_domains<\/code><\/pre>\n<pre><code>debian:~# squid -k check  debian:~# squid -k reconfigure<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0430 \u0445\u043e\u0441\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Firefox<\/p>\n<p><a href=\"https:\/\/www.mozilla.org\/ru\/firefox\/new\/\" rel=\"noopener noreferrer nofollow\">https:\/\/www.mozilla.org\/ru\/firefox\/new\/<\/a><\/p>\n<p>\u0443\u043a\u0430\u0437\u0430\u0432 ip \u0430\u0434\u0440\u0435\u0441 \u0412\u0430\u0448\u0435\u0439 VM (\u0437\u0434\u0435\u0441\u044c \u0438 \u0434\u0430\u043b\u0435\u0435, \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 192.168.1.102 \u043d\u0430 \u0442\u043e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443 \u0412\u0430\u0441)<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/298\/f5d\/428\/298f5d428d39342ced087c38bf86c3e4.png\" width=\"882\" height=\"438\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/298\/f5d\/428\/298f5d428d39342ced087c38bf86c3e4.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u201c\u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f\u201d \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u0439\u0442\u044b, \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u0444\u0430\u0439\u043b\u0435 permit_domains.txt<\/p>\n<h3>\u0428\u0430\u0433 3. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c GitLab<\/h3>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 GitLab, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e:<\/p>\n<p><a href=\"https:\/\/about.gitlab.com\/install\/#debian\" rel=\"noopener noreferrer nofollow\">https:\/\/about.gitlab.com\/install\/#debian<\/a><\/p>\n<p>\u0438\u043b\u0438 \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u043c\u0430\u043d\u0434 \u043d\u0438\u0436\u0435, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c ip \u0430\u0434\u0440\u0435\u0441 \u0432 EXTERNAL_URL \u043d\u0430 \u0412\u0430\u0448:<\/p>\n<pre><code>debian:~# apt install -y curl ca-certificates perl  debian:~# curl https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ce\/script.deb.sh | bash  debian:~# EXTERNAL_URL=\"http:\/\/192.168.1.102\" apt-get install gitlab-ce<\/code><\/pre>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043a GitLab \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0441 \u0445\u043e\u0441\u0442 \u043c\u0430\u0448\u0438\u043d\u044b, \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u0440\u0438 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u0438 EXTERNAL_URL, \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e root \u0438 \u043f\u0430\u0440\u043e\u043b\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437 \u0444\u0430\u0439\u043b\u0430:<\/p>\n<pre><code>debian:~# cat \/etc\/gitlab\/initial_root_password<\/code><\/pre>\n<p>\u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u201cAdmin\u2192Users\u2192New User\u201d \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e, \u0442\u043e\u0436\u0435 student) \u0437\u0430\u0434\u0430\u0432 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b<\/p>\n<pre><code>Name: student Username: student Email: student@localhost<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0443\u044e \u043f\u043e\u0447\u0442\u0443 \u0432 VM, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f (\u201cCreate User\u201d) \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438, \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u0435\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (\u201cEdit\u201d), \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0439\u0442\u0435, \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u0435 \u0438 \u0434\u0432\u0430\u0436\u0434\u044b \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c (\u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u0430\u0440\u043e\u043b\u044c:) \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f (\u201cSave \u0441hanges\u201d)<\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043d\u043e\u0432\u043e\u0439 \u0443\u0447\u0451\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e (\u043d\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439)<\/p>\n<h3>\u0428\u0430\u0433 4. \u0420\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e proxy \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 GitLab<\/h3>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u201cCreate a project\u201d\u2192\u201cCreate blank project\u201d<\/p>\n<p>\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c Project name: squid project \u0438 \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u201c\u0433\u0430\u043b\u043e\u0447\u043a\u0443\u201d \u201cInitialize repository with a README\u201d, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0448\u0430\u0433\u0435.<\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0438\u0437 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u201cPush an existing folder\u201d, \u0437\u0430\u0434\u0430\u0432 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 git \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 user.email<\/p>\n<pre><code>debian:~# git config --global user.email student@localhost  debian:~# cd \/etc\/squid\/  debian:\/etc\/squid# git init --initial-branch=main  debian:\/etc\/squid# git remote add origin http:\/\/192.168.1.102\/student\/squid-project.git  debian:\/etc\/squid# git add .  debian:\/etc\/squid# git commit -m \"Initial commit\"  debian:\/etc\/squid# git push -u origin main<\/code><\/pre>\n<p>\u201c\u0429\u0435\u043b\u043a\u043d\u0443\u0432\u201d \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \/etc\/squid \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0432 GitLab. \u0414\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 SSH \u043a VM \u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c Squid, \u0430 \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u0440\u044f\u043c\u043e \u0437\u0434\u0435\u0441\u044c \u0447\u0435\u0440\u0435\u0437 \u201cWeb IDE\u201d. \u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441, \u043a\u0430\u043a \u044d\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u043f\u0430\u0434\u0443\u0442 \u0432 VM \u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c Squid?<\/p>\n<h3>\u0428\u0430\u0433 5. GitLab Runner<\/h3>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 GitLab Runner, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e:<\/p>\n<p><a href=\"https:\/\/docs.gitlab.com\/runner\/install\/linux-manually.html\" rel=\"noopener noreferrer nofollow\">https:\/\/docs.gitlab.com\/runner\/install\/linux-manually.html<\/a><\/p>\n<p>\u0438\u043b\u0438 \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u043c\u0430\u043d\u0434 \u043d\u0438\u0436\u0435:<\/p>\n<pre><code>debian:~# curl -LJO \"https:\/\/gitlab-runner-downloads.s3.amazonaws.com\/latest\/deb\/gitlab-runner_amd64.deb\"  debian:~# dpkg -i gitlab-runner_amd64.deb<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0435\u0440\u0432\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u043e\u043b\u0433\u043e, \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0441\u0442\u0430\u0440\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0441 \u043c\u043e\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430, \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043e\u043d\u0430 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442:<\/p>\n<pre><code>debian:~# wget http:\/\/val.bmstu.ru\/unix\/Git\/gitlab-runner_amd64.deb<\/code><\/pre>\n<p>\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e gitlab-runner \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u044f\u043c\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 proxy:<\/p>\n<pre><code>debian:~# nano \/etc\/sudoers.d\/squid-sudo<\/code><\/pre>\n<pre><code>gitlab-runner ALL=NOPASSWD: \/bin\/cp -r .\/* \/etc\/squid\/, \/usr\/sbin\/squid -k *<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0432\u0441\u0435 \u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0434\u043e\u043c\u0435\u043d \u043a\u0430\u043a\u043e\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u0430\u0439\u0442\u0430 \u0432 \u0444\u0430\u0439\u043b permit_domains.txt \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u201cWeb IDE\u201d \u0432 GitLab \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 Commit \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0432\u0435\u0442\u043a\u0443 main. \u0414\u0430\u043b\u0435\u0435, \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f gitlab-runner, \u0441\u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0439\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442, \u0437\u0430\u0439\u0434\u0438\u0442\u0435 \u0432 \u0435\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438:<\/p>\n<pre><code>debian:~# su - gitlab-runner  gitlab-runner@debian:~$ git clone http:\/\/192.168.1.102\/student\/squid-project.git  gitlab-runner@debian:~$ cd squid-project\/  gitlab-runner@debian:~\/squid-project$ sudo \/usr\/sbin\/squid -k check -f conf.d\/my.conf  gitlab-runner@debian:~\/squid-project$ sudo \/bin\/cp -r .\/* \/etc\/squid\/  gitlab-runner@debian:~\/squid-project$ sudo \/usr\/sbin\/squid -k reconfigure<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 \u0441\u0430\u0439\u0442 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0437\u043d\u0430\u0447\u0438\u0442 \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e \u043a \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438!<\/p>\n<h3>\u0428\u0430\u0433 6. GitLab CI\/CD<\/h3>\n<p>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0439\u0442\u0435 GitLab Runner \u0432 GitLab. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043a GitLab \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e root (\u0441\u043c. \u0428\u0430\u0433 3) \u0430 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438:<\/p>\n<pre><code>debian:~# gitlab-runner register<\/code><\/pre>\n<p>\u0443\u043a\u0430\u0436\u0438\u0442\u0435\u00a0<a href=\"http:\/\/localhost\/\" rel=\"noopener noreferrer nofollow\">http:\/\/localhost\/<\/a>\u00a0\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u201cGitLab instance URL\u201d<\/p>\n<pre><code>Enter the GitLab instance URL (for example, https:\/\/gitlab.com\/): http:\/\/localhost\/<\/code><\/pre>\n<p>\u0432 GitLab \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 Admin\u2192CI\/CD\u2192Runners \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u201cRegister an instance runner\u201d \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0438 \u0432\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u201cregistration token\u201d<\/p>\n<pre><code>Enter the registration token: xxxxxxxxxxxxxx-xxxxxxx<\/code><\/pre>\n<p>\u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f \u201cdescription\u201d \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439<\/p>\n<pre><code>Enter a description for the runner: [debian]:<\/code><\/pre>\n<p>\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u201ctags\u201d \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 squid-tag, \u043e\u043d\u043e \u043d\u0430\u043c \u0441\u043a\u043e\u0440\u043e \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f<\/p>\n<pre><code>Enter tags for the runner (comma-separated): squid-tag<\/code><\/pre>\n<p>\u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u201coptional maintenance\u201d \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043d\u0430 WARNING \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 (\u0445\u043e\u0442\u044f \u0441\u043a\u043e\u0440\u043e \u0441\u0442\u0430\u0442\u044c\u044e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c:), \u0433\u043b\u0430\u0432\u043d\u043e\u0435 &#8212; \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438<\/p>\n<pre><code>Enter optional maintenance note for the runner: WARNING: ... Registering runner... succeeded                     runner=oDSeAdUz<\/code><\/pre>\n<p>\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u201cexecutor\u201d \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 shell (\u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u043d\u0435\u0433\u043e:)<\/p>\n<pre><code>Enter an executor: docker-ssh, virtualbox, instance, docker-ssh+machine, kubernetes, custom, docker, parallels, shell, ssh, docker+machine: shell<\/code><\/pre>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c \u0447\u0442\u043e \u0432 GitLab, \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 Admin\u2192CI\/CD\u2192Runners \u043d\u0430\u0448 Runner \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 Online \u0438 \u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043a \u043d\u0435\u043c\u0443 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e student<\/p>\n<p>\u0412 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u201csquid project\u201d \u0437\u0430\u0439\u0434\u0438\u0442\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b CI\/CD\u2192Editor \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u201cConfigure Pipeline\u201d<\/p>\n<p>\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0442\u0435\u043a\u0441\u0442 Pipeline \u043d\u0430 \u044d\u0442\u043e\u0442:<\/p>\n<pre><code>stages:   - test   - deploy  test1-job:   stage: test   script:     - sudo \/usr\/sbin\/squid -k check -f conf.d\/my.conf   tags:     - squid-tag  deploy1-job:   stage: deploy   script:     - sudo \/bin\/cp -r .\/* \/etc\/squid\/     - sudo \/usr\/sbin\/squid -k reconfigure   tags:     - squid-tag<\/code><\/pre>\n<p>\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u201cCommit Changes\u201d.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0434\u043e\u043c\u0435\u043d \u0435\u0449\u0435 \u043a\u0430\u043a\u043e\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u0430\u0439\u0442\u0430 \u0432 \u0444\u0430\u0439\u043b permit_domains.txt \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u201cWeb IDE\u201d \u0432 GitLab \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 Commit \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0432\u0435\u0442\u043a\u0443 main.<\/p>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 CI\/CD\u2192Pipelines \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 Status \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u043e\u0441\u044c \u0432 passed, \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u0441\u0430\u0439\u0442, \u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u043c\u0435\u043d \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0444\u0430\u0439\u043b\u0435:<\/p>\n<pre><code>debian:~# cat \/etc\/squid\/permit_domains.txt<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0430\u043a, \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e, \u0412\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u0432\u043e\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 CI\/CD Pipeline!<\/p>\n<h3>\u0418\u0442\u043e\u0433\u0438<\/h3>\n<p>\u0422\u0430\u043a\u043e\u0439 \u0432\u043e\u0442 \u201c\u0438\u0433\u0440\u0443\u0448\u0435\u0447\u043d\u044b\u0439\u201d \u0434\u0435\u043f\u043b\u043e\u0439, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0445 \u201cDevOps\u201d \u0440\u0435\u0448\u0435\u043d\u0438\u0439. \u0415\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c, \u043e\u0431\u0440\u0430\u0449\u0430\u0439\u0442\u0435\u0441\u044c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445!<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435, \u0441\u043f\u0430\u0441\u0438\u0431\u043e, \u0447\u0442\u043e \u0434\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u0434\u043e \u043a\u043e\u043d\u0446\u0430, \u0435\u0441\u043b\u0438 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e DevOps \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u043c \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441, \u043d\u0430\u043f\u0438\u0448\u0443 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e ansible, docker, k8s \u0438 \u043f\u0440\u043e\u0447\u0438\u043c!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/716454\/\"> https:\/\/habr.com\/ru\/post\/716454\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041e\u0434\u043d\u0430\u0436\u0434\u044b \u043f\u043e\u0434\u0441\u043b\u0443\u0448\u0430\u043d\u043e:<\/p>\n<p>\u2014 \u0410\u2026 \u0410\u00a0\u0447\u0442\u043e\u00a0\u043c\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u0434\u0435\u043b\u0430\u0435\u043c?<\/p>\n<p>\u2014 \u0414\u0435\u043f\u043b\u043e\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u2014 \u0410\u00a0\u0447\u0442\u043e\u00a0\u0442\u0430\u043a\u043e\u0435 \u0434\u0435\u043f\u043b\u043e\u0439?<\/p>\n<p>\u2014 \u0414\u0435\u043f\u043b\u043e\u0439\u2026 \u041d\u0443 \u044d\u0442\u043e \u0434\u0435\u043f\u043b\u043e\u0439, \u0447\u0442\u043e\u00a0\u0442\u0443\u0442 \u043d\u0435\u00a0\u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0433\u043e?<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0418 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0432 \u201c\u0442\u0435\u043c\u0435\u201d, \u0432\u0441\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e &#8212; \u0431\u0435\u0440\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 Python, \u0437\u0430\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0432 Docker, \u043a\u043b\u0430\u0434\u0435\u043c \u0432 GitLab, \u0432\u044b\u043a\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0447\u0435\u0440\u0435\u0437 CI\/CD \u0432 \u041aubernetes. \u041d\u043e \u0442\u0435\u043c, \u043a\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0447\u0438\u0442\u0441\u044f, \u0441 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0438\u043b\u0438\u0435\u043c \u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0435\u043b\u0435\u0433\u043a\u043e. \u041c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0441 \u043a\u0430\u0442\u0430\u043d\u0438\u0435\u043c \u043d\u0430 \u0441\u043d\u043e\u0443\u0431\u043e\u0440\u0434\u0435 &#8212; \u043f\u043e\u043a\u0430 \u201c\u0433\u043e\u043b\u043e\u0432\u0430\u201d \u0438 \u201c\u0442\u0435\u043b\u043e\u201d \u043d\u0435 \u043e\u0441\u0432\u043e\u044f\u0442 \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0445 \u043d\u0430\u0432\u044b\u043a\u043e\u0432 &#8212; \u0432\u0434\u043e\u0432\u043e\u043b\u044c \u201c\u043d\u0430\u0432\u0430\u043b\u044f\u0435\u0448\u044c\u0441\u044f\u201d:) \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0438 \u0432 \u0441\u043d\u043e\u0443\u0431\u043e\u0440\u0434\u0435, \u0438 \u0432 \u043b\u044e\u0431\u043e\u043c \u0434\u0440\u0443\u0433\u043e\u043c \u0432\u0438\u0434\u0435 \u0441\u043f\u043e\u0440\u0442\u0430 \u0435\u0441\u0442\u044c \u201c\u043f\u043e\u0434\u0432\u043e\u0434\u044f\u0449\u0438\u0435\u201d \u0443\u043f\u0440\u0430\u0436\u043d\u0435\u043d\u0438\u044f \u0438 \u044f \u0445\u043e\u0447\u0443 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043e\u0434\u043d\u043e \u0438\u0437 \u0442\u0430\u043a\u0438\u0445.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0431\u0443\u0434\u0443 \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0431\u044b\u0442\u0443\u044e\u0449\u0435\u0433\u043e \u043c\u043d\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u0432 \u201c\u0434\u0435\u0432\u043e\u043f\u0441\u044b\u201d \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0434\u0443\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 Python \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 proxy Squid, \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0435\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0432 GitLab \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c CI\/CD \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0427\u0442\u043e\u0431\u044b \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0431\u044b\u043b\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c\u044b\u043c, \u043e\u043f\u0438\u0448\u0443 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0448\u0430\u0433\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0435\u043d\u0434\u0430 \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b (VM) \u0432 VirtualBox.<\/p>\n<h3>\u0428\u0430\u0433 1. \u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 VM<\/h3>\n<p>\u0421\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 VirtualBox:<\/p>\n<p><a href=\"https:\/\/www.virtualbox.org\/wiki\/Downloads\" rel=\"noopener noreferrer nofollow\">https:\/\/www.virtualbox.org\/wiki\/Downloads<\/a><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 VM, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0432 \u043a \u043d\u0435\u0439 \u043e\u0431\u0440\u0430\u0437 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p><a href=\"https:\/\/www.debian.org\/download\" rel=\"noopener noreferrer nofollow\">https:\/\/www.debian.org\/download<\/a><\/p>\n<p>\u0418\u043b\u0438, \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u043e\u0438\u043c:<\/p>\n<p><a href=\"https:\/\/val.bmstu.ru\/unix\/img\/My%20Documents\/debian_11.1_64_01.ova\" rel=\"noopener noreferrer nofollow\">https:\/\/val.bmstu.ru\/unix\/img\/My%20Documents\/debian_11.1_64_01.ova<\/a><\/p>\n<p>\u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0430\u0437\u043d\u0430\u0447\u044c\u0442\u0435 \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 4096 \u041c\u0411 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 (4GB RAM), \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u201c\u043c\u043e\u0441\u0442\u043e\u043c\u201d \u043a \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u0435 \u0412\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 (\u0445\u043e\u0441\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u044b), \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 VM.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u044d\u043a\u0440\u0430\u043d\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e (GUI \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d) \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0441\u0435\u0440\u0432\u0438\u0441 SSH. \u041c\u043e\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e (\u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0440\u0432\u0438\u0441 DHCP) \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f ip \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u041f\u043e\u0441\u043b\u0435 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043a \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u0443\u0437\u043d\u0430\u0439\u0442\u0435 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0435\u0439 ip \u0430\u0434\u0440\u0435\u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<p><code>ip a<\/code><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043c\u043e\u0439 \u043e\u0431\u0440\u0430\u0437, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u043a\u043e\u043d\u0441\u043e\u043b\u0438 VM \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 (\u0443\u0447\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c student\/password), \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438, \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 ip \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u043e dhcp, \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 ip, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code>student@debian:~$ sudo -i  debian:~# nano \/etc\/network\/interfaces<\/code><\/pre>\n<pre><code>auto lo   iface lo inet loopback  auto eth0   iface eth0 inet dhcp<\/code><\/pre>\n<pre><code>debian:~# ifup eth0  debian:~# echo 127.0.1.1 $(hostname) >> \/etc\/hosts<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043d\u0443\u0436\u043d\u0430 \u0434\u043b\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c ip \u043f\u043e hostname \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 sudo \u0438 proxy Squid (\u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430 2-\u043c \u0448\u0430\u0433\u0435, \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0432 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a VM \u043f\u043e SSH).<\/p>\n<h3>\u0428\u0430\u0433 2. \u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441 Squid<\/h3>\n<p>\u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043a VM \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f SSH \u043a\u043b\u0438\u0435\u043d\u0442. \u0415\u0441\u043b\u0438 \u0443 \u0412\u0430\u0441 Windows \u043d\u0430 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c PuTTY:<\/p>\n<p><a href=\"https:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/latest.html\" rel=\"noopener noreferrer nofollow\">https:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/latest.html<\/a><\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 Squid, \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0444\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 (\u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c proxy \u0431\u0443\u0434\u0435\u0442 \u201c\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u201d \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0430\u0439\u0442\u044b, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0430), \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c \u0432 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0435\u0440\u0432\u0438\u0441, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code>student@debian:~$ sudo -i  debian:~# apt update  debian:~# apt install squid -y  debian:~# nano \/etc\/squid\/permit_domains.txt<\/code><\/pre>\n<pre><code>.debian.org .linux.org.ru<\/code><\/pre>\n<pre><code>debian:~# nano \/etc\/squid\/conf.d\/my.conf<\/code><\/pre>\n<pre><code>acl permit_domains dstdomain \"\/etc\/squid\/permit_domains.txt\" http_access allow permit_domains<\/code><\/pre>\n<pre><code>debian:~# squid -k check  debian:~# squid -k reconfigure<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0430 \u0445\u043e\u0441\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Firefox<\/p>\n<p><a href=\"https:\/\/www.mozilla.org\/ru\/firefox\/new\/\" rel=\"noopener noreferrer nofollow\">https:\/\/www.mozilla.org\/ru\/firefox\/new\/<\/a><\/p>\n<p>\u0443\u043a\u0430\u0437\u0430\u0432 ip \u0430\u0434\u0440\u0435\u0441 \u0412\u0430\u0448\u0435\u0439 VM (\u0437\u0434\u0435\u0441\u044c \u0438 \u0434\u0430\u043b\u0435\u0435, \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 192.168.1.102 \u043d\u0430 \u0442\u043e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443 \u0412\u0430\u0441)<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u201c\u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f\u201d \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u0439\u0442\u044b, \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u0444\u0430\u0439\u043b\u0435 permit_domains.txt<\/p>\n<h3>\u0428\u0430\u0433 3. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c GitLab<\/h3>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 GitLab, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e:<\/p>\n<p><a href=\"https:\/\/about.gitlab.com\/install\/#debian\" rel=\"noopener noreferrer nofollow\">https:\/\/about.gitlab.com\/install\/#debian<\/a><\/p>\n<p>\u0438\u043b\u0438 \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u043c\u0430\u043d\u0434 \u043d\u0438\u0436\u0435, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c ip \u0430\u0434\u0440\u0435\u0441 \u0432 EXTERNAL_URL \u043d\u0430 \u0412\u0430\u0448:<\/p>\n<pre><code>debian:~# apt install -y curl ca-certificates perl  debian:~# curl https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ce\/script.deb.sh | bash  debian:~# EXTERNAL_URL=\"http:\/\/192.168.1.102\" apt-get install gitlab-ce<\/code><\/pre>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043a GitLab \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0441 \u0445\u043e\u0441\u0442 \u043c\u0430\u0448\u0438\u043d\u044b, \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u0440\u0438 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u0438 EXTERNAL_URL, \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e root \u0438 \u043f\u0430\u0440\u043e\u043b\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437 \u0444\u0430\u0439\u043b\u0430:<\/p>\n<pre><code>debian:~# cat \/etc\/gitlab\/initial_root_password<\/code><\/pre>\n<p>\u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u201cAdmin\u2192Users\u2192New User\u201d \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e, \u0442\u043e\u0436\u0435 student) \u0437\u0430\u0434\u0430\u0432 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b<\/p>\n<pre><code>Name: student Username: student Email: student@localhost<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0443\u044e \u043f\u043e\u0447\u0442\u0443 \u0432 VM, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f (\u201cCreate User\u201d) \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438, \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u0435\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (\u201cEdit\u201d), \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0439\u0442\u0435, \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u0435 \u0438 \u0434\u0432\u0430\u0436\u0434\u044b \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c (\u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u0430\u0440\u043e\u043b\u044c:) \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f (\u201cSave \u0441hanges\u201d)<\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043d\u043e\u0432\u043e\u0439 \u0443\u0447\u0451\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e (\u043d\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439)<\/p>\n<h3>\u0428\u0430\u0433 4. \u0420\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e proxy \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 GitLab<\/h3>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u201cCreate a project\u201d\u2192\u201cCreate blank project\u201d<\/p>\n<p>\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c Project name: squid project \u0438 \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u201c\u0433\u0430\u043b\u043e\u0447\u043a\u0443\u201d \u201cInitialize repository with a README\u201d, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0448\u0430\u0433\u0435.<\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0438\u0437 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u201cPush an existing folder\u201d, \u0437\u0430\u0434\u0430\u0432 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 git \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 user.email<\/p>\n<pre><code>debian:~# git config --global user.email student@localhost  debian:~# cd \/etc\/squid\/  debian:\/etc\/squid# git init --initial-branch=main  debian:\/etc\/squid# git remote add origin http:\/\/192.168.1.102\/student\/squid-project.git  debian:\/etc\/squid# git add .  debian:\/etc\/squid# git commit -m \"Initial commit\"  debian:\/etc\/squid# git push -u origin main<\/code><\/pre>\n<p>\u201c\u0429\u0435\u043b\u043a\u043d\u0443\u0432\u201d \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \/etc\/squid \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0432 GitLab. \u0414\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 SSH \u043a VM \u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c Squid, \u0430 \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u0440\u044f\u043c\u043e \u0437\u0434\u0435\u0441\u044c \u0447\u0435\u0440\u0435\u0437 \u201cWeb IDE\u201d. \u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441, \u043a\u0430\u043a \u044d\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u043f\u0430\u0434\u0443\u0442 \u0432 VM \u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c Squid?<\/p>\n<h3>\u0428\u0430\u0433 5. GitLab Runner<\/h3>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 GitLab Runner, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e:<\/p>\n<p><a href=\"https:\/\/docs.gitlab.com\/runner\/install\/linux-manually.html\" rel=\"noopener noreferrer nofollow\">https:\/\/docs.gitlab.com\/runner\/install\/linux-manually.html<\/a><\/p>\n<p>\u0438\u043b\u0438 \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u043c\u0430\u043d\u0434 \u043d\u0438\u0436\u0435:<\/p>\n<pre><code>debian:~# curl -LJO \"https:\/\/gitlab-runner-downloads.s3.amazonaws.com\/latest\/deb\/gitlab-runner_amd64.deb\"  debian:~# dpkg -i gitlab-runner_amd64.deb<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0435\u0440\u0432\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u043e\u043b\u0433\u043e, \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0441\u0442\u0430\u0440\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0441 \u043c\u043e\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430, \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043e\u043d\u0430 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442:<\/p>\n<pre><code>debian:~# wget http:\/\/val.bmstu.ru\/unix\/Git\/gitlab-runner_amd64.deb<\/code><\/pre>\n<p>\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e gitlab-runner \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u044f\u043c\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 proxy:<\/p>\n<pre><code>debian:~# nano \/etc\/sudoers.d\/squid-sudo<\/code><\/pre>\n<pre><code>gitlab-runner ALL=NOPASSWD: \/bin\/cp -r .\/* \/etc\/squid\/, \/usr\/sbin\/squid -k *<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0432\u0441\u0435 \u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0434\u043e\u043c\u0435\u043d \u043a\u0430\u043a\u043e\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u0430\u0439\u0442\u0430 \u0432 \u0444\u0430\u0439\u043b permit_domains.txt \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u201cWeb IDE\u201d \u0432 GitLab \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 Commit \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0432\u0435\u0442\u043a\u0443 main. \u0414\u0430\u043b\u0435\u0435, \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f gitlab-runner, \u0441\u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0439\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442, \u0437\u0430\u0439\u0434\u0438\u0442\u0435 \u0432 \u0435\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438:<\/p>\n<pre><code>debian:~# su - gitlab-runner  gitlab-runner@debian:~$ git clone http:\/\/192.168.1.102\/student\/squid-project.git  gitlab-runner@debian:~$ cd squid-project\/  gitlab-runner@debian:~\/squid-project$ sudo \/usr\/sbin\/squid -k check -f conf.d\/my.conf  gitlab-runner@debian:~\/squid-project$ sudo \/bin\/cp -r .\/* \/etc\/squid\/  gitlab-runner@debian:~\/squid-project$ sudo \/usr\/sbin\/squid -k reconfigure<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 \u0441\u0430\u0439\u0442 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0437\u043d\u0430\u0447\u0438\u0442 \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e \u043a \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438!<\/p>\n<h3>\u0428\u0430\u0433 6. GitLab CI\/CD<\/h3>\n<p>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0439\u0442\u0435 GitLab Runner \u0432 GitLab. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043a GitLab \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e root (\u0441\u043c. \u0428\u0430\u0433 3) \u0430 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438:<\/p>\n<pre><code>debian:~# gitlab-runner register<\/code><\/pre>\n<p>\u0443\u043a\u0430\u0436\u0438\u0442\u0435\u00a0<a href=\"http:\/\/localhost\/\" rel=\"noopener noreferrer nofollow\">http:\/\/localhost\/<\/a>\u00a0\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u201cGitLab instance URL\u201d<\/p>\n<pre><code>Enter the GitLab instance URL (for example, https:\/\/gitlab.com\/): http:\/\/localhost\/<\/code><\/pre>\n<p>\u0432 GitLab \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 Admin\u2192CI\/CD\u2192Runners \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u201cRegister an instance runner\u201d \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0438 \u0432\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u201cregistration token\u201d<\/p>\n<pre><code>Enter the registration token: xxxxxxxxxxxxxx-xxxxxxx<\/code><\/pre>\n<p>\u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f \u201cdescription\u201d \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439<\/p>\n<pre><code>Enter a description for the runner: [debian]:<\/code><\/pre>\n<p>\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u201ctags\u201d \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 squid-tag, \u043e\u043d\u043e \u043d\u0430\u043c \u0441\u043a\u043e\u0440\u043e \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f<\/p>\n<pre><code>Enter tags for the runner (comma-separated): squid-tag<\/code><\/pre>\n<p>\u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u201coptional maintenance\u201d \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043d\u0430 WARNING \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 (\u0445\u043e\u0442\u044f \u0441\u043a\u043e\u0440\u043e \u0441\u0442\u0430\u0442\u044c\u044e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c:), \u0433\u043b\u0430\u0432\u043d\u043e\u0435 &#8212; \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438<\/p>\n<pre><code>Enter optional maintenance note for the runner: WARNING: ... Registering runner... succeeded                     runner=oDSeAdUz<\/code><\/pre>\n<p>\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u201cexecutor\u201d \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 shell (\u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u043d\u0435\u0433\u043e:)<\/p>\n<pre><code>Enter an executor: docker-ssh, virtualbox, instance, docker-ssh+machine, kubernetes, custom, docker, parallels, shell, ssh, docker+machine: shell<\/code><\/pre>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c \u0447\u0442\u043e \u0432 GitLab, \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 Admin\u2192CI\/CD\u2192Runners \u043d\u0430\u0448 Runner \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 Online \u0438 \u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043a \u043d\u0435\u043c\u0443 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e student<\/p>\n<p>\u0412 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u201csquid project\u201d \u0437\u0430\u0439\u0434\u0438\u0442\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b CI\/CD\u2192Editor \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u201cConfigure Pipeline\u201d<\/p>\n<p>\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0442\u0435\u043a\u0441\u0442 Pipeline \u043d\u0430 \u044d\u0442\u043e\u0442:<\/p>\n<pre><code>stages:   - test   - deploy  test1-job:   stage: test   script:     - sudo \/usr\/sbin\/squid -k check -f conf.d\/my.conf   tags:     - squid-tag  deploy1-job:   stage: deploy   script:     - sudo \/bin\/cp -r .\/* \/etc\/squid\/     - sudo \/usr\/sbin\/squid -k reconfigure   tags:     - squid-tag<\/code><\/pre>\n<p>\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u201cCommit Changes\u201d.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0434\u043e\u043c\u0435\u043d \u0435\u0449\u0435 \u043a\u0430\u043a\u043e\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u0430\u0439\u0442\u0430 \u0432 \u0444\u0430\u0439\u043b permit_domains.txt \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u201cWeb IDE\u201d \u0432 GitLab \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 Commit \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0432\u0435\u0442\u043a\u0443 main.<\/p>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 CI\/CD\u2192Pipelines \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 Status \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u043e\u0441\u044c \u0432 passed, \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u0441\u0430\u0439\u0442, \u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u043c\u0435\u043d \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0444\u0430\u0439\u043b\u0435:<\/p>\n<pre><code>debian:~# cat \/etc\/squid\/permit_domains.txt<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0430\u043a, \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e, \u0412\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u0432\u043e\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 CI\/CD Pipeline!<\/p>\n<h3>\u0418\u0442\u043e\u0433\u0438<\/h3>\n<p>\u0422\u0430\u043a\u043e\u0439 \u0432\u043e\u0442 \u201c\u0438\u0433\u0440\u0443\u0448\u0435\u0447\u043d\u044b\u0439\u201d \u0434\u0435\u043f\u043b\u043e\u0439, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f <\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-345370","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/345370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=345370"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/345370\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=345370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=345370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=345370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}