MacOS with Docker for Mac[使用oc cluster up 安装openshift origin]

191 阅读1分钟
  1. Install Docker for Mac making sure you meet the prerequisites.  \

  2. Once Docker is running, add an insecure registry of 172.30.0.0/16:

    • From the Docker menu in the toolbar, select Preferences...
    • Click on Daemon in the preferences dialog (note: on some older versions of Docker for Mac this is under Advanced)
    • Under Insecure registries:, click on the + icon to add a new entry
    • Enter 172.30.0.0/16 and press return
    • Click on Apply and Restart
  3. Install socat

    • If not already installed, install Homebrew for Mac

    • Install socatOpen Terminal and run:

      $ brew install socat
      
  4. Install the oc binary using homebrew with: brew install openshift-cli

    OR

    Download the Mac OS oc binary from openshift-origin-client-tools-VERSION-mac.zip and place it in your path.

    Please be aware that the 'oc cluster' set of commands are only available in the 1.3+ or newer releases.

  5. Open Terminal and run

    $ oc cluster up
    

To stop your cluster, run:

$ oc cluster down

根据官方文档编写:

1:先安装Docker For Mac. 具体如何安装,请查看上一篇博客

2:配置Docker文件,我的配置如下:

3:Install socat

      如果brew命令不能用,请安装:

      brew是什么? 是在Mac OSX系统上操作软件包管理工具

      同样的:Linux 中Red Hat 使用yum,Ubuntu使用apt-get,Mac OSX中就使用brew了。\

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

将以上命令粘贴至终端

然后,再安装:

brew install socat

\

4:安装OC命令:

brew install openshift-cli

\

5:启动cluster\

\

参考地址:

www.openshift.com/devpreview/…

\

\

\

\

\

\

\

\

\