Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0968f7b
docs: add PR template
sovva6-14 Jun 5, 2026
a75ef4e
docs: add PR template
sovva6-14 Jun 6, 2026
8450a05
docs: upstream moved while you worked
sovva6-14 Jun 6, 2026
be8c121
docs: add PR template
sovva6-14 Jun 7, 2026
9a2873e
wip(lab2): Work progress
sovva6-14 Jun 9, 2026
cf5cb87
Task1 Done
sovva6-14 Jun 9, 2026
ab8e9ad
Task1 Done
sovva6-14 Jun 9, 2026
04b5e86
docs: upstream moved while you worked
sovva6-14 Jun 9, 2026
19847ff
Lab2 Done
sovva6-14 Jun 9, 2026
55731b8
delete stupid
sovva6-14 Jun 9, 2026
657b853
test Verified
sovva6-14 Jun 9, 2026
51038bb
test again :)
sovva6-14 Jun 9, 2026
a56c59b
verified signature finaly
sovva6-14 Jun 9, 2026
0d27cbe
create feature/lab3, ci, update pr
sovva6-14 Jun 17, 2026
16c2493
pr update
sovva6-14 Jun 17, 2026
1a0b11d
Merge branch 'inno-devops-labs:main' into main
sovva6-14 Jun 17, 2026
90aa199
mrconfict
sovva6-14 Jun 17, 2026
239140a
Create go.yml
sovva6-14 Jun 17, 2026
82e7fcf
Create ci.yml
sovva6-14 Jun 17, 2026
58c3b24
Create pr_gate.yml
sovva6-14 Jun 17, 2026
eaf23fb
Create prgate.yml
sovva6-14 Jun 17, 2026
428accd
Update prgate.yml
sovva6-14 Jun 17, 2026
9c4b404
delete .yml files
sovva6-14 Jun 17, 2026
0ed06c8
new ci.yml
sovva6-14 Jun 17, 2026
2db3026
update ci sha
sovva6-14 Jun 17, 2026
5b93eed
fix golangci
sovva6-14 Jun 17, 2026
ed38523
update lab3 and pr_template
sovva6-14 Jun 17, 2026
dd00f36
complete lab4 (task1+task2)
sovva6-14 Jun 17, 2026
0f184f9
vagrantfile + lab5
sovva6-14 Jun 24, 2026
c23c730
submission lab5
sovva6-14 Jun 24, 2026
899a4cf
add compose; add dockerfile; add lab6
sovva6-14 Jun 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Goal
<!-- What does this PR accomplish? 1 sentence. -->

Complete lab 3 DevOps

## Changes
* Added submissions/lab3.md
* Create GitHub Action CI Workflows
* Added Go environment ubuntu 24.04

## Testing
<!-- How did you verify it? -->
* Start CI action on GitHub and green CI run
* Verfied CI run pipeline

## Checklist
- ☑️ Title is a clear sentence (≤ 70 chars)
- ☑️ Vet, Test, and Lint checks pass
- ☑️ `submissions/lab3.md` updated
83 changes: 83 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: PR Gate

on:
push:
branches: [ main ]
paths:
- 'app/**'
- '.github/workflows/ci.yml'
pull_request:
branches: [ main ]
paths:
- 'app/**'
- '.github/workflows/ci.yml'

permissions:
contents: read # минимальные права

jobs:
# ---------- vet ----------
vet:
name: go vet
runs-on: ubuntu-24.04
strategy:
matrix:
go-version: [ '1.23', '1.24' ]
fail-fast: false
defaults:
run:
working-directory: app
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.3.0
with:
go-version: ${{ matrix.go-version }}
cache: true
- name: Run go vet
run: go vet ./...

# ---------- test ----------
test:
name: go test -race
runs-on: ubuntu-24.04
strategy:
matrix:
go-version: [ '1.23', '1.24' ]
fail-fast: false
defaults:
run:
working-directory: app
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.3.0
with:
go-version: ${{ matrix.go-version }}
cache: true
- name: Run tests with race detector
run: go test -race -count=1 ./...

# ---------- lint ----------
lint:
name: golangci-lint
runs-on: ubuntu-24.04
defaults:
run:
working-directory: app
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.3.0
with:
go-version: '1.24' # достаточно одной версии для линтера
cache: true
- name: Install golangci-lint v2.5.0
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | \
sh -s -- -b $(go env GOPATH)/bin v2.5.0
- name: Run golangci-lint
run: golangci-lint run ./...
40 changes: 40 additions & 0 deletions app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#---------- Builder stage ----------

