-
Notifications
You must be signed in to change notification settings - Fork 0
Docs: README.md #47
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
Merged
Merged
Docs: README.md #47
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,7 @@ | |
|
|
||
| ## Considerations | ||
|
|
||
| The functions run in **Serverless Framework** and use **Windows** like OS. | ||
| The functions run in **Serverless Framework** and use **Linux** like OS to run functions. | ||
|
|
||
| ## Install | ||
|
|
||
|
|
@@ -22,24 +22,63 @@ Check Install | |
| serverless -v | ||
| ``` | ||
|
|
||
| Install azure plugin | ||
| Install azure plugins | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is necessary a specific version of node to install this plugins?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, Only Nodejs should be 10, is due to azure cli compatibility |
||
|
|
||
| ```bash | ||
| serverless plugin install --name serverless-azure-functions | ||
| ``` | ||
|
|
||
|
|
||
| In case that you have **make** installed in your computer you can use | ||
|
|
||
| ```bash | ||
| serverless plugin install --name serverless-azure-functions | ||
| make install-serverless-plugins | ||
| ``` | ||
|
|
||
| Install Azure CLI | ||
| ## Azure Account | ||
|
|
||
| ### Install Azure CLI | ||
|
|
||
| [More Information](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) | ||
|
|
||
| ```bash | ||
| curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash | ||
| ``` | ||
|
|
||
| Login | ||
| ### Login | ||
|
|
||
| ```bash | ||
| az login | ||
| ``` | ||
|
|
||
| ## NodeJs Functions | ||
|
|
||
| ### Create new function | ||
| Go to *nodejs-functions/*, to add a new function, you need create a new directory in *src/handlers/*, inside of directory you need create a **index.js** file | ||
|
|
||
| And how last step you need add reference to this function in **serverless.yml**, check the azure serverless documentation [here](https://www.serverless.com/framework/docs/providers/azure/guide/intro/) for more information. | ||
|
|
||
| ### Add Third Parties Dependencies | ||
| Add *package.json* with the modules that you need inside of function directory. Then add the follow line in **Makefile** inside of *nodejs-functions/*: | ||
|
|
||
| ```bash | ||
| install-dependencies-nodejs: | ||
| cd src/handlers/automatic-clock-outs ; pwd ; $(MAKE) install | ||
| cd src/handlers/my-awesome-function ; pwd ; $(MAKE) install ## add function path. Dont forget use tabs | ||
|
|
||
| ``` | ||
|
|
||
|
|
||
| ## Python Functions | ||
|
|
||
| Go to *python-functions/*, to add a new function, you need create a new directory in *src/handlers/*, inside of directory you need create a _ _ init _ _.py file | ||
|
|
||
| And how last step you need add reference to this function in **serverless.yml**, check the azure serverless documentation [here](https://www.serverless.com/framework/docs/providers/azure/guide/intro/) for more information. | ||
|
|
||
|
|
||
| ## Ops Work | ||
| In case that you need: | ||
| - Add a new Environment Variable | ||
| - Create some function with third parties dependencies | ||
| - Error in Pipeline | ||
| - Some Question :) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.