Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/krook/openwhisk-php-kind-action
Testing various serverless PHP actions on @akrabat's new OpenWhisk PHP kind.
https://github.com/krook/openwhisk-php-kind-action
Last synced: about 2 months ago
JSON representation
Testing various serverless PHP actions on @akrabat's new OpenWhisk PHP kind.
- Host: GitHub
- URL: https://github.com/krook/openwhisk-php-kind-action
- Owner: krook
- Created: 2017-07-24T14:55:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-25T03:33:17.000Z (over 7 years ago)
- Last Synced: 2024-10-11T19:12:12.857Z (3 months ago)
- Language: PHP
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OpenWhisk PHP kind actions
This is a collection of PHP actions to test @akrabat's new [PHP kind for OpenWhisk](https://github.com/apache/incubator-openwhisk/pull/2415). It assumes you have built your own instance of OpenWhisk based on his fork.
## Simple action with params
[hello.php](hello.php)
```bash
vi hello.php
wsk -i action update hello hello.php --kind php:7.1
wsk -i action invoke hello -r -p name World
```## Action connecting to MySQL
[mysql.php](mysql.php)
```bash
vi mysql.php
cp template.local.env local.env
vi local.env # Update with Bluemix or any other MySQL database service.
source local.env
wsk -i action update mysql mysql.php --kind php:7.1 \
--param "MYSQL_HOSTNAME" $MYSQL_HOSTNAME \
--param "MYSQL_USERNAME" $MYSQL_USERNAME \
--param "MYSQL_PASSWORD" $MYSQL_PASSWORD \
--param "MYSQL_DATABASE" $MYSQL_DATABASE
wsk -i action invoke mysql -r \
--param name Tarball \
--param color Black
```## Web action
```bash
vi web.php
# TODO
```## Triggered by an alarm
```bash
vi alarm.php
# TODO
```## Sequence
```bash
vi sequence1.php
vi sequence2.php
# TODO
```