-
Notifications
You must be signed in to change notification settings - Fork 649
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
Running fluentmigrator from linux, is mono still required? .net core? #1383
Comments
I think the limitations are with the driver programs. We had started to look into using TestEnvironment.Docker to verify end to end integration tests. Fabien Menager has made some PRs to that repo and the main issues were around culture issues related to Oracle needing time zone I think. |
@jzabroski thanks for the reply - I'm still unclear though. My goal is to run fluentmigrator on ubuntu container, and run migrations against azure SQL. Is mono the best way, or can I use .net core without mono? For context I am a linux guy with basically zero .NET experience, trying to do some devops stuff for a windows dev team. |
|
@fubar-coder the team I am working with just runs Migrate.exe . It looks like I can run Migrate.exe via mono, and if that is the solution then it's fine. I just don't know if there is a better way. We didnt have plans to write a new migration tool, just to run the existing tool from linux. |
@kevinlong206 Thanks for the additional context. Mark and I discussed and we think, depending on your database driver, FluentMigrator.DotNet.Cli might be a better approach than the exe. It uses a special type of Nuget package called a Tool that can be installed globally or locally. I recommend installing it locally via creating a Tool Manifest. The nice thing about this is it becomes easier to integrate into the overall Visual Studio environment since tool manifest.json gets checked into source control under a top level .tools folder. The unknown is whether the specific db driver you need supports Linux. I think MySql, SQL Server and the Managed Oracle drivers should work but I haven't tried them and am going off memory. Let me know if you have any questions to go with this approach. I used Migrate.exe for the longest time but as of last December all my projects use FluentMigrator.DotNet.Cli. The one gotcha with using FluentMigrator.DotNet.Cli is that since it has it's own deps.json (list of dependencies dotnet.exe loads on top of FluentMigrator.DotNet.dll entry point), your team just needs to make sure the version of FluentMigrator.DotNet.Cli matches the nuget version of FluentMigrator nuget package they write migration against, otherwise there will be load and link errors. |
@kevinlong206 Just wondering if you were able to have any success with the above guidance? |
@jzabroski thanks again for the info. I have not had a chance to test this yet but plan to in the next few weeks. I won't be offended if you close the issue and appreciate the guidance. |
@kevinlong206 I think of it as teamwork, since that was open source is. So the guidance is in part in hopes you can tell us what works for you (or if it didn't work). I think there is a decent chance it should work, but there is a decent chance you might get a runtime exception that can be quickly fixed. Happy holidays! I am a big fan of Thanksgiving because, in the spirit of saying thanks to all who I am thankful for, I get to say, Thank you, @kevinlong206 ! |
At home I used Linux Ubuntu 20.04 and I don't have a problem to run FluentMigrator in linux, but to run FluentMigrator I had develop my own tool(where a can just run without any parameters and this tool have a reference to my projects who have my migrations) and it`s run wells. I will take a look if dotnet tools work fine in linux |
@lillo42 Thanks for all your help. You really stepped up the past few months. Curious what you found? |
@jzabroski Fun fact, I've tried to use in .NET 5 project with FM tools and I got some problem relate with System.Runtime, so for migrations is recommend use .NET Standard 2.0. Follow attached a project with some migrations in .NET Standard 2.0 running the migrations on Docker |
To allow FM build/test using only .NET Core on Linux is necessary add support/update Db2 package SAP Hana package (https://developers.sap.com/tutorials/hana-clients-dot-net-core.html) also SAP Anywhere doesn't have support for .NET Core |
We need to drop SAP Anywhere. See: #1218 |
@jzabroski Maybe we should think about dropping JET support too. |
JET
So... it may be time to drop it. I think people prefer Sqlite anyway, since its open source and the maintainer is very open to companies like expensify sponsoring its development. |
I think it's better we work on this issue on next FM major.
I've never ever listen about JET, here was the first time 😄 |
@lillo42 The fix for this issue will go out today in v3.2.15 |
Still doesnt work. Doesnt even work for .NET Standard 2.1 let alone .NET 5 using v3.2.17. Should this be written down somewhere? |
@CraigComeOnThisNameCantBeTaken Can you elaborate what issue you are running into? My response in your issue #1491 I think covers the solution you are looking for. Please try it and report back in that thread what you find. Thanks. |
Describe the question
Is using 'mono' still the only way to get fluentmigrator running in Linux? I have a use case where I need to run it in a linux container from a ci/cd pipeline. I see mention of supporting .net core in past github issues, can the project be built and run using .net core without mono now?
These steps in a Dockerfile seem to work to get the Migrate.exe to run, I'm just wondering if there is a better way to do this.
Documentation Pages You've Read So Far
https://fluentmigrator.github.io/articles/guides/contribution.html#linux-macos
#712
#1039
Expected benefit
The ci/cd system I must use supports only linux containers for build/deploy operations, I am looking for the most optimal way to build and run fluentmigrator in this context.
Information (please complete the following information):
Additional context
n/a
Thanks!
The text was updated successfully, but these errors were encountered: