How to Deploy a Wiki

Document ID : KB000049383
Last Modified Date : 14/02/2018
Show Technical Document Details

1.0 Introduction

2.0 How to Deploy a Wiki Web Page
2.1 Configure Machine Templates for Wiki
2.2 Define Applications for Wiki
  2.2.1 Define Apache HTTP Server
  2.2.2 Define PHP
  2.2.3 Define MySQL
  2.2.4 Define MediaWiki Database
  2.2.5 Define MediaWiki Content
2.3 Create Wiki Service Template
2.4 Deploy a Wiki

3.0 Copyright

1.0 Introduction

Product: CA Server Automation

Release: 12.7

OS: All supported Windows Server 2008 and Windows Server 2008 R2

This document describes how a system administrator creates a MediaWiki service template that enables one-click service provisioning for service consumers.

This Knowledge Base Article constitutes a portion of the official CA product documentation for this CA product. This Knowledge Base Article is subject to the following notices, terms and conditions.

2.0 How to Deploy a Wiki Web Page

This example shows how to prepare a template that enables end users to deploy a MediaWiki web page. First, you define application executables and their execution actions. Then you combine these applications in a service template to define their execution order and the machines that are required to host them.

The following process describes a high-level overview of how System Administrators combine applications to create service templates that enable one-click service provisioning for Service Consumers:

Wiki Deployment

  1. Configure Machine Templates for Wiki

    Specify default machine configurations to use in service templates.

  2. Define Applications for Wiki

    Specify executable applications, prerequisites, and the resource and operating system requirements for the applications.

  3. Create Wiki Service Template

    Specify the set of applications, and the machines that are required to host them, as a deployable service template.

  4. Deploy a Wiki

    Deploy an instance of the service to your server environment.

2.1 Configure Machine Templates for Wiki

CA Server Automation enables you to specify VM templates for specified operating systems. These templates can then be automatically applied to machines required during service provisioning.

Follow these steps:

  1. Click Resources, and in the Explore tree, select OnDemand Services.

  2. On the right-hand panel, click the tool icon for the vCenter Server containing the templates that you want to use.

    The Machine Template Configuration panel opens.

  3. Select an operating system from the list, select a Template from the list of available VM templates, and click Set As Default.

    CA Server Automation associates the selected VM template with the specified operating system.

  4. (Optional) Click an operating system group folder to view and manage the list of all VM template settings for that OS family.

  5. Click OK to exit Machine Template Configuration.

2.2 Define Applications for Wiki

The initial step in service provisioning is to define the set of applications available to construct a service template and the actions that are required to execute them.

Follow these steps:

  1. In the Staging directory in the CA Server Automation installation directory, create a folder for each of the following applications:

    • Apache HTTP Server

    • PHP

    • MySQL

    • Wiki Database

    • MediaWiki Content

  2. Copy all the application files to the respective folders.

  3. Define new applications in CA Server Automation. See the following chapters for details.

2.2.1 Define Apache HTTP Server

Apache HTTP Server is the host on which the wiki will be running. You install the web server as a service.

Follow these steps:

  1. Click Resources, and in the Explore tree, right-click OnDemand Services, and select New Application.

    The Define an Application wizard opens in the Application Details panel.

  2. Specify the Name, Version, and Vendor for the application.

  3. Specify the location of the application files.

  4. Click Next.

    The System Requirements panel opens.

  5. Set the following recommended values:

    • Number of CPUs - 1

    • Memory - 512 MB

    • Disk Space - 5 GB

    • Operating System - All Microsoft Windows Server versions

  6. Click Next.

    The Configure Installation Actions panel opens. You will define four installation actions: Disable Windows Firewall, Disable Windows Firewall on Windows 2003, Install Apache Server, and Reboot.

  7. Click + to define the Disable Windows Firewall action.

    1. On the Select Installation Action panel, in the Action field, input the command to execute:
      netsh advfirewall set currentprofile state off      
    2. Click Next.

    3. On the Define Installation Action Options panel, only check the preview and click Finish.

      The action is saved.

  8. Click + to define the Disable Windows Firewall on Windows 2003 action.

    1. On the Select Installation Action panel, in the Action field, input the command to execute:
      netsh advfirewall set opmode disable & if "%errorlevel%"=="1" exit /b 0
    2. Click Next.

    3. On the Define Installation Action Options panel, only check the preview and click Finish.

      The action is saved.

  9. Click + to define the Install Apache Server action.

    1. On the Select Installation Action panel, in the Action field, input the command to execute:
      cmd.exe /c start /w msiexec.exe
    2. Click Next.

    3. On the Define Installation Action Options panel, add the following four options:
      /i %CD%\httpd-2.2.22-win32-x86-openssl-0.9.8t.msi   INSTALLDIR=C:\Apache  SERVERADMIN=admin@localhost.com  SERVERNAME=%LOCALHOST%  AgreeToLicense=1  ALLUSERS=1  RebootYESNo=No   
    4. Check the action preview and click Finish.

      The action is saved.

  10. Click + to define the Reboot action.

    1. On the Select Installation Action panel, in the Action field, input the command to execute:
      cmd.exe /c shutdown -r -t 20 & exit /b 1641
    2. Click Next.

    3. On the Define Installation Action Options panel, only check the preview and click Finish.

      The action is saved.

  11. Click Next, and then Finish.

    The Apache HTTP Server application is saved.

