Installing Red Hat OpenShift 2 Environment using Click2Cloud Inc.’s Auto Script – Tutorial Part 5 – Windows Node Deployment

Installing Red Hat OpenShift Environment using Click2Cloud Auto Script - Install Win Node - Screen 1

Installing  Red Hat OpenShift 2 Environment using Click2Cloud Inc.’s Auto Script – Tutorial Part 5 – Windows Node Deployment

Download Click2Cloud Inc.'s  Auto Script installer from https://github.com/click2Cloud/openshift2/   or  register at www.register.click2cloud.net

For windows node deployment you will require OpenShift_Windows_Installer.exe setup, which you have got it with your Click2Cloud OpenShift .NET development kit. If not, download from here.

 

OpenShift Winnode deployment Process is divided into two parts i.e.

A. Install Prerequisites

B. Install Windows Node

 

A. Install Prerequisites

Once you have completed prerequisites software’s extraction process on windows node, you are ready to run the OpenShift_Windows_Installer.exe to install prerequisite software’s.

1. Double-click the executable exe file which is provided under Click2Cloud OpenShift .NET development kit to launch OpenShift Windows Installer.

Installing Red Hat OpenShift Environment using Click2Cloud Auto Script - Install Win Node - Screen 1.jpg

2. In order to install Winnode Prerequisites software’s, Click on Install Prerequisites It will open Prerequisites Setup Wizard and show the list of software’s to install and click Next

 Installing Red Hat OpenShift Environment using Click2Cloud Auto Script - Install Win Node - wizard.jpg

 

3. Accept the License Agreement and Click

 Installing Red Hat OpenShift Environment using Click2Cloud Auto Script - Install Win Node - Agreement.jpg

 

4. Following wizard shows the prerequisites installation progress along with the logs.

Installing Red Hat OpenShift Environment using Click2Cloud Auto Script - Install Win Node - Wizard prerequisite.jpg

 

5. Click Finish to restart system after successfully installation Of Windows Prerequisites. It will automatically restart your computer.

Installing Red Hat OpenShift Environment using Click2Cloud Auto Script - Install Win Node - Wizard Finish.jpg

 

***Note: - We need to run Install prerequisites twice Because of these following perquisites Software behavior.

  1. Microsoft Visual Studio 2012 shell
  2. Microsoft Visual Studio 2013 shell

Both the software’s require machine restart. Installer will work fine if you run Install prerequisites twice after rebooting the system, so it will install VS 2013 ISO shell on next prerequisite installation.

 

B. Install Windows Node

 

Once you have finished installing the prerequisites software’s on windows node, you are ready to run the Install Windows Node.

 

Again Double-click the executable OpenShift_Windows_Installer.exe file to launch OpenShift Windows Installer.

Installing Red Hat OpenShift Environment using Click2Cloud Auto Script - Install Win Node - Screen 1.jpg

 

1. In order to install Windows node, Click on Install Windows Node It will open OpenShift Winnode Installer Wizard.

Installing Red Hat OpenShift Environment using Click2Cloud Auto Script - Install Win Node - Installer.jpg

 

2. To configure the Openshift Windows Node, we have to provide OpenShift component parameters on above wizard. We have provided the required information and select the MS-SQL 2014 cartridge to deploy on windows node. It will provide .NET and MSSQL 2014 cartridge functionality.

All the Component parameters are explained below.

Mandatory PARAMETERS

Winnode Host Name

Public hostname of the windows machine (FQDN). For e.g. – winnode.openshift.example.com

 

Broker Host Name

Hostname of the OpenShift broker. For e.g. – broker.openshift.example.com

 

Cloud Domain

The applications domain name, where the applications will host. For e.g. – apps.example.com

 

Mcollective Psk Plugin

Psk plugin used in Mcollective. The value for an Openshift Origin is ‘unset’.

For a default OpenShift Enterprise installation, the value should be ‘asimplething’.

 

Optional PARAMETERS

Mcollective Information

You will get this Mcollective Information in client.cfg file from Linux Broker

