Slide 1

Slide 1 text

Fuse Service Works 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 Fuse Service Works (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 Home Loan demo ● Intended to show the capabilities of Fuse Service Works Server and Designer ● A work in progress, Lab 1-Switchyard and Lab 2-DTGov are stable. Lab 3- RTGov will be updated for the Home Loan Application. ● 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 Fuse Service Works ● Intended to showcase a demo until the end of each lab If you have any issue please send me an email, chat with me or submit an issue at https://github.com/jboss-switchyard/learning/issues Expectations for the workshop

Slide 4

Slide 4 text

JBoss Integration Product Line

Slide 5

Slide 5 text

Multiple Connectivity Options

Slide 6

Slide 6 text

Fuse Service Works Components

Slide 7

Slide 7 text

Workshop Application – Home Loan

Slide 8

Slide 8 text

Workshop Material Workshop location: https://github.com/jboss-switchyard/learning/tree/master/summit2014 Github Repo: https://github.com/jboss-switchyard/learning.git Folders under summit 2014: ● Guides – This contains the key, ppt and pdf files for the guides. You will be using the PDFs. In the future they will be in asciidoc format. It contains intro, lab1-lab3 ● Lab 1 – Contains the Switchyard application that will be completed during the exercise ● Lab 2 – Contains the Switchyard application in finished form from lab 1 or you can just use your code at the end of lab 1. This demonstrates DTGov. ● Lab 3 – Contains the files necessary for for the RTGov quickstart. It is currently beign modified for the home loan demo.

Slide 9

Slide 9 text

Setup Options for your environment Option 1: Use the simplified FSW template with the automated script Option 2: Use the Dockerfile for a docker container Additional configuration required afterwards.

Slide 10

Slide 10 text

Option 1: Use the simplified FSW template with the automated script Install Fuse Service Works Step 1: Clone the repository from https://github.com/kpeeples/simplified-fsw-template.git Step 2: Download Fuse Service Works from http://www.jboss.org/products/fsw.html Step 3: Place the software in the distros folder Step 4: Modify the support/InstallationScript.xml file to contain the full path to the installed/fsw directory. Make sure to leave the installed/fsw directory. The script performs the automated install of Fuse Service Works. You will notice in the installation script the components that are being installed. Also you will notice the variables file defines the passwords for Goverrnance, SAML keystore and vault keystore passwords. NOTE: This is installing the Switchyard, DTGov, S-RAMP and RTGov components which wouldn’t be the recommended setup as Design Time would be a separate server from the Switchyard/Run Time Server. /home/kpeeples/demos/fsw-simple-demo/installed/fsw Step 5: Run the install-run.sh script to install FSW

Slide 11

Slide 11 text

Option 1: Use the simplified FSW template with the automated script Configure Fuse Service Works Step 1A: Setup the Database – Copying Files Copy from the support directory the customer db files to $FSW_HOME/jboss-eap- 6.1/standalone/data/h2/ Step 1B: Setup the Database - Manual Launch the H2 db and console via the h2 jar in your FSW install java -jar modules/system/layers/base/com/h2database/h2/main/h2-1.3.168-redhat-2.jar At the login screen for the H2 console, use the following values. $FSW_HOME is where you have installed FSW; be sure to replace this with the actual directory for your installation. JDBC URL: jdbc:h2:file:$FSW_HOME/jboss-eap-6.1/standalone/data/h2/customer;mvcc=true User Name : sa Password : sa

Slide 12

Slide 12 text

Option 1: Use the simplified FSW template with the automated script Configure Fuse Service Works Step 1B: Setup the Database – Manual (Continued) In the console, create a table: CREATE TABLE CUSTOMER( SSN VARCHAR(11) PRIMARY KEY, FIRSTNAME VARCHAR(50), LASTNAME VARCHAR(50), STREETADDRESS VARCHAR(255), CITY VARCHAR(60), STATE VARCHAR(2), POSTALCODE VARCHAR(60), DOB DATE, CHECKINGBALANCE DECIMAL(14,2), SAVINGSBALANCE DECIMAL(14,2)); And insert some test data: INSERT INTO CUSTOMER VALUES ('800559876', 'Joe', 'Deeppockets-existing', '345 Pine Ave', 'Springfield', 'MO', '65810', '1966-07-04', 14000.40, 22000.99); INSERT INTO CUSTOMER VALUES ('610761010', 'Sally', 'Shortchange-existing', '456 Larch Lane', 'Springfield', 'MA', '99999', '1966-08-05', 9100.10, 2750.75); INSERT INTO CUSTOMER VALUES ('680777098', 'Barbara', 'Borderline-existing', '567 Poplar Pkwy', 'Worcester', 'MA', '01604', '1976-09-06', 300.41, 11.01);

Slide 13

Slide 13 text

Option 1: Use the simplified FSW template with the automated script Configure Fuse Service Works Step 2: Configure FSW (A example copy of standalone.xml is under the support folder) Add the following datasource definition to standalone-full.xml: jdbc:h2:file:${jboss.server.data.dir}/h2/customer;mvcc=true h2 sa sa

Slide 14

Slide 14 text

Option 1: Use the simplified FSW template with the automated script Configure Fuse Service Works Step 3: Setup JMS Add the JMS user ${FSW_HOME}/bin/add-user.sh Application User Application Realm Username : guest Password : guestp.1 Roles : guest Start the server: bin/standalone.sh In a separate terminal window, add a JMS queue: bin/jboss-cli.sh --connect --command="jms-queue add --queue-address=LoanIntake --entries=LoanIntake"

Slide 15

Slide 15 text

Option 1: Use the simplified FSW template with the automated script Modify settings.xml for the online repo Step 1: Make a backup of you settings.xml that is in .m2 by renaming to settings-bu.xml Step 2: Copy settings.xml from the support directory to the ./m2 directory This is to enable the online repo and add the S-RAMP username/password

Slide 16

Slide 16 text

Option 2: Use the Dockerfile for a docker container Eventually everything in the lab will be contained in a docker image. Contains Centos, and FSW 6.0.0.GA Tar image to load with docker load: https://drive.google.com/file/d/0B5kKwcd4kOq9T0c0Q1hJX3BoLTA/edit?usp= sharing Dockerfile to build Docker image: https://github.com/JBoss-Dockerfiles/FSW600Base FSW admin redhat1! fswAdmin redhat1!

Slide 17

Slide 17 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 5A: Either load the tar image with docker load and go to step 8 or continue to 5B Step 5B: Clone the git repository git clone https://github.com/JBoss-Dockerfiles/FSW600Base.git Step 6: Download FSW from jboss.org and put the software into the software folder Step 7: Run the build command docker build -t jbossfsw600 . Step 8: Connect to the container docker run -P -i -t jbossfsw600 /bin/bash

Slide 18

Slide 18 text

Docker Setup (Continued) Step 9: Setup the server the same as the configuration steps in option 1 for FSW. Step 10: Start the processes in the container by running the run script /home/jboss/run.sh Step 11: Through another terminal 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 FSW where MY_IP is the IP from above http://MY_IP:8080/

Slide 19

Slide 19 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 20

Slide 20 text

A couple of notes around docker: 1. If you will use docker with the labs then that will impact lab2. Make sure to point to the S-RAMP repo in docker in maven. 2. When deploying straight to FSW through JBDS then you do a remote connection to the FSW Server in the container.

Slide 21

Slide 21 text

Setup JBoss Developer Studio for both Option 1 and Option 2 Step 1: Download JBoss Developer Studio (JBDS) 7.1.1 from https://www.jboss.org/products/devstudio/download/ Step 2: Install JBDS according to the instructions Step 3: Add the Integration Stack within JBDS through install new software http://download.jboss.org/jbosstools/updates/stable/kepler/integration-stack/ If step by step is required here send me a message and I will point you to specific info or assist you.

Slide 22

Slide 22 text

Now onto the Lab intro guide and then you will be on your own to start the lab