Visual Studio Onlineに登録してgitでコードをpushしてみた

MicrosoftのVisual Studio Onlineの初期プランは結構豪勢なことをやってるという話を聞いた。

調べてみると確かになかなかなことに・・・

Visual Studio Onlineでできること
Visual Studio Online の価格

Visual Studio Onlineに登録すると、「Basic 5アカウント分の利用権」と「gitもしくはMicrosoft Team Foundation バージョン管理 (TFVC) のオンラインレポジトリ」を利用できるというもの

gitで、というのは面白い、ということで早速登録してみた。

登録後、プロジェクトをgitで作成。

Linuxからgitでpushするためには、「My Profile」nの「CREDENTIALS」にて「ALTERNATE AUTHENTICATION CREDENTIALS」を設定する必要あり。
参考「Git: Use command prompt」と「Share your Eclipse projects

この際、パスワードのセキュリティ要件が若干きつめな設定なので注意。
「The password provided does not meet the minimum security requirements. The password must have at least 8 characters and contain at least three of the following: uppercase letters, lowercase letters, numbers, and symbols.」

[osakanataro@niselog narou]$ git remote add origin https://~.visualstudio.com/DefaultCollection/_git/narou2epub
[osakanataro@niselog narou]$ git push -u origin --all
Username for '~.visualstudio.com':
Password for '~.visualstudio.com':
Counting objects: 14282, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (13753/13753), done.
Writing objects: 100% (14282/14282), 77.17 MiB | 900 KiB/s, done.
Total 14282 (delta 601), reused 0 (delta 0)
remote: Analyzing objects (14282/14282) (100661 ms)
remote: Storing pack file and index...  done (13364 ms)
To https://~.visualstudio.com/DefaultCollection/_git/narou2epub
 * [new branch]      master -> master
Branch master set up to track remote branch master from origin.
[osakanataro@niselog narou]$

push完了後、webを確認

gitの更新履歴もきちんと日本語が文字化けせずに登録できている。

メモ:東海テレビ「てれび博物館」のオープニングテーマ

東海テレビで昔放送してた「てれび博物館」のオープニングテーマ。
あれ、何が出典なのか知らなかったのですが、このたび、判明しました。

SCD 019 Corporate Fanfares, Success Story (43 tracks)」収録の「Progress Award」でした
Title: “Progress Award”
Album: SCD 019 Corporate Fanfares, Success Story
Label: Sonoton
Composers: John Fiddy, Sammy Burdson

以下のアルバムにも収録されているようです。

John Fiddy ‎– Success Story
Label:Sonoton ‎– SON 213
Format:Vinyl, LP, Stereo
Country:Germany
Released:1984
Genre:Electronic, Jazz
Style:Jazz-Rock, Synth-pop
B面7曲目:Progress Award 1

Windows7でGet-AzureVM | Out-GridViewが動作しない

Azure環境をCLIで操作するためのMicrosoft Azure PowerShellですが、最近のバージョンでは、Windows 7 SP1のPowerShell 3.0では正常に動作しないコマンドがあるようです。

まず、現在のPower Shellのバージョンは「$PSversiontable」で確認できます。

PS C:\> $PSversiontable

Name                           Value
----                           -----
PSVersion                      3.0
WSManStackVersion              3.0
SerializationVersion           1.1.0.1
CLRVersion                     4.0.30319.34209
BuildVersion                   6.2.9200.16398
PSCompatibleVersions           {1.0, 2.0, 3.0}
PSRemotingProtocolVersion      2.2


PS C:\>

上記の「PSVersion」がPower Shellのバージョンになります。

次に、Azure Power Shellのバージョンは「(Get-Module Azure).version」で確認できます。

PS C:\> (Get-Module azure).version

Major  Minor  Build  Revision
-----  -----  -----  --------
0      9      2      -1

PS C:\>

上記の場合「0.9.2」です

この場合、「$vm = Get-AzureVM | Out-GridView -Title “Select a VM …” -PassThru」を実行すると、

PS C:\> $vm = Get-AzureVM | Out-GridView -Title "Select a VM ..." -PassThru
Get-AzureVM : パイプラインが停止されています。
発生場所 行:1 文字:7
+ $vm = Get-AzureVM | Out-GridView -Title "Select a VM ..." -PassThru
+       ~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Get-AzureVM]、PipelineStoppedException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.GetAzureVMCommand

Out-GridView : インデックスが範囲を超えています。負でない値で、コレクションのサイズよりも小さくなければなりません。
パラメーター名:index
発生場所 行:1 文字:21
+ $vm = Get-AzureVM | Out-GridView -Title "Select a VM ..." -PassThru
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Out-GridView], ArgumentOutOfRangeException
    + FullyQualifiedErrorId : System.ArgumentOutOfRangeException,Microsoft.PowerShell.Commands.OutGridViewCommand

PS C:\>

Out-GridViewが「ArgumentOutOfRangeException」ということで実行できません。
(「(Get-AzureVM).Name | Out-GridView -PassThue」は実行できるんだけど、得られる出力では次の処理ができない)

