With SOA, you can have hundreds of composites that need to be setup for deployment and this can be a challenge. With FlexDeploy, we have a way to mass load and create projects from a csv file. Through the use of a template (a groovy script along with inputs) in conjunction with the csv file, projects can be created within a few minutes.
So now that I have your interest. Let’s get started with how this feature can assist you in getting to the deployment of SOA composites faster.
First, we need to make sure that several project components have been created in FlexDeploy prior to running the mass load, as the mass load will validate the data in the csv file against the data in FlexDeploy and warn you when there is a issue. Components that need to be created prior are build/deploy workflows, build/deploy instances, SCM instance (SVN or GIT) and the SOA plugin needs to be uploaded.
Second, we need to have a template defined in FlexDeploy.
As you can see, there are several pre-defined templates available for use directly, for modification or to be copied/modified. The pre-defined template that we will use is the BaseSOAProject. This template contains the necessary inputs and groovy script to create a SOA project without modification and provides every necessary piece of data as an input to the script. This can be modified to pass less information in and let the groovy script fill in the details. For example, you can use the same build and deploy workflows for every SOA composite so that really doesn’t need to come in as an input and could be hardcoded right in the script. This may apply to other pieces of data as well.
Next, edit the template you want to use (BaseSOAProject) and select the Download Sample CSV button to get a start on the csv file that you will add your project information to (all template inputs will be column headers in the csv file). Add your project information into the downloaded csv file and save.
BuildInstanceName,BuildWorkflowName,DeployInstanceNames,DeployPriority,DeployWorkflowName,Description,MakeDefaultRevision,OverwriteRevision,Partition,ProjectName,ProjectPath,SCMConfigInstanceName,SCMType SOA7,buildcomposite,SOA7,1,deployComposite,SOA project,true,true,default,Composite1,/FlexDeploy/blog/blogApp,SVN1,SVN SOA7,buildcomposite,SOA7,1,deployComposite,SOA project,true,true,default,Composite2,/FlexDeploy/blog/blogApp,SVN1,SVN
Now that the csv file is ready, we need to upload this file and apply the template to the rows. From the project screen, select the “Click to Create Projects from Template” button
From the create project screen, 1) select the csv file to upload, 2) select the template to apply to the csv file and 3) upload the projects to the screen for review.
If there are errors, the errors will show to the far right for each project row and the user will be able to either fix the errors on the screen, fix the data in the file (re-upload needed) or fix the groovy script (re-upload needed). If there are no errors, select either the create selected or create all button to create the projects as seen below.
Now that wasn’t so bad and you now have SOA projects ready to be built and deployed. This blog went through SOA project creation but the same steps can be utilized for any projects, such as ADF or OSB.