Oshyn Home Page
  • expertise
    • Overview
    • Contact Us |
    • Latest work: www.miramax.com
  • solutions
    • Overview
    • Content Management
      • Choosing a CMS
      • Site Migration
      • Sitecore Consulting
      • EPiServer CMS Consulting
      • Jahia Integration
      • Legacy CMS Solutions
      • Drupal Development
      • Common Issues
      • Training
    • Web Strategy
    • Mobile Platforms
    • Social Media
    • E-commerce
    • Portals & Collaboration
    • SOA
    • Contact Us |
    • Latest work: www.miramax.com
  • work
    • Overview
    • Client Quotes
    • Contact Us |
    • Latest work: www.websense.com
  • resources
    • Overview
    • News & Events
    • Newsletters
    • Blog
    • White Papers
    • Success Stories
    • Press Kit
    • Contact Us |
    • Latest work: www.disneydvd.com
  • partners
    • Overview
    • Agency Partner Program
    • Technology Partners
    • Contact Us |
    • Latest work: www.nea.org
  • company
    • Overview
    • Contact
    • Careers
    • Leadership Team
    • News & Events
    • Social Responsibility
    • Contact Us |
    • Latest work: www.icon4x4.com
  • Tweet
Wednesday, May 23, 2012  /   Juan Pablo Albuja Juan Pablo Albuja
Author Page
close

Juan Pablo Albuja


During his 5 years in software development, Juan Pablo Albuja has performed work for clients in the Software, Insurance, Media Digital, and Higher Education industries. His expertise ranges from software development to innovative web technologies with particular expertise in CMS (Content Management Systems), like Jahia, RedDot, LiveServer (DS), Joomla, and system integration with a particular focus on Java technologies. In addition, Juan Pablo has a high experience with the configuration of automatic deployments process based on Hudson, installations, and configuration of search engines like Verity and OpenText Common Search.

Jahia 6.6 Templates and Modules Deployment Using Jenkins - Part 2

This is the second part of my Jahia 6.6 Templates and Modules Deployment Using Jenkins Part 1 posts. This post will detail the implementation of the design proposed in Part 1. For this implementation, Jenkins CI needs some extra configurations to implement the deployment via the SSH protocol using WinSCP and putty.

Servers

The machines used for this implementation are:

 

 1. Developers promote their code to a SVN server.
2. Jenkins is installed on a windows server that has access to the SVN repository. The SVN server is installed on a separate server.
3. The Integration Jahia site is installed on a Linux server with the SSH and SFTP services working.

Jenkins Configuration

We use WinSCP to SFTP the war files to the target server, and Plink is used to remotely execute the Jahia’s deployment script. First, install WinSCP and plink.exe in the Jenkins server. The first time you use plink.exe to connect to the target server, it is necessary that you manually establish this connection using the same user that runs the Jenkins process. Plink needs to validate the host key of the remote server to avoid prompts during the execution of automated jobs.

Other tools that we need to install on the Jenkins server are Maven 2 and Ant 1.8.3. Maven will be used to compile the Jahia project and Ant is going to handle the integration with WinSCP and Plink. The use of Ant is not strictly necessary because that integration can be handled via .bat files, but using Ant scripting gives an advantage because you can use the same script to deploy to multiple servers based on parameters that can be configured on the Jenkins job. For details of how integrate Maven and Ant with Jenkins please visit http://jenkins-ci.org/.

SVN Repository

It is important that your SVN repository has an appropriate structure in order to facilitate Jenkins jobs configuration. The recommended structure is:
a) <SVN Root>/branches
     This folder stores branches of the versioned code.
b) <SVN Root>/tags
     This folder is going to contain the tags taken from the trunk.
c) <SVN Root>/trunk
     It contains Jahia projects and build files.
d) <SVN Root>/trunk/ConfigurationManager/BuildFiles
     This folder is going to contain the Ant build.xml
e) <SVN Root>/trunk/template-project
     This folder contains a sample Jahia template project
f) <SVN Root>/trunk/modules
     This folder contains Jahia module projects.

Maven and Ant Scripts

If you create your Jahia template and modules projects using the Jahia’s Archetype, those projects comes with their own pom.xml file. Jenkins needs to use them to compile the projects via the command mvn install. For the SFTP and the remote call of scripts, we need to create an Ant script and store it in the folder /trunk/ConfigurationManager/BuildFiles/build.xml. Please download the sample script file from here:

Note: All the property values that are in the buid.xml file can be overwritten from the Jenkins job.

Section: Global Parameters

