Hello World Project (v3.5)

A simple project to deploy and run a script

Project overview.

Here is a summary of what this project wil achieve.

This project is designed to deploy a script onto a server, and then run it. The server can be Windows or Linix, and the script run will be a Windows bat file or Linux shell script as needed. 

Four target environments are configured in the project (two for windows and two for Linux). 

Taking the Linux example, the two environments demonstrate how the project payload (hellowWorld.sh script) is generic, and is parameterised differently in each of the target environments. One environment sets the parameters for a Square, and the other for a Circle (Shape, colour, number of sides).

The parameters are passed to the script as command line arguments AND as environment variables.

When you run the project for each of the environments, view the logs once the deployment is finished, and see how the scripts echo out the different command line parameters and environment variables.

What is preconfigured and demonstrated.

The project demonstrates the following configurations:
  • Target servers for Windows and Linux using localhost
  • Use of the Remote agent plugin
  • Windows batch file or shell script depending on target 
  • Environment variables per environment
  • Command Line arguments per environment
  • ScriptRunner, Copy and Echo tasks
  • Environment specific Data Dictionary items
  • Use of built in variables such as ${ARCHIVE_ROOT}, ${MV_UUID}, ${MV_DATE_MILLIS}

How to use this project.

  1. Download the project to your desktop by clicking on one of the links. The file will be saved as SCRIPT_DEMO.zip
  2. Log into your RapidDeploy instance as mvadmin.
  3. Navigate to Resources-> Projects.
  4. In the top right hand corner click on the Upload Project button.
  5. Select the zip file you downloaded in step 1.
  6. You are guided through a project import wizard. The important thing to check and change (if necessary) here is the path to the project storage directory. Ideally this should be under the projects directory in your RapidDeploy installation. E.g.
    1. /usr/midvision/projects/SCRIPT_DEMO
  7. Once the project is imported, you'll need to create a package to deploy.
    • Firstly, navigate to Resources-> Projects and edit the project (pencil icon on the tool menu). 
    • Navigate to the Packages tab and click the Create Package  button. A new package is created with a version number. This is the package you'll deploy later, containing all the environment definitions, actions and paylod (scripts) to allow the jobs to be run on all defined servers. 
    • Over time, as you update the configuration or payload (script), you'll create more packages, which are a versioned snapshot of the configuration and payload at the time they are created. 
  8. Now you can run a new job to the environment of your choice. 
    • Navigate to Jobs-> New Job
    • Select the project you created earlier. You will see a tree view of server/environment and application. 
    • Select the one you want to deploy and follow the wizard. 
    • On the Version panel you select the version (package version) you want to deploy. 
    • Since there is only one package, it is preselected. The latest package will always be preselected by default. 
    • Click on the Skip to Finish checkbox and click Next
    • On the final tab click the Start Job button. The deployment is started and you see the tasks executed and job log in real time.

Further Reading

The following links will help you gain a deeper understanding of the tasks used in this project:


Download this project!