微软azure 容器服务_Azure Cloud Shell-您自己的bash shell和容器-在Visual Studio代码内部

微软azure 容器服务

微软azure 容器服务

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 Azure 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.

Visual Studio Code具有巨大的扩展库。 还有将近二十打非常好的Azure特定扩展以及Docker等扩展。如果您自己编写Azure扩展,则可以依靠Azure帐户扩展来处理用户登录Azure并选择其订阅的管理权限。 当然, Azure客户扩展是开源的

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 Cloud Shell directly inside VS Code. That means a little container spins up in the Cloud and you can get a real bash 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.

这是最酷的部分-我想,因为我刚刚学到了。 您可以安装Azure帐户扩展(同样,可以直接安装或作为依赖项获得),还可以直接在VS Code中获取Azure Cloud Shell。 这意味着一个小容器在云中旋转,您可以快速获得一个真正的bash shell或一个真正的PowerShell shell。 并且Azure Cloud Shell会自动以您的身份登录,并且已经预先安装了大量工具。

Here's how you do it.

这是您的操作方式。

VS Code Command Palette

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.

它将弹出带有“复制并打开”按钮的消息。 它将启动浏览器,然后在登录Azure并将OAuth VS Code登录到您的“帐户”帐户后输入特殊代码。

image

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.

此时,使用Shift-Ctrl-P打开Cloud Shell,然后键入“ Bash”或“ PowerShell” ...它将自动完成,因此您可以键入更少的内容或设置热键。

Your Cloud Shell will appear along side your local terminals!

您的Cloud Shell将出现在本地终端旁边!

Azure Cloud Shell in VS 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.

请注意,有一个“ clouddrive”文件夹映射到您的Azure存储,因此您可以在其中保存内容。 即使Shell在不使用约20分钟后就消失了,您的东西(脚本等)仍然存在。

image

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.

最后,当您为各种Azure CLI(命令行界面)工具键入“ azure”或“ az”时,您会发现您已经通过身份验证/登录到Azure,因此您可以创建VM,列出网站,管理Kubenetes集群,全部来自VS Code。 我仍在探索,但是我很享受自己所看到的。

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

赞助商:借助适用于Python的英特尔®发行版,将Python扩展到大数据和大科学领域。 接近本机的代码速度。 与NumPy,SciPy和scikit-learn一起使用。 立即获取

翻译自: https://www.hanselman.com/blog/azure-cloud-shell-your-own-bash-shell-and-container-right-inside-visual-studio-code

微软azure 容器服务

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值