CDK安装

摘要:
~/.bash_档案3。运行setup cdkerideMacBook Pro:~ericnie$emissiftstart--vmdrivervirtualbox--Startingprofile'emissift'“emissift'VMisalreadyrunning。ericdeMacBook专业版:

1.下载cdk

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

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

$ mkdir -p ~/bin
$ cp ~/Downloads/cdk-3.1.0-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 3 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 3 setup complete.
ericdeMacBook-Pro:~ ericnie$

4.在.bash_profile中设置username和password

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

export MINISHIFT_USERNAME=eric.nie@163.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 ... 1% 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:  10% 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安装第1张

查看 cdk的具体openshift版本

C:Usersericnie>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.1-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安装》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇原创-K8S INGRESS配置分析 并总结一次配置事故Struts 2.x仍然明显落后于时代。 Struts 2.x这一类老牌Web MVC开发框架仅能用于开发瘦客户端应用,无法用来开发对于交互体验要求更高的应用。下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

Windows XP官方原版系统(所有历史版本下载)

软件简介:    Windows XP,是微软公司(Microsoft)推出的供个人电脑使用的操作系统,包括商用及家用的台式电脑等。其名字“XP”的意思是英文中的“体验(Experience)”,是继Windows 2000及Windows ME,9X之后的下一代Windows操作系统,也是微软首个面向消费者且使用Windows NT5.1架构的操作系统,...

查看FC HBA卡信息的方法

在配置磁盘阵列或虚拟磁带库时,往往会以FC接口与主机对接,那么就涉及FC HBA卡的查看,本文就这个问题进行了总结与整理。 一、Windows 系统 在Windows系统中,可以使用FC HBA卡厂家提供的管理软件查看光纤适配器的WWN号码,具体如下: Qlogic:SANsurfer Emulex:HBAnyware 二、SuSE Linux 9 查看...

Visual Studio 2022 初探 (vs2022附激活码)

前言 Visual Studio 2022 正式版来了。新版本带有 go-live 许可证,可供生产使用。在 Visual Studio 2019 的基础上,新版集成开发坏境提供了非常多的改进,包括对 64 位、.NET 6 的支持,为核心调试器提供更好的性能。 下载地址 https://visualstudio.microsoft.com/zh-hans...

IOS开发—事件处理,触摸事件,UITouch,UIEvent,响应者链条,手势识别

触摸事件 在用户使用app过程中,会产生各种各样的事件 一、iOS中的事件可以分为3大类型 触摸事件加速计事件远程控制事件 响应者对象在iOS中不是任何对象都能处理事件,只有继承了UIResponder的对象才能接收并处理事件。我们称之为“响应者对象” UIApplication、UIViewController、UIView都继承自UIRespond...

linux使用curl发送http get与post请求

1. curl发送get请求curl http://11.120.12.89:6666/sengMsg?phone=18790987654&name=lily&msg=aaa 注意:有多个参数时需要把&转义一下,否则获取不到之后参数会报错 2. curl发送post请求post请求类型application/x-www-form-...

Cypress web自动化23-cypress run 命令行参数详解

前言 非 GUI 模式下命令行运行 cypress,需知道有哪些参数可以使用。 查看命令行参数 输入 -h 查看命令行参数 cypress run -h Runs Cypress tests from the CLI without the GUI Options: -b, --browser <browser-name-or-path>...