Download the PHP package yeebase/readiness without Composer

On this page you can find all versions of the php package yeebase/readiness. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package readiness

Build Status

Yeebase.Readiness

Package to check the rediness of a flow application.

Useful in a kubernetes readiness and liveness probe to determine if a pod can serve traffic and is alive.

Usage

Readiness

Simply execute the flow command ./flow app:isready.

This will execute all tests defined in the Yeebase.Readiness.testChain of the Settings.yaml. If all tests have passed, the readyChain tasks will be executed.

After a successfully run of the ready chain an internal lock will be set to prevent repeated execution, so only the readyChain will be executed again. The testChain will be executed on every run. So the readyChain should bring your application in an "ready state". Make sure to initialize everything you need. The testChain should ping all services your application depends on.

Liveness

Execute ./flow app:isalive to check if your pod is still alive.

This will execute the Yeebase.Readiness.livenessChain.

Currently the liveness chain is empty by default and has one possible test: statusCode.

Configuration

Add all your tests in the following format in your apps Settings.yaml:

After that, the check will execute the ready chain:

After a successful ready chain invokation, you can call ./flow app:isalive to execute your liveness chain:

Advanced configuration

Before each attempt to execute a ready task, the check will test the Yeebase.Readiness.defaultReadyTaskCondition to see if the task should be executed. In the default configuration this is simply a check to see if the ready lock is not yet set.

You can override this behaviour on a per task basis:

(the lockName setting is simply a shorthand for exactly this example)

To extend the eel context, you can provide additional helpers in Yeebase.Readiness.defaultContext.

Example Configuration

This example could be used in your Flow package to make sure that your application pod has a ready state to serve traffic. Therefore it will always check the ping status for doctrine, redis and beanstalk. On the first run all missing database migrations will be executed, the redis cache flushed and static resources published. After a successfull run only the testChain will be executed again.

Note the lockname configuration. This Configuration enables you to run tasks only once per deployment or always. By default the Yeebase_Readiness_Lock cache is used to read and write locks. Add this to your Caches.yaml and all your application pods will rely on the same lock files as they don't use the local file storage but redis. This will result in a execution once per deployment:

The staticResources task has a custom cacheName configured. To ensure that this task will be executed in each application pod set it to local file storage:


All versions of readiness with dependencies

PHP Build Version
Package Version
Requires neos/flow Version ~4.3 || ~5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package yeebase/readiness contains the following files

Loading the files please wait ....