2.2.2 Define PHP

PHP is a scripting language that is used for creating dynamic web pages, such as wiki.

Follow these steps:

  1. Click Resources, and in the Explore tree, right-click OnDemand Services, and select New Application.

    The Define an Application wizard opens in the Application Details panel.

  2. Specify the Name, Version, and Vendor for the application.

  3. Specify the location of the application files (absolute path or relative to the Staging folder).

  4. Specify Apache HTTP Server as a prerequisite for this application.

  5. Click Next.

    The System Requirements panel opens.

  6. Set the following recommended values:

    • Number of CPUs - 1

    • Memory - 512 MB

    • Disk Space - 5 GB

    • Operating System - All Microsoft Windows Server versions

  7. Click Next.

    The Configure Installation Actions panel opens. You will define three installation actions: Install PHP, Stop Apache, and Start Apache.

  8. Click + to define the Install PHP action.

    1. On the Select Installation Action panel, in the Action field, input the command to execute:
      cmd.exe /c start /w msiexec.exe
    2. Enter a description for the action.

    3. Click Next.

    4. On the Define Installation Action Options panel, add the following five options:
      /i %CD%\php-5.3.13-Win32-VC9-x86.msi  APACHEDIR=C:\Apache\conf  /qn  AgreeToLicense=YES  ADDLOCAL=ext_php_mysql,ext_php_mysqli,apache22  
    5. Click Finish.

      The action is saved.

  9. Click + to define the Stop Apache action.

    1. On the Select Installation Action panel, in the Action field, input the command to execute:
      net stop apache2.2
    2. Click Next.

    3. On the Define Installation Action Options panel, only check the preview and click Finish.

      The action is saved.

  10. Click + to define the Start Apache action.

    1. On the Select Installation Action panel, in the Action field, input the command to execute:
      net start apache2.2
    2. On the Define Installation Action Options panel, only check the preview and click Finish.

      The action is saved.

  11. Click Next, and then Finish.

    The PHP application is saved.

2.2.3 Define MySQL

MySQL is the server on which your wiki database will be running.

Follow these steps:

  1. Click Resources, and in the Explore tree, right-click OnDemand Services, and select New Application.

    The Define an Application wizard opens in the Application Details panel.

  2. Specify the Name, Version, and Vendor for the application.

  3. Specify the location of the application files (absolute path or relative to the Staging folder).

  4. Click Next.

    The System Requirements panel opens.

  5. Set the following recommended values:

    • Number of CPUs - 1

    • Memory - 512 MB

    • Disk Space - 5 GB

    • Operating System - All Microsoft Windows Server versions

  6. Click Next.

    The Configure Installation Actions panel opens. You will define three installation actions: Install MySQL, Configure MySQL, and Grant Permissions to Root.

  7. Click + to define the Install MySQL action.

    1. On the Select Installation Action panel, in the Action field, input the command to execute:
      msiexec      
    2. Enter a description for the action.

    3. Click Next.

    4. On the Define Installation Action Options panel, add the following three options:
      /i %CD%\mysql-5.5.25-winx64.msi      /passive      INSTALLDIR=C:\MySQL      
    5. Make the INSTALLDIR option user editable.

    6. Click Finish.

      The action is saved.

  8. Click + to define the Configure MySQL action.

    1. On the Select Installation Action panel, in the Action field, input the command to execute:
      cmd
    2. Enter a description for the action.

    3. Click Next.

    4. On the Define Installation Action Options panel, add the following options:
      /C C:\MySQL\bin\MySQLInstanceConfig.exe -i -q "-lC:\mysql_install_log.txt" "-nMySQL Server 5.5" "-pC:\MySQL" -v5.5 "-tC:\MySQL\my-template.ini" "-cC:\mytest.ini" ServerType=DEVELOPMENT DatabaseType=MIXED ConnectionUsage=DSS Port=3306  ServiceName="MySqlD"   RootPassword=pass  
    5. Make the RootPassword option user editable.

    6. Click Finish.

      The action is saved.

  9. Click + to define the Grant Permissions to Root action.

    1. On the Select Installation Action panel, in the Action field, input the command to execute:
      cmd
    2. Enter a description for the action.

    3. Click Next.

    4. On the Define Installation Action Options panel, add the following options:
      /C C:\MySQL\bin\mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'Root'@'localhost' IDENTIFIED BY 'pass';"  --password=pass  
    5. Make the password option user editable.

    6. Click Finish.

      The action is saved.

  10. Click Next, and then Finish.

    The MySQL application is saved.

