Note: this work is under active development even though it's in the "backlog" milestone. See https://github.com/Azure/Azure-Functions/issues/98
Update 7/7 by @lindydonna: This work is underway, and we hope to have a preview in the next month. Please follow this issue to track the progress: https://github.com/Azure/Azure-Functions/issues/98
I wonder why it is necessary to upvote this to be implemented instead being a top priority? Isn't Azure about embracing devs from all platforms?
Is it really only cmd on Windows right now? I want to use from "Bash on Ubuntu on Windows".
@Bomret It is indeed a priority, but the implementation is not trivial. We're working on it, and just wanted to allow customers to weigh in.
It's in the backlog milestone because the main work for this is done in another repo (about making the Functions runtime run on netstandard)
There are some parts of the CLI that _should_ already work cross-platform
($ func functions create, $ func azure actions). Right now the main script
wont even load on *nix platforms due to line endings and an immediate platform
test.
How about making the functions scaffolding and Azure management pieces available
cross-platform as a first step with some friendly errors for the parts that
absolutely won't work on anything but Windows?
@fiveisprime Definitely! We have plans to add Functions management operations to the Azure CLI 2.0.
I upgraded today and I see that the cli is still not cross platform. A really pity would be great to get scaffolding and management cross-platform as @fiveisprime mentioned.
@kevinbayes The work is still in progress, as the entire local runtime needs to be ported to .NET core. Adding Functions to the Azure CLI 2.0 is a much smaller amount of work and will come sooner.
@kevinbayes for what it's worth you can generate the scaffolding cross platform
now by running
$ npm i -g yo generator-azurefunctions
$ yo azurefunctions
๐
@fiveisprime yeah that's what I use currently, but thanks for the tip.
FWIW, on my mac this works (i had to dos2unix main.js first):
sudo mono /usr/local/lib/node_modules/azure-functions-cli/bin/func.exe init
Hi @lindydonna , when can we use Functions management operations in Azure CLI 2.0?
@jdneo It's under active development. This issue tracks the progress: https://github.com/Azure/azure-cli/issues/2352
@fiveisprime doesn't work well. Not sure what's missing. But the generator fails.
cicorias@arrakis:~/tmp/az/fn$ yo azurefunctions
_-----_
| | โญโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
|--(o)--| โ Welcome to the Azure โ
`---------ยด โ Functions generator! โ
( _ยดU`_ ) โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
/___A___\ /
| ~ |
__'.___.'__
ยด ` |ยฐ ยด Y `
? Select an option... List templates by type
There are 8 event types available
? Select an event type... blobTrigger
There are 0 templates available
? Select from one of the available templates...
readline.js:990
throw err;
^
TypeError: Cannot read property 'value' of undefined
at Prompt.getCurrentValue (/Users/cicorias/.nvm/versions/node/v7.10.0/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/inquirer/lib/prompts/list.js:129:51)
at tryCatcher (/Users/cicorias/.nvm/versions/node/v7.10.0/lib/node_modules/yo/node_modules/rx/dist/rx.js:63:31)
at InnerObserver.next (/Users/cicorias/.nvm/versions/node/v7.10.0/lib/node_modules/yo/node_modules/rx/dist/rx.js:5407:43)
at InnerObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext (/Users/cicorias/.nvm/versions/node/v7.10.0/lib/node_modules/yo/node_modules/rx/dist/rx.js:1762:31)
at InnerObserver.tryCatcher (/Users/cicorias/.nvm/versions/node/v7.10.0/lib/node_modules/yo/node_modules/rx/dist/rx.js:63:31)
at AutoDetachObserverPrototype.next (/Users/cicorias/.nvm/versions/node/v7.10.0/lib/node_modules/yo/node_modules/rx/dist/rx.js:5883:51)
at AutoDetachObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext (/Users/cicorias/.nvm/versions/node/v7.10.0/lib/node_modules/yo/node_modules/rx/dist/rx.js:1762:31)
at TakeObserver.next (/Users/cicorias/.nvm/versions/node/v7.10.0/lib/node_modules/yo/node_modules/rx/dist/rx.js:5646:17)
at TakeObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext (/Users/cicorias/.nvm/versions/node/v7.10.0/lib/node_modules/yo/node_modules/rx/dist/rx.js:1762:31)
at TakeObserver.tryCatcher (/Users/cicorias/.nvm/versions/node/v7.10.0/lib/node_modules/yo/node_modules/rx/dist/rx.js:63:31)
at AutoDetachObserverPrototype.next (/Users/cicorias/.nvm/versions/node/v7.10.0/lib/node_modules/yo/node_modules/rx/dist/rx.js:5883:51)
at AutoDetachObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext (/Users/cicorias/.nvm/versions/node/v7.10.0/lib/node_modules/yo/node_modules/rx/dist/rx.js:1762:31)
at Subject.onNext (/Users/cicorias/.nvm/versions/node/v7.10.0/lib/node_modules/yo/node_modules/rx/dist/rx.js:5998:19)
at Subject.tryCatcher (/Users/cicorias/.nvm/versions/node/v7.10.0/lib/node_modules/yo/node_modules/rx/dist/rx.js:63:31)
at AutoDetachObserverPrototype.next (/Users/cicorias/.nvm/versions/node/v7.10.0/lib/node_modules/yo/node_modules/rx/dist/rx.js:5883:51)
at AutoDetachObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext (/Users/cicorias/.nvm/versions/node/v7.10.0/lib/node_modules/yo/node_modules/rx/dist/rx.js:1762:31)
cicorias@arrakis:~/tmp/az/fn$
We aren't maintain the Yeoman generator anymore, we have logic for this in the CLI itself
I'm really surprised that this is still not supported on other platforms. I'm on OS X.
I'm interested in hosting Functions on Raspberry Pi / Windows IoT Core!
@wind-rider soon https://github.com/Azure/azure-webjobs-sdk/pull/1193
I am also looking for macOS support
I'd just love to be able to set up a local development environment for them.
I would love to be able to set up a local development for Ubuntu > 16.04
I just tweeted ( https://twitter.com/GeorgBuske/status/883141097790296064 ) about my positive first impression of Azure as Google Cloud Functions are way too beta in functionality - and now I come across this (very first link after google search for Linux CLI deployment), come on #MSFT - do I really need to stay with #AMZN or are there real alternatives (without windows build environment)? ;-(
@kinggeorge if you write your functions in one of the portable languages you can deploy to azure using FTP or fit intergration. So can have a non windows build CI/CD
What you don't yet have is access to the full CLI and local dev
@kinggeorge Exactly, you actually get the same experience as AWS when you're on a Mac/Linux. Lambda does not provide a local functions runtime at all.
The port to .NET Core is underway and we should have a preview within the next month.
Fair warning, the FTP deployment option leaves quite a fair bit to be desired.
Functions is really only designed to use the built-in editor and possibly also git for deployment. Which really isn't optimal.
@lindydonna - On top of a better local development experience, the deployment aspects still really aren't getting enough attention to unblock me on Functions. Any plans to address this?
@SteveALee Thanks, I'll check that out later.
@lindydonna Thanks for feedback. I admit it wasn't after deep analysis but very first impressions, first positive (as tweeted), then negative, I also wasn't referring to the emulator function (which non-the-less I like at Google Cloud Functions during tests), but to have a handy CLI tool for managing lambdas / functions (which AWS has). So it was just a bit frustrating to see the error message (npm ERR! notsup Valid OS: win32...) after I was happy to see all the available features in the azure function dashboard, which Google was lacking or are a pain to setup [hack] (e.g. custom domain, CORS). Looking forward to the release of the rewrite... Cheers :)
I agree the deplyment options are minimal and not an ideal fit for a CO pipeline.
The current git support really requires an extra repository so deployment can be triggered by a check-in at the end of the pipeline. Hence the thought of using ftp whuch has push semantics.
You could fun the cli in a container ss part of the pipeline but windows containers are rarely supported which brings us back to need a linux version of the cli.
I guess we could create function that implement a Ci pipeline (or logic apps) with azure container services but I don't think all the required hooks are there yet
+1
@SteveALee Oh please no. Anything that requires more Azure services to be used as crutches is not a valid option. Need to get out of these kludge loops. There is something concerning with the way Microsoft is approaching the "developer joy" story with Azure. I see so many shortcuts end up being applied that resort to more lock in. Builds and deployments should be runnable from any platform in our outside of Azure using standard scripting options.
Also, no to Windows containers. That just misses the whole issue right now which is that the optimal deploy flow is only available for Windows (msdeploy). Break down those old MS habits and start thinking cross platform!
@lindydonna could the Yo generator be flagged as deprecated and possibly updated one last time indicating deprecation? People find the old stuff and become frustrated and bail before they spelunk further and find updated bits. A real turnoff.
At first the readme. If you're ok I can send a PR
@atrauzzi I'd totally prefer to use standard tools like rsync but was just brainstorming work arounds :) Also the Windows build flow is not optimal either.
We want a simple folder sync and FTP does NOT do that, at least not the common clients.
I investigated this and blogged it in some detail.
@cicorias Good catch! Yes, please do and we can update the package.
+1 We really need this feature.
+1 really import for us also
This has been released today see https://github.com/Azure/Azure-Functions/issues/98#issuecomment-331878210 for details
Today!
Announcement blogs:
If this is indeed cross-platform, you may want to remove the "only works on Windows" bit from the README. :) I'm a Linux user and initially went away in search of another solution, then thought I'd come back here to vote up the issue as requested, and now I see that it should work.
CC @jeffhollan to update the readme.
Yeah, this doesn't work on Linux..
npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! notsup Valid OS: win32
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: linux
npm ERR! notsup Actual Arch: x64
Have to do:
npm i -g azure-functions-core-tools@core
The npm package vs github seems different for readme.
The npm package still says this only supports Windows. What's the deal with this? Is it Windows-only or not?
I think the README for v1.0 got published for v2.0 tag. I'm not sure how, I'll fix the readme on the next release. The package.json metadata should list windows, linux and mac
Thanks for the clarification @ahmelsayed !
Most helpful comment
I wonder why it is necessary to upvote this to be implemented instead being a top priority? Isn't Azure about embracing devs from all platforms?