East PaaS

Create a custom PaaS manager following the #East programming philosophy.


Package, to use with East Foundation, to implement custom PaaS manager to deploy easily containerized applications on container-orchestration system like Kubernetes.

This package was inspired by commercial solutions such as Platform.sh, Symfony Cloud or Heroku.

The library is provider free. Thanks to interfaces defined in this library, DI and Teknoo/Recipe you can adapt this library to any orchestration system.

However, a Docker client and a Kubernetes client are bundle with the library.

You can use directly this library on your personal Docker registry and Kubernetes cluster or use any commercial solution.

An implementation of this library is available here

A demo deployed by the project above is available here

Features


Flexible

PaaS adapts to your projects

Independent

Not require any cloud provider or on-premise solution

Docker / Kubernetes

Docker and Kubernetes clients are natively bundled

Extendable

Can be extendable only via the DI's configuration or thanks to Recipe.

GitHub


Fork the project on GitHub

It is open source! It's hosted, developed, and maintained on GitHub by folks like you.


View GitHub Project

Patreon


Support this project on Patreon

This project is free and will remain free, but it is developed on my free time. If you like it and help me maintain it and evolve it, don't hesitate to support me on Patreon. Thanks :) Richard.


Support it

File deployment example


paas#Dedicated to compiler
    
versionv1

#Custom image, not available in the library
images:
    
foo:
        
build-namefoo
        tag
lastest
        path
'/images/${FOO}'

#Hook to build the project before container, Called in this order
builds:
    
composer-build#Name of the step
    
composer: ${COMPOSER#Hook to call

#Volume to build to use with container
volumes:
    
extra#Name of the volume
        
local_path"/foo/bar" #optional local path where store data in the volume
        
add#folder or file, from .paas.yml where is located to add to the volume
            
'extra'
    
other_name#Name of the volume
        
add#folder or file, from .paas.yml where is located to add to the volume
            
'vendor'

#Pods (set of container)
pods:
    
php-pods#podset name
    
replicas#instance of pods
    
containers:
        
php-run#Container name
            
imageregistry.teknoo.io/php-run #Container image to use
            
version7.4
            listen
#Port listen by the container
                
8080
            volumes
#Volumes to link
                
extra:
                    
from'extra'
                    
mount-path'/opt/extra' #Path where volume will be mount
                
app:
                    
mount-path'/opt/app' #Path where data will be stored
                    
add#folder or file, from .paas.yml where is located to add to the volume
                        
'src'
                        
'vendor'
                        
'composer.json'
                        
'composer.lock'
                        
'composer.phar'
                
data#Persistent volume, can not be pre-populated
                    
mount-path'/opt/data'
                    
persistenttrue
            variables
:
                
SERVER_SCRIPT'/opt/app/src/server.php'

#Pods expositions
services:
    
php-pods#Pod name
    
listen9876 #Port listened
        
target8080 #Pod's port targeted

Manager implementation example


//config/packages/di_bridge.yaml:
di_bridge:
    
definitions:
    - 
'%kernel.project_dir%/config/di.php'

//config/packages/east_foundation.yaml:
di_bridge:
    
definitions:
    - 
'%kernel.project_dir%/vendor/teknoo/east-foundation/src/di.php'
    
'%kernel.project_dir%/vendor/teknoo/east-foundation/infrastructures/symfony/Resources/config/di.php'

//config/packages/east_website_di.yaml:
di_bridge:
    
definitions:
    - 
'%kernel.project_dir%/vendor/teknoo/east-website/src/di.php'
    
'%kernel.project_dir%/vendor/teknoo/east-website/infrastructures/doctrine/di.php'
    
'%kernel.project_dir%/vendor/teknoo/east-website/infrastructures/symfony/Resources/config/di.php'
    
'%kernel.project_dir%/vendor/teknoo/east-website/infrastructures/di.php'
    
import:
    
Doctrine\Persistence\ObjectManager'doctrine_mongodb.odm.default_document_manager'

//config/packages/east_paas_di.yaml:
di_bridge:
    
definitions:
    - 
'%kernel.project_dir%/vendor/teknoo/east-paas/src/di.php'
    
'%kernel.project_dir%/vendor/teknoo/east-paas/infrastructures/Doctrine/di.php'
    
'%kernel.project_dir%/vendor/teknoo/east-paas/infrastructures/Flysystem/di.php'
    
'%kernel.project_dir%/vendor/teknoo/east-paas/infrastructures/Git/di.php'
    
'%kernel.project_dir%/vendor/teknoo/east-paas/infrastructures/Kubernetes/di.php'
    
'%kernel.project_dir%/vendor/teknoo/east-paas/infrastructures/BuildKit/di.php'
    
'%kernel.project_dir%/vendor/teknoo/east-paas/infrastructures/Composer/di.php'
    
'%kernel.project_dir%/vendor/teknoo/east-paas/infrastructures/Symfony/Components/di.php'
    
'%kernel.project_dir%/config/di.php'
    
//config/packages/di_bridge.yaml:
di_bridge:
    
definitions:
    - 
'%kernel.project_dir%/config/di.php'


//bundles.php
...
Teknoo\East\FoundationBundle\EastFoundationBundle::class => ['all' => true],
Teknoo\East\WebsiteBundle\TeknooEastWebsiteBundle::class => ['all' => true],
Teknoo\DI\SymfonyBridge\DIBridgeBundle::class => ['all' => true],
Teknoo\East\Paas\Infrastructures\EastPaasBundle\TeknooEastPaasBundle::class => ['all' => true],

//In doctrine config
doctrine_mongodb:
    
document_managers:
    default:
        
auto_mappingtrue
        mappings
:
        
TeknooEastWebsite:
            
type'xml'
            
dir'%kernel.project_dir%/vendor/teknoo/east-website/infrastructures/doctrine/config/universal'