Path – (/opt/rh/ruby193/root/etc/mcollective/client.cfg)

In below format

plugin.activemq.pool.1.port = 61613

plugin.activemq.pool.1.user = mcollective

plugin.activemq.pool.1.password =*********

 

Mcollective User

ActiveMQ Username. The default ActiveMQ username for an OpenShift installation is ‘mcollective’

 

Mcollective port

ActiveMQ Port. The port is to use when connecting to ActiveMQ

 

 

Mcollective Password

ActiveMQ Password. The default ActiveMQ password for an ActiveMQ installation is ‘marionette’

 

Ruby

If we check Ruby Checkbox, that allows the user to download and install Ruby.

 

Cygwin

If we check Cygwin Checkbox, that allows the user to download and install Cygwin.

By default it is disabled because it will installer by winnode prerequisites installer.

 

Mcollective

If we check Mcollective Checkbox, that allows the user to download and install Mcollective.

 

Checks

If we check Checks Checkbox, that allows the user to checking prerequisites.

 

MS-SQL 2008

If this uncheck, then it installs the Windows Node without SQL Server 2008 cartridge support.

Note that the mssql cartridge manifest must be manually update (C:openshiftcartridgesmssqlmetadatamanifest.yml).

 

MS-SQL 2012

If this uncheck, then it installs the Windows Node without SQL Server 2012 cartridge support.

Note that the mssql cartridge manifest must be manually update (C:openshiftcartridgesmssqlmetadatamanifest.yml).

 

MS-SQL 2014

If this uncheck, then it installs the Windows Node without SQL Server 2014 cartridge support.

Note that the mssql cartridge manifest must be manually updated

(C:openshiftcartridgesmssqlmetadatamanifest.yml).

 

3. After providing all component information correctly,You just click Install button to start OpenShift Winnode Installation.

Powershell prompt will open up and you will be able to see OpenShift Installation Process.

Installing Red Hat OpenShift Environment using Click2Cloud Auto Script - Install Win Node - Windows Power shell.jpg

 

4. You will get Done message on powershell Prompt after successful installation of OpenShift Windows node.Click Enter to exit Powershell Prompt.

 

5. Now check the following directories for cartridges availability:

c:/OpenShift/cartridges

c:/OpenShift/.cartridge_repository

It will deploy dotnet, foxweb, mssql and windiy cartridges to your windows node.

 Installing Red Hat OpenShift Environment using Click2Cloud Auto Script - Install Win Node - Click2Cloud Cartridges.jpg

 

On Broker (check the connectivity)

Now go to broker and check the connectivity using the below command:

# oo-mco ping

Installing Red Hat OpenShift Environment using Click2Cloud Auto Script - Install Win Node - available on broker.jpg

You can see the windows node is available at broker.

 

You have successfully configured Windows Node.

Now create district on broker, add windows node to it and then import cartridges.

 

Create District (On Broker) and add Windows Node

Important:

Districts should be created before creating any gears are made on your OpenShift cloud. As long as a node has a gear, it cannot be added to a district. Do not add Windows and Linux nodes to the same district.

  • Create a District for windows node from the following command:

oo-admin-ctl-district –c create –o windows -n <Name Of Your District>

Create a District for windows node.jpg

  • Now add a node to your district

oo-admin-ctl-district –c add-node –n <Name Of Your District> -I <Hostname Of Your Node>

add a node to your district.jpg

 

 

Importing .NET Cartridges (On Broker)

Important:

Run the following commands to import cartridges. ** It will cleanup all currently configured cartridges and import them all again**

  • oo-admin-broker-cache --console --clear
  • for i in `oo-admin-ctl-cartridge -c list|awk '{print $2}'`;do echo "$i";done | oo-admin-ctl-cartridge -c deactivate
  • oo-admin-ctl-cartridge -c clean
  • oo-admin-broker-cache --console --clear
  • oo-admin-ctl-cartridge -c import-node --activate --force

 

You will see the DotNet and other windows cartridges added successfully to your broker:

DotNet and other windows cartridges added successfully to your broker.jpg

