Playing nicely with Pagodabox
Published:
Recently, I get a chance working with Pagodabox while helping a friend with a client project. If you do not know about Pagodabox, you can go to their website to checkout. In short it is a cloud solution to deployment of web application. One of the nice feature of Pagodabox is you can actually connect directly to the Sql Server. Most of traditional hostings involve using some sort of web interface (e.g PhpMyAdmin) to interact with db. If you're using Mac OSX, then you should be fine but anything on Windows is a pain. I'm going to show you how this can be done on Windows (sort of!) and backed by Ubuntu VM running in the guest.
Assumptions:
- I have Ubuntu 13.04 (guest) running in my Hyper-V as headless VM.
- I have access to the VM through SSH.
- HeidiSQL is installed on my Win 8 (host)
- In Ubuntu, make sure you have properly set your SSH Key with Pagodabox
Let's do this in few simple steps
- You will need to configure your VM such that your host can reach your guest and vice versa (i.e. host <-> guest)
- SSH to Ubuntu
- Follow the standard procedures from Pagodabox
- Once tunnel is successfuly created, open up HeidiSQL in Windows
- Settings
- Network type: MySQL (TCP/IP)
- Hostname: 192.168.2.3 (This will be my Ubuntu's IP address)
- Uncheck prompt for credential
- User:
- Password:
- Port: 3306 (Your might be different)
- Click open, and you should be able to access the database.
Notes/ Clarifications
- The most important part is that your guest VM and your host (Windows) must be able to communicate correctly.
- For my settings, Pagodabox (local copy of Wordpress) is set up in my Windows using WAMP server (like LAMP/XAMP). Next time maybe I'll try to host everything on my Ubuntu box.
- I shared the local copy of Wordpress so I can access it from Ubuntu using Samba. I think this is part of verification by Pagoda as well to make sure you are the owner of said project/repo.
- Basically, Ubuntu is just there to act as a little server that connects/tunnels to Pagodabox's SQL server.
- Since my Windows host can access to my Ubuntu guest, HeidiSQL can connect to this local server that I've created.
If you have had time figuring this out, my writing can be cryptic at time. Just shoot me an email and I'll be glad to help.