From 6627a628537be36954f8ac44c9e5d6c0d0830b20 Mon Sep 17 00:00:00 2001 From: SailorUpiter Date: Fri, 10 Jul 2026 21:47:25 +0300 Subject: [PATCH 1/4] add ci depoy satge --- .github/workflows/ci.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c661084..7229a1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ env: # Переменные окружения PLATFORMS: linux/amd64,linux/arm64 jobs: # Список выполняемых джоб - check-changes: # джоба проверки изменений в файлах + need-deploy: # джоба проверки изменений в файлах runs-on: ubuntu-latest outputs: src_changed: ${{ steps.filter.outputs.src }} @@ -53,4 +53,22 @@ jobs: # Список выполняемых джоб ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} cache-from: type=gha - cache-to: type=gha,mode=max \ No newline at end of file + cache-to: type=gha,mode=max + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Deploy over SSH + uses: appleboy/ssh-action@v0.1.6 + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USER }} + key: ${{ secrets.KEY }} + script: | + cd /home/ubadmin/mkdocs + git pull origin main + docker compose down + docker compose up -d --build \ No newline at end of file -- 2.52.0 From baf27b42bbc0735619cecaa335ca53ff10a3cb51 Mon Sep 17 00:00:00 2001 From: SailorUpiter Date: Fri, 10 Jul 2026 22:10:06 +0300 Subject: [PATCH 2/4] add ci checker from need build and deploy --- .github/workflows/ci.yml | 24 ++++++++++++++++++++---- mkdocs.yml | 4 +--- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7229a1c..5da8a38 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,21 @@ env: # Переменные окружения PLATFORMS: linux/amd64,linux/arm64 jobs: # Список выполняемых джоб - need-deploy: # джоба проверки изменений в файлах + need-build: # джоба проверки изменений в файлах. При изменении пулит новые файлы и перезапускает контейнер + runs-on: ubuntu-latest + outputs: + src_changed: ${{ steps.filter.outputs.src }} + steps: + - uses: actions/checkout@v3 + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + src: + - 'docs/*' + - 'mkdocs.yml' + + need-deploy: # джоба проверки изменений в зависимостях. Если requirements.txt был изменен, то будет выполнена сборка и пуш образа runs-on: ubuntu-latest outputs: src_changed: ${{ steps.filter.outputs.src }} @@ -24,8 +38,8 @@ jobs: # Список выполняемых джоб - 'requirements.txt' build: # джоба сборки и пуша образа. Выполняется если проверка изменений показала что requirements.txt был изменен - needs: check-changes - if: needs.check-changes.outputs.src_changed == 'true' + needs: need-build + if: needs.need-build.outputs.src_changed == 'true' runs-on: ubuntu-latest steps: - name: Login to Gitea Registry @@ -54,9 +68,11 @@ jobs: # Список выполняемых джоб ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} cache-from: type=gha cache-to: type=gha,mode=max + deploy: runs-on: ubuntu-latest - + needs: need-deploy + if: needs.need-build.outputs.src_changed == 'true' steps: - name: Checkout uses: actions/checkout@v3 diff --git a/mkdocs.yml b/mkdocs.yml index 12ddfc6..e2c3514 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -18,12 +18,10 @@ theme: icon: repo: fontawesome/brands/github features: - - content.code.copy + - content.code.copy - navigation.instant - navigation.instant.progress - navigation.sections -# - navigation.tabs -# - navigation.tabs.sticky - navigation.path - navigation.top - navigation.prune -- 2.52.0 From cf1b1617947d969a202a5853793d96de2aecd004 Mon Sep 17 00:00:00 2001 From: SailorUpiter Date: Fri, 10 Jul 2026 22:10:23 +0300 Subject: [PATCH 3/4] add plantuml schemas --- docs/scemas plantUml/scema-vms.uml | 27 ++++++++++++++++++++ docs/scemas plantUml/schema-kube.uml | 38 ++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 docs/scemas plantUml/scema-vms.uml create mode 100644 docs/scemas plantUml/schema-kube.uml diff --git a/docs/scemas plantUml/scema-vms.uml b/docs/scemas plantUml/scema-vms.uml new file mode 100644 index 0000000..2c50f0f --- /dev/null +++ b/docs/scemas plantUml/scema-vms.uml @@ -0,0 +1,27 @@ +@startuml +!theme bluegray + +title Схема доступа к Vm через Proxy + +node "Proxy" as proxy + +node "Master-1" as m1 +node "Master-2" as m2 +node "Master-3" as m3 + +node "Worker-1" as w1 +node "Worker-2" as w2 +node "Worker-3" as w3 + +node "Docker" as d1 + +proxy -down-> m1 +proxy -down-> m2 +proxy -down-> m3 + +proxy -down-> w1 +proxy -down-> w2 +proxy -down-> w3 + +proxy -down-> d1 +@enduml \ No newline at end of file diff --git a/docs/scemas plantUml/schema-kube.uml b/docs/scemas plantUml/schema-kube.uml new file mode 100644 index 0000000..6c61c32 --- /dev/null +++ b/docs/scemas plantUml/schema-kube.uml @@ -0,0 +1,38 @@ +@startuml +!theme bluegray + +title Схема Кластера Кубера + +node "Proxy" as proxy + +node "Мастер-ноды" { + [Master-1] + [Master-2] + [Master-3] +} + +node "Воркер-ноды" { + [Worker-1] + [Worker-2] + [Worker-3] +} + + + +proxy --> [Master-1] +proxy --> [Master-2] +proxy --> [Master-3] + +[Master-1] --> [Worker-1] +[Master-1] --> [Worker-2] +[Master-1] --> [Worker-3] +[Master-2] --> [Worker-1] +[Master-2] --> [Worker-2] +[Master-2] --> [Worker-3] +[Master-3] --> [Worker-1] +[Master-3] --> [Worker-2] +[Master-3] --> [Worker-3] + + + +@enduml \ No newline at end of file -- 2.52.0 From 2b2daa5117b399761f78f2cc4d491da59ceffa4d Mon Sep 17 00:00:00 2001 From: SailorUpiter Date: Fri, 10 Jul 2026 22:12:19 +0300 Subject: [PATCH 4/4] add sudo --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5da8a38..da53f8e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,5 +86,5 @@ jobs: # Список выполняемых джоб script: | cd /home/ubadmin/mkdocs git pull origin main - docker compose down - docker compose up -d --build \ No newline at end of file + sudo docker compose down + sudo docker compose up -d --build \ No newline at end of file -- 2.52.0