-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Serverless Run Plugin #4034
Conversation
@eahefnawy @pmuens I gave it a spin and I got errors in installing the
Full trace:
|
@rupakg thanks for testing! 👍 AFAIK it's now called @serverless/emulator and is already published to |
@pmuens Maybe I can do a PR. But, I could not find it on npm. |
Thanks for that @rupakg 👍 🤔 maybe @eahefnawy knows more... |
local emulator not published yet, gonna publish it today |
@eahefnawy @pmuens Any word on resolving this issue?
|
@rupakg the setup / config to auto-deploy the |
@eahefnawy I got latest of the branch and tried it on a service I have. I get this error:
Any ideas? |
It looks like the /cc @eahefnawy |
const path = require('path'); | ||
|
||
function installEventGateway(eventGatewayVersion) { | ||
let eventGatewayDownloadUrl = `https://github.com/serverless/event-gateway/releases/download/${eventGatewayVersion}/event-gateway_${eventGatewayVersion}_darwin_386.tar.gz`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we download amd64
version for 64bit arch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could do it https://stackoverflow.com/a/37465917/837709
@eahefnawy @pmuens I tried the
And, my
Highlighting the error:
Another couple of things from the output: Can we get rid of this deprecation message?
I really like how the Local Emulator advertises the port it listen's on. I would like the Event Gateway to do the same. (Issue 246)
Maybe at the bottom, we can also show version info. for Local Emulator and Event Gateway as well:
PS: I was not sure if opening issues for these would confuse existing users as the feature is not merged in yet. |
Shout out to @eahefnawy 🙌 The code is clean and easy to work with! |
I am using "serverless" installed local with the project and would like to do this with the emulator too.
packages.json
|
@aheissenberger thanks for commenting 👍 🤔 nice catch! It looks like the Emulator and Event Gateway support is only available for global installs (but local Serverless Framework installs are also pretty common). Could you please open up a separate issue so that we can track and discuss this in isolation? Thanks in advance! |
What did you implement:
serverless run
command that installs and/or downloads the event gateway and the local emulator, spins them up and deploys & registers functions to the local emulator and/or event gateway.How did you implement it:
We first check whether the local emulator is running, if it is, we deploy functions to the local emulator. We then check whether the event gateway is running, if it is, we register functions/events to the event gateway. If they're not running, we check whether they're installed and install them if not. We then spin them up and deploy and register functions.
How can we verify it:
Basic Example
sls run
localhost:4000/e1
. You should see the response from the function.Todos
Is this ready for review?: YES
Is it a breaking change?: NO