Download Integrating Software AG Designer and

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Integrating Software AG Designer and
webMethods Asset Build Environment with
Microsoft Team Foundation Server (TFS)
Setup and Connection “Cheat sheet”
Author: Mangat Rai
Version 1.1 | 8, July, 2015
V1.1
Designer Workstation with TFS
07/08/2015
Table of contents
1.0 INTRODUCTION
3
1.1
3
Purpose
2.0 PRE-REQUISITE
3
2.1
Local Service Development
3
2.2
TFS eclipse plugin
3
2.3
Access to TFS server
3
3.0 INSTALLATION
3
3.1
3
Eclipse plugin
4.0 SETUP
4
4.1
Source Control
4
4.2
Connect with Team server
8
5.0 Working with Local Service Development
10
5.1
Getting Existing package from TFS
10
5.2
Adding new package to TFS
12
5.3
Checkin/Checkout
13
5.4
Editing java service
15
5.5
Creating new java service
16
5.6
Detect Local Changes
17
6.0 Asset Build Environment
17
6.1
Folder Structure
17
6.2
Updating build properties
18
6.3
Working with TFS command line client
19
6.4
Executing build script
20
6.5
Connecting Deployer to ABE
20
7.0 REFERENCES
©2009 Software AG. All rights reserved.
23
Page 2 of 24
Designer Workstation with TFS
07/08/2015
1.0 INTRODUCTION
This document covers installing webMethods 9.8 Designer Workstation setup with Team Foundation Server (TFS)
source control. This guide is not an extensive or official documentation from Software AG. This guide will help
you with the step-by-step setup. . It all mentions all the issues encountered by author during the setup.
1.1
Purpose
This guide will be helpful for developers/administrators using Designer with TFS. Consider it an extra reference
“cheat sheet” while doing installation.
2.0 PRE-REQUISITE
Below are the pre-requisites for this setup to work
2.1
Local Service Development
Before starting with this guide, developers need to make sure that they have a working installation of
webMethods local service development in their machine. Components which need to be installed includes
Integration server on local machine and Designer workstation with Local service development.
Make sure all necessary updates are installed and you have the appropriate license.
2.2
TFS eclipse plugin
TFS plugin for eclipse is required to checkin/checkout and manages IS asset. Eclipse plugin version 12 was used
during POC and was found to be working successfully. Version 12 is also the compatible version with
webMethods 9.8.
2.3
Access to TFS server
Individuals need to have access to TFS repository as a contributor (minimum).
3.0 INSTALLATION
3.1
Eclipse plugin
Eclipse plugin 12 is compatible version with TFS 2012. Jar files for eclipse plug in can be found at
http://www.microsoft.com/en-us/download/details.aspx?id=40785
Download TFSEclipsePlugin-UpdateSiteArchive-12.0.2.zip from above link. Please check supported version for
your TFS server and download appropriate one.
©2009 Software AG. All rights reserved.
Page 3 of 24
Designer Workstation with TFS
07/08/2015
Start Designer. We’re going to install the TFS plugin.
1. Help/Install new Software…
2. Click the Add… button near the top of the Install window to the right of the ‘Work with’ drop down.
3. The Add Repository dialog box appears.
4. In Name, enter TFS Plugin for Eclipse.
5. Click the Archive button in the Add Repository window.
6. Browse to the TFSEclipsePlugin-UpdateSiteArchive-12.0.2.zip file.
7. choose OK.
8. In the list of features in the Install dialog box, select the check box that corresponds to Team
Foundation Server Plug-in for Eclipse, and then choose Next two times.
9. Make sure to clear Contact all update sites during install to find required software if you just want to
install Team Explorer Everywhere at this time.
10. Accept the Microsoft Software License Terms, and then choose Finish.
Restart Eclipse when prompted. Installation of TFS plugin is complete.
4.0 SETUP
4.1
Source Control
When eclipse is started select a workspace in your machine other than package folder. You will face errors if
you choose integration server package folder as workspace
e.g. C:\Users\<your Windows userid>\workspace98
Once eclipse is started go to Window --> Preferences --> Team. You should now see team Foundation Server
listed there.
Click Ignored Resources under Team and add these patterns:
node.ndf.*
node.idf.*
*.class
©2009 Software AG. All rights reserved.
Page 4 of 24
Designer Workstation with TFS
Go to Team
07/08/2015
Team Foundation Server
Uncheck second option – Connect mapped projects to TFS automatically.
Click Apply
©2009 Software AG. All rights reserved.
Page 5 of 24
Designer Workstation with TFS
07/08/2015
Go to Source Control Option Under Team Foundation Server and change Default Lock Level to Check Out. Click
Apply and OK.
©2009 Software AG. All rights reserved.
Page 6 of 24
Designer Workstation with TFS
07/08/2015
In Preference window Go To General -> WorkSpace and check two options
Build Automatically
Refresh Using native hooks or polling
©2009 Software AG. All rights reserved.
Page 7 of 24
Designer Workstation with TFS
4.2
07/08/2015
Connect with Team server
Open the TFS View. Go to Window --> Show View --> Other --> Team Explorer
©2009 Software AG. All rights reserved.
Page 8 of 24
Designer Workstation with TFS
07/08/2015
Connect with TFS server.
Add new server: http://server:port/tfs/
Path - $/Integration/Development/Source/webMethods/packages
Select Integration and click ‘Finish’
Open Source Control Explorer and go to Path - $/Integration/Development/Source/webMethods/packages it
will show as not mapped. Click on Not Mapped link beside local path and map it to default instance package
folder
C:\SoftwareAG\IntegrationServer\instances\default\packages
This completed the setup part of Eclipse plugin.
©2009 Software AG. All rights reserved.
Page 9 of 24
Designer Workstation with TFS
07/08/2015
5.0 WORKING WITH LOCAL SERVICE DEVELOPMENT
Once the setup is done, it is time to start local service development. There are various scenarios you may come
across. We will cover them one by one.
5.1
Getting Existing package from TFS
If you are setting up a new Designer workstation environment and want to get packages from source control.
Then follow these steps.
Open Source Control Explorer and go to Path - $/Integration/Development/Source/webMethods/packages. This
path will vary depending on your enterprise TFS folder structure.
Navigate to Package needs to be downloaded
right click and select import
Select projects to import from Team Foundation Server. E.g. WmTransformationServices
©2009 Software AG. All rights reserved.
Page 10 of 24
Designer Workstation with TFS
07/08/2015
Click Next and Finish
Newly downloaded package will appear in Package Explorer view
You will notice that project is already recognized as Local service development project.
©2009 Software AG. All rights reserved.
Page 11 of 24
Designer Workstation with TFS
07/08/2015
Right click on package in Package Explorer and Select Load IS Package
Package will start appearing in Package Explorer.
5.2
Adding new package to TFS
This section covers when there is a newly created package which needs to be added to TFS
1. Create Package and asset under that package in Package Navigator view.
2. Right click on new package which needs to be added to TFS. Select Create Local Service Development
Project.
3. Share Project wizard will open
©2009 Software AG. All rights reserved.
Page 12 of 24
Designer Workstation with TFS
07/08/2015
4. Select Team Foundation Server and Click Next
5. Select your TFS project and path structure and click finish.
6. Now your package is checked into TFS and no changes can be made until assets are checked out from
TFS.
5.3
Checkin/Checkout
Once code is checked into TFS, flow services and components will show a red dot against them in designer
package navigator view. Red dot indicates that services are system locked and can’t be edited.
To edit a service, check out code from TFS first. To check out code go to package explore --> folder of
concerned component. E.g. if flow service fs in testPackage package needs to be edited then check out fs
folder under ns folder in testPackage java project.
©2009 Software AG. All rights reserved.
Page 13 of 24
Designer Workstation with TFS
07/08/2015
To check out. Right click on fs folder. Team --> Check Out For Edit…
Select Option 2 in Select Lock Type i.e CheckOut
Once Check Out is done. Package will be reloaded automatically. If not then reload package. Service should not
have red dot any longer. Lock for Edit and service is ready to be edited.
©2009 Software AG. All rights reserved.
Page 14 of 24
Designer Workstation with TFS
07/08/2015
Once changes are done, unlock service. Go to Pending Changes, enter comments and commit check in.
5.4
Editing java service
TFS and java project changes the way java services are created and edited. You should no longer edit Java
services from the package navigator.
Don’t edit/open Java service(s) using package navigator. It will create a corrupt package
(testPackage_5555) of no use.
To edit a java service, go to Package Explorer view and select the package containing Java service which needs
to be edited. E.g if java service testPackage:js needs to be edited, then select testPackage package in Package
Explorer view and go to path testPackage – code/source – and check out testPackage.java and also check out
folder ns/testPackage/js
Depending on where java services were created first, .java file may appear differently. E.g. here .java file
appears under /testJS/code/source/testJS
©2009 Software AG. All rights reserved.
Page 15 of 24
Designer Workstation with TFS
07/08/2015
Java services are stored as methods in Java class file. Java class file is named after folder which contains java
service. Hence we are checking out testPackage.java to make changes.
In testPackage.java you will see all Java services as separate methods. Make changes in js method.
After making changes run WmRoot package service wm.server.packages:compilePackage with package name
which contain java service as input. This will recompile java service. Once done making changes – Go to
Pending Changes in Team Explorer and Check in changes to TFS.
5.5
Creating new java service
If the folder where new service needs to be created already has java service make sure those services are
checked out and also the related .java file is checked out. Follow 5.4 for checking out existing java services
If failed to do so, designer will throw an error
Once you check out and reload package, follow wizard to create new java service.
.java file will be updated with a method name that comes from the name you gave the new Java service.
Write your code for java service between
// --- <<IS-START(testJSForTFS)>> --// @sigtype java 3.5
Your code goes here
// --- <<IS-END>> ---
©2009 Software AG. All rights reserved.
Page 16 of 24
Designer Workstation with TFS
07/08/2015
Save java file and recompile java as explained in previous sections.
Additionally you will see that Designer created an unwanted package ([localhost_5555] in Package explorer
view.
Once done creating java service, go to package explorer and delete this newly created unwanted package from
package explorer.
Prompt will ask if you want to delete content from disk, you can safely select to delete content from disk
And you are done.
5.6
Detect Local Changes
In case if new flow service or any new component is created for first time in existing package those changes
either will automatically show up in Pending Changes tab or needs to be detected in order to reflect under
pending change.
Go to Package Explorer and Right click on package which contains new addition.
Right Click --> Team --> Detect Local Changes…
New additions will appear under Pending Changes tab. Follow normal check in process to commit changes to
TFS.
6.0 ASSET BUILD ENVIRONMENT
In this section, you will see how to configure the Asset Build Environment to extract the IS assets from the TFS.
After this is done you can use webMethods Deployer to push it to the target environment(s).
Document talks about setting up ABE on a windows machine. Steps for Linux are more or less same.
6.1
Folder Structure
Create a directory for the Asset Build. Open a File Explorer, and create the following directory and
subdirectories:
©2009 Software AG. All rights reserved.
Page 17 of 24
Designer Workstation with TFS
07/08/2015
Note: this is just an example folder structure. You can come up with your own naming standards for ABE.
6.2
Updating build properties
You will next configure the Asset Build Environment before running the build.
The Asset Build Environment is located under:
<SAG Home>\common\AssetBuildEnvironment
Use Windows Explorer and navigate into the directory
<SAG Home>\common\AssetBuildEnvironment\master_build
Open the files build.properties in text editor of your preference. You will notice build.xml is the main Ant
build file. It references build.properties and build-source-checkout.xml. We’ll make our changes in the
build.properties.
In build.properties change the following properties to the listed values:
Property
Value
build.output.dir
D:/esb/abe/build
build.source.dir
D:/esb/abe/tfscheckout/IS
©2009 Software AG. All rights reserved.
Page 18 of 24
Designer Workstation with TFS
07/08/2015
enable.checkout
false
enable.archive
true
build.archive.dir
D:/esb/abe/archive
enable.build.IS
true
enable.build.UniversalMessaging
true
build.log.enable
true
build.log.filename
D:/esb/abe/logs/build.log
6.3
Working with TFS command line client
Next is to check out code from TFS. Microsoft deprecated Teamprise so you need to configure TFS client or
Team explorer everywhere to check out code from TFS manually. Configure TFS client to download code to
same folder which is set as build.source.dir in your build.properties file. In this case
D:/esb/abe/tfscheckout/IS
You can download command line client from same url as Eclipse plugin.
Few of the TFS command line client commands which are useful to work with are below. For more information
you can visit
https://msdn.microsoft.com/en-us/library/z51z7zy0(v=vs.100).aspx
add tf.exe path to system path of windows.
Run these below commands from folder where you want to or already map with tfs.
Use “tf workspace” command to create workspace
-Map a local folder to a workspace
tf workfold -map -collection:http://server:port/tfs/DefaultCollection -workspace:ESBWS $/ESB/
D:/esb/abe/tfscheckout
Get all packages from TFS
tf get -force –recursive –login:your login
©2009 Software AG. All rights reserved.
Page 19 of 24
Designer Workstation with TFS
07/08/2015
-Get all items in a package and all sub folders
tf get testPackage -force -recursive
Note:- Team explorer everywhere and Microsoft Visual Studio comes with feature to automate checkout
process. You can configure to check out code periodically or whenever there is a new checkin. Please refer to
Visual studio documentation for more information.
6.4
Executing build script
To run the build: open a command prompt then “cd” into
<SAG Home>\common\AssetBuildEnvironment\bin
Type build.bat and press Enter. ( The build.bat uses Ant, and Ant uses build.xml for the build settings )
You will see the output of the build in your command window. If everything works fine you will see a message
at the end saying:
BUILD SUCCESSFUL
You can use Windows Explorer to see the results of the build. The IS package was checked out to the directory
D:\esb\abe\tfscheckout\IS The build output is under the directory: D:\esb\abe\build (this location will become
a Source Repository in Deployer).
The build.log is under D:\esb\abe\logs.
6.5
Connecting Deployer to ABE
This section will show you how to connect webMethods Deployer to your Asset Build Environment (file based)
repository (where the build is located). This is use for Repository-based deployment instead of Runtime-based
deployment. This section assumes you have configured Deployer to connect to your target servers. For details
on Deployer, refer to the webMethods Deployers User’s Guide.
Open webMethods Deployer in your browser.
Add a new source Repository. In the left nav bar, click Repository then Add Repository
Enter a Name for your Asset Build Enviroment repository. For example: MyABErepo and the File Directory as
D:\esb\abe\build and click the Configure button.
©2009 Software AG. All rights reserved.
Page 20 of 24
Designer Workstation with TFS
07/08/2015
You should see a message saying “Repository MyABErepo was added”.
You can then create a Deployer project of type “Repository”.
After creating the deployer project, you can create a deployment set. Make sure you select your Asset Build
Environment repository as the source for the deployment.
©2009 Software AG. All rights reserved.
Page 21 of 24
Designer Workstation with TFS
07/08/2015
Next, create the deployment Map so that you can select the target server(s).
Finally, you can create a Deployment Candidate, where you can first Simulate the deployment, or do the actual
Deploy.
©2009 Software AG. All rights reserved.
Page 22 of 24
Designer Workstation with TFS
07/08/2015
7.0 REFERENCES
Designer Local Service Development
For more info, refer to the section Using the Local Service Development Feature in the Service Development
Help (v9.8) document here :
http://documentation.softwareag.com/webmethods/wmsuites/wmsuite9-8/Designer/98_Service_Development_Help.pdf
Designer with VCS (Subversion)
This document does not cover how to use the VCS (Subversion) client within Designer. For more information
about how to use the VCS client with Designer local service development, refer to the following sections within
the Service Development help doc:
 Adding Folders and Elements to the VCS
 Modifying Packages, Folders, or Elements in the VCS
 Checking Out an Element from the VCS
 Checking In Packages and Element to the VCS
 Getting the Latest Version from the VCS
 Getting a Specific Version from the VCS
 Copying Packages from the VCS to Integration Server
webMethods Deployer (using Repository-based deployment)
For more info, search for repository based deployment in the webMethods Deployer User’s Guide (v9.8)
document here :
http://documentation.softwareag.com/webmethods/wmsuites/wmsuite9-8/Cross_Product/98_Deployer_Users_Guide.pdf
©2009 Software AG. All rights reserved.
Page 23 of 24