RHEV 2.2: REST API INSTALLATION



Similar documents
C-Series How to configure SSL

This document uses the following conventions for items that may need to be modified:

Configuring the JBoss Application Server for Secure Sockets Layer and Client-Certificate Authentication on SAS 9.3 Enterprise BI Server Web

Exchange Reporter Plus SSL Configuration Guide

DISTRIBUTED CONTENT SSL CONFIGURATION AND TROUBLESHOOTING GUIDE

Practice Fusion API Client Installation Guide for Windows

A COMPLETE GUIDE FOR THE INSTALLATION, CONFIGURATION, AND INTEGRATION OF

Table of Contents INTRODUCTION... 2 SYSTEM REQUIREMENTS... 3 SERVICEDESK PLUS EDITIONS... 4 INSTALL SERVICEDESK PLUS... 5

Table of Contents INTRODUCTION... 2 SYSTEM REQUIREMENTS... 3 SERVICEDESK PLUS - MSP EDITIONS... 5 INSTALL SERVICEDESK PLUS - MSP...

Configuring Secure Socket Layer (SSL) for use with BPM 7.5.x

IIS, FTP Server and Windows

Installing Digital Certificates for Server Authentication SSL on. BEA WebLogic 8.1

NSi Mobile Installation Guide. Version 6.2

Enable SSL in Go2Group SOAP Server

White paper version: 1.2 Date: 29th April 2011 AUTHORS: Vijeth R. Rajoli Krishna Chalamasandra

RoomWizard Synchronization Software Manual Installation Instructions

How to Implement Two-Way SSL Authentication in a Web Service

How to Implement Transport Layer Security in PowerCenter Web Services

Upgrading Your Web Server from ClientBase Browser Version 2.0 or Above to Version 2.1.1

Lepide Active Directory Self Service. Configuration Guide. Follow the simple steps given in this document to start working with

Installing Oracle 12c Enterprise on Windows 7 64-Bit

CycleServer Grid Engine Support Install Guide. version 1.25

SSL Certificate Generation

FlexSim LAN License Server

Chapter 1: How to Configure Certificate-Based Authentication

PowerChute TM Network Shutdown Security Features & Deployment

Installing and Configuring vcloud Connector

Reconfiguring VMware vsphere Update Manager

Table of Contents INTRODUCTION... 2 SYSTEM REQUIREMENTS... 3 INSTALLATION... 4 INSTALLING SUPPORTCENTER PLUS In Windows In Linux...

WHITE PAPER Citrix Secure Gateway Startup Guide

Tool Tip. SyAM Management Utilities and Non-Admin Domain Users

OneLogin Integration User Guide

IUCLID 5 Guidance and Support

UP L18 Enhanced MDM and Updated Protection Hands-On Lab

You may have been given a download link on your trial software . Use this link to download the software.

Supplement I.B: Installing and Configuring JDK 1.6

Synchronizer Installation

Kaseya 2. User Guide. Version 6.1

XenClient Enterprise Synchronizer Installation Guide

Revolution R Enterprise DeployR 7.1 Installation Guide for Windows

Table of Contents. Requirements and Options 1. Checklist for Server Installation 5. Checklist for Importing from CyberAudit

IMDG Code for Intranet

Monitoring Oracle Enterprise Performance Management System Release Deployments from Oracle Enterprise Manager 12c

CHAPTER 7 SSL CONFIGURATION AND TESTING

Junio SSL WebLogic Oracle. Guía de Instalación. Junio, SSL WebLogic Oracle Guía de Instalación CONFIDENCIAL Página 1 de 19

Configuring IBM WebSphere Application Server 7 for Secure Sockets Layer and Client-Certificate Authentication on SAS 9.3 Enterprise BI Server Web

Configuring SSL in OBIEE 11g

To install and configure SSL support on Tomcat 6, you need to follow these simple steps. For more information, read the rest of this HOW-TO.

Click Studios. Passwordstate. Installation Instructions

1 Reflection ZFE 5. 2 Security Considerations Troubleshooting the Installation 19. Contents 1

JAMF Software Server Installation Guide for Windows. Version 8.6

Implementing Microsoft SQL Server 2008 Exercise Guide. Database by Design

Portions of this product were created using LEADTOOLS LEAD Technologies, Inc. ALL RIGHTS RESERVED.

Tenrox. Single Sign-On (SSO) Setup Guide. January, Tenrox. All rights reserved.

ProSystem fx Document

Creating an authorized SSL certificate

Installation Guide for Pulse on Windows Server 2012

Aspera Connect User Guide

QUANTIFY INSTALLATION GUIDE

Oracle Fusion Middleware 11gR2: Forms, and Reports ( ) Certification with SUSE Linux Enterprise Server 11 SP2 (GM) x86_64

