Download the PHP package open-runtimes/executor without Composer

On this page you can find all versions of the php package open-runtimes/executor. 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 executor

Open Runtimes Executor 🤖

open-runtimes-box-bg-cover


Discord Build Status Twitter Account Docker Pulls

Executor for Open Runtimes, a runtime environments for serverless cloud computing for multiple coding languages.

Executor is responsible for providing HTTP API for creating and executing Open Runtimes. Executor is stateless and can be scaled horizontally when a load balancer is introduced in front of it. You could use any load balancer but we highly recommend using Open Runtimes Proxy for it's ease of setup with Open Runtimes Executor.

Features

Getting Started

  1. Pull Open Runtimes Executor image:

  2. Create docker-compose.yml file:

Notice we added bind to local ./functions directory. That is only nessessary for this getting started, since we will be executing our custom function.

  1. Create .env file:

OPR_EXECUTOR_CONNECTION_STORAGE takes a DSN string that represents a connection to your storage device. Every scheme but file and local requires a host. For example:

Storage DSN
Local filesystem file://localhost
AWS S3 s3://access_key:access_secret@bucket_name.s3.us-east-1.amazonaws.com?region=us-east-1
S3-compatible (MinIO, Garage, etc.) s3://access_key:access_secret@minio:9000/bucket_name?region=us-east-1&insecure=true
S3-compatible, endpoint given outright s3://access_key:access_secret@localhost/bucket_name?region=us-east-1&url=http%3A%2F%2Fminio%3A9000

The DSN resolves to an endpoint of scheme://host[:port][/bucket], and every object key hangs off it. insecure=true makes that scheme http, and the port is used as given. The bucket is the path of the DSN, and it reaches the endpoint exactly once: it is appended for path-style addressing, and left alone where the endpoint already names it, either as the leading label of the host (AWS S3, DigitalOcean Spaces, Backblaze, Linode and Wasabi all address their buckets that way) or as the path of a url. url replaces the scheme, host and port, so the last two rows above address the same object.

A DSN that cannot be parsed, or whose scheme has no device, is rejected rather than quietly falling back to the local filesystem. Ask for local storage with file:// or local://, or leave the variable empty.

For backwards compatibility, executor also supports OPR_EXECUTOR_STORAGE_* variables as replacement for OPR_EXECUTOR_CONNECTION_STORAGE, as seen in Appwrite repository.

  1. Start Docker container:

  2. Prepare a function we will ask executor to run:

This created my-function.tar.gz that includes index.php with a simple Open Runtimes script.

  1. Send a HTTP request to executor server:

  2. Stop Docker containers:

API Endpoints

Method Endpoint Description Params
GET /v1/runtimes/{runtimeId}/logs Get live stream of logs of a runtime JSON
POST /v1/runtimes Create a new runtime server JSON
GET /v1/runtimes List currently active runtimes X
GET /v1/runtimes/{runtimeId} Get a runtime by its ID JSON
DELETE /v1/runtimes/{runtimeId} Delete a runtime JSON
POST /v1/runtimes/{runtimeId}/executions Create an execution JSON
GET /v1/health Get health status X

/v1/runtimes/{runtimeId}/logs

Param Type Description Required Default
runtimeId string Runtime unique ID ✅
timeout string Maximum logs timeout in seconds '600'

/v1/runtimes

Param Type Description Required Default
runtimeId string Runtime unique ID ✅
image string Base image name of the runtime ✅
entrypoint string Entrypoint of the code file ' '
source string Path to source files ' '
destination string Destination folder to store runtime files into ' '
variables json Environment variables passed into runtime [ ]
runtimeEntrypoint string Commands to run when creating a container. Maximum of 100 commands are allowed, each 1024 characters long. ' '
command string Commands to run after container is created. Maximum of 100 commands are allowed, each 1024 characters long. ' '
cacheKey string Optional key for sharing build caches. Must start with a letter or number. Allowed characters are letters, numbers, dots, underscores, and hyphens. ' '
timeout integer Commands execution time in seconds 600
remove boolean Remove a runtime after execution false
cpus float Maximum CPU cores runtime can utilize 1
memory integer Container RAM memory in MBs 512
version string Runtime Open Runtime version (allowed values: 'v2', 'v5') 'v5'

