Slide 1

Slide 1 text

Data Virtualization Workshop Kenneth Peeples, JBoss Technology Evangelist [email protected] www.ossmentor.com

Slide 2

Slide 2 text

Agenda for the Workshop ● Review the workshop material (10 minutes) ● Review Data Virtualization (10 minutes) ● Review setup (20 minutes) ● Attendee Hands on Lab (about an hour and 20 minutes) Please post questions to the Bluejeans chat if you have questions at anytime.

Slide 3

Slide 3 text

The workshop is: ● A step by step guide to building a financials demo ● Intended to show the capabilities of DV Server and Designer ● A work in progress, moving it from EDS to DV with Docker ● A hands on work shop ● To be started in class and finished at home/office if not completed The workshop is NOT: ● A 5 minute guide to Data Virtualization ● Intended to showcase a demo until the end of the workshop If you have any issue please send me an email, chat with me or submit an issue at https://github.com/DataVirtualizationByExample/DVWorkshop/issues Expectations for the workshop

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

Red Hat JBoss Data Virtualization includes: • Tools for creating data views that are accessible through standard protocols (the Teiid Designer plug-in for Red Hat JBoss Developer Studio (JBDS)). • A robust runtime environment that provides enterprise-class performance, data integrity, and security (the Red Hat JBoss Data Virtualization Server, which executes as a process within the Red Hat JBoss Enterprise Application Platform (EAP)). • A repository for storing metadata (ModeShape) Red Hat JBoss Data Virtualization is based on the following community projects: • Teiid (http://www.jboss.org/teiid) • Teiid Designer (http://www.jboss.org/teiiddesigner) • Modeshape (http://www.jboss.org/modeshape) What does Data Virtualization include?

Slide 6

Slide 6 text

What is the Data Virtualization Architecture?

Slide 7

Slide 7 text

Workshop Material Workshop location: https://github.com/DataVirtualizationByExample/DVWorkshop Folders: ● demos – Contains the Financials Project for the workshop, including the database scripts ● docs – Contains the asciidoc for the labs as well as the Workshop in HTML, PDF, DocBook format ● dv-docker – Contains the docker image for the workshop

Slide 8

Slide 8 text

Setup Options for your environment Option 1: Install Everything Option 2: Use the Virtual Box Image Option 3: Use the Dockerfile for a docker container Option 4: Use OpenShift

Slide 9

Slide 9 text

Option 1: Install Everything This option takes a little more time. ● OpenJDK 1.6 or 1.7 or Oracle JDK 1.6, 1.7 ● Git ● PostgreSQL server ● MySQL Server ● Data Virtualization 6, either manual or auto ● JBDS 7 with Integration Stack This is sections 1-3 of the workshop guide

Slide 10

Slide 10 text

Option 2: Use the Virtual Box Image This option requires a huge download ~3.3GB but skips sections 1-3 of the workshop guide ● Virtual Box 4.3.12 ● https://drive.google.com/folderview?id=0B5kKwcd4kOq9dWFRMU0xR3Y2azA&usp=sharing Contains Fedora 20, JDK, PostgreSQL including demo data, MySQL including Demo Data, DV 6.0.0.GA, JBDS 7.1.1 with the Teiid Designer tools installed, JBDS setup done DV server and Teiid instance already configured). OS Username Password root jboss jboss jboss DV admin redhat1! user user Installation dir: /home/jboss/dv/jboss-eap-6.1 PostgreSQL JDBC driver in: /home/jboss/Downloads

Slide 11

Slide 11 text

Option 3: Use the Docker file for a Docker Image This is the option we will use and eventually remove the other options. Contains Centos, PostgreSQL including demo data, MySQL including Demo Data, DV 6.0.0.GA ● Docker must be installed (documentation on docker.io) ● Git ● JBDS 7.1.1 with the Teiid Designer tools should be installed (Will be put in the container in the future) ● JBDS setup done DV server and Teiid instance already configured (Will be put in the container in the future) ● DV auto install locally due to a JBDS bug OS Username Password root jboss jboss jboss DV admin redhat1! user user Postgres jboss jboss

Slide 12

Slide 12 text

Option 4: Use OpenShift This option is being tested but the guide has some instructions. I would recommend using one of the other options unless you are adventerous. At some point Docker and OpenShift will be used in conjuction.

Slide 13

Slide 13 text

Docker Setup Step 1: Install docker Instructions are located for each platform at https://docs.docker.com/ Step 2: Start docker sudo systemctl start docker Step 3: If you receive a operation not permitted error, try sudo chmod a+rw /var/run/docker.sock Step 4: Verify docker is running docker info or docker version Step 5: Clone the git repository git clone https://github.com/DataVirtualizationByExample/DVWorkshop.git Step 6: Download Data Virtualization from jboss.org and put jboss-dv-installer-6.0.0.GA-redhat-4.jar into dv- docker/software Step 7: Run the build command docker build -t jbossdv600 . Step 8: Connect to the container docker run -P -i -t jbossdv600 /bin/bash

Slide 14

Slide 14 text

Docker Setup (Continued) Step 9: Start the processes in the container by running the run script /home/jboss/run.sh Step 10: Get the IP, probably 172.17.0.2 -Get the ContainerID docker ps -Get the IP Address where MY_CID is the container ID docker inspect --format '{{ .NetworkSettings.IPAddress }}' MY_CID -Browse to Data Virtualization where MY_IP is the IP from above http://MY_IP:8080/ -Browse to Data Virtualization Dashboard where MY_IP is the IP from above with user as user and user as password http://MY_IP:8080/dashboard/

Slide 15

Slide 15 text

Additional helpful Docker Commands ● Save an image to share docker save IMAGE > image.tar ● Load an image from someone docker load IMAGE < image.tar ● Stop all containers docker stop $(docker ps -a -q) ● Delete all containers docker rm $(docker ps -a -q) ● Delete all images docker rmi $(docker images -q)

Slide 16

Slide 16 text

JBDS Setup with container Step 1: Installing Red Hat JBoss Data Virtualization by using an automated script. This is required due to an issue with remote access to the server https://access.redhat.com/site/solutions/550033 This instance won't be used but just configuration files required. This will be removed once JBDS issue is resolved and/or it is put inside the container. -Clone the repository using git from https://github.com/kpeeples/simplified-dv-template.git -Modify the simplified-dv-template/support/InstallationScript.xml file to contain the full path to your installed/dv directory -Run the install-run.sh script to install Jboss Data Virtualization. The server can be stopped as only the configuration is used. Step 2: Install JBDS and the integration stack using Chapter 3 Use the Install Red Hat Jboss Developer Studio with the exception of creating the server

Slide 17

Slide 17 text

JBDS Setup with container (Continued) Step 3: JBDS should be started and workspace created with the integration stack. Connect JBDS to the DV in the container by clicking on create server. Step 4: Choose EAP 6.1+ Step 5: Choose the home directory of the FSW local install just for configuration. Click next. This is only temporary because of a JBDS bug. Step 6: Click server is managed externally. Then change Local to Remote System Deployment. Step 7: add new host then SSH only, choose hostname of 172.17.0.2 Step 8: Click finish and then change the host Local to the IP Step 9: click browse and enter jboss/jboss for credentials to connect to the container. Save userid and password. If JBDS ask for the secure storage password then enter what you have used before or a new one. It can be reset. Step 10: Click yes for authenticity Step 11: Choose the My Home/dv/jboss-eap-6.1 folder and click finish

Slide 18

Slide 18 text

JBDS Setup with container (Continued) Step 12: Double click on the server Step 13: On the overview tab for the management admin user put in the redhat1! Password then save and start the server which should indicate synchronized Step 14: Click on the Teiid instance under the server on the server tab Step 15: Test the JDBC connection

Slide 19

Slide 19 text

Gotchas 1. If you are using the Docker image instead of the VB Image or local make sure to change the host to 172.17.0.2 instead of localhost 2. Download the Postgres Driver http://jdbc.postgresql.org/download/postgresql-9.3-11 01.jdbc41.jar and remove the old jar when in the new driver definition 3. Use jboss/jboss for the postgres credentials such as on page 62

Slide 20

Slide 20 text

Now it is Hands on Time..... If you are using Docker and did all the previous steps....Start with Chapter 4. Create a Teiid project and Import Data Source Section 4.2. Creating a Teiid Project