1.下载cdk

https://developers.redhat.com/products/cdk/download/

2.在mac OS上更名并加入目录

$ mkdir -p ~/bin
$ cp ~/Downloads/cdk-3.1.--minishift* ~/bin/minishift
$ chmod +x ~/bin/minishift
$ export PATH=$PATH:$HOME/bin
$ echo export PATH=$PATH:$HOME/bin >> ~/.bash_profile

3.运行setup-cdk

ericdeMacBook-Pro:~ ericnie$ minishift setup-cdk
Setting up CDK on host using '/Users/ericnie/.minishift' as Minishift's home directory
The MINISHIFT_HOME directory '/Users/ericnie/.minishift' exists. Continuing will delete any existing VM and all other data in this directory. Do you want to continue? [y/N]
y
Copying minishift-rhel7.iso to '/Users/ericnie/.minishift/cache/iso/minishift-rhel7.iso'
Copying oc to '/Users/ericnie/.minishift/cache/oc/v3.9.31/darwin/oc'
Creating configuration file '/Users/ericnie/.minishift/config/config.json'
Creating marker file '/Users/ericnie/.minishift/cdk'
Default add-ons anyuid, admin-user, xpaas, registry-route, che, eap-cd installed
Default add-ons anyuid, admin-user, xpaas enabled
CDK setup complete.
ericdeMacBook-Pro:~ ericnie$

4.在.bash_profile中设置username和password

export PATH=/Users/ericnie/bin:$PATH

export MINISHIFT_USERNAME=eric.nie@.com
export MINISHIFT_PASSWORD=Welcome1$

然后启动。

ericdeMacBook-Pro:~ ericnie$ minishift start --vm-driver virtualbox
-- Starting profile 'minishift'
The 'minishift' VM is already running.
ericdeMacBook-Pro:~ ericnie$ minishift stop
Stopping the OpenShift cluster...
Cluster stopped.
ericdeMacBook-Pro:~ ericnie$ minishift start --vm-driver virtualbox
-- Starting profile 'minishift'
-- Check if deprecated options are used ... OK
-- Checking if https://mirror.openshift.com is reachable ... OK
-- Checking if requested OpenShift version 'v3.9.31' is valid ... OK
-- Checking if requested OpenShift version 'v3.9.31' is supported ... OK
-- Checking if requested hypervisor 'virtualbox' is supported on this platform ... OK
-- Checking if VirtualBox is installed ... OK
-- Checking the ISO URL ... OK
-- Checking if provided oc flags are supported ... OK
-- Starting local OpenShift cluster using 'virtualbox' hypervisor ...
-- Starting Minishift VM .......................... OK
-- Registering machine using subscription-manager
Registration in progress ............................... OK [1m35s]
-- Checking for IP address ... OK
-- Checking for nameservers ... OK
-- Checking if external host is reachable from the Minishift VM ...
Pinging 8.8.8.8 ... OK
-- Checking HTTP connectivity from the VM ...
Retrieving http://minishift.io/index.html ... OK
-- Checking if persistent storage volume is mounted ... OK
-- Checking available disk space ... % used OK
-- OpenShift cluster will be configured with ...
Version: v3.9.31
-- Copying oc binary from the OpenShift container image to VM .............................................................................. OK
-- Starting OpenShift cluster ..........................................
Using nsenter mounter for OpenShift volumes
Using public hostname IP 192.168.99.100 as the host IP
Using 192.168.99.100 as the server IP
Starting OpenShift using registry.access.redhat.com/openshift3/ose:v3.9.31 ...
OpenShift server started. The server is accessible via web console at:
https://192.168.99.100:8443

ou are logged in as:
User: developer
Password: <any value>


To login as administrator:
oc login -u system:admin


-- Applying addon 'admin-user':..
-- Applying addon 'anyuid':.
Add-on 'anyuid' changed the default security context constraints to allow pods to run as any user.
Per default OpenShift runs containers using an arbitrarily assigned user ID.
Refer to https://docs.openshift.org/latest/architecture/additional_concepts/authorization.html#security-context-constraints and
https://docs.openshift.org/latest/creating_images/guidelines.html#openshift-origin-specific-guidelines for more information.
-- Applying addon 'xpaas':.........................................................................................................................
XPaaS OpenShift imagestream and templates installed
See https://github.com/openshift/openshift-ansible/tree/release-3.9/roles/openshift_examples/files/examples/v3.9
-- Exporting of OpenShift images is occuring in background process with pid 1141.

 

记得一定需要后面Applying addon那些话,第一次安装往了带--vm-driver,所以安装出错,

需要先通过minishift delete删除后然后再来。

ericdeMacBook-Pro:~ ericnie$ minishift status
Minishift: Running
Profile: minishift
OpenShift: Running (openshift v3.9.31)
DiskUsage: % of 19G (Mounted On: /mnt/sda1)
CacheUsage: 576.7 MB (used by oc binary, ISO or cached images)

配置.bash_profile的路径

ericdeMacBook-Pro:~ ericnie$ minishift oc-env
export PATH="/Users/ericnie/.minishift/cache/oc/v3.9.31/darwin:$PATH"
# Run this command to configure your shell:
# eval $(minishift oc-env)

运行oc login -u system:admin后出现下面的项目

ericdeMacBook-Pro:~ ericnie$ oc login -u system:admin
Logged into "https://192.168.99.100:8443" as "system:admin" using existing credentials. You have access to the following projects and can switch between them with 'oc project <projectname>': default
kube-public
kube-system
* myproject
openshift
openshift-infra
openshift-node
openshift-web-console Using project "myproject".

查看 cdk的具体openshift版本