FROM golang:1.24-alpine AS builder

# WorkDir

WORKDIR /build

# copy go.mod and run

COPY go.mod ./
RUN go mod download

COPY . .


# CGO_ENABLED=0 — disable CGO
# -ldflags='-s -w' — delete table symbol

RUN CGO_ENABLED=0 GOOS=linux go build \
-ldflags='-s -w' \
-trimpath \
-o quicknotes .

# -------------------- Runtime stage --------------------
FROM gcr.io/distroless/static:nonroot

# copy bin from builder-stage

COPY --from=builder /build/quicknotes /quicknotes

# UID 65532 in distroless/static:nonroot

USER 65532:65532

# port
EXPOSE 8080

# exec-form
ENTRYPOINT ["/quicknotes"]
Binary file added app/lab4-trace.pcap
Binary file not shown.
27 changes: 27 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
services:
quicknotes:
build:
context: ./app
dockerfile: Dockerfile
image: quicknotes:lab6
container_name: quicknotes
ports:
- "8080:8080"
volumes:
- quicknotes-data:/data
environment:
- ADDR=:8080
- DATA_PATH=/data/notes.json
- SEED_PATH=/data/seed.json
healthcheck:
test: ["CMD", "/quicknotes", "-healthcheck"] # or ["CMD-SHELL", "wget -qO- http://localhost:8080/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 5s
restart: unless-stopped


