From Godaddy To OpenShift
I am moving to other host, I will try to check all links and review everything so until I am finish it might be a lot of broken stuff here.
When I started my hobby website I decided to buy a cheap host, so I found Goddady with a nice price, at the time a shared host was very cheap and cheaper if I buy it for 5 years, so I did and I got stuck with Godaddy for 5 years. Now, after five years the host is going to expire, witch for me is not a bad thing because I wanted to move to other host that has better support, better management tools and nodejs would be a plus. But, since its a hobby, I didn’t want to spend much money on it, fortunately I found very good solutions being one of them the OpenShift.
When I started locking for cheap hosts with nodejs I always got to cloud servers, there was two with free plan that actually caught my attention OpenShift and Heroku.
Both of them are kind of similar, both have console management tools, git and are scalable. On Heroku I particular liked how easily you can manage and share the resources used by each application..on OpenShift if is possible its not so obvious.
Anyway, after trying to setup my wordpress blog on both, I quickly decided to go with OpenShift for the simple reason that the free plan as MySQL DB needed by wordpress and it has more DB space. Heroku free plan has a PostGresSQL DB and wordpress doesnt support it out of the box.
Until now OpenShift is …
…Great :D, I am really happy with OpenShift:
- Free Plan: The free plan is a great feature on any service, because it lets you try it and see if it fits your needs. Besides the motto “Pay as you grow” make sense to me, its a great way to get customers and a good marketing tool. But yeah I like it because I don’t have to pay
- Git:For any project involving developing its great to have a version control system, and its great to use it as a deploying system as well. OpenShift uses git as
the primary tool to deploy applications live.
On my “real” work I always update my services and websites to deploy with git, its a simple matter of pull the master branch. Normally I use 2 “standard” branch’s: master (production ready branch) and dev (merge master ready branch). Any other developments are made on other branch’s.
- Certificate Authentication: Tools like git and other OpenShift tools can login with a certificate so you only need to set it up once on your computer and then you never
need to worry about authentication again
- Management Shell tools: OpenShift applications can be manage with a single shell command tool. The “rhc” command can perform a lot of management task, like
setting up your account certificate, and a lot of other stuff. I especilly like the command
, it simple starts the ssh shell where your app is.
- Nodejs It supports nodejs :D…
There is probably a lot more great features that I will discover with time.
OpenShift DNS pain…
Attention that OpenShift is not domain name registrar or provider/management, but I need to put my domain names to work with it.
The biggest problem I found was to configure my domains names to work as they did before.
The problem is that I am using fsvieira.com to point to my page and web services, I recently discovered that this kind of names are called naked or root domains, and apparently is not a good idea to use them on the web stuff.
The problem is that I can use a cname (alias) to a sub-domain, like www.fsvieira.com points to
seems not only be on the domain providers but also on the RFC, and with good reason, because
root domain name can be used on other services.
Anyway, so I made a sub-domain www.fsvieira.com and point to my cloud, then I redirect fsvieira.com (301) to www.fsvieira.com with forward only because masking is really bad, it makes a iframe with source pointing to your redirect address, so the url will never change on address bar and if you have rest service send json it will be bad.
Redirect seemed to work ok, everything I access fsvieira.com it was changed to www.fsvieira.com and everything looked good.
But when I try to use my (ajax) rest public service (with cors enabled to allow everyone) it fails. It works for www.fsvieira.com but not with fsvieira.com because of the redirect.
So, the solution was to make a CNAME for fsvieira.com to point to the cloud, and I did it with
cloudflare, it is very easy you don’t need to transfer the domain to be able to use their services and for what I saw there is plenty of interesting services that they provide.
OpenShift is a great hosting solution, even for hobbyists. A CloudFare is great to manage your domain names and do stuff that you cant do with other domain providers.
If I knew what I know now I sure would have used the www.fsvieira.com to point to my services,
it would have been much more simple to change them ;).
Thats it, I hope to finish the migration of my website very soon, and sorry for any broken links and pages.