XL Release - System Administration Manual

    This manual describes how to install, configure and upgrade the XL Release server.

    Installing XL Release

    This section contains information on the installation of the XL Release server.

    Prerequisites

    Server Requirements

    To install the XL Release server, the following prerequisites must be met:

    • Operating system: Windows or Unix-family operating system running Java 7.
    • Java Runtime Environment: JDK 1.7 (Oracle or IBM)
    • RAM: At least 2GB of RAM available for XL Release.
    • Harddisk space: At least 2GB of harddisk space to store the XL Release repository. This depends on your usage of XL Release.

    Depending on the environment, the following may also be required:

    • Database: XL Release's repository may be stored in a database. For more information see section Configuring the Repository.
    • LDAP: To enable group-based security, an LDAP x.509 compliant registry is needed. For more information see section Configuring LDAP Security.

    Client Requirements

    GUI Clients

    To use the XL Release GUI, you must meet the following requirements:

    • Web browser: The following web browsers are supported:
      • IE 8.0 or up
      • Firefox
      • Chrome
      • Safari

    Installation Procedure

    Note: see The Upgrade Process for instructions on how to upgrade XL Release from a previous version.

    Follow these steps to install the XL Release server application:

    1. Login to the server where the XL Release Server will be installed. It is recommended to install XL Release Server as a non-root user, e.g. xl-release.
    2. Create an installation directory, e.g. /opt/xebialabs/xl-release.
    3. Copy the XL Release Server archive to the directory.
    4. Extract the archive into the directory.

    XL Release Server Directory Structure

    Once the XL Release installation file is extracted, the following directory structure exists in the installation directory (in the remainder of the document this directory will be referred to as XL_RELEASE_SERVER_HOME_):

    • bin: contains the Server binaries
    • conf: contains Server configuration files
    • ext: contains Server Java extensions.
    • hotfix: contains hotfixes that fix issues with the Server software
    • lib: contains libraries that the Server needs
    • log: contains Server log files

    Installing the license

    XL Release needs a valid license to operate. A license file should be provided to you by your XebiaLabs representative. To activate the license, save the xl-release-license.lic file in the XL_RELEASE_SERVER_HOME/conf directory.

    Running the Server Setup Wizard

    Run the XL Release Setup Wizard to start the XL Release server and prepare it for use. The command server.sh -setup starts the wizard. If you want to stop the Setup Wizard at any time, enter exitsetup. All changes to the configuration will be discarded.

    The Setup Wizard displays the following welcome message:

    Welcome to the XL Release setup.
    You can always exit by typing 'exitsetup'.
    To re-run this setup and make changes to the XL Release server configuration
    you can run server.cmd -setup on Windows or server.sh -setup on Unix.
    
    Do you want to use the simple setup?
    Default values are used for all properties. To make changes to the default
    properties, please answer no.
    Options are yes or no.
    [yes]:
    

    Answer yes (or press Enter) to use the simple setup. Simple setup makes it easy to quickly get started with XL Release and to use the product's default configuration. See Simple Setup for more information.

    Answer no to use the manual setup. Manual setup provides explicit control over all XL Release settings. See Manual Setup for more information.

    Note: if you installed XL Release in the same location before, the Setup Wizard will ask you whether you want to edit the existing configuration or create a new one. Answer yes (or press Enter) to edit the existing configuration. The Setup Wizard will load all settings from the existing configuration and allow you to choose simple or manual setup. Answer no to start over with an empty configuration.

    Simple Setup

    Using simple setup, the Setup Wizard will assume default values for all configuration parameters. Specifically, the following defaults will be used:

    • The server will run with security enabled.
    • The server will not use secure communication between the XL Release GUI and the XL Release server.
    • The server will listen on XL Release's standard HTTP port (5516).
    • The server will use '/' as the context root.
    • The server will use a minimum of 3 and a maximum of 24 threads.
    • Applications can be imported from the importablePackages directory.

    First, the Setup Wizard will ask you to provide a password for the built-in 'admin' user.

    Please enter the admin password you wish to use for Deployit Server
    New password:
    Re-type password:
    

    The admin user has by definition all permissions (like 'root' on a unix operating system). The admin user is also used to connect to the JCR repository. If you connect to an existing repository, make sure you enter the password that has been used before to connect to the repository, otherwise the XL Release server will not be able to connect. To change the admin password of an initialized repository, use the method described below in Changing the Admin Password.

    If you give an empty password (hitting enter twice), the default password 'admin' will be used.

    Then, the Setup Wizard will ask:

    Do you want XL Release to initialize the JCR repository?
    Options are yes or no.
    [yes]:
    

    Answer yes (or press Enter) if you want the XL Release repository to be recreated. The Setup Wizard must have write access to the repository directory. Answer no to leave the repository intact. This option is useful if you already have an existing repository that you want to reuse.

    If you answer yes, the Setup Wizard will ask the following questions to help you configure your repository:

    The password encryption key protects the passwords stored in the repository.
    Do you want to generate a new password encryption key?
    Options are yes or no.
    [yes]:
    

    XL Release ships with a default encryption key. By answering no, you agree to use either the XL Release-provided key or any key you previously generated. Answer yes to generate a new key. When you do this, you have the option of locking the keystore with a password as well:

    The password encryption key is optionally secured by a password.
    Please enter the password you wish to use. (Use an empty password to avoid a password prompt when starting XL Release.)
    New password:
    Re-type password:
    

    If you want to secure the keystore with a password, enter the password here. You will need to provide this password to XL Release when it starts, either interactively via a prompt or via a command line parameter. If you don't want to use a password for the keystore, press enter.

    See Finishing the Setup Wizard for completing the setup process.

    Warning: if you choose to recreate the XL Release repository and you have installed XL Release in the same location before, any information stored in the repository will be lost.

    Manual Setup

    The manual setup procedure contains the following steps:

    Setting the admin password

    First, the Setup Wizard will ask you to provide a password for the built-in 'admin' user.

    Please enter the admin password you wish to use for Deployit Server
    New password:
    Re-type password:
    

    The admin user has by definition all permissions (like 'root' on a unix operating system). The admin user is also used to connect to the JCR repository. If you connect to an existing repository, make sure you enter the password that has been used before to connect to the repository, otherwise the XL Release server will not be able to connect. To change the admin password of an initialized repository, use the method described below in Changing the Admin Password.

    Secure Communication Configuration

    The Setup Wizard will show the following message:

    Would you like to enable SSL?
    Options are yes or no.
    [yes]:
    

    Answer no to use regular unsecured communication between the GUI and the server. Continue with the Http configuration section.

    Answer yes (or press Enter) if you want to use a secure connection from the GUI to the server.

    If you answer yes, the Setup Wizard will ask the following question to help you configure secure communication:

    Would you like XL Release to generate a keystore with a self-signed
    certificate for you?
    N.B.: Self-signed certificates do not work correctly with some versions
    of the Flash Player and some browsers!
    Options are yes or no.
    [yes]:
    

    Answer yes (or press Enter) if you want the Setup Wizard to generate a digital certificate automatically. The digital certificate is required to secure communication and is normally signed by a Certificate Authority (CA). The Setup Wizard can generate a self-signed certificate if there is no official certificate available. Beware that using a self-signed certificate may trigger security warnings in some Flash players and browsers. Continue with the Http configuration section.

    Answer no if you want to use your own keystore. XL Release uses the built-in Jetty webserver to communicate with the GUI. Jetty requires a certificate with the name jetty to be present in the keystore.

    The Setup Wizard prompts you for the following keystore information:

    What is the path to the keystore?
    []:
    
    What is the password to the keystore?
    []:
    
    What is the password to the key in the keystore?
    []:
    

    Enter the filesystem location of the keystore (for example, mykeystore.jks), the password to unlock the keystore and the password for the Jetty certificate in the keystore.

    Http Configuration

    The Setup Wizard shows the following questions:

    What http bind address would you like the server to listen on?
    [localhost]:
    
    What http port number would you like the server to listen on?
    [5516]:
    
    Enter the web context root where XL Release will run
    [/]:
    

    Enter the host name, port number and context root that the XL Release server listens on for connections.

    From this information, XL Release will derive the URL it is accessible at. This URL is used in the emails sent out by the XL Release server. In the next question, you may override this value, for example is XL Release runs behind a proxy server and needs to be accessed using a different URL

    Enter the public URL to access XL Release
    [http://xlrelease-server:5516/]:
    

    Thread Configuration

    The Setup Wizard shows the following questions:

    Enter the minimum number of threads the HTTP server should use (recommended:
        3 per client, so 3 for single user usage)
    [3]:
    

    Enter the minimum number of threads that the XL Release server uses to handle incoming connections. The recommended minimum number of threads is 3 per XL Release application client.

    Enter the maximum number of threads the HTTP server should use (recommended :
        3 per client, so 24 for 8 concurrent users)
    [24]:
    

    Enter the maximum number of threads that the XL Release server uses to handle incoming connections. The recommended maximum number of threads is 3 per XL Release application client.

    Repository Configuration

    The Setup Wizard shows the following questions:

    Where would you like XL Release to store the JCR repository?
    [repository]:
    

    Enter the filesystem path to a directory where XL Release will create the repository. If the directory does not exist, the Setup Wizard will create it.

    Do you want XL Release to initialize the JCR repository?
    Options are yes or no.
    [yes]:
    

    Answer no to leave the repository intact.

    Answer yes (or press Enter) if you want the XL Release repository to be recreated. The Setup Wizard must have write access to the repository directory. The Setup Wizard will ask the following questions to help you configure your repository:

    The password encryption key protects the passwords stored in the repository.
    Do you want to generate a new password encryption key?
    Options are yes or no.
    [yes]:
    

    XL Release ships with a default encryption key that matches the encryption key used in earlier versions of XL Release. By answering no, you agree to use either the XL Release-provided key or any key you previously generated. Answer yes to generate a new key. When you do this, you have the option of locking the keystore with a password as well:

    The password encryption key is optionally secured by a password.
    Please enter the password you wish to use. (Use an empty password to avoid a password prompt when starting XL Release.)
    New password:
    Re-type password:
    

    If you want to secure the keystore with a password, enter the password here. You will need to provide this password to XL Release when it starts, either interactively via a prompt or via a command line parameter. If you don't want to use a password for the keystore, press enter.

    Warning: if you choose to recreate the XL Release repository and you have installed XL Release in the same location before, any information stored in the repository will be lost.

    Importable Packages Configuration

    The Setup Wizard shows the following question:

    Where would you like XL Release to import packages from?
    [importablePackages]:
    

    Enter the filesystem path to a directory from which XL Release will import packages. The Setup Wizard assumes that this directory exists once the XL Release server starts and will not create it.

    Finishing the Setup Process

    Once you have completed configuration of the setup process, the Setup Wizard displays an overview of all selected options. The following text is an example:

    Do you agree with the following settings for XL Release and would you like
        to save them?
    Changes will be saved in xl-release-server.conf
        SSL will be disabled
        HTTP bind address is localhost
        HTTP port is 5516
        HTTP server will use a minimum of 3 and a maximum of 24 threads
        JCR repository home is at repository
        JCR repository will be initialized.
        Task recovery file will deleted
        Application import location is importablePackages
    [yes]:
    

    Answer yes (or press Enter) to store the configuration settings and end the Setup Wizard. If you selected the option to initialize the repository, this will be done now.

    Answer no to abort the Setup Wizard.

    If the Setup Wizard is successfully completed, it will display the following message:

    You can now start your XL Release server by executing the command server.cmd
        on Windows or server.sh on Unix.
    Note: If your XL Release server is running please restart it.
    Finished setup.
    

    Changing the encryption key password

    The passwords in the repository are encrypted with a secret key. This password encryption key is stored in a keystore file called conf/repository-keystore.jceks. This keystore file is optionally protected with a password. If a password is set, you need to enter the password when the XL Release Server starts up.

    To change the keystore password, you can use the keytool utility that is part of the Java JDK distribution. Usage:

    keytool -storepasswd -keystore conf/repository-keystore.jceks -storetype jceks
    

    There is one restriction however: keytool refuses to read or set passwords that are shorter than 6 characters. If you want to change a keystore with an empty or short password, download the third-party application KeyStore Explorer.

    Note: The repository-keystore.jceks is one of the two keystore concepts in XL Release. This keystore only contains the key used for encryption of passwords in the repository. If you use HTTPS, XL Release will use a second keystore file to store the (self-signed) certificate.

    High Availability Setup

    XL Release can be configured to ensure maximum uptime of the application. In such a high availability setup, two instances of XL Release are running in an active/passive configuration. At any one time, only one XL Release instance is active but as soon as a failure is detected, the passive XL Release instance is activated and the failed instance is taken down for repair.

    To configure XL Release for high availability, the XL Release repository must be used in clustering mode. This means that each XL Release node writes changes to a shared journal in addition to applying the change to it's own repository. See the section Configuring the Repository below for more information on setting up clustering.

    Configuring XL Release

    This section contains information on the configuration of the XL Release server.

    Configuring LDAP Security

    XL Release can be configured to use an LDAP repository to authenticate users and to retrieve role (group) membership. The LDAP users and groups are used as principals in XL Release and can be mapped to XL Release roles. Role membership and rights assigned to roles are always stored in the JCR repository.

    XL Release treats the LDAP repository as read-only. This means that XL Release will use the information from the LDAP repository, but can not make changes to that information.

    To configure XL Release to use an LDAP repository, the security configuration file xl-release-security.xml must be modified. This is an example of a working xl-release-security.xml file that uses LDAP:

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:security="http://www.springframework.org/schema/security"
        xsi:schemaLocation="
            http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
            http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd
        ">
    
        <bean id="ldapServer" class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">
            <constructor-arg value="LDAP_SERVER_URL" />
            <property name="userDn" value="MANAGER_DN" />
            <property name="password" value="MANAGER_PASSWORD" />
            <property name="baseEnvironmentProperties">
                <map>
                    <entry key="java.naming.referral">
                        <value>ignore</value>
                    </entry>
                </map>
            </property>
        </bean>
    
        <bean id="ldapProvider" class="org.springframework.security.ldap.authentication.LdapAuthenticationProvider">
            <constructor-arg>
                <bean class="org.springframework.security.ldap.authentication.BindAuthenticator">
                    <constructor-arg ref="ldapServer" />
                    <property name="userSearch">
                        <bean id="userSearch" class="org.springframework.security.ldap.search.FilterBasedLdapUserSearch">
                            <constructor-arg index="0" value="USER_SEARCH_BASE" />
                            <constructor-arg index="1" value="USER_SEARCH_FILTER" />
                            <constructor-arg index="2" ref="ldapServer" />
                        </bean>
                    </property>
                </bean>
            </constructor-arg>
            <constructor-arg>
                <bean class="org.springframework.security.ldap.userdetails.DefaultLdapAuthoritiesPopulator">
                    <constructor-arg ref="ldapServer" />
                    <constructor-arg value="GROUP_SEARCH_BASE" />
                    <property name="groupSearchFilter" value="GROUP_SEARCH_FILTER" />
                    <property name="rolePrefix" value="" />
                    <property name="searchSubtree" value="true" />
                    <property name="convertToUpperCase" value="false" />
                </bean>
            </constructor-arg>
        </bean>
    
        <bean id="rememberMeAuthenticationProvider" class="com.xebialabs.deployit.security.authentication.RememberMeAuthenticationProvider"/>
    
        <bean id="jcrAuthenticationProvider" class="com.xebialabs.deployit.security.authentication.JcrAuthenticationProvider"/>
    
        <security:authentication-manager alias="authenticationManager">
            <security:authentication-provider ref="rememberMeAuthenticationProvider" />
            <security:authentication-provider ref="ldapProvider" />
            <security:authentication-provider ref="jcrAuthenticationProvider"/>
        </security:authentication-manager>
    
    </beans>
    

    The XML fragment above contains placeholders for the following values:

    • LDAP_SERVER_URL: The LDAP url to connect to. (example: "ldap://localhost:389/")
    • MANAGER_DN: The principal to perform the initial bind to the LDAP server. (example: "cn=admin,dc=example,dc=com")
    • MANAGER_PASSWORD: The credentials to perform the initial bind to the LDAP server. (example: "secret")
    • USER_SEARCH_FILTER: The LDAP filter to determine the LDAP dn for the user that's logging in, {0} will be replaced with the username that's logging in (example: "(&(uid={0})(objectClass=inetOrgPerson))")
    • USER_SEARCH_BASE: The LDAP filter that is the base for searching for users (example: "dc=example,dc=com")
    • GROUP_SEARCH_FILTER: The LDAP filter to determine the group memberships for the user, {0} will be replaced with the DN of the user (example: "(memberUid={0})")
    • GROUP_SEARCH_BASE: The LDAP filter that is the base for searching for groups (example: "ou=groups,dc=example,dc=com")

    XL Release server will need to be restarted after you have configured LDAP access.

    Assigning a default role to all authenticated users

    When your Ldap is not setup to contain a group that all XL Release users are assigned to, or you want to utilize such a group in the default JcrAuthenticationProvider, it is possible to configure this in your xl-release-security.xml file. The following snippet will setup an 'everyone' group (The name is arbitrary, choose a different one if you wish) that is assigned to each user who is authenticated. You could then link this group up to a XL Release role, and assign 'login' privileges to it for instance.

    <beans>
        ...
    
        <bean id="ldapProvider" class="org.springframework.security.ldap.authentication.LdapAuthenticationProvider">
            <constructor-arg>
                ...
            </constructor-arg>
    
            <property name="authoritiesMapper" ref="additionalAuthoritiesMapper" />
        </bean>
    
        <bean id="jcrAuthenticationProvider" class="com.xebialabs.deployit.security.authentication.JcrAuthenticationProvider">
            <property name="authoritiesMapper" ref="additionalAuthoritiesMapper" />
        </bean>
    
        <bean id="additionalAuthoritiesMapper" class="com.xebialabs.deployit.security.AdditionalAuthoritiesMapper">
            <property name="additionalAuthorities">
                <list>
                    <value>everyone</value>
                </list>
            </property>
        </bean>
    
    </beans>
    

    Configuring the Repository

    XL Release uses a repository to store all of its data. XL Release can use either the filesystem or a database to maintain the repository.

    Out of the box, XL Release uses the filesystem to store all data in the repository.

    Using a Database

    XL Release can also use a database to store its repository. The built-in Jackrabbit JCR implementation must be configured to make this possible.

    There are several configuration options when setting up a database repository:

    • Store only binary artifacts in a database. This requires configuring the DataStore property.
    • Store only CIs and CI history in a database. This requires configuring the PersistenceManager and FileSystem properties.
    • Store all data (binary artifacts and CIs and CI history) in a database. This requires configuring the DataStore, PersistenceManager and FileSystem must be configured.

    Here are some examples of configuring XL Release to use a database for various database vendors. The XML snippets below must be put into the conf/jackrabbit-repository.xml file.

    Note: XL Release must initialize the repository before it can be used. Run XL Release's setup wizard and initialize the repository after making any changes to the repository configuration.

    For more information about using a database with Jackrabbit, see it's PersistenceManager FAQ and DataStore FAQ.

    Using XL Release with MySQL

    <DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
        <param name="driver" value="com.mysql.jdbc.Driver"/>
        <param name="url" value="jdbc:mysql://localhost:3306/xlrelease"/>
        <param name="databaseType" value="mysql"/>
        <param name="user" value="xlrelease" />
        <param name="password" value="XL Release" />
    </DataStore>
    
    <Workspace name="${wsp.name}">
        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
            <param name="driver" value="com.mysql.jdbc.Driver"/>
            <param name="url" value="jdbc:mysql://localhost:3306/xlrelease"/>
            <param name="schemaObjectPrefix" value="${wsp.name}_" />
            <param name="schema" value="mysql" />
            <param name="user" value="xlrelease" />
            <param name="password" value="XL Release" />
        </FileSystem>
    
        <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager">
            <param name="driver" value="com.mysql.jdbc.Driver"/>
            <param name="url" value="jdbc:mysql://localhost:3306/xlrelease" />
            <param name="user" value="xlrelease" />
            <param name="password" value="XL Release" />
            <param name="schemaObjectPrefix" value="${wsp.name}_" />
        </PersistenceManager>
    
        <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
            <param name="path" value="${wsp.home}/index" />
            <param name="supportHighlighting" value="true" />
        </SearchIndex>
    
    </Workspace>
    
    <Versioning rootPath="${rep.home}/version">
        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
            <param name="driver" value="com.mysql.jdbc.Driver"/>
            <param name="url" value="jdbc:mysql://localhost:3306/xlrelease"/>
            <param name="schemaObjectPrefix" value="version_" />
            <param name="schema" value="mysql" />
            <param name="user" value="xlrelease" />
            <param name="password" value="XL Release" />
        </FileSystem>
    
        <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager">
            <param name="url" value="jdbc:mysql://localhost:3306/xlrelease" />
            <param name="user" value="xlrelease" />
            <param name="password" value="XL Release" />
            <param name="schemaObjectPrefix" value="version_" />
        </PersistenceManager>
    </Versioning>
    

    Note: The MySQL database is not suited for storage of large binary objects, see the MySQL bug tracker.

    Using XL Release with DB2

    <DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
            <param name="driver" value="com.ibm.db2.jcc.DB2Driver"/>
            <param name="url" value="jdbc:db2://localhost:50002/xlrelease"/>
            <param name="databaseType" value="db2"/>
            <param name="user" value="xlrelease" />
            <param name="password" value="XL Release" />
    </DataStore>
    
    <Workspace name="${wsp.name}">
        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
                <param name="driver" value="com.ibm.db2.jcc.DB2Driver"/>
                <param name="url" value="jdbc:db2://localhost:50002/xlrelease"/>
                <param name="schemaObjectPrefix" value="${wsp.name}_" />
                <param name="schema" value="db2" />
                <param name="user" value="xlrelease" />
                <param name="password" value="XL Release" />
        </FileSystem>
    
         <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager">
                <param name="driver" value="com.ibm.db2.jcc.DB2Driver"/>
                <param name="url" value="jdbc:db2://localhost:50002/xlrelease" />
                <param name="user" value="xlrelease" />
                <param name="password" value="XL Release" />
                <param name="databaseType" value="db2" />
                <param name="schemaObjectPrefix" value="${wsp.name}_" />
             </PersistenceManager>
    
        <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
            <param name="path" value="${wsp.home}/index" />
            <param name="supportHighlighting" value="true" />
        </SearchIndex>
    </Workspace>
    
    <Versioning rootPath="${rep.home}/version">
        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
            <param name="driver" value="com.ibm.db2.jcc.DB2Driver"/>
            <param name="url" value="jdbc:db2://localhost:50002/xlrelease"/>
            <param name="schemaObjectPrefix" value="version_" />
            <param name="schema" value="db2" />
            <param name="user" value="xlrelease" />
            <param name="password" value="XL Release" />
        </FileSystem>
        <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager">
            <param name="driver" value="com.ibm.db2.jcc.DB2Driver"/>
            <param name="url" value="jdbc:db2://localhost:50002/xlrelease" />
            <param name="user" value="xlrelease" />
            <param name="password" value="XL Release" />
            <param name="databaseType" value="db2" />
            <param name="schemaObjectPrefix" value="version_" />
        </PersistenceManager>
    </Versioning>
    

    Using XL Release with Oracle

    <DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
        <param name="driver" value="oracle.jdbc.OracleDriver"/>
        <param name="url" value="jdbc:oracle:thin:@localhost:1521:orcl"/>
        <param name="databaseType" value="oracle"/>
        <param name="user" value="xlrelease" />
        <param name="password" value="XL Release" />
    </DataStore>
    
    <Workspace name="${wsp.name}">
        <FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
            <param name="driver" value="oracle.jdbc.OracleDriver"/>
            <param name="url" value="jdbc:oracle:thin:@localhost:1521:orcl"/>
            <param name="schemaObjectPrefix" value="${wsp.name}_"/>
            <param name="schema" value="oracle" />
            <param name="user" value="xlrelease" />
            <param name="password" value="XL Release" />
        </FileSystem>
    
        <PersistenceManager
            class="org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager">
            <param name="driver" value="oracle.jdbc.driver.OracleDriver"/>
            <param name="url" value="jdbc:oracle:thin:@localhost:1521:orcl"/>
            <param name="user" value="xlrelease" />
            <param name="password" value="XL Release" />
            <param name="databaseType" value="oracle" />
            <param name="schemaObjectPrefix" value="${wsp.name}_" />
        </PersistenceManager>
    
        <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
            <param name="path" value="${wsp.home}/index" />
            <param name="supportHighlighting" value="true" />
        </SearchIndex>
    </Workspace>
    
    <Versioning rootPath="${rep.home}/version">
        <FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
            <param name="driver" value="oracle.jdbc.OracleDriver"/>
            <param name="url" value="jdbc:oracle:thin:@localhost:1521:orcl"/>
            <param name="schemaObjectPrefix" value="version_"/>
            <param name="schema" value="oracle" />
            <param name="user" value="xlrelease" />
            <param name="password" value="XL Release" />
        </FileSystem>
    
        <PersistenceManager
            class="org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager">
            <param name="driver" value="oracle.jdbc.driver.OracleDriver"/>
            <param name="url" value="jdbc:oracle:thin:@localhost:1521:orcl"/>
            <param name="user" value="xlrelease" />
            <param name="password" value="XL Release" />
            <param name="databaseType" value="oracle" />
            <param name="schemaObjectPrefix" value="version_" />
        </PersistenceManager>
    </Versioning>
    

    If you use the TNSNames Alias syntax to connect to Oracle, you may need to inform the driver where to find the TNSNAMES file. See the Oracle documentation for more details.

    Clustering

    It is also possible to run XL Release server with its repository shared with other XL Release server instances. For this to happen, the jackrabbit JCR must be configured to run in a clustered mode. This needs a cluster configuration to be present in the jackrabbit-repository.xml file.

    File-based repository

    Add the following snippet to the jackrabbit-repository.xml to enable clustering:

    <Cluster id="node1">
      <Journal class="org.apache.jackrabbit.core.journal.FileJournal">
        <param name="revision" value="${rep.home}/revision.log" />
        <param name="directory" value="/nfs/myserver/myjournal" />
      </Journal>
    </Cluster>
    

    In the above example, the property directory refers to the shared journal. Both XL Release instances must be able to write to the same journal.

    Database repository

    The following XML snippet shows a sample clustering configuration for a JCR using Oracle as its repository.

    <Cluster id="101" syncDelay="2000">
        <Journal class="org.apache.jackrabbit.core.journal.OracleDatabaseJournal">
            <param name="revision" value="${rep.home}/revision" />
            <param name="driver" value="oracle.jdbc.driver.OracleDriver" />
            <param name="url" value="jdbc:oracle:thin:@localhost:1521:orcl" />
            <param name="user" value="xlrelease" />
            <param name="password" value="XL Release" />
            <param name="schemaObjectPrefix" value="JOURNAL_" />
        </Journal>
    </Cluster>
    

    Note that each jackrabbit cluster node should have a unique value for id. For more information on JCR clustering, or ways to configure clustering using other databases, please refer to the jackrabbit clustering documentation.

    Logging

    Configuring Logging

    Out of the box, XL Release server writes informational, warning and error log messages to standard output as well as log/xl-release.log when running. In addition, XL Release writes an audit trail to the file log/audit.log. It is possible to change XL Releases logging behavior (for instance to write log output to a file or to log output from a specific source).

    XL Release uses the Logback logging framework for its logging. To change the behavior, edit the file logback.xml in the conf directory of the XL Release server installation directory.

    The following is an example logback.xml file:

    <configuration>
        <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
            <!-- encoders are assigned the type
                 ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
            <encoder>
                  <pattern>
                    %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
                </pattern>
            </encoder>
        </appender>
    
        <!-- Create a file appender that writes log messages to a file -->
        <appender name="FILE" class="ch.qos.logback.core.FileAppender">
            <layout class="ch.qos.logback.classic.PatternLayout">
                <pattern>%-4relative [%thread] %-5level %class - %msg%n</pattern>
            </layout>
               <File>log/my.log</File>
        </appender>
    
        <!-- Set logging of classes in com.xebialabs to INFO level -->
        <logger name="com.xebialabs" level="info"/>
    
        <!-- Set logging of class HttpClient to DEBUG level -->
        <logger name="HttpClient" level="debug"/>
    
        <!-- Set the logging of all other classes to INFO -->
        <root level="info">
            <!-- Write logging to STDOUT and FILE appenders -->
            <appender-ref ref="STDOUT" />
            <appender-ref ref="FILE" />
        </root>
    
    </configuration>
    

    For more information see the Logback website.

    Audit log

    XL Release can write an audit log for each human-initiated event on the server. For each event, the following information is recorded:

    • the user making the request
    • the event timestamp
    • the component producing the event
    • an informational message describing the event

    For events involving CIs, the CI data submitted as part of the event is logged in XML format.

    These are some of the events that are logged in the audit trail:

    • the system is started or stopped
    • a user logs into or out of the system
    • an application is imported
    • a CI is created, updated, moved or deleted
    • a security role is created, updated or deleted
    • a task (deployment, undeployment, control task or discovery) is started, cancelled or aborted

    By default, the audit log is stored in log/audit.log. The audit log is rolled over daily.

    Starting and Stopping XL Release

    Starting the Server

    Open a terminal window and change to the XL_RELEASE_SERVER_HOME directory. Start the XL Release server with the command:

    bin/server.sh
    

    on Unix and

    bin/server.cmd
    

    on Windows.

    By starting the server with the -h flag, a message is printed that shows the possible options it supports:

        Supported options:
         -help                  : Prints this usage message
         -repository-keystore-password VAL : The password to open the repository keystore file, if not given,
                                  the server will prompt you.
         -reinitialize          : Reinitialize the repository, only useful with -setup
         -setup                 : (Re-)run the setup 
         -setup-defaults VAL    : Use the given file for defaults during setup server.sh arguments...
    

    The command line options are:

    • -repository-keystore-password VAL -- tells XL Release which password to use to access the repository keystore. If not specified and the repository keystore does require a password, XL Release will prompt you for it.
    • -reinitialize -- tells XL Release to reinitialize the repository. Used only in conjunction with -setup. N.B. This flag only works if XL Release is running on the filesystem repository, not when you've configured XL Release to run against a database.
    • -setup -- runs the XL Release Setup Wizard.
    • -setup-defaults VAL -- specifies a file that contains default values for configuration properties set in the Setup Wizard.

    Server Options

    Any options you want to give the XL Release Server when it starts can be specified in the _XLRELEASE_SERVER_OPTS environment variable.

    Starting XL Release in the background

    By running the server.sh or server.cmd command, the XL Release server is started in the foreground. To run the server as a background process, use:

    nohup bin/server.sh &
    

    on Unix or run XL Release as a service on Windows.

    Stopping the Server

    It is possible to stop the XL Release server using a REST API call. The following is an example of a command to generate such a call (replace admin:admin with your own credentials):

    curl -X POST --basic -u admin:admin
        http://admin:admin@localhost:5516/server/shutdown
    

    This requires the external curl command, available for both Unix and Windows. The server can also be shutdown using the CLI.

    Maintaining XL Release

    This section describes how to maintain the XL Release server in your environment.

    Creating Backups

    To create a backup of XL Release, several components may need to be backed up depending on your configuration:

    • Repository.
      • Built-in repository: Create a backup of the built-in JCR repository by backing up the files in the repository directory.
      • Database repository: Create a backup of both the files in the repository directory, as well as the database (using the tools provided by your database vendor).
    • Configuration. Create a backup of the XL Release configuration by backing up the files in the conf directory in the installation directory.

    Note: XL Release must not be running when you are making a backup. Schedule backups outside planned deployment hours to ensure the server is not being used.

    Restoring Backups

    To restore a backup of XL Release, restore one of the following components:

    • JCR repository.
      • Built-in repository: Remove the repository directory and replace it with the backup.
      • Database repository: Remove the repository directory and replace it with the backup. Next, restore a backup of the database using the tools provided by your vendor.
    • Configuration. Remove the conf directory in the XL_RELEASE_SERVER_HOME directory and replace it with the backup.

    Note: XL Release must not be running when you are restoring a backup.

    The upgrade process

    Overall, the upgrade process consists of the following steps:

    • Obtain a new version of the XL Release software from XebiaLabs.
    • Read the new version's release notes so you are aware of the new functionality and possible upgrade considerations.
    • Read the new version's upgrade manual (this document) so you are aware of possible upgrade considerations.
    • Stop the current version of XL Release if it is still running, making sure there are no running tasks active.
    • Create a brand-new installation directory for the new version of XL Release so the existing version is still available in case of problems.
    • Extract the new XL Release software release into the new installation directory.
    • Copy the data from the previous XL Release installation directory into the new installation directory.
    • Start the new version of XL Release.

    See the section Performing the Upgrade below for a detailed explanation of these steps.

    Upgrade notes

    • It is possible to skip XL Release versions when upgrading. XL Release will sequentially apply any upgrades for the intermediate (skipped) versions. Please read the specific upgrade instructions for each of the versions carefully.
    • If a repository upgrade is required, XL Release will detect that it is running against an old repository and will automatically execute an upgrade when it is first started. The server log will contain extensive logging of the repository upgrade process.

    Upgrading the Server

    To upgrade an existing XL Release server installation, do the following:

    1. Create a directory for the new XL Release server installation, including the new XL Release server version number in the directory name.
    2. Extract the server archive in this directory.
    3. Copy the contents of the conf directory from the previous installation into the new installation directory.
    4. Copy the entire repository directory from the previous installation into the new installation directory.
    5. DO NOT copy the contents of the hotfix directory (unless instructed) because hotfixes are version specific.
    6. If you have made any changes to the XL Release server startup scripts (server.sh or server.cmd), manually re-do these changes in the new installation directory.

    This completes upgrading of the XL Release server.