容器化应用: 实验环境-安装配置Minishift
虚拟化支持:
OS X
: xhyve (default), VirtualBox, VMware FusionGNU/Linux
: KVM (default), VirtualBoxWindows
: Hyper-V (default), VirtualBox
本文所述过程全部在MacOS X环境下完成
启动
命令行和参数
$ minishift start --vm-driver=virtualbox
由于总所周知的原因, 可以使用Docker镜像
$ minishift start --vm-driver=virtualbox --registry-mirror=https://docker.mirrors.ustc.edu.cn
参数 --vm-driver
可用的值有: virtualbox
, vmwarefusion
, xhyve
(默认为xhyve
), 由于我的系统上已经安装了VirtualBox, 因此选择 virtualbox
, --registry-mirror
指定了公共Docker镜像库的地址.
输出
-- Starting local OpenShift cluster using 'virtualbox' hypervisor ...
-- Minishift VM will be configured with ...Memory: 2 GBvCPUs : 2Disk size: 20 GB
-- Starting Minishift VM ......................... OK
-- Checking for IP address ... 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 ... 0% OK
-- OpenShift cluster will be configured with ...Version: v3.6.0
-- Checking `oc` support for startup flags ... host-config-dir ... OKhost-data-dir ... OKhost-pv-dir ... OKhost-volumes-dir ... OKrouting-suffix ... OK
Starting OpenShift using openshift/origin:v3.6.0 ...
Pulling image openshift/origin:v3.6.0
Pulled 1/4 layers, 26% complete
Pulled 2/4 layers, 69% complete
Pulled 3/4 layers, 77% complete
Pulled 4/4 layers, 100% complete
Extracting
Image pull complete
OpenShift server started.
如果过程中出现任何错误, 执行
minishift delete
删除集群然后重试, 启动过程中会下载镜像库等资源, 保持良好的网络连接.
把 oc
命令添加到PATH中
使用minishift oc-env
输出要添加到PATH中的export命令:
export PATH="/Users/username/.minishift/cache/oc/v3.6.0:$PATH"
# Run this command to configure your shell:
# eval $(minishift oc-env)
应用部署
部署一个简单的Node.js应用
$ oc new-app https://github.com/openshift/nodejs-ex -l name=myapp
查看日志输出:
$ oc logs -f bc/nodejs-exCloning "https://github.com/openshift/nodejs-ex" ...Commit: 96e651f58aee338e24ea1a170da6d631be1c33da (Merge pull request #143 from bparees/annotations)Author: Ben Parees <bparees@users.noreply.github.com>Date: Thu Oct 19 14:56:53 2017 +0200
---> Installing application source ...
---> Building your Node application from source
npm WARN deprecated to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
nodejs-ex@0.0.1 /opt/app-root/src
+-- chai@3.5.0
| +-- assertion-error@1.0.2
| +-- deep-eql@0.1.3
| | `-- type-detect@0.1.1
| `-- type-detect@1.0.0
+-- chai-http@2.0.1
| +-- cookiejar@2.0.6
| +-- is-ip@1.0.0
| | `-- ip-regex@1.0.3
| +-- methods@0.0.1
| +-- qs@2.0.0
| `-- superagent@1.2.0
| +-- component-emitter@1.1.2
| +-- cookiejar@2.0.1
| +-- extend@1.2.1
| +-- form-data@0.2.0
| | +-- async@0.9.2
| | +-- combined-stream@0.0.7
| | | `-- delayed-stream@0.0.5
| | `-- mime-types@2.0.14
| | `-- mime-db@1.12.0
| +-- formidable@1.0.14
| +-- methods@1.0.1
| +-- mime@1.3.4
| +-- qs@2.3.3
| +-- readable-stream@1.0.27-1
| | +-- isarray@0.0.1
| | `-- string_decoder@0.10.31
| `-- reduce-component@1.0.1
+-- ejs@2.5.7
+-- express@4.16.2
| +-- accepts@1.3.4
| | +-- mime-types@2.1.17
| | | `-- mime-db@1.30.0
| | `-- negotiator@0.6.1
| +-- array-flatten@1.1.1
| +-- body-parser@1.18.2
| | +-- bytes@3.0.0
| | +-- http-errors@1.6.2
| | | `-- setprototypeof@1.0.3
| | +-- iconv-lite@0.4.19
| | +-- qs@6.5.1
| | `-- raw-body@2.3.2
| +-- content-disposition@0.5.2
| +-- content-type@1.0.4
| +-- cookie@0.3.1
| +-- cookie-signature@1.0.6
| +-- debug@2.6.9
| | `-- ms@2.0.0
| +-- depd@1.1.1
| +-- encodeurl@1.0.1
| +-- escape-html@1.0.3
| +-- etag@1.8.1
| +-- finalhandler@1.1.0
| | `-- unpipe@1.0.0
| +-- fresh@0.5.2
| +-- merge-descriptors@1.0.1
| +-- methods@1.1.2
| +-- on-finished@2.3.0
| | `-- ee-first@1.1.1
| +-- parseurl@1.3.2
| +-- path-to-regexp@0.1.7
| +-- proxy-addr@2.0.2
| | +-- forwarded@0.1.2
| | `-- ipaddr.js@1.5.2
| +-- qs@6.5.1
| +-- range-parser@1.2.0
| +-- safe-buffer@5.1.1
| +-- send@0.16.1
| | +-- destroy@1.0.4
| | `-- mime@1.4.1
| +-- serve-static@1.13.1
| +-- setprototypeof@1.1.0
| +-- statuses@1.3.1
| +-- type-is@1.6.15
| | +-- media-typer@0.3.0
| | `-- mime-types@2.1.17
| | `-- mime-db@1.30.0
| +-- utils-merge@1.0.1
| `-- vary@1.1.2
+-- mocha@2.5.3
| +-- commander@2.3.0
| +-- debug@2.2.0
| | `-- ms@0.7.1
| +-- diff@1.4.0
| +-- escape-string-regexp@1.0.2
| +-- glob@3.2.11
| | +-- inherits@2.0.3
| | `-- minimatch@0.3.0
| | +-- lru-cache@2.7.3
| | `-- sigmund@1.0.1
| +-- growl@1.9.2
| +-- jade@0.26.3
| | +-- commander@0.6.1
| | `-- mkdirp@0.3.0
| +-- mkdirp@0.5.1
| | `-- minimist@0.0.8
| +-- supports-color@1.2.0
| `-- to-iso-string@0.0.2
+-- mongodb@2.2.33
| +-- es6-promise@3.2.1
| +-- mongodb-core@2.1.17
| | +-- bson@1.0.4
| | `-- require_optional@1.0.1
| | +-- resolve-from@2.0.0
| | `-- semver@5.4.1
| `-- readable-stream@2.2.7
| +-- buffer-shims@1.0.0
| +-- core-util-is@1.0.2
| +-- isarray@1.0.0
| +-- process-nextick-args@1.0.7
| +-- string_decoder@1.0.3
| `-- util-deprecate@1.0.2
+-- morgan@1.9.0
| +-- basic-auth@2.0.0
| `-- on-headers@1.0.1
`-- object-assign@4.1.0Pushing image 172.30.1.1:5000/reactive-microservices/nodejs-ex:latest ...
Pushed 0/9 layers, 17% complete
Pushed 1/9 layers, 12% complete
Pushed 2/9 layers, 23% complete
Pushed 3/9 layers, 34% complete
Pushed 4/9 layers, 47% complete
Pushed 5/9 layers, 62% complete
Pushed 6/9 layers, 73% complete
Pushed 7/9 layers, 83% complete
Pushed 8/9 layers, 100% complete
Pushed 9/9 layers, 100% complete
Push successful
查看控制台地址
$ oc project
Using project "prometheus-example" on server "https://192.168.99.100:8443".
Then:
https://192.168.99.100:8443
-> 浏览器
容器化应用: 实验环境-安装配置Minishift相关推荐
- go环境搭建_容器化 Go 开发环境的尝试
Go语言中文网,致力于每日分享编码知识,欢迎关注我,会有意想不到的收获! 01 写在前面 昨天上午"起早"到附近的影院看<波西米亚狂想曲>,选的座位比较靠前,最后的二十 ...
- 打造前端 Deepin Linux 工作环境——安装配置 atom 编辑器
打造前端 Deepin Linux 工作环境--安装配置 atom 编辑器 好,我个人推荐大家使用 atom 编辑器,第一是免费,第二是好看,第三是好用. 安装 atom 编辑器 我们输入 apt-c ...
- 实验 snort安装配置与规则编写
实验 snort安装配置与NIDS规则编写 1 实验目的 在linux或windows任意一个平台下完成snort的安装,使snort工作在NIDS模式下,并编写符合相关情景要求的snort规则. 2 ...
- php7 apache 环境,php7+apache的环境安装配置
php7+apache的环境安装配置 php7+apache的环境安装配置 为什么80%的码农都做不了架构师?>>> 因为刚开始接触php,所以要对php的开发环境进行搭建. 1.首 ...
- MySQL 系列(一) 生产标准线上环境安装配置案例及棘手问题解决
MySQL 系列(一) 生产标准线上环境安装配置案例及棘手问题解决 一.简介 MySQL是最流行的开放源码SQL数据库管理系统,它是由MySQL AB公司开发.发布并支持的.有以下特点: MySQL是 ...
- 使用Clion开发C语言程序,环境安装配置,保姆级教程
墙裂推荐:C语言学习资源汇总,史上最全面总结,没有之一 C语言开发神器--Clion 首先我们到官网下载安装包 安装包下载后,鼠标双击下载的exe文件,然后点击next 选择安装目录,然后点击next ...
- 使用VS2019编写C语言程序,环境安装配置+代码调试
墙裂推荐:C语言学习资源汇总,史上最全面总结,没有之一 环境安装配置 首先我们要在Visual Studio官方网站去下载安装包 https://visualstudio.microsoft.com/ ...
- 使用VS2019开始第一个C语言程序,环境安装配置+代码实例
C语言文章更新目录 C/C++学习资源(百度云盘链接) 计算机二级资料(过级专用) C语言学习路线(从入门到实战) 编写C语言程序的7个步骤和编程机制 C语言基础-第一个C程序 C语言基础-简单程序分 ...
- Meteor环境安装配置
在本教程中,我们将展示如何在windows操作系统安装Meteor .在我们开始学习使用Meteor 之前,我们将需要NodeJS.如果你还没有安装它,则可以点击下表中的链接. 必须条件 Meteor ...
最新文章
- python 添加进度条
- (转) eclipse项目中.classpath文件详解
- Cisco交换机的经典配置(1)
- 请教各位高手!手机要如何访问电脑的tomcat呢!
- GNS3路由器直连端口Ping不通
- 【深度学习】在PyTorch中使用 LSTM 进行新冠病例预测
- golang程序如何优雅地退出
- 妲己机器人怎么升级固件_台湾重金设计的3D妲己,亮瞎了
- 微服务系列之ZooKeeper注册中心和Nacos注册中心Nacos和Zookeeper对比
- 我要带徒弟学JAVA架构 ( 写架构,非用架构 )
- 使用python来操作hive(通过 pyhs2 和 HiveServer2)
- 【数据结构与算法】内部排序之一:插入排序和希尔排序的N中实现(不断优化,附完整源码)...
- 一个屌丝程序猿的人生(八十九)
- 项目学子商城(加密,异常,拦截器SpringBoot没有xml配置文件,附常见配置错误)
- 2021 泰迪杯 A 题
- journalctl命令
- VirtualBox 端口转发(端口映射) 主机和虚拟机相互访问
- linux自定义自动补全命令
- MFC版 黄金矿工 游戏开发记录
- preg_replace_callback函数的使用