Openshift E01 最常见的使用场景

暂时不介绍 openshift 的概念,也不介绍如何安装、部署,先使用一个例子来看看 openshift 能做什么。

新建一个项目

在我的本地,使用developer/developer登陆 OpenShift控制台,右上角点击 +Create Project

  • Name -> mybank
  • Display Name -> MyBank
  • Description- > MyBank Application

新建之后,去到 MyBank project, Overview, Browse Catalog Wildfly;补充如下截图的信息

slR7a4.png

Application github repo url: https://github.com/nichochen/mybank-demo-maven

点击 Create 按钮后,OpenShift就会创建一系列的后台对象,进而出发S2I流程。构建的过程需要连接互联网下载应用的源代码、Maven构建所需要的Jar包以及镜像。在我的电脑上clone后大概等待了20min,然后才继续后面的步骤。

slIrq0.png

我本地使用minishift搭建的OpenShift实验环境

1
2
3
4
5
6
# login vm
minishift ssh

# grep the image
[docker@minishift ~]$docker images | grep bank
172.30.1.1:5000/mybank/mybank latest 9f9a257dce21 8 minutes ago 961 MB

一切便都结束了,不要太省心~
slTjbt.png

可以直接从浏览器访问应用程序了
sl7ZV0.png

Donate
  • Copyright: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
  • Copyrights © 2019-2024 John Doe
  • Visitors: | Views:

请我喝杯咖啡吧~