Skip to content

Commit

Permalink
Merge pull request #904 from UniversityOfHelsinkiCS/trunk
Browse files Browse the repository at this point in the history
100 uutta featurea ja fixiä
  • Loading branch information
Rochet2 authored May 16, 2019
2 parents 02745c8 + 5c6e417 commit c16f0f4
Show file tree
Hide file tree
Showing 290 changed files with 5,737 additions and 3,603 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ services/updater_writer/updater/test_assets/testi.bak
services/updater_writer/updater/test_assets/011120775.json
services/updater_writer/updater/test_assets/014272112.json
services/updater_writer/updater/test_assets/014441008.json
services/updater_writer/updater/test_assets/meta.json
services/updater_writer/updater/test_assets/meta.json
services/updater_scheduler/all_student_numbers.txt
services/updater_scheduler/debug.log
services/updater_scheduler/active_student_numbers.txt
services/oodikone2-backend/debug.log
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,6 @@ jobs:

after_script:
- docker-compose logs

after_failure:
- "curl -X POST -H 'Content-type: application/json' --data '{\"text\":\"Buildi on paskana! STOP AND FIX tai tulee kenkää! https://travis-ci.org/UniversityOfHelsinkiCS/oodikone\"}' https://hooks.slack.com/services/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"
14 changes: 7 additions & 7 deletions cypress.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"projectId": "c8bfes",
"defaultCommandTimeout": 120000,
"execTimeout": 120000,
"taskTimeout": 120000,
"pageLoadTimeout": 120000,
"requestTimeout": 120000,
"responseTimeout": 120000
"projectId": "c3jsph",
"defaultCommandTimeout": 60000,
"execTimeout": 60000,
"taskTimeout": 60000,
"pageLoadTimeout": 60000,
"requestTimeout": 60000,
"responseTimeout": 60000
}
2 changes: 1 addition & 1 deletion cypress/integration/Population_statistics.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ describe('Population Statistics tests', () => {
cy.contains("Matematiikan didaktiikka").siblings().eq(2).should("have.text", '9')
})

cy.get(".refresh").eq(1).click()
cy.contains("Courses of Population").parentsUntil(".ui.segment").parent().within(() => {
cy.get(".refresh").click()
cy.contains("number at least").siblings().within(() => cy.get("input").clear().type("0"))
cy.contains("Matematiikan didaktiikka").siblings().eq(2).should("have.text", '1')
})
Expand Down
44 changes: 43 additions & 1 deletion docker-compose.lateste2e.production.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
version: '3'

services:
nats:
image: nats-streaming
command: -cid updaterNATS
expose:
- "4222"
container_name: nats

analytics_db:
image: postgres:9.6.3
ports:
Expand Down Expand Up @@ -66,22 +73,27 @@ services:
backend:
image: toska/oodikone2-backend:latest
build:
context: services/oodikone2-backend
context: services/backend
dockerfile: oodikone2-backend/Dockerfile
restart: unless-stopped
ports:
- "8080:8080"
- "9229:9229"
environment:
WAIT_HOSTS: redis:6379,db:5432,nats:4222
REDIS: redis
DB_URL: postgres://postgres@db:5432/tkt_oodi
TEST_DB: postgres://postgres@db:5432/tkt_oodi_test
FRONT_URL: http://localhost:1337
TOKEN_SECRET: IWannaBeTheVeryBest
OODILEARN_URL: http://oodilearn:5000
USERSERVICE_URL: http://userservice:4567
USAGESERVICE_URL: http://usageservice:545
USERSERVICE_SECRET: Luukk4inenApprov3dVitunMinttuSalainenAvain666NurmivaaraPJ2019
USAGESERVICE_SECRET: Luukk4inenApprov3dVitunMinttuSalainenAvain666NurmivaaraPJ2019
ANALYTICS_ADMINER_URL: http://localhost:5050/?pgsql=analytics_db&username=postgres
ANALYTICS_URL: http://analytics:4568
NATS_URI: nats://nats:4222
container_name: backend
entrypoint: 'node --inspect=0.0.0.0:9229 --max_old_space_size=4096 index.js'
depends_on:
Expand All @@ -98,6 +110,7 @@ services:
ports:
- "5000:5000"
environment:
WAIT_HOSTS: user_db:5432
BACKEND_ADDR: backend
ADMINER_URL: http://localhost:5050/?pgsql=db&username=postgres
container_name: frontend
Expand All @@ -110,6 +123,7 @@ services:
ports:
- 4567:4567
environment:
- WAIT_HOSTS=user_db:5432
- DB_URL=postgres://postgres@user_db:5432/user_db
- TEST_DB=postgres://postgres@user_db:5432/user_db_test
- SECRET=Luukk4inenApprov3dVitunMinttuSalainenAvain666NurmivaaraPJ2019
Expand All @@ -118,6 +132,33 @@ services:
- user_db
container_name: userservice

