Background
The intention of this document is to describe how to successfully run a Ruby on Rails app, built specifically for and entirely on an Ubuntu distribution, in production mode on a Windows Server 2016 environment.
Prerequisites:
- A Windows Server 2016 VM (Currently running on Amazon lightsail)
- Internet connection -- Access to github to clone repo
- Server Manager > Disable IE Enhanced security mode
- Git - well, to clone repo
- What is the default site on host?
How to
- On your Windows Server machine, download and install https://www.microsoft.com/web/downloads/platform.aspx
- Run Web Platform Installer and click on "Options"
- Add Helicon Zoo Custom Feed http://www.helicontech.com/zoo/feed.xml
- From the "Zoo" tab, go to "Packages" and install the Ruby hosting package
- Install the Ruby template from the "templates" section
Source: http://www.helicontech.com/zoo/install.html
Method 2, with docker on Windows Server 2016
Apparently windows server 2016 supports containerization, but setting it up is proving a challenge! In any case, havent really had any rails deployments on docker before, might be a good learning experience, but meh!
- On Winows PowerShell
Install-WindowsFeature containers
- Restart - Scheduled OS Reconfiguration
Notes: Running into unable to get package x, search criteria? [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Method 3, Virtual Machine on Windows
-- Needs CPU to support some special virtualization technologies etc Lets see how this goes -- Can't use the cloud VMs though
Ref: https://www.nakivo.com/blog/creating-configuring-vms-in-windows-server-2016-hyper-v/
A virtualization server is a physical computer that provides the resources to run virtual machines. You can use virtual machines to run different workloads. Each virtual machine runs in an isolated execution environment, which gives you the flexibility to run different operating systems and applications on one physical computer.
Prereq: Ubuntu image, or you can download during install etc
- Enable Hyper-V on the virtualization host computer
- sudo apt instal openssh-server after successful launch of vm