2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Openshift Origin (OKD)のAll-in-One Serverをインストールしてみた

Posted at

はじめに

OKD(以前はOpenShift Originと呼ばれていたもの)のAll-in-One ServerをmacOSで動かしているVirtualBox上の仮想マシン(CentOS7)にインストールしてみました。

前提条件

  • ホストマシン:macOS
  • 仮想環境:VirtualBox 6.0
  • ゲストマシン:CentOS 7.6.1810
  • OKD:v3.11.0-0cbc58b

ゲストマシンの最新化と必要パッケージのインストール

 細かい手順は省略しますが、こんな感じ

$ yum update
$ yum install docker

バイナリのダウンロードしてゲストマシン内の適当な場所に展開

 ダウンロード先:https://www.okd.io/download.html
 検証したバージョン:v3.11.0-0cbc58b-linux-64bit.tar.gz

設定ファイルの修正

 基本的な作業はGitHubで公開されているドキュメントを参考にすると良いでしょう。
 https://github.com/openshift/origin/blob/v4.0.0-alpha.0/docs/cluster_up_down.md

  • /etc/containers/registries.conf

 このファイルを修正

[registries.insecure]
registries = ['172.30.0.0/16']
  • /etc/docker/daemon.json

    このファイルを修正

    {
    "insecure-registries": [
    "172.30.0.0/16"
    ]
    }

SE LinuxとFirewallの停止

 作業する際、問題の切り分けを簡単にするため、いくつかの機能を止めました。

  • SE Linuxをdisabled
  • Firewalldをstop

クラスタの起動

 ホストマシンからアクセスできるようにNATの設定をVirtualBoxにしています。
 ホストマシンからはlocalhost:8443でアクセスしたいため、オプションで追加しています。

$ oc cluster up --public-hostname="localhost" --base-dir="/opt/okd" --no-proxy="localhost" --routing-suffix="localhost"

ホストマシンからアクセス

https://localhost:8443/console
アクセスするとログイン画面が表示されます。
 ログインユーザ名、パスワードはoc cluster upコマンドの出力の最後に表示されます。

okd_webconsole.png

ただ、現在、ログイン後にError表示が出ます。おそらくNAT関連で上手くいっていないところがありそうです。あと一歩。

okd_webconsole_error.png

ゲストマシン<->ゲストマシン間ではOKでした。
ゲストマシン<->ゲストマシンで通信させる際は、oc cluster up --public-hostname="localhost" ...のlocalhost部分をゲストマシンのIPに変更してください。

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?