-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kubernetes for local dev #118
Merged
Merged
Changes from 66 commits
Commits
Show all changes
85 commits
Select commit
Hold shift + click to select a range
74049bf
Get volumes working in k3s
rmunn 7174aad
Remove namespace from secrets for now
rmunn dd62dc6
Fix "invalid base64" error in secrets.yaml
rmunn e37a7b3
Populate Kubernetes dev secrets
rmunn 34a824b
First pass at a Kubernetes setup for local dev
rmunn 7adca7c
Add "localdev" task to get git container running
rmunn d8ec41a
Task for SSH setup is now working
rmunn c24372a
Use Skaffold instead of custom-built solution
rmunn e9d475c
Increase memory limits so Hasura isn't OOM killed
rmunn 2bb077e
Fix CORS error in local k8s dev
rmunn 08f5f88
Add dev.languagedepot.org hostname for local dev
rmunn 351cb12
Restore the k8s "languagedepot" namespace
rmunn 37032f5
Fix login process - use Svelte-Kit load properly
rmunn 9d3eb39
Fix SHA1 hashing during SSR
rmunn c87d0a3
Add k8s deployment setup for docker-desktop
rmunn f28baa0
Work around issue with recent Node Docker images
rmunn f83ee84
Node 18 doesn't have webcrypto module
rmunn 64d98e8
Turn off https during local dev
rmunn a8d5ad6
Fix BACKEND_HOST env var
rmunn b1c9efb
First attempt: speeding up skaffold dev reloading
rmunn ee8ebc6
More attempts at speeding up skaffold dev
rmunn 2775ff8
Attempt to split Hasura into separate deployment
rmunn e03e891
Merge branch 'develop' into chore/k8s-for-local-dev
rmunn 2187c87
Pin Node version to 20.2 for now
rmunn 8d99fb3
Have hasura pod wait for backend to be healthy
rmunn d1767ef
Rename hg-repos-pvc.yaml to just pvc.yaml
rmunn d94f200
Move db PVC into pvc.yaml and create skaffold hook
rmunn 69fa1db
Add namespace to pvc.yaml
rmunn de86efb
Attempt to get correct ports for local UI dev
rmunn 2564637
Increase memory for dev containers
rmunn 52574d6
Greatly increase memory request for dotnet watch
rmunn 89c73c2
Avoid merge conflict
rmunn 172c7c2
Pre-populate Sena-3 repo in k8s deployment
rmunn 1942832
Specify Mercurial Docker image more precisely
rmunn e146b51
Deploy Hasura metadata as part of container image
rmunn 28bc26c
Remove db deployment from skaffold dev
rmunn 6c0ea9b
Hasura no longer needs to wait on backend
rmunn 78ada23
Attempt to use Kustomize for dev mode
rmunn 67b1c6c
Split UI out into separate pod
rmunn 90b5550
change schema file generation responsibility from vite to dotnet
hahn-kev aee8942
Fix dotnet generation of GraphQL files
rmunn aa3f735
Fix SVG train-track heights not adjusting
rmunn 4cf5faa
Update Database Startup procedures
hahn-kev ced78b8
Add migrate-db task to Taskfile
hahn-kev 212ad16
Move Hasura container back inside lexbox pod
rmunn 60ac444
Add initContainer for DB migrations in lexbox pod
rmunn 0547001
Speed up Docker builds by caching packages
rmunn eecf9af
Attempt to cache nuget packages in k8s dev
rmunn f7a88cb
Cache NuGet packages in Docker image instead
rmunn f09a80f
Reorder skaffold.yaml to be slightly more robust
rmunn 95c1bae
Put backend before frontend in skaffold.yaml
rmunn bc031c6
Put staging deployment back how it was
rmunn 3c70976
Update skaffold to version 2.6.0
rmunn ac02e28
Remove dev.languageforge.org from staging k8s proxy
rmunn 5737454
Node bug is fixed, revert to current Node version
rmunn 77e0155
Have Vite listen on all interfaces
rmunn c0f2ad4
Use correct port for ingress-lexbox communication
rmunn 8d9fe0a
Add skaffold profiles for running locally
rmunn 9ca7d76
Add DOTNET_URLS env to lexbox in dev mode
rmunn bd4e905
Merge branch 'develop' into chore/k8s-for-local-dev
rmunn 9f0a038
Upgrade NuGet packages in Testing.csproj
rmunn 4f19dfb
Merge branch 'develop' into chore/k8s-for-local-dev
rmunn 1859901
only proxy from vite in local dev not in a container. Forward some mi…
hahn-kev 8784cb5
fix goesToErrorPage error
hahn-kev 311ff21
add collector-config.yaml to gitignore
hahn-kev 345cd3c
add missing dockerfile syntax to dev.Dockerfile
hahn-kev 3d51cc4
update minor inconsistencies in readme.
hahn-kev 560bacd
remove Cors bypass on backend
hahn-kev 3a32b67
force skaffold to run on the `docker-desktop` context
hahn-kev e686f3e
Minor README fix
rmunn 0a5f005
Merge branch 'develop' into chore/k8s-for-local-dev
hahn-kev 2cba39e
revert login without hashed password
hahn-kev 123cd1b
set reasonable default limits on UI deployment
hahn-kev 4d914cf
add kustomization.yaml layers for prod and staging
hahn-kev 50f6279
setup ingress configuration for staging overlay
hahn-kev 7032010
refactor dev overlay secrets into patches
hahn-kev 17775dd
add setup step to create local.env file for dev
hahn-kev 1658b5f
changed imagePullPolicy back to Always for base but IfNotPresent for…
hahn-kev 0979a42
remove hasura from skaffold.yaml
hahn-kev aa2ed76
fix issue with deployments still trying to reference secrets. Fix mis…
hahn-kev fcf0d8c
fix password hash for login to wait for the promise to resolve
hahn-kev 56394d4
change dotnet port to 5158 instead of 80 across the board. Expose db …
hahn-kev b21be5b
Rearrange README a bit, mention extra Windows setup
rmunn f152551
Revert "Add "localdev" task to get git container running"
rmunn 73901a5
Remove localdev-deployment.yaml
rmunn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using HotChocolate.Execution; | ||
|
||
namespace LexBoxApi.Services; | ||
|
||
public class DevSchemaWriterService : IHostedService | ||
{ | ||
private readonly RequestExecutorProxy _executorProxy; | ||
private readonly ILogger<DevSchemaWriterService> _logger; | ||
public DevSchemaWriterService(IRequestExecutorResolver executorResolver, ILogger<DevSchemaWriterService> logger) | ||
{ | ||
_logger = logger; | ||
_executorProxy = new RequestExecutorProxy(executorResolver, Schema.DefaultName); | ||
} | ||
|
||
public async Task StartAsync(CancellationToken cancellationToken) | ||
{ | ||
var schema = await _executorProxy.GetSchemaAsync(cancellationToken); | ||
await using var file = File.Open("../../frontend/schema.graphql", FileMode.Create); | ||
await SchemaPrinter.PrintAsync(schema, file, true, cancellationToken); | ||
_logger.LogInformation("Schema written frontend/schema.graphql"); | ||
} | ||
|
||
public Task StopAsync(CancellationToken cancellationToken) | ||
{ | ||
return Task.CompletedTask; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
# syntax=docker/dockerfile:1 | ||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build | ||
EXPOSE 80 | ||
EXPOSE 443 | ||
WORKDIR /src/backend | ||
# Copy the main source project files | ||
COPY */*.csproj *.sln ./ | ||
# move them into the proper sub folders, based on the name of the project | ||
RUN for file in $(ls *.csproj); do dir=${file%.*} mkdir -p ${file%.*}/ && mv $file ${file%.*}/ && dotnet restore ${file%.*}/${file}; done | ||
|
||
COPY . . | ||
WORKDIR /src/backend/LexBoxApi | ||
RUN mkdir /src/frontend | ||
ENV DockerDev=true | ||
CMD dotnet watch run -lp docker --property:InformationalVersion=dockerDev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,6 @@ | |
} | ||
}, | ||
"LexBoxApi": { | ||
"Url": "https://localhost:7075" | ||
"Url": "http://localhost:5158" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ | |
kind: ConfigMap | ||
metadata: | ||
name: email-config | ||
namespace: languagedepot | ||
data: | ||
email-from: "Value" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: languagedepot | ||
|
||
resources: | ||
- config-map.yaml | ||
- secrets.yaml | ||
hahn-kev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- pvc.yaml | ||
- db-deployment.yaml | ||
- hg-deployment.yaml | ||
- lexbox-deployment.yaml | ||
- ui-deployment.yaml | ||
- proxy-deployment.yaml |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this docker file isn't used for local dev does this make any difference?