• workspace.dir: This property needs to point to the /workspace folder for the job. Each job created in Jenkins creates a local folder in <Jenkins Installation>/jobs/<job name>/workspace. This property in the script has the value ../../ because the job is going to call to the build file located on /ConfigurationManager/BuildFiles/build.xml.
• sftp.exec.dir: Path of the installation of WinSCP.
• plink.exec.dir: Path of the installation of Plink

Section: SFTP Configuration

• server.sftp: The target SFTP server.
• user.sftp: The SFTP user.
• password.sftp: The SFTP password associated with the above user.
• key.sftp: The SFTP key that is going to be used by WinSCP.
• sftp.command.file: The temporal file name that is going to contain the SFTP commands. The commands of this file are going to be created later.
• sftp.targetlocation: Absolute path folder in the target server where the compiled war files are going to be copied.
• connectionString.sftp: open SFTP statement formed with the above parameters.

Section: PLink Configuration

• jahia.shfile.path: Absolute path to the deployModule.sh file. It is going to be used by plink to deploy the compiled war files.
• jahia.wars.list: Absolute paths of each war file to be deployed into Jahia separated by space. For example:
/opt/Jahia_xCM_v6.6.0.0/deploywars/test-1.0-SNAPSHOT.war /opt/Jahia_xCM_v6.6.0.0/deploywars/templates-test-1.0-SNAPSHOT.war
• jahia.tomcat.path: Absolute path to the root folder of the Jahia application that is running under Tomcat.

Ant Target: Create Commands

This target creates a temporal file using the property sftp.command.file in the folder that contains the build.xml file. This file contains SFTP commands to put or copy the wanted war files into the sftp.target location.

Ant Target: Sftp

This target uses the Ant task <exec> to call the WinSCP.com program with all the SFTP commands created previously.

Ant Target: Deploy


This target uses the Ant task <exec> to call plink.exe. Note that it is using many parameters configured previously to call the deployModule.sh.

Jenkins Job Configuration

For details on how to configure this, check out the available documentation here: http://jenkins-ci.org/
Here are the general considerations:

1. Create your Jenkins job as a Maven 2/3 project.
2. Configure it to check out the code that is on the svn trunk folder.
3. Configure it to build the template project and the modules project via mvn install.
4. Configure it to invoke the Ant build file located in ConfigurationManager\BuildFiles\build.xml with the following properties:

sftp.exec.dir=C:\\Program Files\\WinSCP
server.sftp=target.oshyn.com
user.sftp=root
password.sftp=password
key.sftp=ssh-rsa 2048 55:11:1d:e6:ba:c0:7c:8c:e5:9c:2e:f6:ed:12:11:cf
sftp.targetlocation=/opt/Jahia_xCM_v6.6.0.0/deploywars
jahia.shfile.path=/opt/Jahia_xCM_v6.6.0.0/deployModule.sh
jahia.wars.list=/opt/Jahia_xCM_v6.6.0.0/deploywars/test-1.0-SNAPSHOT.war /opt/Jahia_xCM_v6.6.0.0/deploywars/templates-test-1.0-SNAPSHOT.war
jahia.tomcat.path=/opt/Jahia_xCM_v6.6.0.0/jahia

This implementation is a generic possibility to deploy Jahia Projects. It combines the power of Jenkins with the Jahia tool deployModules. You can adjust the sample script to your needs but notice that almost all the properties are parameterized so if you want to deploy to another server, you just need to register the host key of the target server and change the values of the parameters according to your needs.

Trackback Link
http://www.oshyn.com/BlogRetrieve.aspx?BlogID=1907&PostID=223084&A=Trackback
Trackbacks
Post has no trackbacks.

Pages: Previous Next

TwitterFacebookLinkedIn
ajax rotator

Blog Authors

Christian Burne   Christian Burne  
Subscribe Subscribe Subscribe Subscribe Subscribe
OTHER CATEGORIES
  • ALL

  • General

  • Web Content Management

  • Sitecore CMS

  • Open Text

  • Jahia

  • Drupal

  • EpiServer

  • SOA

  • Social Media and Mobile

  • Software Development

  • Visit Bloggers Profiles

RELATED POSTS
  • Quick intro to Glass Sitecore Mapper
  • What is the purpose of Sitecore’s “sc:VisitorIdentification” tag?
  • Creating Custom Strategies in Sitecore DMS Multivariate Tests
  • Automated Content Migration Part 3: Managing your CMS during a website redesign
  • Sitecore database deployment to Amazon RDS SQL
  • Redesigning your Sitecore Site with Siteport
  • GeoIP Inner Workings in Sitecore DMS
  • Automated Content Migration Part 2: Completing a CMS Upgrade
  • 5 Don'ts for Selecting a CMS/WCM
  • Can you do CXM with RedDot?

