Comments (9)
You're on your own here mate, I have no desire to play in the k8s space for this stuff... we run live migrations in k8s, but literally just kubectl run --restart=never
an image built like the samples...
from grate.
I have a tiny bit of experience with Service Fabric and i know we have hosted python containers in there. I could have a look how we do it for that and maybe create an exampld based on that?
from grate.
Thanks a lot, @DjKillerMemeStar ! I'd appreciate that. I don't think the main issue is hosting grate in a container, though, but how you should/would actually use it in a Kubernetes setting. Would you create an init container? Would you create a background service that watches a folder for changes? Something totally different?
Do you have any thoughts on this? Maybe the question is too generic, and the use cases will vary a lot depending on each and every one's surrounding bits and bobs?
from grate.
I don't really see a point in hosting grate yourself. It's just install on the build server any way you like and run it. This seems like a way easier way to do it. Ofcourse, people/situations differ so i'm not sure.
Maybe the question could be rephrased to beter explain what you mean. It's more of a "why would you use grate in a container" then a how in my eyes. Could ofcourse be wrong here 😄.
from grate.
I had a project where the build server (AzDo) didn't have access to the Sql Server (firewalled/PrivateLink/something weird???) but the k8s cluster obviously did have access. As noted above, we'd build the container like the sample and just kubectl run
a one-off instance from the pipeline.
from grate.
Ow yeah, makes sense, sorry bout that!
We just use our own agents so bypass any firewall restrictions etc, but that is ofcourse not possible for everyone.
From that standpoint i don't see anything wrong with your approach of an one-off instance.
from grate.
I'm just thinking a bit further on this one. It might seem like I'm trying hard to create a use case for something that isn't, but, if you compare to, say EF migrations, where the migration is performed on application startup, would it make sense to create an example where grate is used in an init container, mounting the database scripts in a volume there, and running them on startup, before the actual application container starts?
Or am I beating a dead horse here?
from grate.
I can see the comparison with EF Migrations (which fwiw I don't like for various reasons, hence being here).
A sample for a migration style workflow would obviously be useful if that's a workflow you want to push, via either
- init containers (which I have no experience with), or
- referencing grate via nuget (which I think RH had support for?? I never used it) and running a migration on app start?
from grate.
There is the init container pattern described here: https://andrewlock.net/deploying-asp-net-core-applications-to-kubernetes-part-7-running-database-migrations/#combining-jobs-and-init-containers-to-handle-migrations
from grate.
Related Issues (20)
- CREATE INDEX CONCURRENTLY cannot be executed within a pipeline (on Postgresql) HOT 8
- Run Grate from code HOT 5
- RoundhousE Feature | SearchAllSubdirectoriesInsteadOfTraverse HOT 5
- Azure SQL migrations with Managed Identity not working after 1.3.0 HOT 3
- MySQLConnector Hangs when connecting to MySQL 5.7 for DB Open() HOT 2
- Inconsistent script type for RunFirstAfterUpdate folder in documentation HOT 2
- Scripts using postgresql dollar-quoted strings fail in version 1.5.1 HOT 11
- Use Npgsql Code for Parsing PostgreSQL SQL Statements HOT 17
- Unable to connect to MySQL 8.0.30 using grate 1.5.3 HOT 5
- Silent flag doesn't work on version 1.5.3 on Linux HOT 6
- Ability to programmatically migrate HOT 9
- A noop run creates new entries in `Version` table HOT 1
- Migrating from Roundhouse, MySQL text_of_script column size too small HOT 2
- Documentation to support non-DotNet users HOT 2
- Unhandled exception trying to login to Azure SQL database HOT 3
- Improve error messages on SQL errors
- Getting Incorrect string value: '\xE2\x9C\xA8", ...' for column 'text_of_script' HOT 3
- SET QUOTED_IDENTIFIER OFF leads to Unhandled exception error HOT 2
- Running migrations on SQL Server fail - database is attempted to create though exists already HOT 12
- Add more resiliency/retries to DB calls
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grate.