C:\Users\ericnie>minishift openshift version list
The following OpenShift versions are available:
- v3.9.14
- v3.9.27
- v3.9.30
- v3.9.31
- v3.9.33
- v3.9.40
- v3.9.41
- v3.9.43
- v3.10.14
- v3.10.34
- v3.10.45
- v3.10.66
- v3.11.16

以某个固定版本启动cdk

C:\minishift-1.26.-windows-amd64>minishift start --vm-driver virtualbox --openshift-version v3.10.45
-- Starting profile 'minishift'
-- Check if deprecated options are used ... OK
-- Checking if https://github.com is reachable ... OK
-- Checking if requested OpenShift version 'v3.10.0' is valid ... OK
-- Checking if requested OpenShift version 'v3.10.0' is supported ... OK
-- Checking if requested hypervisor 'virtualbox' is supported on this platform ... OK
-- Checking if VirtualBox is installed ... OK
-- Checking the ISO URL ... OK
-- Downloading OpenShift binary 'oc' version 'v3.10.0'

跳过注册步骤

minishift start --vm-driver virtualbox --skip-registration

CDK安装的更多相关文章

  1. OpenShift应用镜像构建(3) - Jenkins的流水线构建

    Jenkins方式构建的定位是使用专门的CICD平台. 既支持把JenKins作为一个Pod部署到openshift内部,也支持部署在Openshift集群外部,操作上的区别是 openshift自己 ...

  2. CDK上安装kube-dashboard

    首先把addon的代码下载下来 git clone https://github.com/minishift/minishift-addons 然后进入相应的目录,运行 ericdeMacBook-P ...

  3. TeamCity : 安装 Agent

    笔者在前文中介绍了 TeamCity Server 的安装过程,本文介绍在 Ubuntu Server 14.04 中安装 TeamCity Agent.Ubuntu Server 上已经创建了用户 ...

  4. SOA_环境安装系列3_Oracle Weblogic安装和环境搭建(案例)

    2014-01-03 Created By BaoXinjian

  5. WLS_Oracle Weblogic安装和环境搭建(案例)

    2014-01-03 Created By BaoXinjian

  6. Cocos2d-Java安装和配置跨平台游戏引擎以及相关的开发工具

    假设认为博文图片不清晰.能够Ctrl+鼠标滚动缩放网页比例 Cocos2d-Java是什么? http://blog.csdn.net/touchsnow/article/details/387047 ...

  7. Angular20 nginx安装,angular项目部署

    1 nginx安装(Windows版本) 1.1 下载安装包 到官网下载Windows版本的nginx安装包 技巧01:下载好的压缩包解压即可,无需安装 1.2 启动nginx 进入到解压目录,点击 ...

  8. Angular CLI 安装和使用

    1.背景介绍 关于Angular版本,Angular官方已经统一命名Angular 1.x同一为Angular JS:Angular 2.x及以上统称Angular: CLI是Command Line ...

  9. CentOS7 安装git服务器

    在CentOS7系统中安装git服务器有两种方法,分别为yum安装和下载git安装包手动安装,这篇文章只有下载git安装包手动安装方法. 方法一:使用yum安装 暂无 方法二:下载git安装包手动安装 ...

随机推荐

  1. chain模块将两个列表合并

    示例代码 from itertools import chain v1 = [11,22,33] v2 = ['a','b','c'] for item in chain(v1,v2): print( ...

  2. poj 1579(动态规划初探之记忆化搜索)

    Function Run Fun Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 17843   Accepted: 9112 ...

  3. 【转载】PDB命令行调试Python代码

    转载自这里. (博主按:PDB调试python代码和用GDB调试c++代码很类似) 你有多少次陷入不得不更改别人代码的境地?如果你是一个开发团队的一员,那么你遇到上述境地的次数比你想要的还要多.然而, ...

  4. VS Code使用

    VS Code使用了有一段时间了,感觉各方面表现蛮好的,当然主要还是基于electron开发的,(有源代码,想改啥就改啥,当然现在也没有改什么,没那么时间,也没有那么多精力),性能不错,其实中间主要还 ...

  5. 关于在webapi + ef + 视图 + top查询的问题

    在ef中使用视图中有一种坑是视图没有主键,表现的形式是有些数据会出现重复,解决的方法是手动在视图中添加主键即可 在实际的项目中碰到另一种坑,即使用webapi查询时的一种,现记录情况如下: 1:随便创 ...

  6. shadownsocks SSR 账号密码注册 可1元体验一天

    shadownsocks SSR 账号密码注册 可1元体验一天 注册地址 https://www.cup123.club/register?aff=809

  7. 模仿jq里的选择器和color样式

    (function(){ HTMLElement.prototype.css = function () { var option; if (arguments.length > 0) { op ...

  8. CentOS7下Samba的安装与配置

    一.Samba简介 Samba是在Linux和UNIX系统上实现SMB协议的一个免费软件,由服务器及客户端程序构成.SMB(Server Messages Block,信息服务块)是一种在局域网上共享 ...

  9. Delphi 设计模式:《HeadFirst设计模式》Delphi7代码---工厂模式之简单工厂

    简单工厂:工厂依据传进的参数创建相应的产品. http://www.cnblogs.com/DelphiDesignPatterns/archive/2009/07/24/1530536.html { ...

  10. CodeForces 723F st-Spanning Tree

    $dfs$,构造. 类似于$k$度限制生成树的想法,可以将$s$和$t$先从图中删去,将剩下的部分求连通块,每个连通块内部很容易构造生成树,每个连通块缩成一个点来处理. 连通块分三种: $1$.只与$ ...