This post was originally written by Markus Eisele in his blog: http://blog.eisele.net/2015/10/scaling-java-ee-microservices-openshift.html
OpenShift is the most interesting PaaS offering these days for me. Not only because it is part of the Red Hat family of products, but because it holds everything I expect from a modern PaaS. It supports image based deployments (with Docker-Images), abstracts operational complexity (e.g. networking, storage and health checks) and greatly supports DevOps with an integrated tooling stack. On tiny drawback for now is, that the latest v3 isn't available as a free online service. If you want to play around with it, you can set it up on AWS yourself or run it locally. As usual, most of the documentation available only covers Linux based systems. So, I am going to walk you through the first steps in getting OpenShift v3 Origin up on your local machine.
Prerequisites
Install the latest versions of Vagrant and Virtualbox. You'll need both and they will make your life easier. Also, please install the OpenShift client for windows. Download the one for your os from the origin project on github. The windows build has 16 MB. Next is to unpack it into a folder of your choice. Make sure to add this folder to your PATH environment variable.
<code>set PATH=%PATH%;"D:Program Files (x86)openshift-origin-v1.0.3"</code>
Method One: Fabric 8 Vagrant All In One
The Fabric 8 team has a complete Vagrant based all-in-one box ready for you to run. It also contains Fabric8 but you get a fully operational OpenShift Origin too. All you have to do is to clone the fabric8 installer git repository:
$ git clone https://github.com/fabric8io/fabric8-installer.git
$ cd fabric8-installer/vagrant/openshiftYou need to install an additional vagrant plugin:
<code>vagrant plugin install vagrant-hostmanager-fabric8</code>
Unfortunately for Windows no automatic routing for new services is possible. You have to add new routes manually to %WINDIR%\System32\drivers\etc\hosts. For your convenience, a set of routes for default Fabric8 applications has been pre-added. If you expose new routes, you will have to add them manually to your hosts file. Now you're ready to start vagrant:
<code>$ vagrant up</code>
If you do that for the first time, a bunch of Docker images will get pulled. So prepare for a little coffee+++ break. When that is done, point your browser to http://vagrant.f8:8443 and use any user/password combination to access the OpenShift console.
Login with the oc command line tool and see, if that works, too:
<code>$oc login https://vagrant.f8:8443</code>
Method Two: Use the pre-built Vagrant Box
Using the pre build vagrant box from the v3developer training is probably the most convenient way to get everything up and running. The following is part of the complete v3 Hands-On-Lab and there will be a more polished version available soon, hopefully.
Go to: bit.ly/v3devs and change to the BinariesAndVagrantFile folder. Download the openshift-bootstrap-1.0.6.box (Attention 4.5 GB!) and the Vagrant file.
Rename the .box file to openshift.box using your file manager and edit the Vagrant File with notepad and change all references from openshift3bootstrap to openshift and then save the changes. Now you need to add the box:
<code>$vagrant box add openshift openshift.box</code>
And you're ready to bring up the vagrant box:
<code>$ vagrant up</code>
When that is done, point your browser to http://localhost:8443 and use any user/password combination to access the OpenShift console.
Login with the oc command line tool and see, if that works, too:
<code>$oc login https://localhost:8443</code>
Method three and four: Build from Source and Docker Container
The OpenShift documentation mentions two other methods of getting OpenShift Origin to run locally. Either as a docker container or by building in locally in a vagrant box. I couldn't make any of them work on my Windows 7.
Wrap-Up
This was just a little exercise to lay some groundwork for the upcoming blog-posts. I am going to show you more about how to build your Java EE projects with OpenShift's source-to-image technology and how to run and scale Docker containers.
Author
Markus Eisele
Developer Advocate
JBoss Middleware at Red Hat
@myfear
http://blog.eisele.net/
저자 소개
Markus Eisele is a Red Hat Developer Tools Marketing Lead at Red Hat. He is also a JavaTM Champion, former Java EE Expert Group member, founder of German JavaLand and a speaker at Java conferences around the world.
유사한 검색 결과
How DTCC uses GitOps to accelerate customer value and security
Northrop Grumman scales enterprise Kubernetes for AI and hybrid cloud with Red Hat OpenShift
The Ground Floor | Compiler: Tales From The Database
Bad Bosses | Compiler: Tales From The Database
채널별 검색
오토메이션
기술, 팀, 인프라를 위한 IT 자동화 최신 동향
인공지능
고객이 어디서나 AI 워크로드를 실행할 수 있도록 지원하는 플랫폼 업데이트
오픈 하이브리드 클라우드
하이브리드 클라우드로 더욱 유연한 미래를 구축하는 방법을 알아보세요
보안
환경과 기술 전반에 걸쳐 리스크를 감소하는 방법에 대한 최신 정보
엣지 컴퓨팅
엣지에서의 운영을 단순화하는 플랫폼 업데이트
인프라
세계적으로 인정받은 기업용 Linux 플랫폼에 대한 최신 정보
애플리케이션
복잡한 애플리케이션에 대한 솔루션 더 보기
가상화
온프레미스와 클라우드 환경에서 워크로드를 유연하게 운영하기 위한 엔터프라이즈 가상화의 미래