Core concepts

Overview

Magelify is a next-generation Platform as a Service (PaaS) that combines two big industry trends:

  • Containers - orchestrated by managed Kubernetes clusters
  • DevOps - code to cloud deployment automation

Applications / websites are deployed in a cluster as individual microservice containers running on scalable cloud infrastructure. The process of taking code from your local dev environment to production is automated through built-in continuos integration (CI/CD) and Git, providing a unified end-to-end developer workflow.

Git "push to deploy" helps developers be more productive and reduce the risk of human errors.

Organizations

A Magelify organization is a top-level collection of sites and members. Members can have one or more roles that grants the user a particular access level. All sites inherit users and roles from the parent organization. Sites are also billed to the organization's billing account. Sites that do not belong to an organization are referred to as "Personal sites" and are billed to an individual's account.

Groups

A group is a sub-collections of sites within an organization. Groups inherit user permissions from the parent organization, but allows to define specific access to one or more organization members for granular control. This can be used to model departments or divisions within a company, or as a way to grant external users access to one or more sites without allowing them full access at the organization level. An organization can have many groups.

Users

A Magelify user account is required to get access to the platform. Users can be members of an organization or group, which grants them access to sites within the organization/group defined by their access level (role).

Roles

A role defines the mapping of permissions to a set of resources. Users are granted one or more roles when they're added as site collaborators or organization/group members. A user's access level is determined by their most permissive role. Common roles are site admins, developers, billing admins, etc. Refer to the Teams management section for more details.

Clusters

A cluster is a collection of compute nodes that is responsible for running your workloads (applications). When you deploy a new application it gets scheduled onto one or multiple nodes according to your required fault-tolerance. The cluster orchestrator makes sure that the desired number of replicas are running at all times. Clusters are provisioned within a data center managed by a cloud service provider. Clusters are available in different geographical regions.

Magelify runs on self-healing infrastructure making it resilient to hardware failures. If a node becomes unavailable for any reason, workloads are automatically re-scheduled to other healthy cluster nodes.

Sites

A site is a collection of application containers, services, configuration settings, etc. that makes up your application. Sites are based on a template (e.g. Magento, Wordpress, etc.) which determines the technology stack (e.g. NGINX, PHP-FPM, MariaDB, Redis,...) and the configuration needed to build and run the application.

Repositories

Magelify provides managed Git repositories for your application code. You don't need to use an external version control tool.

Environments and deployments

An environment is a running instance of your application (site) and the associated app config. Typically you have one deployment per environment (e.g. staging and production). Deployments can be scaled horizontally by adding/removing replicas to enable high-availability (HA) and load balancing. Environments are fully isolated from each other.

Containers and images

At the core, each application component comprises one or more containers. A component is usually a single process such as NGINX or PHP, or a managed service like a MySQL database or Redis instance. Before your application gets deployed, it is packaged up into a Docker image, a portable, self-contained executable, containing your application code and all of its dependencies (referred to as a build).

Containers are lightweight and offers better resource utilization than traditional virtualization technologies. Unlike a dedicated server or VPS which is responsible for running a bunch of different processes, Magelify is built on a microservices architecture. Each process runs in a separate container with dedicated resource limits and a single responsibility.

Replicas and worker processes

Certain types of components can be deployed with multiple replicas (i.e. scaled horizontally). Requests are distributed between all available container instances in accordance with the load balancer algorithm (e.g. round robin). A common use case is to scale out the number of PHP-FPM worker instances to be able to handle more concurrent visitors / PHP requests. Each component can be scaled independently to allocate resources only where it's necessary.

CI/CD pipeline

Magelify provides an integrated build and delivery pipeline (CI/CD) to simplify application deployments. The git push command builds a new image based on the current application framework/runtime, and performs a rolling update of your deployment replicas.

The CI/CD pipeline runs through a series of build steps depending on which framework and programming language is being used. External dependencies are automatically installed using the official package managers.

For PHP-based applications, dependencies are pulled from the composer.json file if it exists. Node.js applications must provide a package.json or yarn.lock file, depending on if you're using the npm or yarn package manager, respectively.