Skip to content

Commit

Permalink
Change DummyBuild to Staging (standard naming)
Browse files Browse the repository at this point in the history
Create staging env for Serval and Echo
  • Loading branch information
johnml1135 committed Oct 13, 2023
1 parent aa0a7e1 commit c53e70a
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 14 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ There are 3 different environments that Serval is deployed to:
- `kubectl config use-context aws-rke`
- `helm upgrade serval deploy/serval -n serval -f deploy/values.yaml`

### Environments:
- Production:
- Full deployment, full NMT and SMT builds
- Staging:
- Full Deploymnet, dummy NMT building (10 steps, small model)
- Also used for Docker-compose local staging
- Development:
- Non-docker use only

## Debugging
### To access Serval API
* Internal QA:
Expand Down
2 changes: 1 addition & 1 deletion deploy/qa-ext-values.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
externalHost: qa.serval-api.org
environment: Staging
enableTls: true
namespace: serval
auth0Domain: dev-sillsdev.auth0.com
lokiTenent: serval-tenant
lokiUrl: http://loki-distributed-gateway.loki.svc.cluster.local
servalImage: ghcr.io/sillsdev/serval:0.7.1
machineImage: ghcr.io/sillsdev/machine:3.3.2
machineEnvironment: DummyBuild
ClearMLDockerImage: ghcr.io/sillsdev/machine.py:0.9.5
ClearMLMaxSteps: 10
ClearMLQueue: lambert_24gb
Expand Down
2 changes: 1 addition & 1 deletion deploy/qa-int-values.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
externalHost: qa-int.serval-api.org
environment: Staging
enableTls: true
namespace: nlp
auth0Domain: sil-appbuilder.auth0.com
lokiTenent: nlp-tenant
lokiUrl: http://loki-distributed-gateway.loki.svc.cluster.local
servalImage: ghcr.io/sillsdev/serval:0.7.1
machineImage: ghcr.io/sillsdev/machine:3.3.2
machineEnvironment: DummyBuild
ClearMLDockerImage: ghcr.io/sillsdev/machine.py:0.9.5
ClearMLMaxSteps: 10
ClearMLQueue: lambert_24gb
Expand Down
2 changes: 1 addition & 1 deletion deploy/serval/templates/echo-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
workingDir: /app/echo_server
env:
- name: ASPNETCORE_ENVIRONMENT
value: Production
value: {{ .Values.environment}}
- name: ASPNETCORE_Kestrel__Endpoints__Grpc__Url
value: http://*:80
- name: ASPNETCORE_Kestrel__Endpoints__Grpc__Protocols
Expand Down
2 changes: 1 addition & 1 deletion deploy/serval/templates/machine-engine-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
workingDir: /app/engine_server
env:
- name: ASPNETCORE_ENVIRONMENT
value: {{ .Values.machineEnvironment }}
value: {{ .Values.environment }}
- name: ASPNETCORE_Kestrel__Endpoints__Grpc__Url
value: http://*:80
- name: ASPNETCORE_Kestrel__Endpoints__Grpc__Protocols
Expand Down
2 changes: 1 addition & 1 deletion deploy/serval/templates/machine-job-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
workingDir: /app/job_server
env:
- name: ASPNETCORE_ENVIRONMENT
value: {{ .Values.machineEnvironment}}
value: {{ .Values.environment}}
- name: ASPNETCORE_Kestrel__Endpoints__Grpc__Url
value: http://*:80
- name: ASPNETCORE_Kestrel__Endpoints__Grpc__Protocols
Expand Down
6 changes: 2 additions & 4 deletions deploy/serval/templates/serval-api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ spec:
env:
- name: Auth__Domain
value: {{ .Values.auth0Domain}}
- name: ASPNETCORE_ENVIRONMENT
value: {{ .Values.environment}}
- name: ASPNETCORE_Kestrel__Endpoints__Http__Url
value: http://*:80
- name: ASPNETCORE_Kestrel__Endpoints__Http2__Url
Expand All @@ -35,10 +37,6 @@ spec:
value: mongodb://mongo:27017/serval_jobs?replicaSet=myRS
- name: ASPNETCORE_ConnectionStrings__Mongo
value: mongodb://mongo:27017/serval?replicaSet=myRS
- name: ASPNETCORE_Logging__LogLevel__Default
value: Information
- name: ASPNETCORE_Logging__LogLevel__Microsoft.AspNetCore
value: Warning
- name: ASPNETCORE_Translation__Engines__0__Type
value: Echo
- name: ASPNETCORE_Translation__Engines__0__Address
Expand Down
2 changes: 1 addition & 1 deletion deploy/values.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
externalHost: prod.serval-api.org
environment: Production
enableTls: true
namespace: serval
auth0Domain: languagetechnology.auth0.com
lokiTenent: nlp-tenant
lokiUrl: http://loki-distributed-gateway.loki.svc.cluster.local
servalImage: ghcr.io/sillsdev/serval:0.7.1
machineImage: ghcr.io/sillsdev/machine:3.3.2
machineEnvironment: Production
ClearMLDockerImage: ghcr.io/sillsdev/machine.py:0.9.5
ClearMLMaxSteps: 20000
ClearMLQueue: production
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
context: .
dockerfile: dockerfile.development
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_ENVIRONMENT=Staging
- Auth__Domain=sil-appbuilder.auth0.com
- Auth__Audience=https://machine.sil.org
- ASPNETCORE_Kestrel__Endpoints__Http__Url=http://*:80
Expand Down Expand Up @@ -48,7 +48,7 @@ services:
context: .
dockerfile: dockerfile.development
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_ENVIRONMENT=Staging
- ASPNETCORE_Kestrel__Endpoints__Http__Url=http://*:80
- ASPNETCORE_Kestrel__EndpointDefaults__Protocols=Http2
- ASPNETCORE_ConnectionStrings__TranslationPlatformApi=http://serval-api:81
Expand Down Expand Up @@ -79,7 +79,7 @@ services:
dockerfile: ../machine/dockerfile.development

environment:
- ASPNETCORE_ENVIRONMENT=DummyBuild
- ASPNETCORE_ENVIRONMENT=Staging
- ASPNETCORE_Kestrel__Endpoints__Https__Url=http://*:80
- ASPNETCORE_Kestrel__EndpointDefaults__Protocols=Http2
- ASPNETCORE_ConnectionStrings__Hangfire=mongodb://mongo:27017/machine_jobs?replicaSet=myRS
Expand Down Expand Up @@ -124,7 +124,7 @@ services:
context: ../machine
dockerfile: ../machine/dockerfile.development
environment:
- ASPNETCORE_ENVIRONMENT=DummyBuild
- ASPNETCORE_ENVIRONMENT=Staging
- ASPNETCORE_ConnectionStrings__Hangfire=mongodb://mongo:27017/machine_jobs?replicaSet=myRS
- ASPNETCORE_ConnectionStrings__Mongo=mongodb://mongo:27017/machine?replicaSet=myRS
- ASPNETCORE_ConnectionStrings__Serval=http://serval-api:81
Expand Down
8 changes: 8 additions & 0 deletions samples/EchoTranslationEngine/appsettings.Staging.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
8 changes: 8 additions & 0 deletions src/Serval.ApiServer/appsettings.Staging.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

0 comments on commit c53e70a

Please sign in to comment.