User Guide Generate Certificate Signing Request (CSR) & Installation of SSL Certificate

Installing the Android SDK

MultiSite Manager. Setup Guide

Installation Guide for Pulse on Windows Server 2008R2

Portions of this product were created using LEADTOOLS LEAD Technologies, Inc. ALL RIGHTS RESERVED.

Introduction to Mobile Access Gateway Installation

JAMF Software Server Installation Guide for Linux. Version 8.6

RSA Authentication Manager 8.1 Virtual Appliance Getting Started

Configuring TLS Security for Cloudera Manager

1. Open the preferences screen by opening the Mail menu and selecting Preferences...

Initial Setup of Mozilla Thunderbird with IMAP for Windows 7

MultiSite Manager. Setup Guide

Entrust Certificate Services. Java Code Signing. User Guide. Date of Issue: December Document issue: 2.0

Snow Active Directory Discovery

SOA Software API Gateway Appliance 7.1.x Administration Guide

Primavera P6 Professional Windows 8 Installation Instructions. Primavera P6. Installation Instructions. For Windows 8 Users

8.6. NET SatisFAXtion Gateway Installation Guide. For NET SatisFAXtion 8.6. Contents

McAfee SMC Installation Guide 5.7. Security Management Center

VERALAB LDAP Configuration Guide

Administration Guide for SAP HANA Smart Data Integration and SAP HANA Smart Data Quality

1. If there is a temporary SSL certificate in your /ServerRoot/ssl/certs/ directory, move or delete it. 2. Run the following command:

Developers Integration Lab (DIL) Certificate Installation Instructions. Version 1.4

Customer Tips. Xerox Network Scanning TWAIN Configuration for the WorkCentre 7328/7335/7345. for the user. Purpose. Background

TSM for Windows Installation Instructions: Download the latest TSM Client Using the following link:

Initial Setup of Mozilla Thunderbird with IMAP for OS X Lion

FieldIT Limited FieldIT CRM. Installation Manual v1.3.i3 (Enterprise Install)

Installation Guide. Research Computing Team V1.9 RESTRICTED

JAVS Scheduled Publishing. Installation/Configuration... 4 Manual Operation... 6 Automating Scheduled Publishing... 7 Windows XP... 7 Windows 7...

Secret Server Installation Windows 8 / 8.1 and Windows Server 2012 / R2

Note: With v3.2, the DocuSign Fetch application was renamed DocuSign Retrieve.

Setting Up a Unisphere Management Station for the VNX Series P/N Revision A01 January 5, 2010

Data Center Real User Monitoring

Table of Contents. CHAPTER 1 About This Guide CHAPTER 2 Introduction CHAPTER 3 Database Backup and Restoration... 15

The FlexiSchools Online Order Management System Installation Guide

Enterprise Content Management System Monitor. How to deploy the JMX monitor application in WebSphere ND clustered environments. Revision 1.

