From Zero to Hero — run parse-server on Google Cloud Platform Part 0 — Introduction
This blog post is the first part of a series on how to run parse-server on GCP. After reading all the blogs in the series you will know how to:
- Build, run and test your parse-server nodejs+ MongoDB on your local machine via docker-compose
- Deploy, run and test your parse-server nodejs + MongoDB instances on GCP container engine (Kubernetes) in production at low/large scale
- Integrate kube-lego to automatically obtain secured certificate (via lets encrypt apis) for your app
- Create a simple mobile (iOS) app that will consume your parse-server apis
- Add real time capabilities to your mobile app via Parse LiveQuery protocol
From Zero to Hero
In the From Zero to Hero series i will not make any assumptions on your professional knowledge ahead. I will try to explain everything from scratch about each one of the technologies that i will use, so if you feel comfortable with one or more technologies please feel free to skip the theoretical part and go directly to the practical part. I will also mention in the blogs which part are theoretical and which are practical.
I’ve decided to write this series of blogs after i found myself struggling a lot with running apps in production mode. Prior to google container engine i used google app engine + mongoLAB and it really worked well but then i decided to use Redis instance for caching some common records, and use elastic-search for creating a fast and scalable search engine and believe me that’s only part of the things that you need to use when you create big apps. The naive solution was to either create a vm for each one of the services that i want to use or even better (and more expensive) to use some as a service solutions like Redis labs and elastic cloud. That’s where i decided to stop and rethink on what is the right approach to use so i read a lot of articles, blogs, watch a lot of youtube videos, the only thing that i knew at that time is that i want to run my services only on GCP. I don’t want to write the reasons why i decided to go with GCP to not open a huge discussion here but what i can say is that i am familiar with the other 2 big cloud providers (AWS and AZURE) and used one of them before i moved to GCP.
Thanks god i found google container engine which was the answer to all of my needs which are:
- Keep my services close to each other
- Quickly add more services when required
- Easy/Auto scale the services on demand
- Run all my services on GCP
I just want to add one last thing before we start to get our hands dirty which is that i know that this solution is not the easiest solution for running parse-server or any other NodeJS application out there in the cloud but what i can grantee you is that this solution is very flexible and cost effective and you will not need to refactor all your stack in case your app or solution will get high attraction.
Please note! since i am a very happy mac user all the screenshots, videos, photos and other assets will be relevant for mac users only. If you are using windows OS you can run it as well except part 4 of the series there i will show how to create an iOS app.
So, are you ready to get your hands dirty? Click here to read part 1