usageservice:
image: toska/oodikone2-usageservice:latest
build:
context: services/oodikone2-usageservice
restart: unless-stopped
ports:
- 545:545
environment:
- WAIT_HOSTS=usage_db:5432
- PORT=545
- DB_URL=postgres://postgres@usage_db:5432/usage_db
- SECRET=Luukk4inenApprov3dVitunMinttuSalainenAvain666NurmivaaraPJ2019
depends_on:
- usage_db
container_name: usageservice

usage_db:
image: postgres:9.6.3
ports:
- "5424:5432"
volumes:
- ./usage_pgdata:/var/lib/postgresql/data
container_name: oodi_usage_db
environment:
- POSTGRES_USER=postgres
- POSTGRES_DB=usage_db

analytics:
image: toska/oodikone2-analytics:latest
build:
Expand All @@ -126,6 +167,7 @@ services:
ports:
- 4568:4568
environment:
- WAIT_HOSTS=analytics_db:5432,analytics_redis:6379
- REDIS=analytics_redis
- DB_URL=postgres://postgres@analytics_db:5432/analytics_db
- TEST_DB=postgres://postgres@analytics_db:5432/analytics_db_test
Expand Down
46 changes: 44 additions & 2 deletions docker-compose.lateste2e.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
version: '3'

services:
nats:
image: nats-streaming
command: -cid updaterNATS
expose:
- "4222"
container_name: nats

analytics_db:
image: postgres:9.6.3
ports:
Expand Down Expand Up @@ -66,22 +73,27 @@ services:
backend:
image: toska/oodikone2-backend:staging
build:
context: services/oodikone2-backend
context: services/backend
dockerfile: oodikone2-backend/Dockerfile
restart: unless-stopped
ports:
- "8080:8080"
- "9229:9229"
environment:
WAIT_HOSTS: redis:6379,db:5432,nats:4222
REDIS: redis
DB_URL: postgres://postgres@db:5432/tkt_oodi
TEST_DB: postgres://postgres@db:5432/tkt_oodi_test
FRONT_URL: http://localhost:1337
FRONT_URL: http://localhost:1337/staging
TOKEN_SECRET: IWannaBeTheVeryBest
OODILEARN_URL: http://oodilearn:5000
USERSERVICE_URL: http://userservice:4567
USAGESERVICE_URL: http://usageservice:545
USERSERVICE_SECRET: Luukk4inenApprov3dVitunMinttuSalainenAvain666NurmivaaraPJ2019
USAGESERVICE_SECRET: Luukk4inenApprov3dVitunMinttuSalainenAvain666NurmivaaraPJ2019
ANALYTICS_ADMINER_URL: http://localhost:5050/?pgsql=analytics_db&username=postgres
ANALYTICS_URL: http://analytics:4568
NATS_URI: nats://nats:4222
container_name: backend
entrypoint: 'node --inspect=0.0.0.0:9229 --max_old_space_size=4096 index.js'
depends_on:
Expand All @@ -98,6 +110,7 @@ services:
ports:
- "5000:5000"
environment:
WAIT_HOSTS: user_db:5432
BACKEND_ADDR: backend
ADMINER_URL: http://localhost:5050/?pgsql=db&username=postgres
container_name: frontend
Expand All @@ -110,6 +123,7 @@ services:
ports:
- 4567:4567
environment:
- WAIT_HOSTS=user_db:5432
- DB_URL=postgres://postgres@user_db:5432/user_db
- TEST_DB=postgres://postgres@user_db:5432/user_db_test
- SECRET=Luukk4inenApprov3dVitunMinttuSalainenAvain666NurmivaaraPJ2019
Expand All @@ -118,6 +132,33 @@ services:
- user_db
container_name: userservice

usageservice:
image: toska/oodikone2-usageservice:staging
build:
context: services/oodikone2-usageservice
restart: unless-stopped
ports:
- 545:545
environment:
- WAIT_HOSTS=usage_db:5432
- PORT=545
- DB_URL=postgres://postgres@usage_db:5432/usage_db
- SECRET=Luukk4inenApprov3dVitunMinttuSalainenAvain666NurmivaaraPJ2019
depends_on:
- usage_db
container_name: usageservice

usage_db:
image: postgres:9.6.3
ports:
- "5424:5432"
volumes:
- ./usage_pgdata:/var/lib/postgresql/data
container_name: oodi_usage_db
environment:
- POSTGRES_USER=postgres
- POSTGRES_DB=usage_db

analytics:
image: toska/oodikone2-analytics:staging
build:
Expand All @@ -126,6 +167,7 @@ services:
ports:
- 4568:4568
environment:
- WAIT_HOSTS=analytics_db:5432,analytics_redis:6379
- REDIS=analytics_redis
- DB_URL=postgres://postgres@analytics_db:5432/analytics_db
- TEST_DB=postgres://postgres@analytics_db:5432/analytics_db_test
Expand Down
Loading

0 comments on commit c16f0f4

Please sign in to comment.