この現象はMicrosoftがgithubに開設しているアカウントに報告されている。
Possible breaking change Get-AzureVM breaks pipeline with Out-Gridview (#3047) #13

これによると、どうやら、Power Shell 4.0が必要らしい。

Windows Management Framework 4.0」の一部としてPower Shell 4.0が配布されているので、こちらからダウンロードしてインストールする。
リンク先でダウンロードすると、いくつかのファイルがダウンロードできるが、Windows7の64bit環境で必要なものは「Windows6.1-KB2819745-x64-MultiPkg.msu」だけである。Windows7 32bitの場合は Windows6.1-KB2819745-x86.msu」

インストール&再起動後にPower Shellの状況を確認すると、以下のようになる。

PS C:\>  $PSversiontable

Name                           Value
----                           -----
PSVersion                      4.0
WSManStackVersion              3.0
SerializationVersion           1.1.0.1
CLRVersion                     4.0.30319.34209
BuildVersion                   6.3.9600.16406
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion      2.2


PS C:\> (Get-Module azure).version

Major  Minor  Build  Revision
-----  -----  -----  --------
0      9      2      -1


PS C:\>

で・・改めて「$vm = Get-AzureVM | Out-GridView -Title “Select a VM …” -PassThru」を実行!

PS C:\> $vm = Get-AzureVM | Out-GridView -Title "Select a VM ..." -PassThru
Get-AzureVM : パイプラインが停止されています。発生場所 行:1 文字:7
+ $vm = Get-AzureVM | Out-GridView -Title "Select a VM ..." -PassThru
+       ~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Get-AzureVM]、PipelineStoppedException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.GetAzureVMCommand

Out-GridView : インデックスが範囲を超えています。負でない値で、コレクションのサイズよりも小さくなければなりません。
パラメーター名:index発生場所 行:1 文字:21
+ $vm = Get-AzureVM | Out-GridView -Title "Select a VM ..." -PassThru
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Out-GridView], ArgumentOutOfRangeException
    + FullyQualifiedErrorId : System.ArgumentOutOfRangeException,Microsoft.PowerShell.Commands.OutGridViewCommand

PS C:\>

・・・あの・・・?

というわけで、当初もくろんでいたPower Shellを4.0にすることで対処できる、というわけではなく
アップデートしても、なんともならない、という救いようのない状態に・・・・

う~ん・・・


2015/07/21追記

githubのissue」にコメントが付いた

It’s a bug in PS 3.0 and 4.0 in that it fails to load the object and/or type info, if TableControl is not correctly configured.

This will be patched on our end for 3.0/4.0 in the incoming release. Stay tune. Thanks.

PowerShell 3.0と4.0におけるバグで、今度のリリースで修正される、とのこと。

Azure上の仮想ディスクを拡張する

このページの内容は「Azure上の仮想マシンのディスク拡張手法 2016年1月版」に置き換わりました。


Azure上にある仮想マシンで使用しているディスクの残り容量が減ってきた。
拡張するための手順を確認すると、一度VHDをダウンロードし、ローカルで拡張操作をした後に、再アップロードする、といったものが出てくる。

そんなバカな、と調べてみたところ、現在はそんなことをしなくてもいようだ。

Resizing Data Disks in the Cloud on Microsoft Azure with Windows PowerShell

Azure Power Shellモジュールのversion 0.8.15.1以降であれば、「Update-AzureDisk」のオプションとして「-ResizedSizeInGB」が追加されており、それを使用することで拡張することができる、とのこと。

ただ、2015/06/01現在、Azureのドキュメントの「Update-AzureDisk」は、version 0.8.10準拠ということで、このオプションが載っておらず、半ば隠しオプションとなってしまっている。

いや・・・ちゃんとしてくれよ・・・

しかも、Windows7で試したところ、Azure PowerShellモジュールを2015/06/01時点での最新ver 0.9.2にしても、このページ記載のコマンドが実行できないという事態も発覚。

「$vm = Get-AzureVM | Out-Gridview -PassThru」が失敗するという・・・

下記の問題と同様のようだ。
Possible breaking change Get-AzureVM breaks pipeline with Out-Gridview (#3047) #13

どうやらPower Shell 3.0では、動かず、Power Shell 4.0にする必要があるらしい。

そして、Power Shellは、Windows Management Framework 4.0に含まれるため
Windows Management Framework 4.0」を導入する必要がある、とのこと。

めんどくさいなぁ・・・・

Raspberry/Banana/Orange/Lemon pi

Raspberry pi」に始まったミニボードブーム

同じようなネーミングのほかの製品もちらほら

Banana pi
Orange pi

そして、今回、「Lemon pi」というのが登場しそうです

どれもARM Cortex系ではありますが、SoCが違います。
Rapsberry:Broadcom
Banana/Orange:Allwinner
Lemon: Actions Semicon
となっています。

「~ pi」という名称ではないボードでもAllwinner系は採用例が多いです。
Lemon piで採用している「S500」は、いまんところ珍しい部類でしょうか

商品名 SoC SoCスペック
Raspberry Pi Broadcom BCM2835 ARM1176JZF-S 1コア / 700MHz
Raspberry Pi 2 Broadcom BCM2836 Cortex-A7 4コア / 900MHz
Banana Pi BPi-M1 Allwinner A20 Cortex-A7 2コア / 1GHz
Banana Pi BPi-M2 Allwinner A31S Cortex-A7 4コア / 1GHz
Orange Pi
Orange pi Mini
Allwinner A20 Cortex-A7 2コア / 1GHz
Orange Pi Plus Allwinner H3 Cortex-A7 4コア / 1.6GHz
Orange Pi 2 Allwinner H3 Cortex-A7 4コア / 1.6GHz
Orange pi Mini 2 Allwinner H3 Cortex-A7 4コア / 1.6GHz
Lemon Pi Actions Semicondustor S500 Cortex-A9 4コア / ?GHz

ちなみに・・・Orange piの値段ですが先日改訂があり、中国からの送料込みで下記の様になっています。
Orange pi plus $59→$52.41
OPi2 $38.99→$31.96
OPi2 mini $33.99→$26.96

Lemon pi・・・微妙じゃね?