Back again with some more notes.
Opinion and Motivation
MS SQL is a popular tool, but in has a big hurdle in cloud adoption: pricing.
The obfuscation of pricing in Azure hurts. When a client asks how much it will cost to run a MS SQL cluster; no one can answer this very well. It’s sort of like asking Azure billing support how much running Sharepoint in Azure would cost (this is an inside joke; most of the Azure billing support reps don’t know about the Office365 cloud).
When you finally get an answer, well, it’s quite expensive. You’re paying for the Azure DB or the VM running SQL 2012; you’re paying for licenses, cores, compute time, huh? Enterprise shops are not immune to budget cuts. If you’re simultaneously being asked to migrate to the cloud and cut expenses… remember this post.
Solution: Use another popular relational database: MySQL
MySQL is the famed open source database.
Problem 1: Oracle bought it. If you don’t get why that’s a problem; you’re probably an executive. Congrats.
Problem 2: The original developer left and built a better version.
Okay, so, that’s why, now let’s focus on the how-to.
If you followed my last blog, you’ve got a Virtual Machine in the Azure Cloud running Ubuntu 13.10. So what we’re going to do now is:
- Install MariaDB 10.0
- Connect to it via MySQL Workbench from my local desktopn
- Create a test database
- Go back to the Azure VM and prove it worked.
Open Putty and connect to your Azure VM running Ubuntu.
Issue these commands:
sudo apt-get install software-properties-common sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db sudo add-apt-repository 'deb http://download.nus.edu.sg/mirror/mariadb/repo/10.0/ubuntu saucy main'
That sets up the key and repository. Now you can install it.
sudo apt-get update sudo apt-get install mariadb-server
Verify MariaDB Works & Nice To Know’s
To connect on your Azure VM to your MariaDB installation:
mysql -u root -p -h localhost
Here’s what you should see:
Great, now let’s just take it a little further so we have something to work with.
Enter the following commands into MariaDB to create a test database and look around.
CREATE DATABASE IF NOT EXISTS test; SHOW DATABASES;
Okay, so, it’s installed, alive, and working properly.
If you want to connect remotely to your MariaDB/MySQL database, be sure to:
Create an ENDPOINT on the Azure Virtual Machine
Go to your Azure Portal, click on Virtual Machines in the left navigation, and select your test VM.
Go to the EndPoints tab in the main portion of the portal.
At the bottom center, select Add (which infers you want to add an endpoint).
Select MySQL from the Endpoint drop down and it should look like this:
In a near future post I will describe how to connect to your MariaDB via MySQLWorkBench
If you’ve ever tried to figure out what Cloud Hosting would cost, you may have thought, “wow, that’s complex.”
I’m here to confirm that thought and maybe help out with the knowledge I gained from 4 days of back and forth emails with Microsoft’s Billing Support. They’re very helpful, but I think they’re pricing model is probably a barrier for some Architects. Regardless of complexity, it turned out to be a very good deal.
Azure Hosting if you have a MSDN License:
If you currently have a Visual Studio Premium with MSDN subscription, that may include $100 monetary credit each month. Therefore, as long as your usage is within $100, you would not be billed. If your usage exceeds $100, you would be charged as per standard rates.
You will be metered for compute hours as you are using reserved units for your website.
How many compute hours are there in a month? 930 compute hours.
Pricing = 930 x 0.06 = 55.8 USD.
WordPress Websites MySQL Database
Since I made a WordPress site, I discovered I got 1 Free 20MB MySQL database license. Additional MySQL databases will be charged.
How much would I be charged for a second MySQL database?
Standard Rates: http://www.windowsazure.com/en-us/pricing/details/sql-database/
- 0 to 100 MB $4.99
- 100 MB to 1 GB $9.99
- 1 GB to 10 GB $9.99, for the first GB $3.99 for each additional GB
- 10 GB to 50 GB $45.96, for the first 10 GB $1.99 for each additional GB
- 50 GB to 150 GB $125.88, for the first 50 GB $0.99 for each additional GB
How much would a Microsoft SQL Server Database Cost (what are standard rates)?
When you set up a SQL Database in Azure you can choose:
DATABASE SIZE DATABASE UNITS (EACH DU = $9.99)
- 0 to 100 MB 0.5 DU
- 100 MB to 1 GB 1 DU
- 1 GB to 10 GB 1 DU for the first GB, 0.4 DU for each additional GB
- 10 GB to 50 GB 4.6 DU for the first 10 GB, 0.2 DU for each additional GB
- 50 GB to 150 GB 12.6 DU for the first 50 GB, 0.1 DU for each additional GB
These rates are pro rated.
Why does a “Windows Azure Website” show up under “Cloud Services”
For billing purposes only, Azure Web Sites (standard) uses Windows Azure Compute Hours meter (also used by Cloud Services). This is the reason why the website would show up as “Cloud Services” under the invoice/detailed usage report.
If I have 3 WordPress Websites, How can I minimize the costs?
By default, if you create a Standard Website, there is a reserved unit created for that sub-region (ex: east-us).
Any additional websites that you create in the same sub-region, would be automatically linked to this reserved unit.
We will be billing only for the reserved unit and not for the number of websites.
Therefore, to save cost, you can create all three websites under the same sub-region.
You would be only for one reserved unit, i.e. 30 hours per day.
Well, hope that helps anyone out.