DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Integrating PostgreSQL Databases with ANF: Join this workshop to learn how to create a PostgreSQL server using Instaclustr’s managed service

Mobile Database Essentials: Assess data needs, storage requirements, and more when leveraging databases for cloud and edge applications.

Monitoring and Observability for LLMs: Datadog and Google Cloud discuss how to achieve optimal AI model performance.

Automated Testing: The latest on architecture, TDD, and the benefits of AI and low-code tools.

Related

  • How To Deploy Helidon Application to Kubernetes With Kubernetes Maven Plugin
  • Microservices With Apache Camel and Quarkus (Part 5)
  • Automating the IBM MQ Upgrade on Redhat OpenShift Using BuildConfigs as CI/CD
  • OpenShift Container Platform 4.11 Cluster Setup

Trending

  • The Systemic Process of Debugging
  • Mastering Persistence: Why the Persistence Layer Is Crucial for Modern Java Applications
  • Send Your Logs to Loki
  • API Design
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. Running OpenShift Origin on Windows

Running OpenShift Origin on Windows

PaaS from Red Hat supports image-based deployments, which supports DevOps with an integrated tooling stack.

Markus Eisele user avatar by
Markus Eisele
·
Sep. 26, 15 · Tutorial
Like (4)
Save
Tweet
Share
6.78K Views

Join the DZone community and get the full member experience.

Join For Free

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.

One 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.

set PATH=%PATH%;"D:\Program Files (x86)\openshift-origin-v1.0.3"

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/openshift

You need to install an additional Vagrant plugin:

vagrant plugin install vagrant-hostmanager-fabric8

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:

$ vagrant up

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:

$oc login https://vagrant.f8:8443

Method Two: Use the Pre-built Vagrant Box 

Using the pre-built 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:

$vagrant box add openshift openshift.box

And you're ready to bring up the Vagrant box:

$ vagrant up

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:

$oc login https://localhost:8443

Methods 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 upcoming blog posts. Soon 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.

OpenShift

Published at DZone with permission of Markus Eisele, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • How To Deploy Helidon Application to Kubernetes With Kubernetes Maven Plugin
  • Microservices With Apache Camel and Quarkus (Part 5)
  • Automating the IBM MQ Upgrade on Redhat OpenShift Using BuildConfigs as CI/CD
  • OpenShift Container Platform 4.11 Cluster Setup

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: