by Erik Jacobsen
• September 7, 2018
How do we get from here, hosting an AWS Microsoft SQL Server instance on my MacBook Pro?
To here using Microsoft Server, SQL Server, and DreamFactory, still on my MacBook Pro.
Let’s get to the nuts and bolts of this. In the past, it was very difficult to create cross platform solutions. With the advent of cloud computing, this has become increasingly easier to do.
When you have a robust piece of middleware software, such as DreamFactory which is for most intents and purposes language and platform agnostic, you really do have your choice of platforms to install it on. Each has its advantages and disadvantages, which I am not going to go into detail in this article, but suffice it to say, there are a lot of enterprises that choose the Microsoft platform(s), and some of those advantages became apparent as I worked on this post.
First things first, make sure to grab all of the pre-requisites you need to make the install easy:
At a minimum, you will need the following software and extensions installed and enabled on your system in order to successfully clone and install DreamFactory 2.12.0+.
Microsoft Server can be spun up almost anywhere now, as is evidenced by the photos above, and since DreamFactory is platform agnostic, we can install it on the Microsoft Server 2012 R2 instance with just a few bits of software installed to get up and running. There are multiple ways to grab and install PHP on a Microsoft platform, but an easy way is to utilize the Web Platform Installer (version 5.0 as of this post).
You can download the Web Platform Installer for IIS here. Select a PHP version (7.0.x is required to run the current 2.13.0 version of DreamFactory), and different pieces of IIS, should you decide to utilize that as your production web server. This post will not dive into the nitty-gritty of IIS, but you can see our documentation here. We will be using PHP’s built-in development web server to just illustrate the connections.
Once you have installed PHP and double checked your pre-requisites are installed, you can begin the install:
git clone https://github.com/dreamfactorysoftware/dreamfactory
This will pull down the master branch of DreamFactory into a directory called ./dreamfactory.
composer update --ignore-platform-reqs --no-dev
Otherwise, run the following command to install the dependencies:
composer install --no-dev
php artisan df:setup
Follow the on-screen prompts to complete the setup.
You can then run php artisan serve and migrate over to the address and port you have set up. In this example, we are running off of http://127.0.0.1:8000
php artisan serve
With our instance running now, we can finally delve into the “fun” part of this install. The ease with which you can add a SQL Server instance is awesome. It is the fastest install I have ever done from the driver install to DreamFactory connection, it was less than 5 minutes¹.
Using the Web Platform Installer, you can download a SQL Server driver package that is compatible with your PHP version and your O/S version.
Now you can head back over to your instance and create a SQL Server service. Just select the service type, add in your credentials and then test it. That’s it. No muss, no fuss. Take a look at the screenshots below to see the results.
We have now connected our SQL Server instance to our Microsoft Server 2012 R2 (both hosted on AWS) on my MacBook Pro. Sometimes, it all falls into place. Don’t forget to check out our wiki and community forums for more topics, information, and examples.
¹ I had my credentials on hand in a notepad text file for copy/paste quickness, but still, very fast 🙂
Related reading: MySQL vs MS SQL Server – Which Reigns Supreme?
You must be logged in to post a comment.
Join the DreamFactory newsletter list.