volumes:
quicknotes-data:
name: quicknotes-data
Binary file added lab4-trace.pcap
Binary file not shown.
132 changes: 132 additions & 0 deletions lab4-trace.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
19:11:19.932815 IP 127.0.0.1.42566 > 127.0.0.1.8080: Flags [S], seq 3179416048, win 65495, options [mss 65495,sackOK,TS val 2461922435 ecr 0,nop,wscale 7], length 0
E..<..@.@.(..........F.... ..........0.........
............
19:11:19.932821 IP 127.0.0.1.8080 > 127.0.0.1.42566: Flags [R.], seq 0, ack 3179416049, win 0, length 0
E..(..@.@.<............F...... .P...$...
19:11:19.932861 IP6 ::1.40002 > ::1.8080: Flags [S], seq 2374255427, win 65476, options [mss 65476,sackOK,TS val 2676338689 ecr 0,nop,wscale 7], length 0
`.~..(.@.................................B....CC.........0.........
............
19:11:19.932866 IP6 ::1.8080 > ::1.40002: Flags [R.], seq 0, ack 2374255428, win 0, length 0
`.k9...@...................................B......CDP.......
19:12:26.641138 IP 127.0.0.1.41710 > 127.0.0.1.8080: Flags [S], seq 509650619, win 65495, options [mss 65495,sackOK,TS val 2461989143 ecr 0,nop,wscale 7], length 0
E..<1.@.@.
..............`...........0.........
............
19:12:26.641142 IP 127.0.0.1.8080 > 127.0.0.1.41710: Flags [R.], seq 0, ack 509650620, win 0, length 0
E..(..@.@.<..................`..P...*3..
19:12:26.641165 IP6 ::1.32816 > ::1.8080: Flags [S], seq 630744336, win 65476, options [mss 65476,sackOK,TS val 2676405397 ecr 0,nop,wscale 7], length 0
` .d.(.@.................................0..%.e..........0.........
............
19:12:26.641168 IP6 ::1.8080 > ::1.32816: Flags [R.], seq 0, ack 630744337, win 0, length 0
`.$....@...................................0....%.e.P.......
19:12:43.027807 IP 127.0.0.1.41602 > 127.0.0.1.8080: Flags [S], seq 851489407, win 65495, options [mss 65495,sackOK,TS val 2462005530 ecr 0,nop,wscale 7], length 0
E..<.y@.@..@............2............0.........
..9.........
19:12:43.027811 IP 127.0.0.1.8080 > 127.0.0.1.41602: Flags [R.], seq 0, ack 851489408, win 0, length 0
E..(..@.@.<.................2...P...
{..
19:12:43.027836 IP6 ::1.34804 > ::1.8080: Flags [S], seq 3910870731, win 65476, options [mss 65476,sackOK,TS val 2676421784 ecr 0,nop,wscale 7], length 0
`..Q.(.@......................................&..........0.........
............
19:12:43.027839 IP6 ::1.8080 > ::1.34804: Flags [R.], seq 0, ack 3910870732, win 0, length 0
`......@..........................................&.P.......
19:12:54.413810 IP 127.0.0.1.52472 > 127.0.0.1.8080: Flags [S], seq 1293846705, win 65495, options [mss 65495,sackOK,TS val 2462016916 ecr 0,nop,wscale 7], length 0
E..<.H@.@.[q............M............0.........
..e.........
19:12:54.413816 IP 127.0.0.1.8080 > 127.0.0.1.52472: Flags [R.], seq 0, ack 1293846706, win 0, length 0
E..(..@.@.<.................M...P....t..
19:12:54.413855 IP6 ::1.50118 > ::1.8080: Flags [S], seq 971549680, win 65476, options [mss 65476,sackOK,TS val 2676433170 ecr 0,nop,wscale 7], length 0
`.|s.(.@....................................9............0.........
..!.........
19:12:54.413860 IP6 ::1.8080 > ::1.50118: Flags [R.], seq 0, ack 971549681, win 0, length 0
`.+f...@........................................9...P.......
19:13:30.465338 IP 127.0.0.1.45936 > 127.0.0.1.8080: Flags [S], seq 499019428, win 65495, options [mss 65495,sackOK,TS val 2462052968 ecr 0,nop,wscale 7], length 0
E..<c.@.@............p....n..........0.........
...h........
19:13:30.465343 IP 127.0.0.1.8080 > 127.0.0.1.45936: Flags [R.], seq 0, ack 499019429, win 0, length 0
E..(..@.@.<............p......n.P...Rj..
19:13:30.465371 IP6 ::1.45326 > ::1.8080: Flags [S], seq 2488604191, win 65476, options [mss 65476,sackOK,TS val 2676469222 ecr 0,nop,wscale 7], length 0
`.J .(.@.....................................U...........0.........
............
19:13:30.465375 IP6 ::1.8080 > ::1.45326: Flags [R.], seq 0, ack 2488604192, win 0, length 0
`../...@.........................................U. P.......
21:33:29.974894 IP 127.0.0.1.54142 > 127.0.0.1.8080: Flags [S], seq 289262757, win 65495, options [mss 65495,sackOK,TS val 2470452477 ecr 0,nop,wscale 7], length 0
E..<.$@.@............~...=...........0.........
.@..........
21:33:29.974902 IP 127.0.0.1.8080 > 127.0.0.1.54142: Flags [S.], seq 2132570133, ack 289262758, win 65483, options [mss 65495,sackOK,TS val 2470452477 ecr 2470452477,nop,wscale 7], length 0
E..<..@.@.<............~..p..=.......0.........
.@...@......
21:33:29.974907 IP 127.0.0.1.54142 > 127.0.0.1.8080: Flags [.], ack 1, win 512, options [nop,nop,TS val 2470452477 ecr 2470452477], length 0
E..4.%@.@............~...=....p......(.....
.@...@..
21:33:29.974939 IP 127.0.0.1.54142 > 127.0.0.1.8080: Flags [P.], seq 1:176, ack 1, win 512, options [nop,nop,TS val 2470452477 ecr 2470452477], length 175: HTTP: POST /notes HTTP/1.1
E....&@.@............~...=....p............
.@...@..POST /notes HTTP/1.1
Host: localhost:8080
User-Agent: curl/7.81.0
Accept: */*
Content-Type: application/json
Content-Length: 39

{"title":"trace me","body":"in flight"}
21:33:29.974940 IP 127.0.0.1.8080 > 127.0.0.1.54142: Flags [.], ack 176, win 511, options [nop,nop,TS val 2470452477 ecr 2470452477], length 0
E..4.+@.@.$............~..p..=.U.....(.....
.@...@..
21:33:29.980128 IP 127.0.0.1.8080 > 127.0.0.1.54142: Flags [P.], seq 1:207, ack 176, win 512, options [nop,nop,TS val 2470452482 ecr 2470452477], length 206: HTTP: HTTP/1.1 201 Created
E....,@.@.#............~..p..=.U...........
.@...@..HTTP/1.1 201 Created
Content-Type: application/json
Date: Wed, 17 Jun 2026 18:33:29 GMT
Content-Length: 93

{"id":5,"title":"trace me","body":"in flight","created_at":"2026-06-17T18:33:29.975704318Z"}

21:33:29.980139 IP 127.0.0.1.54142 > 127.0.0.1.8080: Flags [.], ack 207, win 511, options [nop,nop,TS val 2470452482 ecr 2470452482], length 0
E..4.'@.@............~...=.U..p......(.....
.@...@..
21:33:29.980234 IP 127.0.0.1.54142 > 127.0.0.1.8080: Flags [F.], seq 176, ack 207, win 512, options [nop,nop,TS val 2470452482 ecr 2470452482], length 0
E..4.(@.@............~...=.U..p......(.....
.@...@..
21:33:29.980286 IP 127.0.0.1.8080 > 127.0.0.1.54142: Flags [F.], seq 207, ack 177, win 512, options [nop,nop,TS val 2470452482 ecr 2470452482], length 0
E..4.-@.@.$............~..p..=.V.....(.....
.@...@..
21:33:29.980293 IP 127.0.0.1.54142 > 127.0.0.1.8080: Flags [.], ack 208, win 512, options [nop,nop,TS val 2470452482 ecr 2470452482], length 0
E..4.)@.@............~...=.V..p......(.....
.@...@..
21:34:41.834814 IP 127.0.0.1.47718 > 127.0.0.1.8080: Flags [S], seq 1421564529, win 65495, options [mss 65495,sackOK,TS val 2470524337 ecr 0,nop,wscale 7], length 0
E..<g+@.@............f..T.Zq.........0.........
.A5.........
21:34:41.834822 IP 127.0.0.1.8080 > 127.0.0.1.47718: Flags [S.], seq 2578938132, ack 1421564530, win 65483, options [mss 65495,sackOK,TS val 2470524337 ecr 2470524337,nop,wscale 7], length 0
E..<..@.@.<............f..y.T.Zr.....0.........
.A5..A5.....
21:34:41.834828 IP 127.0.0.1.47718 > 127.0.0.1.8080: Flags [.], ack 1, win 512, options [nop,nop,TS val 2470524337 ecr 2470524337], length 0
E..4g,@.@............f..T.Zr..y......(.....
.A5..A5.
21:34:41.834861 IP 127.0.0.1.47718 > 127.0.0.1.8080: Flags [P.], seq 1:176, ack 1, win 512, options [nop,nop,TS val 2470524337 ecr 2470524337], length 175: HTTP: POST /notes HTTP/1.1
E...g-@.@............f..T.Zr..y............
.A5..A5.POST /notes HTTP/1.1
Host: localhost:8080
User-Agent: curl/7.81.0
Accept: */*
Content-Type: application/json
Content-Length: 39

{"title":"trace me","body":"in flight"}
21:34:41.834863 IP 127.0.0.1.8080 > 127.0.0.1.47718: Flags [.], ack 176, win 511, options [nop,nop,TS val 2470524337 ecr 2470524337], length 0
E..4.i@.@..X...........f..y.T.[!.....(.....
.A5..A5.
21:34:41.839333 IP 127.0.0.1.8080 > 127.0.0.1.47718: Flags [P.], seq 1:207, ack 176, win 512, options [nop,nop,TS val 2470524341 ecr 2470524337], length 206: HTTP: HTTP/1.1 201 Created
E....j@.@..............f..y.T.[!...........
.A5..A5.HTTP/1.1 201 Created
Content-Type: application/json
Date: Wed, 17 Jun 2026 18:34:41 GMT
Content-Length: 93

{"id":6,"title":"trace me","body":"in flight","created_at":"2026-06-17T18:34:41.835071034Z"}

21:34:41.839349 IP 127.0.0.1.47718 > 127.0.0.1.8080: Flags [.], ack 207, win 511, options [nop,nop,TS val 2470524342 ecr 2470524341], length 0
E..4g.@.@............f..T.[!..y......(.....
.A5..A5.
21:34:41.839506 IP 127.0.0.1.47718 > 127.0.0.1.8080: Flags [F.], seq 176, ack 207, win 512, options [nop,nop,TS val 2470524342 ecr 2470524341], length 0
E..4g/@.@............f..T.[!..y......(.....
.A5..A5.
Loading