2.2.4 Define MediaWiki Database

The MediaWiki database is the place where the content of the wiki web page is stored.

Follow these steps:

  1. Click Resources, and in the Explore tree, right-click OnDemand Services, and select New Application.

    The Define an Application wizard opens in the Application Details panel.

  2. Specify the Name, Version, and Vendor for the application.

  3. Specify the location of the application files (absolute path or relative to the Staging folder).

  4. Specify MySQL as a prerequisite for this application.

  5. Click Next.

    The System Requirements panel opens.

  6. Set the following recommended values:

    • Number of CPUs - 1

    • Memory - 512 MB

    • Disk Space - 5 GB

    • Operating System - All Windows options

  7. Click Next.

    The Configure Installation Actions panel opens. You will define three installation actions: Install Database, Stop MySQL, and Start MySQL.

  8. Click + to define the Install Database action.

    1. On the Select Installation Action panel, in the Action field, input the command to execute:
      cmd /C "C:\MySQL\bin\mysql      
    2. Enter a description for the action.

    3. Click Next.

    4. On the Define Installation Action Options panel, add the following options:
      --user=root     --password=pass     < %CD%\wiki_db.txt > %CD%\output.txt"      
    5. Make the password option user editable.

    6. Click Finish.

      The action is saved.

  9. Click + to define the Stop MySQL action.

    1. On the Select Installation Action panel, in the Action field, input the command to execute:
      net stop MySqlD
    2. On the Define Installation Action Options panel, only check the preview and click Finish.

      The action is saved.

  10. Click + to define the Start MySQL action.

    1. On the Select Installation Action panel, in the Action field, input the command to execute:
      net start MySqlD
    2. On the Define Installation Action Options panel, only check the preview and click Finish.

      The action is saved.

  11. Click Next, and then Finish.

    The MediaWiki Database application is saved.

2.2.5 Define MediaWiki Content

These files are the application files that the wiki needs for running.

Follow these steps:

  1. Click Resources, and in the Explore tree, right-click OnDemand Services, and select New Application.

    The Define an Application wizard opens in the Application Details panel.

  2. Specify the Name, Version, and Vendor for the application.

  3. Specify the location of the application files (absolute or relative path to the Staging folder).

  4. Specify PHP and MediaWiki Database as prerequisites for this application.

  5. Click Next.

    The System Requirements panel opens.

  6. Set the following recommended values:

    • Number of CPUs - 1

    • Memory - 512 MB

    • Disk Space - 5 GB

    • Operating System - All Windows options

  7. Click Next.

    The Configure Installation Actions panel opens. You will define two installation actions: Copy Files and Update DB Server.

  8. Click + to define the Copy Files action.

    1. On the Select Installation Action panel, in the Action field, input the command to execute:
      xcopy
    2. Enter a description for the action.

    3. Click Next.

    4. On the Define Installation Action Options panel, add the following two options:
      %CD%\* C:\Apache\htdocs /S  
    5. Click Finish.

      The action is saved.

  9. Click + to define the Update DB Server action.

    1. On the Select Installation Action panel, select Update File from the Action drop-down list.

    2. Enter a description for the action.

    3. In the File Name field, enter the path to the configuration file: C:\Apache\htdocs\LocalSettings.php

    4. Click Next.

    5. On the Define Installation Action Options panel, add the following five options:
      CONFIG_FILE_ACTION=FILEUPDATE   CONFIG_FILE_NAME=C:\Apache\htdocs\LocalSettings.php    #DB_SERVER#=%DEPENDINGHOST%   #BLOG_TITLE#=<Wiki Title>   #DBPASSWORD#=pass    
    6. Make the #DB_SERVER#, BLOG_TITLE, and #DBPASSWORD# options user editable.

    7. Click Finish.

      The action is saved.

  10. Click Next, and then Finish.

    The MediaWiki Content application is saved.