/v1/runtimes/{runtimeId}

Param Type Description Required Default
runtimeId string Runtime unique ID ✅

/v1/runtimes/{runtimeId}/executions

Param Type Description Required Default
runtimeId string The runtimeID to execute ✅
body string Data to be forwarded to the function, this is user specified. ' '
path string Path from which execution comes '/'
method array Path from which execution comes 'GET'
headers json Headers passed into runtime [ ]
timeout integer Function maximum execution time in seconds 15
image string Base image name of the runtime ' '
source string Path to source files ' '
entrypoint string Entrypoint of the code file ' '
variables json Environment variables passed into runtime [ ]
cpus floats Maximum CPU cores runtime can utilize 1
memory integer Container RAM memory in MBs 512
version string Runtime Open Runtime version (allowed values: 'v2', 'v5') 'v5'
runtimeEntrypoint string Commands to run when creating a container. Maximum of 100 commands are allowed, each 1024 characters long. ' '

Environment variables

Variable name Description
OPR_EXECUTOR_ENV Environment mode of the executor, ex. development
OPR_EXECUTOR_IMAGES Comma-separated list of supported images (ex: openruntimes/php:v5-8.1,openruntimes/php:v2-8.1,..).
OPR_EXECUTOR_CONNECTION_STORAGE DSN string that represents a connection to your storage device, ex: file://localhost for local storage
OPR_EXECUTOR_CONNECTION_BUILD_CACHE_STORAGE Optional DSN string for build cache artifacts. Defaults to OPR_EXECUTOR_CONNECTION_STORAGE when empty
OPR_EXECUTOR_INACTIVE_THRESHOLD Threshold time (in seconds) for detecting inactive runtimes, ex: 60
OPR_EXECUTOR_MAINTENANCE_INTERVAL Interval (in seconds) at which the Executor performs maintenance tasks, ex: 60
OPR_EXECUTOR_NETWORK Network used by the executor for runtimes, ex: openruntimes-runtimes
OPR_EXECUTOR_SECRET Secret key used by the executor for authentication
OPR_EXECUTOR_DOCKER_HUB_USERNAME Username for Docker Hub authentication (if applicable)
OPR_EXECUTOR_DOCKER_HUB_PASSWORD Password for Docker Hub authentication (if applicable)
OPR_EXECUTOR_RUNTIME_VERSIONS Version tag for runtime environments, ex: v5
OPR_EXECUTOR_RETRY_ATTEMPTS Number of retry attempts for failed executions, ex: 5
OPR_EXECUTOR_RETRY_DELAY_MS Delay (in milliseconds) between retry attempts, ex: 500

Contributing

All code contributions - including those of people having commit access - must go through a pull request and be approved by a core developer before being merged. This is to ensure a proper review of all the code.

We truly ❤️ pull requests! If you wish to help, you can learn more about how you can contribute to this project in the contribution guide.

Security

For security issues, kindly email us at [email protected] instead of posting a public issue on GitHub.

Follow Us

Join our growing community around the world! See our official Blog. Follow us on Twitter, Facebook Page, Facebook Group , Dev Community or join our live Discord server for more help, ideas, and discussions.

License

This repository is available under the MIT License.


All versions of executor with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5.0
ext-curl Version *
ext-json Version *
ext-swoole Version *
utopia-php/client Version ^0.6
utopia-php/config Version ^0.2.2
utopia-php/console Version ^0.1.1
utopia-php/di Version 0.3.*
utopia-php/dsn Version 0.2.*
utopia-php/http Version ^2.0@RC
utopia-php/orchestration Version ^0.19.2
utopia-php/storage Version ^4.4
utopia-php/system Version 0.10.*
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 open-runtimes/executor contains the following files

Loading the files please wait ...