I was curious if anyone has had experience with distributing a Rails app through an installer so that it could be run/hosted internally by a customer. Is there a best practice for doing this?
The only Rails app I know of that has this model is SpiceWorks, and I believe they run it on a VM. I’ve also seen solutions such as Pkgr and Docker, but I’m not really sure how they stack up against other options.
Any help would be greatly appreciated!
There are several ways to do this. Docker is one. A custom install script is another.
I frequently setup a script in a rails app to build all the deps, setup the database, migrate, etc, so new Devs can get working without tons of technical knowledge about the system.
That is kinda what you want here, only for a client not a dev.
Look into Docker. It is awesome!
Sorry to bump this, but I’m under some pressure to make a decision in the near term.
Here are the considerations:
- Software is essentially a self-hosted dropbox for customers with large amounts of video. Hosting in the cloud is too expensive for these large assets, so the software syncs the filesystem to a database and then serves the details locally through a web UI.
- Ease of installation is a huge priority. Competitors require days of on site configuration. A ‘feature’ of the product would be that customers can get up and running in less than an hour. Ideally the whole web stack and file system element would be wrapped in a single installer.
- Currently it is Mac specific, but shortly Windows and Linux would like to be supported.
- There are talks to install this directly into storage systems (SAN, NAS, RAID)
- Stakeholders obviously want this rewrite to happen ‘quickly’
This is OLD legacy software and we are planning to rewrite the web stack from the ground up. I like Ruby and Rails, but I try to be language agnostic and make technology choices which make the most sense for the requirements. I am not a DevOps guy at all, so the idea of deploying perfect stacks through an installer slightly intimidates me. I realize there is the option to go down the VM route (with Vagrant, Docker, or something else) but my worries are performance and syncing the native filesystem with the VM. I have no idea if these worries are justified.
Right now the wind seems to be blowing in the PHP direction, mainly due to how easy it is to install and get up and running on all platforms. I asked @cpytel about this in office hours, and he suggested looking at how Github Enterprise does it and they seem to use the VM route now. I looked into it, but I’m still undecided if this will work well going forward.
Sorry for the tome, but I would love any direction or suggestions no matter how minor they could be. Thanks!
I haven’t personally written server-side software to be distributed like this before, but I’d strongly consider the VM route, regardless of the language and platform you choose.
Although PHP may be easier to get up and running quickly, it’s also easy to make mistakes on. Different versions on different systems each have their own defaults, and PHP behaves drastically different depending on the system and settings. Making sure the settings are correct is difficult and will complicate setup. Trying to make it work with every possible configuration will result in bugs. Either approach will be unreliable, but a VM will fix these issues.
Regarding performance, there are definitely VMs which will perform adequately. Using VirtualBox with a virtual file system may not be adequate, but using Xen or a VMWare solution with a real disk will perform extremely well. You can use tools like Vagrant to interact with a number of these VMs.
I’ve been following the Docker project loosely, and although it looks really cool, they still have this warning on their home page:
Please note Docker is currently under heavy development. It should not be used in production (yet).
There will definitely be some experimentation and tuning involved in getting a good VM solution going, but I don’t think you’ll be able to achieve an easy install on any language or platform if you try to integrate and install directly into the host machine.
Awesome! Thanks for your help Joe!