How To Enable A Websphere To Communicate With Ssl On An Ipad From Aaya One X Portal On A Pc Or Macbook Or Ipad (For Acedo) On A Network With A Password Protected (

Customer Tips. Xerox Network Scanning HTTP/HTTPS Configuration using Microsoft IIS. for the user. Purpose. Background

Configuring Secure Socket Layer and Client-Certificate Authentication on SAS 9.3 Enterprise BI Server Systems That Use Oracle WebLogic 10.

Transcription:

RHEV 2.2: REST API INSTALLATION BY JAMES RANKIN REVISED 02/14/11 RHEV 2.2: REST API INSTALLATION 1

TABLE OF CONTENTS OVERVIEW PAGE 3 JAVA AND ENVIRONMENT VARIABLES PAGE 3 JBOSS INSTALLATION PAGE 5 REST API SETUP PAGE 5 RUN JBOSS PAGE 9 START JBOSS ON BOOT PAGE 10 VALIDATE INSTALL VIA WEB BROWSER PAGE 15 VALIDATE INSTALL VIA REST CLIENT PAGE 17 RHEV 2.2: REST API INSTALLATION 2

OVERVIEW This whitepaper will outline how a RHEV administrator may add the REST API developer preview onto an existing RHEV 2.2 installation. Please ensure the RHEV 2.2 environment is installed and operational before installing this REST API. Note also that the REST API will be installed automatically with the next release of RHEV-M. This document applies only to RHEV-M 2.2. The REST API developer preview homepage is: https://fedorahosted.org/rhevm-api/ The developer documentation for the API is available at: http://markmc.fedorapeople.org/rhevm-api/en-us/html/index.html The workflow of this install will be as follows: Install JDK Install and configure JBoss Application Server Install and configure REST API Validate REST API functionality JAVA AND ENVIRONMENT VARIABLES Because the REST API runs on an embedded JBoss Application Server, the Oracle JDK must be installed onto the Windows Server 2008 R2 machine that runs the RHEV Manager service. RHEV 2.2: REST API INSTALLATION 3

First, download the current 64 bit JDK and install it onto the RHEV-M server. At the time of the writing of this whitepaper, the current JDK is Java 6 Update 22. The JDK download is available at the Java SE landing page: http://www.oracle.com/technetwork/java/javase/downloads/index.html After installation of the JDK, the %JAVA_HOME% environment variable must be set to the JDK path; the JBoss Application Server will not start unless this variable is correctly defined. To set the %JAVA_HOME% variable in Windows Server, click Start, then right-click Computer and choose Properties. Toward the upper left of the System properties window, click the Advanced system settings link. Next, click the Environment Variables... box, as shown below. RHEV 2.2: REST API INSTALLATION 4

In the Environment Variables window, click the New button, and set the JAVA_HOME variable to the path to your newly installed JDK. In the example below, the variable is set to the default path for the 64 bit JDK 6u22 install. JBOSS INSTALLATION With the JDK installed, download version 5.1.0 of the JBoss Application Server: http://sourceforge.net/projects/jboss/files/jboss/jboss-5.1.0.ga/jboss-5.1.0.ga.zip/download Install JBoss by simply unzipping it into a directory of your choice. In the example below, JBoss was placed in Program Files. RHEV 2.2: REST API INSTALLATION 5

REST API SETUP Download the current Windows milestone release of the REST API from the REST API homepage on fedorahosted.org. At the time of writing, the current milestone is 7: https://fedorahosted.org/rhevm-api/wiki/milestones Like the JBoss install, simply unzip the API zip file into Program Files, or any other location. Navigate into the webapp folder of the REST API. Copy the rhevm-api-powershell.war file and then paste it into the \server\default\deploy directory inside the JBoss install, as shown below. RHEV 2.2: REST API INSTALLATION 6

RHEV 2.2: REST API INSTALLATION 7

Next, create a certificate for https communication (which is also described in the README_HTTPS file). To do this, open a command prompt in Windows as an Administrator. Simply navigate to the Command Prompt icon in the Start menu, right-click it, and choose Run as Administrator. If the command prompt is not opened as an administrator, then you will not have write access into Program Files. With the command prompt open, navigate to your JBoss\server\default\conf directory, and run the following Java keytool command to generate a certificate: C:\Program Files\Java\jdk1.6.0_22\bin\keytool.exe -genkey -alias rhevm -keyalg RSA -keystore rhevm-keystore -keypass redhat -storepass redhat In this example, note that the path to keytool.exe is fully qualified and in quotes. If using a JDK other than 6U22, this path would be different, so using tab completion is advised. Also, note that the redhat values in this command are certificate passwords; please change these to any value you prefer. RHEV 2.2: REST API INSTALLATION 8

After running the keytool.exe command, answer the certificate creation questions when prompted. An example is below. With the certificate creates, the next step is to modify the server.xml file in the JBoss install. Start Word- Pad as an Administrator and navigate to $JBOSS_HOME\server\default\deploy\jbossweb.sar\ and open server.xml With the server.xml file open, find the following section: <!-- SSL/TLS Connector configuration using the admin devl guide keystore <Connector protocol="http/1.1" SSLEnabled="true" port="8443" address="${jboss.bind.address}" scheme="https" secure="true" clientauth="false" keystorefile="${jboss.server.home.dir}/conf/chap8.keystore" keystorepass="rmi+ssl" sslprotocol = "TLS" /> --> RHEV 2.2: REST API INSTALLATION 9

First, ensure that the SSL/TLS Connector... stanza is no longer commented out; these lines are commented out by default. Next, modify the keystorefile and keystorepass values to correspond to the filename and passwords chosen when creating the certificate. Since the example here uses rhevm-keystore as the keystore file and redhat as the password, the server.xml should be edited as shown below: <!-- SSL/TLS Connector configuration using our new keystore --> <Connector protocol="http/1.1" SSLEnabled="true" port="8443" address="${jboss.bind.address}" scheme="https" secure="true" clientauth="false" keystorefile="${jboss.server.home.dir}/conf/rhevm-keystore" keystorepass="redhat" sslprotocol = "TLS" /> The three changes necessary are highlighted above in yellow. Notice again how the comment at the beginning of the stanza is now closed at the end of the first line. After making these changes, save the file in WordPad. Next, the JBoss run.conf.bat file will need one edit to ensure that the REST API does not produce a port conflict. Again run WordPad as an Administrator, and open the $JBOSS_HOME\bin\run.conf.bat file. Find a JAVA_OPTS line and add -Djboss.service.binding.set=ports-01 to the end. For example, find the following existing section: rem # Reduce the RMI GCs to once per hour for Sun JVMs. set "JAVA_OPTS=%JAVA_OPTS% -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000" And edit this as shown below (with the change highlighted in yellow): rem # Reduce the RMI GCs to once per hour for Sun JVMs. set "JAVA_OPTS=%JAVA_OPTS% -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.service.binding.set=ports-01" RHEV 2.2: REST API INSTALLATION 10

Finally, save the file and exit WordPad. RUN JBOSS Open a command prompt as an Administrator and navigate to the JBoss directory. Run the following command in the JBoss directory to start the JBoss Application Server: bin\run.bat -b 0.0.0.0 Once JBoss starts, you'll see output similar to the example below. Starting JBoss and the REST API may take a minute. RHEV 2.2: REST API INSTALLATION 11

RHEV 2.2: REST API INSTALLATION 12

RHEV 2.2: REST API INSTALLATION 13

RHEV 2.2: REST API INSTALLATION 14

START JBOSS ON BOOT Once the JBoss Application Server starts correctly on the command prompt, one way to automatically start this service on Windows Server's boot is with a Scheduled Task. Another means to start JBoss on boot is by using JBossNative, which will configure JBoss to start as a Windows Service. This document lists the steps for creating a Task. To setup a scheduled task, click on the Start menu and choose Administrative Tools > Task Scheduler. In the Task Scheduler window, click on the Create Task link, as shown below: RHEV 2.2: REST API INSTALLATION 15

In the Create Task wizard, name the task (in this example, start jboss ). Also, choose the Run whether user is logged on or not radio button and check the box next to Run with highest privileges, as shown in the example below. RHEV 2.2: REST API INSTALLATION 16

Next, click on the Triggers tab and create a trigger to start the task At system startup, as depicted below: RHEV 2.2: REST API INSTALLATION 17

RHEV 2.2: REST API INSTALLATION 18

Now, click on the Actions tab and create a new action. The action should contain the following values (if you chose to not install JBoss in Program Files, then adjust these accordingly): Action: Program/script: Start a Program C:\Program Files\jboss-5.1.0.GA\bin\run.bat Add arguments: -b 0.0.0.0 Start in: C:\Program Files\jboss-5.1.0.GA\ Note that the Program value includes quotes and the Start in value does not. This is required. If the Start in value contains quotes, Windows will produce an error and will fail to start the task. RHEV 2.2: REST API INSTALLATION 19

Lastly, click on the Settings tab and deselect the box next to Stop the task if it runs longer... RHEV 2.2: REST API INSTALLATION 20

Click OK and the task will be created. Verify that the Task works correctly by rebooting the Windows Server and observe that JBoss and the REST API start automatically on boot. RHEV 2.2: REST API INSTALLATION 21

VALIDATE INSTALL VIA WEB BROWSER REST API functionality can be easily verified using any web browser. Start Internet Explorer or Firefox and navigate to: https://<rhevm-ip-address-or-fqdn>:8543/rhevm-api-powershell/ Note that connections to the API will be on port 8543. If the Windows Firewall is enabled, ensure that this port is open. Since the SSL certificate is self-signed, accept the IE or Firefox security warning. To prevent this warning from occurring again, import the certificate. Next, you will be prompted to provide RHEV Administrator credentials. Note that the username syntax is required to be <username>@<domain-name>. In the example below, the username is rhevadmin and the domain is jrlab.local. RHEV 2.2: REST API INSTALLATION 22

Once RHEV Administrator credentials are provided, the API will output XML similar to the example below. Also browse to the /rhevm-api-powershell/vms and other URLs to see more information on your RHEV environment. Please consult the API documentation for additional options and details. RHEV 2.2: REST API INSTALLATION 23

VALIDATE INSTALL VIA REST CLIENT Another easy way to test the REST API is with the java rest-client available on Google Code: http://code.google.com/p/rest-client/ Download the jar file for the rest-client from the project homepage. On Windows, simply double click the jar file to run the client. On Linux, issue the command java -jar <jar-file-name>. To configure the rest-client, provide a URL to the client, just as when testing the API via a web browser. Under the Auth tab, choose BASIC authentication and furnish RHEV Administrator credentials, as shown below: RHEV 2.2: REST API INSTALLATION 24

Next, click on the SSL tab and provide the client with a copy of the rhevm-keystore file that was created during the earlier setup process. Also provide the trust store password; in the example in this whitepaper, the trust store password was redhat. Last, change the hostname verifier to allow all, as shown below: RHEV 2.2: REST API INSTALLATION 25

RHEV 2.2: REST API INSTALLATION 26

To run the GET query, click the green button to the right of the URL field. After processing the query, click on the Body tab under HTTP Response to view the XML response: The rest-client may also be used to issue POSTs and PUTs into the API. Please consult the API documentation or the rhev-api mailing list for more detail. RHEV 2.2: REST API INSTALLATION 27