chucknorris / roundhouse

RoundhousE is a Database Migration Utility for .NET using sql files and versioning based on source control
http://projectroundhouse.org
916 stars 249 forks source link

Documentation around running on Linux #379

Closed billybobpersonal closed 4 years ago

billybobpersonal commented 5 years ago

We are currently migrating our environment to AWS, which includes the DB Migration. We were able to get Roundhouse to work inside a Docker container fairly easily, but it feels a bit clunky, because you then need to create a container per release and then it's a run once container. So we thought that running it via an AWS Lambda could also be a more suitable solution. But when we try to deploy it then we are unable to figure out how to run it on Linux(AWS Linux). We stored all the scripts in an S3 bucket and then pull them and then execute roundhouse. The Lambda is triggered by an event sent when the contents of the bucket changes. This makes it re-usable tool that requires a single deploy. We were able to install successfully it using the dotnet global tools but when trying to execute it, then it fails. We feel that it is a good use case for Roundhouse, and having solid documentation around how to run it on Linux opens up a lot of doors or alternative uses.

definesfineout commented 4 years ago

I know it's been almost a year since you posted, but any chance you resolved your issues running on linux?

erikbra commented 4 years ago

The dotnet core global tool works fine on Linux for me, are there any particular issues you are experiencing (thanks a lot for following up, @definesfineout )

definesfineout commented 4 years ago

Can you summarize your setup process? I didn't try very long before abandoning RH for this particular project, but I quickly got dependency issues attempting dotnet build and stopped spending time on it. I'd love to use it for other projects if it's ready to run, and perhaps I missed something simple.

definesfineout commented 4 years ago

I'll volunteer to write the documentation once I have it working :)

erikbra commented 4 years ago

Lovely. It's really quite easy to run RoundhousE on Linux now, IMHO. You need the .net core sdk (hoping to remove this requirement soon(ish) when upgrading to .NET Core 3.1), then all you do, it dotnet tool install -g dotnet-roundhouse

$ dotnet tool install -g dotnet-roundhouse
You can invoke the tool using the following command: rh
Tool 'dotnet-roundhouse' (version '1.2.0') was successfully installed.
$ rh
Error: You must specify Database Name (/d) OR Connection String (/cs) at a minimum to use RoundhousE.
  -?, --help, -h             Prints out the options.
  -d, --db, --database, --databasename=VALUE
                             REQUIRED: DatabaseName - The database you want
                               to create/migrate.
  -c, --cs, --connstring, --connectionstring=VALUE
                             REQUIRED: ConnectionString - As an alternative
                               to ServerName and Database - You can provide an
                               entire connection string instead.
  -f, --files, --sqlfilesdirectory=VALUE
                             SqlFilesDirectory - The directory where your SQL
                               scripts are. Defaults to ".".
  -s, --server, --servername, --instance, --instancename=VALUE
                             ServerName - The server and instance you would
                               like to run on. (local) and (local)\SQL2008 are
                               both valid values. Defaults to "(local)".
      --csa, --connstringadmin, --connectionstringadministration=VALUE
                             ConnectionStringAdministration - This is used
                               for connecting to master when you may have a
(...)
definesfineout commented 4 years ago

Wonderful, thanks @erikbra so much for the assist! I'm chalking this up to my newbness with respect to dotnet cli. Once I have this running I'll add to the wiki. Cheers!