Skip to content

access_RosePuppetConfiguration

mrd599 edited this page Apr 8, 2015 · 3 revisions

#!html
<h1 style="text-align: center; color: blue"> Installing and Configuring Rose on Accessdev Wiki Page </h1>

PageOutline

Introduction

This documentation outlines the installation and configuration of Rose on the NCI virtual machine accessdev. Rose is a group of utilities for managing the development of scientific application suites. It is published by the Met Office. It is assumed that administrators have access to the puppet and git repository for the ACCESS project, as well as privileges for managing and updating the puppet configurations.

Rose Puppet configuration files

The configuration of accessdev is declared in various puppet modules. A puppet module has been written for installing and configuring Rose. It is located in /puppet/modules/rose.

The puppet configuration for Rose contains the following files;

rose/manifests/init.pp Basic installation
rose/manifests/server.pp Server installation
rose/manifests/params.pp Default configuration items
rose/files/recreatedatabase.sh Script for recreating database from a repository
rose/files/rose-monitor Script that allows users to monitor other people's running suites
rose/files/rose-task-hook2 Wrapper for the task-hook handler that correctly pulls back log files
rose/templates/roseconf.erb Template for Rose configuration
rose/templates/rosaserver.erb Template for the init.d Rosa server script
rose/templates/rosa-pre-commit.erb Template for svn pre commit hook
rose/templates/rosa-post-commit.erb Template for svn post commit hook

Dependencies

Rose requires several packages and programs to work. These include the following;

Python

Python: PyGTK

Python: cherrypy

Python: jinja2

Python: requests

Python: simplejson

Python: sqlalchemy

Cylc

Subversion

FCM

xterm (For rosie gui)

gedit (For rosie gui)

gcc-gfortran.x86_64 (For running the MET rug-brief-tour )

See http://metomi.github.io/rose/doc/rose-install.html#requirements for more details about dependencies

Installation

Basic

To add Rose to your node, add the following puppet class.

class{“rose”:
	rosehosts => ‘accessdev.nci.org.au’, 		
	rosa_hostname => ‘accessdev.nci.org.au’
	rosa_portnumber => ‘8080’ 		
	suite_collections => [‘dev1’, ‘dev2’],		
	default_prefix => ‘dev1’,
	repos_dir => ‘/home/access-svn’,
	group => ‘access’,
	database_dir => ‘/var/lib/’,
	rose_dir => ‘/usr/local/rose/’
	}

Where the following options are available default values are in params.pp; rosehosts => Hostname of host for running suites

rosa_hostname => Hostname for the rosa server

rosa_portnumber => Port number for the rosa server

suite_collections => A list of repositories that are available to users

default_prefix => Default prefix

rose_dir => Installation directory of Rose

repos_dir => Location of repositories

database_dir => Location of databases (Redundant for basic installation)

Use single quotes around values, rather than double quotes otherwise puppet will evaluate environment variables as puppet variables.

Adding this puppet configuration to your node will do the following:

  1. Installs the latest Rose version from github
  2. Creates the Rose configuration file

This configuration will allow users to run Rose suites, but no repositories, databases or server will be installed. Rosa clients running on the node might still work if they can to connect to an external server and the external repository is accessible as defined by rosa_hostname , rosa_portnumber and repos_dir.

Default values for parameters are stored in the file params.pp. Other configuration items are in stated in configuration template rose/templates/roseconf.erb

Server

To add Rose and enable the Rosa server on your node, plus create rose repositories. Add the following puppet class.

class {“rose::server”:
	rosehosts => ‘accessdev.nci.org.au’, 		
	rosa_hostname => ‘accessdev.nci.org.au’
	rosa_portnumber => ‘8080’ 		
	suite_collections => [‘dev1’, ‘dev2’],		
	default_prefix => ‘dev1’,
	repos_dir => ‘/home/access-svn’,
	group => ‘access’,
	database_dir => ‘/var/lib/’,
	}

Where the following options are available (default values are in params.pp); rosehosts => Hostname of host for running suites

rosa_hostname => Hostname for the rosa server

rosa_portnumber => Port number for the rosa server

suite_collections => A list of repositories that are available to users

default_prefix => Default prefix. Needs to be set to one of the values in suite_collections.

group => Group name for access permission for databases and repositories

Adding this puppet configuration to your node will do the following:

  1. Install Rose from the github
  2. Create the Rose configuration file
  3. Create subversion repositories (if not existing) and installs pre and post commit hooks
  4. Enable users from the “access” group to read and write to repository
  5. Create or recreate sqlite databases. Re-creation happens only if repositories exist, but no databases exist.
  6. Start or restart the Rosa server

A simple example of a server configuration might contain the following class definition.

class { "rose::server":
         rosehosts => $fqdn,
         rosa_hostname => $fqdn,
         rosa_portnumber => 8080,
         suite_collections => ["au","test"],
         default_prefix => "au"

In this example, a server is configured to run on the current node with port number 8080. Two repositories and their respective databases are created using the names “au” and “test.”

$fqdn is the puppet variable representing the fully qualified domain name of the current node.

Upgrading Rose to a newer version on Accessdev #roseupdate

  1. Notify users and other admins of upcoming upgrade of software.

  2. Admins should upgrade Rose and Cylc on Raijin before doing an upgrade on accessdev. However do NOT update the default versions yet, see below step 10. This will minimize any downtime. See https://trac.nci.org.au/trac/access/wiki/UpgradingRoseCylc

