TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Announcing Azure Command-Line Interface 2.0 Preview

174 pointsby itayskover 8 years ago

23 comments

jimjimjimover 8 years ago
This reminds me of companies rewriting applications from VB to c++&#x2F;c#.<p>Half the people complained about VB being good enough and more popular.<p>But the overall feeling was that once the rapid application dev version is out the door and ok then it&#x27;s a good time to redo it with something more engineering-y, for long term support before the first version gets too ossified.<p>(i&#x27;m sure i&#x27;m going to burn karma for comparing node with vb but...)
评论 #12593545 未加载
评论 #12594239 未加载
评论 #12593495 未加载
评论 #12593661 未加载
sagivoover 8 years ago
motivation:<p><i>- Dependency management for Node.js adds maintenance costs for Linux distributions.<p>- Cloud tooling vendors prefer Python to match AWS CLI and GCloud CLI.<p>- Python offers a more mature platform for building CLIs Python is typically available on Linux distributions by default.<p>- While none of these reasons precluded building the next CLI in Node.js, Python was the natural choice.</i><p>taken from here - <a href="https:&#x2F;&#x2F;github.com&#x2F;Azure&#x2F;azure-cli&#x2F;wiki&#x2F;Motivation" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Azure&#x2F;azure-cli&#x2F;wiki&#x2F;Motivation</a>
评论 #12598111 未加载
lubosover 8 years ago
I&#x27;m currently starting one project on Node.js and just this morning I thought to myself. This is too hard. I might as well rewrite it in Python.<p>The main issue for me is how Node.js is forcing you to have all I&#x2F;O operations asynchronous. For what I&#x27;m doing, this is exactly what I don&#x27;t need. It makes the code so much more complicated. It&#x27;s callback into callback into callback and returning &quot;promises&quot; within &quot;promises&quot;... simple functions are turned into beasts. It works but it&#x27;s obvious I&#x27;m not using the right tool for the job.<p>Don&#x27;t get me wrong. I&#x27;m actually glad I dived into Node.js and learned a lot of new things. It&#x27;s just that Node.js is very specialized framework which is amazing for certain use-cases and totally inappropriate for others.<p>On the other hand, Python is general-purpose. It&#x27;s never the best tool for the job but it&#x27;s almost always good enough. So once you know Python, you know you can use it in many diverse projects without giving up your sanity. Can&#x27;t say the same about Node.js.
Longhanksover 8 years ago
Did they explain why they switched?<p>Not that I&#x27;m complaining. Love Python, dislike JS being everywhere.
评论 #12593289 未加载
评论 #12593666 未加载
dajonkerover 8 years ago
One advantage of using a dynamic language like Python is that you don&#x27;t necessarily have to update the client code to be able to use new functions. You can just generate the necessary code during runtime after loading the specification from a web API. I believe this is what google does with their gcloud tools (and that&#x27;s probably also the reason why it sometimes feels slow to react). Yes, you can probably do this using Node as well, but Python comes installed on a lot of Unix based systems nowadays, as far as I can tell Node does not.
评论 #12593215 未加载
aabajianover 8 years ago
Python is the language that, once you know it, you&#x27;ll never go back. It&#x27;s gotten to the point where I use it to run an entire backend as well as simple terminal scripts. It&#x27;s faster to write a Python script to &quot;switch the first and third columns in a file&quot;, rather than Googling for an appropriate awk command (or spending the time to come up with one myself).
评论 #12593922 未加载
评论 #12593836 未加载
评论 #12594120 未加载
评论 #12594280 未加载
评论 #12593771 未加载
devyover 8 years ago
FYI, both AWS&#x27;s CLI[1] and GCP&#x27;s Cloud SDK(which includes CLIs like gcloud, gsutil, bq, etc.)[2] are also written in Python.<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;aws&#x2F;aws-cli" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;aws&#x2F;aws-cli</a><p>[2]: <a href="https:&#x2F;&#x2F;cloud.google.com&#x2F;sdk&#x2F;" rel="nofollow">https:&#x2F;&#x2F;cloud.google.com&#x2F;sdk&#x2F;</a>
tamalsaha001over 8 years ago
I wish they had used GO. If you worry about distribution and dependencies, GO static binaries are clear winner. One issue with GO binaries is that they can become very big.
评论 #12594880 未加载
johnwheelerover 8 years ago
If you&#x27;re going to write any sort of cli in Python, you really should use click <a href="http:&#x2F;&#x2F;click.pocoo.org&#x2F;5&#x2F;" rel="nofollow">http:&#x2F;&#x2F;click.pocoo.org&#x2F;5&#x2F;</a><p>Why click? <a href="http:&#x2F;&#x2F;click.pocoo.org&#x2F;dev&#x2F;why&#x2F;" rel="nofollow">http:&#x2F;&#x2F;click.pocoo.org&#x2F;dev&#x2F;why&#x2F;</a>
评论 #12597026 未加载
brachiover 8 years ago
Looking at the Dockerfile, it seems this works in Python 3.5, that was the first thing I wanted to check when I read this.
smortazover 8 years ago
On behalf of the Python team @ Microsoft:<p><a href="http:&#x2F;&#x2F;imgur.com&#x2F;gallery&#x2F;MWcxIMA" rel="nofollow">http:&#x2F;&#x2F;imgur.com&#x2F;gallery&#x2F;MWcxIMA</a><p>Congrats!<p>Python built into Windows 10, Azure CLI in Python, Python Tools for Visual Studio, Azure Jupyter Notebooks, ... exciting times for Python devs on the msft stack!
评论 #12596312 未加载
colemickensover 8 years ago
One feature I&#x27;m loving in the new Azure CLI is a new command (`az ad sp create-for-rbac`) that will create a new Service Principal and grant it a RBAC Role assignment in a single shot. It should make the first step of setting up CI&#x2F;CD scenarios a bit easier.
评论 #12597036 未加载
评论 #12593678 未加载
phjordonover 8 years ago
This is really cool! Some rambly notes:<p>* I&#x27;m interested in seeing how they plan on handling keeping an &#x27;evergreen&#x27; state on ubuntu repos that they don&#x27;t control.<p>* jmespath! It&#x27;s great to see it spread more! Such a useful spec.<p>* There&#x27;s an awful lot of dependencies, 59 vs 10 in the aws cli.<p>* No windows installers?<p>* Does that server side completion cost money?<p>* With such a crazy file structure, it would be great to see a getting started guide for contributing.<p>* The readme should really list the supported python versions.<p>* It&#x27;s hard to tell how much is code generated and how much is custom.<p>* Help text prints right to the shell without using a pager.
评论 #12596267 未加载
tetronover 8 years ago
I haven&#x27;t used the new Azure cli, but a major issue with the node.js based cli was that it was heavily oriented towards interactive use and not well suited for use by scripts. Hard to parse output, prompt for parameters instead of accepting them on the command line, etc.
评论 #12593724 未加载
评论 #12594675 未加载
itayskover 8 years ago
Was the submission edited?? The point I wanted to make was about the choice of language, rather then the announcement of the new tools. It&#x27;s kind of rude TBH...
0xFFCover 8 years ago
Personally I don&#x27;t have any experience with working with neither of AWS,Azure,GCP,etc.<p>But I am so curious to know how people who have worked with them find them? Which one is better ? What is advantage of each one?<p>I couldn&#x27;t find any useful information in web either.<p>Update: I am familiar with basic stuff. But I am so curious about heavy load, for example why Spotify chose gcp or etc. Was there technical reason or it was preference.
评论 #12593124 未加载
bbaylesover 8 years ago
The directory structure is beautiful.
评论 #12593512 未加载
edddover 8 years ago
Python is a good fit for CLI tools, but it doesnt differ that much from node when it comes to complex backends.<p>Type annotations in py3 might change that, but lets be honest - py3 is still far from broad adoption.
TheRealPomaxover 8 years ago
Can someone please explain why the fact that it was in Node and is now in Python matters in the slightest, given that it&#x27;s a command line utility that doesn&#x27;t seem to, in any way, expose the language it is written in?<p>This could be in haskell or F# and it still wouldn&#x27;t matter because it&#x27;s the CLI itself that matters. (to which the question must be: is Azure popular? Is a new version of the CLI utility big news?)
jpdllaover 8 years ago
Official announcement in the Azure blog: <a href="https:&#x2F;&#x2F;azure.microsoft.com&#x2F;en-us&#x2F;blog&#x2F;announcing-azure-cli-2-preview&#x2F;" rel="nofollow">https:&#x2F;&#x2F;azure.microsoft.com&#x2F;en-us&#x2F;blog&#x2F;announcing-azure-cli-...</a>
评论 #12594262 未加载
robertocarlosover 8 years ago
Surprised this is getting so much attention here. They re-wrote their CLI in another language. What&#x27;s the big deal...
评论 #12593240 未加载
评论 #12593246 未加载
评论 #12593651 未加载
_jezell_over 8 years ago
Would have been better if they had rewritten in rust or go if they wanted to eliminate problems with distros...
评论 #12593873 未加载
cmdrfredover 8 years ago
Looks like the are going for both 2 and 3 support?<p><a href="https:&#x2F;&#x2F;github.com&#x2F;Azure&#x2F;azure-cli&#x2F;blob&#x2F;master&#x2F;scripts&#x2F;dev_setup.py" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Azure&#x2F;azure-cli&#x2F;blob&#x2F;master&#x2F;scripts&#x2F;dev_s...</a><p>EDIT:<p>Nah, only 3. So much for Microsoft and it&#x27;s legendary backwards compatibility.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;Azure&#x2F;azure-cli&#x2F;blob&#x2F;master&#x2F;scripts&#x2F;generate_command_inventory.py" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Azure&#x2F;azure-cli&#x2F;blob&#x2F;master&#x2F;scripts&#x2F;gener...</a>
评论 #12593947 未加载