Grape is a hosting platform and web-panel to manage servers infrastructures.
A self-hosted PaaS (Platform as a Service) solution for web agencies and personal use. It is an our internal project as a part of work for completely redesign the company server infrastructure.
The main question was how to publish web application to the Internet as easy as we can? Answering for this question is not very easy for web agency, because there are a lot of sub-questions. For example:
- How to host a lot of projects on the couple of servers?
- How to isolate projects one from another?
- How to make a backups?
- How to operate with databases?
- How to implement the domain routing?
- How to easy create ftp for project?
- And many others…
There are also yet another important question: how to implement the infrastructure which is easy to use for developers and does not require a system administrator.
There are a number of PaaS projects on the market.
- https://www.heroku.com/ - PaaS
- https://www.dotcloud.com/ - PaaS
- http://appfog.com/ - PaaS
- https://www.digitalocean.com/ - Micro Instances
- https://www.webfaction.com/ - Flexible Shared Hosting
But all that projects use own infrastructure and very expensive for webagency.
Our old infrastructure looks like that:
- A couple of dedicated servers in the datacenter.
- Xen is using for creates a number of VMs (virtual machines) on the base of dedicated servers.
- Each VM can host about a dozen of projects through a Nginx/uwsgi.
- Also we have a separate VMs for host the DB server and a domain router.
This infrastructure works but have a number of conceptual problems:
- System administration person is needed.
- Hypervisor virtualization (provided by Xen) is very heavy for implementing the per-project isolation. Per-VM isolation has a lot of potential security risks.
- Very difficult to operate by developers.
Everything that are described above are why we began to develop a new infrastructure and special web based panel for operate it. Grape is like a personal cloud which can be installed on your own server or on the group of servers. But unlike the most of cloud solutions Grape does not hide the real hardware from users. When we created the Grape we were following the next key points:
- We need to know where (on which server) our application is working.
- We do not have to do any modification for application code for deploying to the Grape infrastructure.
- Each application which can hosts on the Grape infrastructure might be able to host also on the just regular server (Linux/nginx/wwsgi or something like this).
- If our customer have an own server but wants to give it to us for service it should to be easy.
- We need to have a “two-clicks” solution for creation the FTP.
- We need to have a “two-clicks” solution for backups operation.
- We need to have a very simple solution for create/delete databases and operates the access.
- We need to have a simple interface for doing standart things when configure the http server.
- We need to have a per-application isolation.
Which technologies we use in this project:
- Docker - per-application isolation, container-based virtualization.
- Hipache - domain routing, load-balancing.
- Redis - domain routing table storage, key-value based persistent storage for applications.
- PostgreSQL - as a main RDBMS (relational database management system).
- Memcached - caching solution for applications.
- Phusion Passenger - application server for Python/Ruby/Node.js based applications.
Now project is in an alpha version.
Let’s to describe the features more closely.
- List of servers (hosts) in an infrastructure. Commonly it is a list of all servers owned by an agency:
- Each new server can be added to the infrastructure very easy, just in couple of clicks:
- Any person with an engineer background (like any backend developer) can setup new server very easily just by following the Grape tooltips.
- When server setup will be completed it will be able to operate by Grape control panel:
- If you need to use an FTP access to the application container folders or for downloading backups or something like this, you can add a new FTP user in just a couple of clicks:
- Additionally to the web application containers Grape also supports a special service containers which is shared between applications. Like PostgreSQL, which is using like service. it means that one RDBMS server can share by many applications. But you can start any number of database servers on any server depends your needs. It is very easy to start a new database server in just couple of clicks and seconds by the help of web based interface (no commands in terminal).
- Very common scenario is using a Cron tool for setup the periodical tasks in Linux. Grape provides the web-interface for operate it:
- Grape has a special interface for see a list of all hosted web applications in the infrastructure:
- New application creates very easily in a two clicks:
- A standard application container image already contains a simple “Hello World” application for testing purposes. You can see it immediately after container creation:
- Special interface can help to add SSH key for login to container. It is very easy to developers because working with keys is much usable then with passwords. Also it means that you can easy to close the access for users if it is needed. Developers don’t need to remember passwords they can just copy and paste command from web interface to terminal and it is just works.
- Special interface can help to operate by database users and databases.
- List of DB users:
- Creation of the database:
- List of databases:
- Developers can easily to get the info how to configure frameworks for connecting to the right database (just copy and paste):
- Dumping and restoring the database are also simple:
- A special interface helps to share application folders to FTP (very useful for external service integration for example):
- Attaching domains to the application is also very simple:
- For start the periodical backup creation you need just a two clicks:
Also there are provided an interface for configuring Nginx. Special simple mode allows to use a couple of check boxes and inputs for doing the common scenarios. Also provided a manual mode with Nginx config editor integrated to web panel.
List of possible competitors:
- cPanel - web based software for configure servers.
- A list of PaaS’es which was described above.