build 2017 も終わりAzureに関する様々な新しい機能が発表されました。自己学習を兼ねて、すこしづつ試した結果を備忘録として書いていきたいと思います。
Azure Cloud Shell(Preview)が使えるようになりました。Azureのポータルからボタンをポチっとするだけ、ブラウザ内でShellが起動し、Azureを色々操作できてしまう機能です。
いちおう確認画面がでます。
サブスクリプションに何もない状態で、最初にCloud Shellを起動しようとすると、リソースが作成できず失敗したので、そういう場合は、捨てのストレージアカウントでも作成しておくと良いと思います。
Azure Cloud Shell (Preview) overview | Microsoft Docs
- Storageアカウントが必要で勝手に作られます。
- Azure Files でホームディレクトリが保持される感じで、5GBまでになってます
- OSは、Ubuntu 16.04 LTS のコンテナです。
- ユーザ名はかってにMSアカウントのファーストネームを使われました
- 自分の場合は、リソースグループが cloud-shell-storage-westus なので、West USに作られた模様です。インドとかの人もいるので、なんらかのルールで割り振られるのかもしれません。
- PowerShell 版は、もうじきだそうです。
操作
あらかじめ az
コマンドがインストールされており、ログインしたサブスクリプションが認証されているので、そのまま操作可能です。
az group create --name hoge --location japaneast az vm create --resource-group hoge --name myVM --image UbuntuLTS --admin-username azureuser --authentication-type password --admin-password '...'
とでもやれば、さくっとLinux VMが起動するでしょう。
Linuxとしてつらつら
- Emacs/Vim は入ってます。
- apt はあるけど、sudo とかないのでパッケージ的ななにかはインストールできません。ただし、gccとかあるので、普通に configure && make すれば色々動くでしょう。
cpuinfoとか
~$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 63 model name : Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz stepping : 2 microcode : 0xffffffff cpu MHz : 2394.439 cache size : 30720 KB physical id : 0 siblings : 1 core id : 0 cpu cores : 1 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx lm constant_tsc rep_good nopl eagerfpu p ni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm fsgsbase bmi1 avx2 smep bmi2 erms xsaveopt bugs : bogomips : 4788.87 clflush size : 64 cache_alignment : 64 address sizes : 42 bits physical, 48 bits virtual power management:
meminfoとか
~$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 63 model name : Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz stepping : 2 microcode : 0xffffffff cpu MHz : 2394.439 cache size : 30720 KB physical id : 0 siblings : 1 core id : 0 cpu cores : 1 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx lm constant_tsc rep_good nopl eagerfpu p ni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm fsgsbase bmi1 avx2 smep bmi2 erms xsaveopt bugs : bogomips : 4788.87 clflush size : 64 cache_alignment : 64 address sizes : 42 bits physical, 48 bits virtual power management: ...
とりあえず、気になる人は要チェックです。