twilio-labs / serverless-toolkit

CLI tool to develop, debug and deploy Twilio Functions
https://www.twilio.com/docs/labs/serverless-toolkit
MIT License
113 stars 59 forks source link

More a question about using twilio-run without dependency on ngrok #205

Closed alsitebro closed 3 years ago

alsitebro commented 3 years ago

Hi,

We currently use the serverless-toolkit for building and running our serverless functions over at my workplace. I am currently working on building a CI/CD pipeline to automate the build and release cycles for our projects. Unfortunately, we are restricted from using ngrok within our network and traffic to its services are actively blocked by our firewall, because, security.

As a result, we are unable to install the required npm packages for twilio-run which depends on ngrok.

Is there an option within the serverless toolkit for us to build our pipeline without relying on ngrok. If this is not possible, then it means we may need to create a custom solution.

Could please point me in the direction of documentation which outlines to what extent the ngrok package is required in the toolkit.

Thanks

welcome[bot] commented 3 years ago

Thank you so much for opening your first issue in this project! We'll try to get back to it as quickly as possible. While you are waiting...here's a random picture of a corgi (powered by dog.ceo)

picture of dog

philnash commented 3 years ago

Hey @alsitebro, thanks for opening this issue.

For the toolkit itself, ngrok is used when starting the local development server in twilio-run. This is something we could push to an optional dependency (though I'm unclear whether that would help when installing as a CLI plugin). I will investigate this.

We've also investigated the idea of updating the ngrok package to handle the ngrok executable failing to download, though work on that hasn't started yet either.

For the meantime, you may be able to rely directly on the @twilio-labs/serverless-api package, which handles the majority of the deployment logic. The twilio-run deploy command does a bunch of collecting data and checking that the project is all correct, then uses a TwilioServerlessApiClient to make the actual deploy.

Does that help at all?

alsitebro commented 3 years ago

Thanks for this @philnash , I'll try the serverless-api package. And I appreciate you implementing the change to make ngrok optional. That will be really useful. I am happy for this issue to be closed