WHITE PAPERS

    Web Content Management, Social Media, Content: Three Kings for Your Website Web Content Management, Social Media, Content: Three Kings for Your Website (846 KB)
    Companies pursuing online marketing success, including Social Media, can increase the power of their online presence with right strategy and technology to maximize online visibility and engagement. Download this FREE white paper on the WCM, Social Media, and Content triad.

    Drupal Performance Tuning Drupal Performance Tuning (1213 KB)
    In this Free White Paper Oshyn evaluates Drupal Performance Tuning, sharing the results of testing response time and Requests Per Second (RPS) that a server can hold before the response rate becomes unacceptable. In this paper you will learn about optimizing performance of a website through changes to settings and the server.

    Enterprise Drupal: Social Media, Mobile, and Rich Media in your Website Enterprise Drupal: Social Media, Mobile, and Rich Media in your Website (1015 KB)
    In this free WCM white paper, Oshyn examines advanced Drupal capabilities: Multisite Environment, Access Control and Security, Enhanced User Profiles, Custom Breadcrumbs, Mobile Support, Podcasts, Advanced Multimedia, Locations and Maps, Internationalization and Locale based content, Events and Scheduled Tasks, Rules Actions and E-Commerce Solutions.

    Drupal Multilingual Drupal Multilingual (636 KB)
    There are several multilingual installation methods for Drupal. In this free white paper Oshyn evaluates and recommends several methods of using Drupal Open Source CMS to manage websites in multiple languages.

    Drupal Social Media Drupal Social Media (1297 KB)
    Looking for an Open Source CMS to for “Social Media Optimization” of your website? Download this free white paper, “Drupal and Social Media”, to learn about the extensive Social Media this Open Source CMS offers to create a dynamic and engaging website and online community.

    Drupal Multisite Options Drupal Multisite Options (427 KB)
    There are several multisite installation methods for Drupal. In this free white paper Oshyn evaluates and recommends several methods of using Drupal Open Source CMS to manage multiple sites.

    Open Source CMS: Is It Right for your Organization Open Source CMS: Is It Right for your Organization (496 KB)
    In this free white paper, “Open Source CMS: Is It Right for your Organization?” we share an in-depth look at the pros and cons of using Open Source Content Management Systems (CMS) or Open Source Web Content Management (WCM) platforms. Oshyn helps clients select CMS/WCM solutions based on the specific requirements of each client.

    Affiliate Content Sharing in a CMS/WCM World Affiliate Content Sharing in a CMS/WCM World (273 KB)
    The Content Editors at your company have created GREAT content! Now how do you share it? In this Free white paper learn several methods for using a Content Syndication tool to automatically repurpose content and how Content Sharing can generate business value.

    Sitecore and Social Media - An Interactive Web Content Management Platform Sitecore and Social Media - An Interactive Web Content Management Platform (898 KB)
    Social Media has revolutionized how people interact with business. In this white paper Oshyn’s Lead Sitecore Developer, Prasanth Nittala, discusses key points from the perspectives of marketing and Web development that make Sitecore a compelling choice for engaging in Social Media via your website. This Sitecore white paper draws from Oshyn’s expertise as a certified Sitecore partner, helping organizations understand the distinct capabilities offered by Sitecore CMS.

    The Business Case for Leveraging Open Text Web Solutions Delivery Manager The Business Case for Leveraging Open Text Web Solutions Delivery Manager (451 KB)
    This free white paper explores the evolving needs of small and medium size businesses and explains how the Open Text Web Solutions Delivery Manager (formerly RedDot LiveServer) can help businesses build their brand, reputation, and client base. This white paper examines strategies, key points and tips to leverage the features available in Open Text Web Solutions (RedDot CMS) to achieve an impactful user experience and to maximize visitor engagement through a reliable and powerful implementation.

    Open Text Best Practices: Part One Open Text Best Practices: Part One (763 KB)
    Authored by Oshyn Senior Consultant, Adaeze Okorie, this free CMS white paper draws from Oshyn’s vast experience as an Open Text Certified Partner, in helping organizations define strategies to meet business goals while implementing Open Text Web Solutions (RedDot CMS). Specifically in this free white paper Adaeze Okorie discusses strategies, key points and tips to leverage the features available in Open Text Web Solutions (RedDot CMS) to achieve an effective, reliable and robust implementation.

    Improving the ROI of Business Software: Service Oriented Architecture from a Business Perspective Improving the ROI of Business Software: Service Oriented Architecture from a Business Perspective (398 KB)
    Software selection and technology decision making should no longer be left to the IT department alone. By gaining an understanding of Service-Oriented Architecture, business people outside of the IT department will be better positioned to maximize the ROI of the company's technology platforms. Download this free white paper to learn more.

    Getting Over Social Media Marketing Paralysis for B2B Getting Over Social Media Marketing Paralysis for B2B (2254 KB)
    Many companies are well aware that Social Media has become critically important to engaging audiences and promoting online "presence" while some wonder how to approach their C-level executives and prove that it is not all hype. With so many ways to engage in Social Media, how can they get buy-in and begin execution with so many different venues and tools available? Staying on the sidelines and becoming a latecomer might make it more difficult to create a convincing "social" presence. Put the ove

    Performance Tuning Open Text Web Solutions Management Server and Delivery Server Performance Tuning Open Text Web Solutions Management Server and Delivery Server (235 KB)
    If you've made an investment in Open Text Web Solutions (formerly RedDot) Web Content Management products, you’ve undoubtedly experienced performance issues. While every CMS requires tuning, Open Text Web Solutions - RedDot is especially susceptible to mis-configuration and poor performance as the out-of-the-box installation comes untuned and ready for Development Environments only. In this FREE white paper we share performance tuning expertise as an Open Text Certified Partner that has optimize

    The Business Case for Leveraging Open Text Web Solutions Within Higher Education The Business Case for Leveraging Open Text Web Solutions Within Higher Education (430 KB)
    Academic institutions have a long reputation for being slower to adopt new technologies for their audiences. However, many schools are taking serious steps in improving the online experience they are providing. This white paper explores the unique needs of the higher education market, applying new tools & trends and specifically how the Open Text Web Solutions’ Delivery Manager (formerly known as RedDot LiveServer) can be leveraged to achieve those goals.

    SEO Best Practices within a Content Management System SEO Best Practices within a Content Management System (712 KB)
    In this free white paper, we share Search Engine Optimization (SEO) tips and best practices to follow when implementing a Content Management System (CMS). Certain features and functionality will help your content editors make website changes faster while minimizing the risk of human error. Download this free white paper to learn strategies to improve search engine rankings.

    Best Practices for Sitecore CMS Best Practices for Sitecore CMS (1121 KB)
    Sitecore CMS is an extensive Web Content Management (WCM) platform for the mid-market. It offers reduced IT expenditures, a streamlined content lifecycle, and a return of content control to the subject matter experts. The newest incarnation of Sitecore CMS version 6.0 is a mature product that incorporates standard social media components such as wikis, blogs, RSS syndication and “e-mail a friend” features.

    Optimizing SEO in your CMS (WCM) Optimizing SEO in your CMS (WCM) (3108 KB)
    Oshyn's Christian Burne spoke in depth about SEO in CMS at the Gilbane San Francisco Conference on June 3rd, 2009. Christian discussed the pressues of keyword competition and how the CMS can add tremendous power to climbing Google SERPs and other search engine rankings. The presentation was later part of a featured article on CMSWire. We've made the presentation available in PDF format. Download now to learn more about strategies for using your CMS to optimize SEO.

    The Best CMS for You: Tips on How to Select Your Next CMS The Best CMS for You: Tips on How to Select Your Next CMS (909 KB)
    As websites continue to grow in size, features and functionality, the visitors to these websites are also becoming more demanding and have higher expectations than ever before. Companies who committed valuable time and resources to web strategies just five years ago are finding they must re-evaluate and explore new options as their content, features and online offerings must keep pace with the constant and rapid movement in the digital marketplace. For many of these companies, there is a strong.

    Oshyn Sample Voluntary Product Accessibility Template (VPAT) Oshyn Sample Voluntary Product Accessibility Template (VPAT) (741 KB)
    Section 508 requires that when federal government and agencies procure, develop, and maintain or use electronic and information technology (EIT), they must ensure that it is accessible and in compliance with Section 508 standards developed by the Architectural and Transportation Barriers Compliance Board (Access Board). Oshyn understands these requirements and has delivered reports like these countless times.

    G SEO Best Practices Guide G SEO Best Practices Guide (349 KB)

    Sitecore CMS Implementation Best Practices Sitecore CMS Implementation Best Practices (481 KB)

    Twitter Facebook LinkedIn Featured in Alltop
    Oshyn, Inc.17785 Center Court Drive N Cerritos, CA 90703    1.888.483.1770 newbusiness@oshyn.com
    2013 Copyright Oshyn. All rights reserved.
    • View Mobile Version
    • Terms of Use
    • Privacy Policy
    • Contact Us
    x
    • Contact Us Oshyn 1.888.483.1770
      Have Oshyn Call Me Have Oshyn call you
      Request Further Information Request further information

      Submit an RFP Submit an RFP