Norway


Visual Studio Code has a HUGE extension library. There’s also almost two dozen very nice Azure specific extensions as well as extensions for Docker, etc. If you write an extension yourself, you can depend on the Azure Account Extension to handle the administrivia of the user logging into Azure and selecting their subscription. And of course, the Azure Account Extension is open source.

Here’s the cool part – I think, since I just learned it. You can have the Azure Account Extension installed (again, you can install it directly or you can get it as a dependency) you also get the ability to get an Azure Shell directly inside VS . That means a little container spins up in the and you can get a real shell or a real PowerShell shell quickly. AND the Azure Cloud Shell automatically is logged in as you and already has a ton of tools pre-installed.

Here’s how you do it.

VS Code Command Palette Azure Cloud Shell - your own bash shell and container - right inside Visual Studio Code - image 92178b26 08fd 42e9 ab6e 0983a90ff531 - Azure Cloud Shell – your own bash shell and container – right inside Visual Studio Code

It will pop up a message with a “copy & open” button. It’ll launch a browser, then you enter a special code after logging into Azure to OAuth VS Code into your Account account.

image Azure Cloud Shell - your own bash shell and container - right inside Visual Studio Code - image 3a037025 dbae 4afb b1c1 9ac0e2e3f11a - Azure Cloud Shell – your own bash shell and container – right inside Visual Studio Code

At this point, open a Cloud Shell with Shift-Ctrl-P and type “Bash” or “PowerShell”…it’ll autocomplete so you can type a lot less, or setup a hotkey.

Your Cloud Shell will appear along side your local terminals!

Azure Cloud Shell in VS Code Azure Cloud Shell - your own bash shell and container - right inside Visual Studio Code - image 56f4a7c1 d05e 4626 a1e4 2beee6b21b3a - Azure Cloud Shell – your own bash shell and container – right inside Visual Studio Code

Note that there’s a “clouddrive” folder mapped to your Azure Storage so you can keep stuff in there. Even though the Shell goes away in about 20 min of non-use, your stuff (scripts, whatever) is persisted.

image Azure Cloud Shell - your own bash shell and container - right inside Visual Studio Code - image 70867e9d d1de 416c 9e9e e4dd59c94b9d - Azure Cloud Shell – your own bash shell and container – right inside Visual Studio Code

There’s a bunch of tools preinstalled you can use as well!

scott@Azure:~$ node --version

v6.9.4
scott@Azure:~$ dotnet --version
2.0.0
scott@Azure:~$ git --version
git version 2.7.4
scott@Azure:~$ python --version
Python 3.5.2
scott@Azure:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial

And finally, when you type “azure” or “az” for the various Azure CLI (Command Line Interface) tools, you’ll find you’re already authenticated/logged into Azure, so you can create VMs, list websites, manage Kubenetes clusters, all from within VS Code. I’m still exploring, but I’m enjoying what I’m seeing.


Sponsor: Scale your Python for big data & big science with Intel® Distribution for Python. Near-native code speed. Use with NumPy, SciPy & scikit-learn. Get it Today


© 2017 Scott Hanselman. All rights reserved.

Azure Cloud Shell - your own bash shell and container - right inside Visual Studio Code - scotthanselman - Azure Cloud Shell – your own bash shell and container – right inside Visual Studio Code

Azure Cloud Shell - your own bash shell and container - right inside Visual Studio Code - fblike20 - Azure Cloud Shell – your own bash shell and container – right inside Visual Studio Code Azure Cloud Shell - your own bash shell and container - right inside Visual Studio Code - googleplus20 - Azure Cloud Shell – your own bash shell and container – right inside Visual Studio Code Azure Cloud Shell - your own bash shell and container - right inside Visual Studio Code - twitter20 - Azure Cloud Shell – your own bash shell and container – right inside Visual Studio Code Azure Cloud Shell - your own bash shell and container - right inside Visual Studio Code - email20 - Azure Cloud Shell – your own bash shell and container – right inside Visual Studio Code Azure Cloud Shell - your own bash shell and container - right inside Visual Studio Code - rss20 - Azure Cloud Shell – your own bash shell and container – right inside Visual Studio Code 



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here