Azure Basic A0のCentOS7.1にGitLabを入れようとしたらメモリ不足でハマった件


※この記事自体ははてなブログの過去記事(2015年)から移転しました。内容古めなのでご注意ください。

要約=題名

GitLabが面白そうと思い、AzureでGitLabサーバーを立ててみようと思ったら、何故かSELinuxへの登録が上手くいきませんでした。
しかしそこはオープンソース。既に悩んでいた方の記事があり、そのコメントで解決しました。感謝。

解法

ググったら下記の記事が出てきました。

Marcelo de Castro @belfalas-vinyamar 11 months ago
Well, I solved my problem.

The cause was that the command semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-7.2.0-ssh-keygen.pp takes a lot of memory, and it was being killed for becoming out of memory, enabling a swap file solved it for me.

But I do think that receiving an exit code of '' should output some options of causes, like the out of memory problem.

[https://gitlab.com/gitlab-org/omnibus-gitlab/issues/295#note_355769:embed:cite]

要するにSELinuxがout of memory(メモリ不足)で落ちているとのことなので、素直にメモリを追加します。
Basic A1に切り替えたところ、うまく動きました。

最終的にAzureはあんまり関係なかったのですが、備忘まで。