Skip to content

Commit adf1e06

Browse files
author
Skalski
committed
Merge branch 'dev' into 51-implement-unit-tests-for-system-including-genai
2 parents 6664b45 + 60f6135 commit adf1e06

57 files changed

Lines changed: 3226 additions & 2030 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build_docker.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ jobs:
2929
- service: flashcard-service
3030
context: flashcard-service
3131
dockerfile: flashcard-service/Dockerfile
32+
- service: genai-service
33+
context: genai-service
34+
dockerfile: genai-service/Dockerfile
3235

3336
steps:
3437
- uses: actions/checkout@v4

.gitignore

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,76 @@
1+
### Frontend ###
2+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
3+
4+
# dependencies
5+
/frontend/*/node_modules
6+
/.pnp
7+
.pnp.*
8+
9+
# production
10+
/frontend/*/build
11+
/frontend/*/dist
12+
13+
# misc
14+
.DS_Store
15+
*.pem
16+
17+
# debug
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*
21+
22+
# local env files
23+
.env
24+
.env*.local
25+
26+
# vercel
27+
.vercel
28+
29+
# typescript
30+
*.tsbuildinfo
31+
next-env.d.ts
32+
33+
### Terraform ###
34+
# Local .terraform directories
35+
**/.terraform/*
36+
37+
# .tfstate files
38+
*.tfstate
39+
*.tfstate.*
40+
41+
# Crash log files
42+
crash.log
43+
crash.*.log
44+
45+
# Exclude all .tfvars files, which are likely to contain sensitive data, such as
46+
# password, private keys, and other secrets. These should not be part of version
47+
# control as they are data points which are potentially sensitive and subject
48+
# to change depending on the environment.
49+
*.tfvars
50+
*.tfvars.json
51+
52+
# Ignore override files as they are usually used to override resources locally and so
53+
# are not checked in
54+
override.tf
55+
override.tf.json
56+
*_override.tf
57+
*_override.tf.json
58+
59+
# Ignore transient lock info files created by terraform apply
60+
.terraform.tfstate.lock.info
61+
62+
# Include override files you do wish to add to version control using negated pattern
63+
# !example_override.tf
64+
65+
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
66+
# example: *tfplan*
67+
68+
# Ignore CLI configuration files
69+
.terraformrc
70+
terraform.rc
71+
72+
### End Terraform ###
73+
174
### Angular ###
275
## Angular ##
376
# compiled output

client/Dockerfile

Lines changed: 0 additions & 24 deletions
This file was deleted.

client/nginx.conf

Lines changed: 0 additions & 25 deletions
This file was deleted.

client/src/App.js

Lines changed: 0 additions & 81 deletions
This file was deleted.

compose.aws.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,12 @@ services:
7878
- .env.prod
7979
depends_on:
8080
- db
81+
- genai-service
8182
environment:
8283
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/initexample
8384
- SPRING_DATASOURCE_USERNAME=${POSTGRES_USER}
8485
- SPRING_DATASOURCE_PASSWORD=${POSTGRES_PASSWORD}
86+
- GENAI_SERVICE_URL=http://genai-service:5001
8587
labels:
8688
- "traefik.enable=true"
8789
- "traefik.docker.network=traefik"
@@ -115,6 +117,24 @@ services:
115117
networks:
116118
- traefik
117119

120+
genai-service:
121+
image: ghcr.io/aet-devops25/team-deployaas/genai-service:latest
122+
container_name: studyapp_genai_service
123+
env_file:
124+
- .env.prod
125+
environment:
126+
- WEBUI_API_KEY=${WEBUI_API_KEY}
127+
- PORT=5001
128+
healthcheck:
129+
test: ["CMD", "curl", "-f", "http://localhost:5001/health"]
130+
interval: 30s
131+
timeout: 30s
132+
retries: 3
133+
start_period: 30s
134+
restart: always
135+
networks:
136+
- traefik
137+
118138
client:
119139
image: ghcr.io/aet-devops25/team-deployaas/client:latest
120140
container_name: studyapp_client
@@ -124,6 +144,7 @@ services:
124144
- auth-service
125145
- quiz-service
126146
- flashcard-service
147+
- genai-service
127148
labels:
128149
- "traefik.enable=true"
129150
- "traefik.docker.network=traefik"

database/initdb/02-data.sql

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
-- Insert test users
2+
INSERT INTO users (user_id, name, email, password_hash) VALUES
3+
('00000000-0000-0000-0000-000000000001', 'Test User', 'test@example.com', '$2a$10$dummyhashfordemopurposes');
4+
15
-- Insert initial course data
26
INSERT INTO courses (course_id, title) VALUES
37
('550e8400-e29b-41d4-a716-446655440000', 'DevOps Fundamentals'),
@@ -86,3 +90,59 @@ INSERT INTO questions (question_id, text, sample_solution, chapter_id, ordering)
8690
'How do distributed tracing and logging work together to provide system insights?',
8791
'Distributed tracing tracks requests across multiple services, providing end-to-end visibility of transaction flows and identifying performance bottlenecks. Logging captures detailed events and errors at each service level. Together, they enable: 1) Correlation of trace spans with relevant log entries, 2) Root cause analysis by following trace paths and examining logs, 3) Performance optimization by identifying slow operations in traces and their corresponding log details, 4) Error investigation by linking failed traces to error logs, and 5) System understanding through combined transaction flows and detailed event records.',
8892
'550e8400-e29b-41d4-a716-446655440003', 3);
93+
94+
-- Insert test flashcard decks
95+
INSERT INTO flashcard_decks (deck_id, user_id, name) VALUES
96+
('550e8400-e29b-41d4-a716-446655450001', '00000000-0000-0000-0000-000000000001', 'DevOps Fundamentals Deck'),
97+
('550e8400-e29b-41d4-a716-446655450002', '00000000-0000-0000-0000-000000000001', 'Testing Strategies Deck'),
98+
('550e8400-e29b-41d4-a716-446655450003', '00000000-0000-0000-0000-000000000001', 'CI/CD Pipeline Essentials');
99+
100+
-- Insert test flashcards for DevOps Fundamentals Deck
101+
INSERT INTO flashcards (flashcard_id, deck_id, front, back) VALUES
102+
('550e8400-e29b-41d4-a716-446655450011', '550e8400-e29b-41d4-a716-446655450001',
103+
'What does CI/CD stand for?',
104+
'Continuous Integration / Continuous Deployment (or Continuous Delivery)'),
105+
106+
('550e8400-e29b-41d4-a716-446655450012', '550e8400-e29b-41d4-a716-446655450001',
107+
'What is Infrastructure as Code (IaC)?',
108+
'Managing and provisioning computing infrastructure through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools'),
109+
110+
('550e8400-e29b-41d4-a716-446655450013', '550e8400-e29b-41d4-a716-446655450001',
111+
'Name the three pillars of observability',
112+
'Metrics, Logs, and Traces'),
113+
114+
('550e8400-e29b-41d4-a716-446655450014', '550e8400-e29b-41d4-a716-446655450001',
115+
'What is the difference between monitoring and observability?',
116+
'Monitoring tells you WHAT is happening (predefined metrics), while observability helps you understand WHY it is happening (ability to debug unknown issues)');
117+
118+
-- Insert test flashcards for Testing Strategies Deck
119+
INSERT INTO flashcards (flashcard_id, deck_id, front, back) VALUES
120+
('550e8400-e29b-41d4-a716-446655450021', '550e8400-e29b-41d4-a716-446655450002',
121+
'What is the difference between verification and validation?',
122+
'Verification: Are we building the product right? (according to specifications)\nValidation: Are we building the right product? (according to user requirements)'),
123+
124+
('550e8400-e29b-41d4-a716-446655450022', '550e8400-e29b-41d4-a716-446655450002',
125+
'Name 3 fundamental principles of software testing',
126+
'1. Testing shows presence of defects, not their absence\n2. Exhaustive testing is impossible\n3. Early testing saves time and money'),
127+
128+
('550e8400-e29b-41d4-a716-446655450023', '550e8400-e29b-41d4-a716-446655450002',
129+
'What is mutation testing?',
130+
'A testing technique that evaluates test suite quality by introducing small changes (mutations) to the code and checking if tests can detect these changes');
131+
132+
-- Insert test flashcards for CI/CD Pipeline Essentials Deck
133+
INSERT INTO flashcards (flashcard_id, deck_id, front, back) VALUES
134+
('550e8400-e29b-41d4-a716-446655450031', '550e8400-e29b-41d4-a716-446655450003',
135+
'What are the key stages of a CI/CD pipeline?',
136+
'1. Source Control\n2. Build Stage\n3. Test Stage\n4. Code Analysis\n5. Deployment to Staging\n6. Production Deployment\n7. Monitoring'),
137+
138+
('550e8400-e29b-41d4-a716-446655450032', '550e8400-e29b-41d4-a716-446655450003',
139+
'What is the main benefit of automated testing in CI/CD?',
140+
'Early detection of integration issues and improved code quality through consistent, repeatable testing'),
141+
142+
('550e8400-e29b-41d4-a716-446655450033', '550e8400-e29b-41d4-a716-446655450003',
143+
'What is infrastructure drift?',
144+
'When actual infrastructure configuration deviates from the defined specification over time due to manual changes, patches, or updates'),
145+
146+
('550e8400-e29b-41d4-a716-446655450034', '550e8400-e29b-41d4-a716-446655450003',
147+
'How does IaC prevent infrastructure drift?',
148+
'By maintaining a single source of truth in code, regularly comparing actual vs desired state, and enabling automated remediation');

0 commit comments

Comments
 (0)