  3. New systems admins will need to have access to the NCI git repository and have read through the NCI Virtual Lab Developer's Guide before updating Accessdev. See https://docs.google.com/document/d/1ndDa505VPr4dXLRoojUh9nRBp7gzDsPAkD2c4h8EsFE

  4. Puppet modules for accessdev.nci.org.au are edited on cloudlogin.nci.org.au machine. Before editing the puppet scripts please ensure you have the latest repository. This can be done by logging onto cloudlogin and pulling down the NCI git repository.

ssh cloudlogin.nci.org.au
cd puppet # This location might differ depending on where you have cloned the repository.
git pull
git checkout master
  1. For minor upgrades, admins can modified the master branch directory. Upgrades that are major should be tested on a separate branch before merging onto the master. See NCI Virtual Lab Developer's Guide for more details. (https://docs.google.com/document/d/1ndDa505VPr4dXLRoojUh9nRBp7gzDsPAkD2c4h8EsFE)

  2. By default puppet will install the latest version from the git repository. To specify a specific Rose (or Cylc) version on Accessdev add/modify the following lines to hieradata/project.yaml

# Rose version
rose::params::roserevision: 2014-04

# Cylc version
cylc::cylcrevision: 5.4.13
  1. IMPORTANT:The configuration file for Rose frequently changes with each version. Admins must update the template puppet/modules/rose/templates/roseconf.erb to reflect the chosen version.

This can be done by

Possible changes could include

  • new configuration items
  • renaming of names of configuration items

Admins must also review https://github.com/metomi/rose/blob/master/CHANGES.md for any further requirements or gotchas.

  1. After making modifications to the puppet code, you will need to commit and push the changes upstream by typing
git commit -a # you will be asked to enter a log message (-a for all files)
git push
  1. Test changes on accessdev-test first
# on accessdev-test 
#switch to your branch if neccessary
cd /puppet
git pull
sudo git checkout <user>/rose-update
#update puppet
sudo /usr/local/sbin/puppet-update
  1. When satisfied with your tests, if using a branch, merge your changes back into the master branch
# on cloudlogin
cd /puppet
git checkout master
git merge <user>/rose-update
  1. To apply the latest puppet changes on Accessdev, run the script puppet-update on Accessdev.
ssh accessdev.nci.org.au
sudo /usr/local/sbin/puppet-update
  1. Finally, admins should set the default modules for Rose (and Cylc) on Raijin
ssh raijin.nci.org.au
vim ~access/modules/rose/.version #Change to the latest version
vim ~access/modules/cylc/.version #Change to the latest version

Changing the default behaviour of Rose Bush

Currently (version 2014-05) there are no mechanisms for

  • changing the default behaviour of Rose Bush.
  • storing user settings such as display options via cookies

However limited default behaviour can be modified by editing the rose bush python module by

ssh accesdev.nci.org.au
sudo vim /usr/local/rose/lib/python/rose/bush.py

To change the default number of jobs per page in rose bush Change

JOBS_PER_PAGE = 15

to

JOBS_PER_PAGE = 80

This should be done manually after a new version of Rose installed. Apache will need to be restarted by running sudo service httpd restart

Handling of MetOffice Meta data

Meta data for the UM and other various software is usually installed on the access-svn.nci.org.au server. This needs to be checked out on accessdev in order for the Rose Editor to display items correctly. Currently the meta data is manually checked out and placed in /g/data1/access/rose-meta as specified in modules/rose/mainfests/init.pp.

To update the metadata, run the following on accessdev,

newgrp access.dev
cd /g/data1/access/rose-meta
fcm update

Rose Installation notes for Raijin

Installing/Upgrading on Raijin

For installing Rose on Raijin See https://trac.nci.org.au/trac/access/wiki/UpgradingRoseCylc

Limitations of Rose on Raijin

There are no configuration files installed for Rose on either Vayu or Raijin machines as this is performed on Accessdev. However users can create their own personal configuration file under ~/.metomi/ if necessary. None of the Gui elements of Rose will be made available on the computes node. It is intended that users will operate these interfaces on Accessdev only.

Quick Overview of the Rose Software

Rose consists of three main programs Rosa, Rosie and Rose. Rosa is the server. Rosie is the client. Rose is a collection of utilities for editing and running suites. Rose uses Cylc for scheduling suite applications.

Refer to http://metomi.github.io/rose/doc/rose.html for more information regarding Rose.

Note: Users must have set up their ssh keys correctly in order to not to be prompted when accessing the svn repository via svn-ssh.

Starting the Rosa Server outside of puppet

An init.d script is created when installing Rose via puppet. This allows the root user to easily start, stop or restart the server via the service command.

service rosa start|stop|restart

Starting the Rosie client

Rosie allows the user to view suites in a repository. To run Rosie type

rosie go

Running Rose

To edit a Rose suite;

rose edit [-C /dir/to/my.suite]

To run a suite through rose and cylc;

rose suite-run [-C /dir/to/my.suite]

Things to do

Several items still need to be addressed and included in the puppet configuration. Some of these will depend on future releases of rose in the near future.

  • Rosebud (Conversion of UMUI jobs to Rose jobs)
  • Trac (Repository browser)
  • Use system accounts for svn repository
  • Install multiply versions on Rose on accessdev (Version 2014-06+ has this capability)
Clone this wiki locally