2.3 Create Wiki Service Template

Service provisioning is the creation of a working instance of a service that is based on a service template. In this procedure, you create a service template for Wiki deployment that consists of the applications that you have already defined, and the number of machines that are required to host the service.

Follow these steps:

  1. Click Resources, and in the Explore tree, right-click OnDemand Services, and select New Service Template.

    The Create Service Template panel opens.

  2. Input a name and description for the service template and select the number of machines that are required to host the service. The number of machines depends on the expected load of the wiki web page and the amount of content that you intend to store on it. In this example, we install all application on one server.

  3. Click Details to display the configuration of the machine. Leave all the values set to Auto. With this setting, the supported OS types of all applications in the template are checked during provisioning, and the most convenient VMware template is automatically selected.

  4. Specify a Service Information File. This HTML file is displayed to the end users at the end of the provisioning process informing them how to access the service.

  5. Click + (New) to add the MediaWiki Content application to the service template.

    The Service Template Application Configuration Wizard opens in the Select Applications panel.

  6. Select MediaWiki Content from the list of available defined applications and click Next.

    The Installation Actions panel opens. Do not make any changes here.

  7. Click Next.

    The Confirm Application Configurations panel opens.

  8. Click Finish.

    The Create Service Template panel updates with the details of the application and machine to host it.

  9. Repeat steps 5 through 8 to add the MediaWiki Database application. Due to the applications prerequisites, the Apache HTTP Server, PHP, and MySQL are added automatically during provisioning.

  10. Click OK.

    CA Server Automation adds the template to the list of service templates in the Explore tree. The service template is ready for provisioning.

2.4 Deploy a Wiki

The creation of service templates enables one-click service provisioning for end users.

Follow these steps:

  1. Click Resources, and in the Explore tree select Service Templates under OnDemand Services.

  2. In the Summary tab, select the created Wiki service template, and click the Provision Service icon.

  3. Input a name for the provisioned service instance.

  4. Provide a title for the Wiki web page. This user input has been specified in the definition of the MediaWiki Content application.

  5. Click OK.

    CA Server Automation provisions the requested service instance and adds it to the list of resources under OnDemand Resources in the Explore tree. Track the status of the provisioning in the Jobs pane.

  6. After the provisioning has completed, a page with a link to the Wiki web page is displayed. Follow the link to verify that the provisioning was successful.

3.0 Copyright

This Documentation, which includes embedded help systems and electronically distributed materials, (hereinafter referred to as the "Documentation") is for your informational purposes only and is subject to change or withdrawal by CA at any time.

This Documentation may not be copied, transferred, reproduced, disclosed, modified or duplicated, in whole or in part, without the prior written consent of CA. This Documentation is confidential and proprietary information of CA and may not be disclosed by you or used for any purpose other than as may be permitted in (i) a separate agreement between you and CA governing your use of the CA software to which the Documentation relates; or (ii) a separate confidentiality agreement between you and CA.

Notwithstanding the foregoing, if you are a licensed user of the software product(s) addressed in the Documentation, you may print or otherwise make available a reasonable number of copies of the Documentation for internal use by you and your employees in connection with that software, provided that all CA copyright notices and legends are affixed to each reproduced copy.

The right to print or otherwise make available copies of the Documentation is limited to the period during which the applicable license for such software remains in full force and effect. Should the license terminate for any reason, it is your responsibility to certify in writing to CA that all copies and partial copies of the Documentation have been returned to CA or destroyed.

TO THE EXTENT PERMITTED BY APPLICABLE LAW, CA PROVIDES THIS DOCUMENTATION "AS IS" WITHOUT WARRANTY OF ANY KIND, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT WILL CA BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY LOSS OR DAMAGE, DIRECT OR INDIRECT, FROM THE USE OF THIS DOCUMENTATION, INCLUDING WITHOUT LIMITATION, LOST PROFITS, LOST INVESTMENT, BUSINESS INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF CA IS EXPRESSLY ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.

The use of any software product referenced in the Documentation is governed by the applicable license agreement and such license agreement is not modified in any way by the terms of this notice.

The manufacturer of this Documentation is CA.

Provided with "Restricted Rights." Use, duplication or disclosure by the United States Government is subject to the restrictions set forth in FAR Sections 12.212, 52.227-14, and 52.227-19(c)(1) - (2) and DFARS Section 252.227-7014(b)(3), as applicable, or their successors.

Copyright ? 2012 CA. All rights reserved. All trademarks, trade names, service marks, and logos referenced herein belong to their respective companies.

File Attachments:
TEC575598.zip