Now you are ready to create you first application using .NET cartridge.

 

Creating Windows Application

I.    Create .NET Application from rhc tool

From a client machine, use rhc tool to connect to your OpenShift cloud.

Click here to download rhc command line tool to your system.

Before creating your app, add the app's hostname to your local hosts file, pointing to the Linux machine, so the git client and your browser know how to resolve that hostname.

All OpenShift applications that contain a Windows cartridge must be configured as scalable. When you use rhc to create a Windows application, make sure to specify the -s flag.

Example:

rhc create-app myapp dotnet -s

Add a MS SQL Server 2014 cartridge

rhc add-cartridge mssql-2014 -a myapp

You can get message and have successfully created app from rhc tool using windows DotNet and mssql 2014 cartridges.

II.    Create .NET Application from Openshift Console

Open browser and enter the broker FQDN or IP address to login to broker console:

https://broker.openshift.example.com/

Once you login you will see the OpenShift console to create applications, Click on Create your first application now:

click2cloud openshift console to create applications.jpg

 

Now select the .NET cartridge to create application:

click2cloud openshift console to create applications - select cartridge.jpg

 

Provide meaningful name to your application and click to Create Application:

click2cloud openshift console to create applications - Provide meaningful name to your application.jpg

 

It will create .NET application in couple of mins and you can see the application is created and its running gear. Also you can click on Add MSSQL Server 2014 cartridge to embed it with your .NET application:

click2cloud openshift console to create applications -Add MSSQL Server 2014 Cartridge.jpg 

 

Your SQL cartridge will be added successfully and it will show the DB information

click2cloud openshift console to create applications -Add MSSQL Server 2014 Cartridge - Success.jpg

So we have successfully configured broker, configured linux node and configured windows node, also created the application using windows cartridges.

 

 

TESTS

Checklist to verify deployment on Windows Node

Below are the line-items that you can manually verify to test the deployment.

  • Verify that the core OpenShift.Net service exists, started and running at the time of startup.
  • Verify that the scheduled tasks required for OpenShift.Net functionality exist,
  • Verify that Broker, hostname and winnode resolved
  • Verify TCP connection with ActiveMQ Service
  • Check that both MS SQL Server 2008 and MS SQL Server 2012 are installed, their services are stopped and the startup mode is set to be disabled
  • Check that the firewall is enabled, that the SSHD port is opened and that all the existing prisons have a corresponding rule.
  • Check the prison users exist as local user account.
  • Check that local user accounts with the prison prefix have corresponding prison entries.
  • Check that the users found in cygwin/etc/passwd exist on the local system and also in the prison db

 

This is the fifth part of the tutorial for enabling the OpenShift 2.O for Microsoft Windows. You can visit the other tutorials at;

Part 1 -  System Requirements

https://blog.click2cloud.net/2016/04/26/installing-red-hat-openshift-2-x-environment-using-click2cloud-inc-s-auto-script-part-1-system-requirements/

Part 2 - Linux Broker Deployment

https://blog.click2cloud.net/2016/04/26/installing-red-hat-openshift-2-x-environment-using-click2cloud-inc-s-auto-script-part-2-linux-broker-deployment/

Part 3 - Linux Node Deployment

https://blog.click2cloud.net/2016/04/26/installing-red-hat-openshift-2-x-environment-using-click2cloud-inc-s-auto-script-part-3-linux-node-deployment/

Part 4 - Windows Node Pre-requisite

https://blog.click2cloud.net/2016/04/26/installing-red-hat-openshift-2-x-environment-using-click2cloud-inc-s-auto-script-part-4-windows-node-prerequisites/

Part 5 - Windows Node Deployment

https://blog.click2cloud.net/2016/04/26/installing-red-hat-openshift-2-x-environment-using-click2cloud-inc-s-auto-script-part-5-windows-node-deployment/

 

 

For any queries, you can contact: contact@click2cloud.net , OR +1 (425) 749-7495 and +1 (425) 748-9666

Leave a Reply

Your email address will not be published. Required fields are marked *