113
Ralph Documentation Release 2.3.1 Allegro Group August 10, 2015

Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

  • Upload
    buinhu

  • View
    289

  • Download
    8

Embed Size (px)

Citation preview

Page 1: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph DocumentationRelease 2.3.1

Allegro Group

August 10, 2015

Page 2: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell
Page 3: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Contents

1 Ralph overview 31.1 Ralph Core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 Ralph Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.3 Ralph Pricing “Scrooge” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Install / Upgrade Ralph 52.1 Prebuilt docker image - recommeneded option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 Upgrading an existing installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.3 Installing Ralph - advanced installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3 Ralph Windows Agent 133.1 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4 Configuration 154.1 Configuration file layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154.2 Creating a default configuration file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154.3 Secret key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154.4 Database backend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164.5 Message queue broker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164.6 Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164.7 Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

5 Additional modules 195.1 CMDB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

6 Extending Ralph 376.1 Writing custom SCAN plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376.2 PULL - Generic SCAN plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396.3 Writing own module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

7 Scan - Device discovery 417.1 Preparing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417.2 Scanning existing device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417.3 Scanning new devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427.4 Plugins configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437.5 Discovery plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437.6 Integration with external services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

8 The device browser 47

i

Page 4: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

8.1 Viewing devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478.2 Editing devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

9 Server deployment 499.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499.2 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499.3 Plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509.4 Boot images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

10 DNS configuration 5310.1 Importing configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

11 DHCP configuration 5511.1 Ralph DHCP agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5511.2 Configured DHCP servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5511.3 Importing and exporting DHCP configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

12 Notifications 5712.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5712.2 Example of use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5712.3 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

13 API 5913.1 Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5913.2 Output format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5913.3 Input format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5913.4 HTTP methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6013.5 Some notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

14 Frequently Asked Questions 6114.1 Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6114.2 Gunicorn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6314.3 MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6314.4 RQ workers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6414.5 TCP/IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

15 Permissions 6715.1 List of bound permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6815.2 Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6815.3 API Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6915.4 List of bound permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

16 Quickstart 7116.1 Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7116.2 Licences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7716.3 Supports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7816.4 Scrooge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7916.5 Data center view (DC View) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8116.6 Admin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

17 Change Log 8517.1 2.3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8517.2 2.3.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8517.3 2.1.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8717.4 2.0.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

ii

Page 5: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

17.5 2.0.0-stable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8817.6 2.0.0-rc8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8917.7 2.0.0-rc7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9017.8 2.0.0-rc6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9017.9 2.0.0-rc5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9117.10 2.0.0-rc4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9117.11 2.0.0-rc3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9117.12 2.0.0-rc2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9117.13 2.0.0-rc1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9217.14 1.2.9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9217.15 1.2.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9317.16 1.2.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9317.17 1.2.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9317.18 1.2.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9417.19 1.2.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9417.20 1.2.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9417.21 1.2.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9517.22 1.2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9517.23 1.2.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9517.24 1.1.18 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9617.25 1.1.17 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9617.26 1.1.16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9617.27 1.1.15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9617.28 1.1.14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9717.29 1.1.13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9717.30 1.1.12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9717.31 1.1.11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9717.32 1.1.10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9817.33 1.1.9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9817.34 1.1.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9817.35 1.1.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9817.36 1.1.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9917.37 1.1.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9917.38 1.1.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9917.39 1.1.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10017.40 1.1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10017.41 1.1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10017.42 1.1.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10017.43 1.0.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10117.44 1.0.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10117.45 1.0.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10217.46 1.0.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10217.47 1.0.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10217.48 1.0.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10317.49 1.0.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

18 License 105

iii

Page 6: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

iv

Page 7: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

Contents:

Contents 1

Page 8: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

2 Contents

Page 9: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

CHAPTER 1

Ralph overview

Ralph consists of 3 submodules:

1.1 Ralph Core

Ralph Core (DCIM and CMDB) acts as a base system for Ralph applications. It is the database of Networks, IPAddresses, Racks, and discovered hardware.

It allows you to:

• scan networks automatically through periodic or manual scans.

• deploy servers by generating appropriate DNS/DHCP configs and uses I/PXE method.

• see relations between Configuration Items using CMDB view interface

1.2 Ralph Assets

This submodule provides advanced Asset management system which has following features:

• manual inventory system

• can be used alongside Ralph Core discovery using reconciliation technique

• covers complete life cycle of assets from purchase to decommissioning

• gives ability to generate custom defined PDF documents (hardware assignments printouts for example)

• integrated assets license management

• integrated basic hardware support/contracts management

• easy & usable module for generic inventory tasks

1.3 Ralph Pricing “Scrooge”

This submodule provides flexible billing and financial reporting subsystem which can:

• calculate TCO of Services using complex utilization of bare metal costs, IT Support work time, virtualiza-tion costs

• integrate OpenStack billings with hardware costs

3

Page 10: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

• gather historical data every day to safely inspect trends over time

Read more about additional modules

4 Chapter 1. Ralph overview

Page 11: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

CHAPTER 2

Install / Upgrade Ralph

2.1 Prebuilt docker image - recommeneded option

It is the easiest way to try out Ralph using pre-built docker image with the worker, database, and server all together.We decided to push new images from time to time when we decide it’s stable enough to use.

1. Install docker using instructions at https://docs.docker.com/installation/. Use Docker version > 1.5

2. Create volume data for mysql data and configuration:

docker run -i -t --name mysql_data -v /var/lib/mysql -v /home/ralph/.ralph busybox /bin/sh -c "chown default /home/ralph; chown default /home/ralph/.ralph"

3. Initialize config file and empty mysql database with default login and password and collect static files:

docker run -P -t -i --volumes-from mysql_data allegrogroup/ralph:latest /bin/bash /home/ralph/init.sh

4. Now, run ralph:

docker run -P -p 8000:8000 -t -i --name ralph --mac-address=02:42:ac:11:ff:ff --volumes-from mysql_data allegrogroup/ralph:latest

5. Point your browser to: http://YOUR_DOCKER_IP:8000. Use ralph: ralph as login credentials. Nowfollow our quick tutorial: quickstart

2.2 Upgrading an existing installation

Note: To upgrade docker image, stop Ralph instance, pull new docker image and run migration script for DB andstatic files.

docker pull allegrogroup/ralph:latest

docker run -P -t -i -volumes-from mysql_data allegrogroup/ralph:latest /home/ralph/upgrade_ralph.sh

Before you start the upgrade, you need to stop any Ralph processes that are running.

If you installed from pip, then you can simply do:

(ralph)$ pip install --upgrade ralph[...]

Now you need to upgrade the static files:

5

Page 12: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

(ralph)$ ralph collectstatic[...]

2.2.1 Migrate the database

Some versions of Ralph will change the database schema in order to add or change some of the models of the data thatis stored in there. You need to migrate the database to the current version of Ralph:

(ralph)$ ralph syncdb[...](ralph)$ ralph migrate[...]

Once your code is upgraded and the database is migrated, you can start all your Ralph processes back and enjoy thenew version.

2.2.2 Update the settings

Some new features added to Ralph may require additional settings to work properly. In order to enable them in yoursettings, follow the instructions in the change log for the version you installed.

2.2.3 Example data

Ralph after instalation doesn’t have any example data – for this reason you can run special CLI command for generatesome example data such as data for visualization.

To generate some data run ralph make_demo_data and select right option from menu.

Available params for command:

• --flush - flush the databases,

• -d fixture_name - execute defined fixture,

Example of use:

• ralph make_demo_data --flush -d envs -d services - flush databases and execute de-fined fixtures,

• ‘‘ralph make_demo_data –flush ‘‘ - interactive mode.

2.3 Installing Ralph - advanced installation

Note: Warning: The latest stable version on PyPi is very old (6 months old). Please help us testing new release usingDocker Images.

Note: You can install Ralph on a variety of sensible operating systems. This guide assumes Ubuntu Server12.04/14.04 LTS and presents shell command examples accordingly. MySQL as the relational backend for Djangois also assumed but other databases supported by Django may be used as well. sqlite3 is discouraged for largerdeployments because it doesn’t support concurrent writes which are very common on a distributed queue-based archi-tecture.

6 Chapter 2. Install / Upgrade Ralph

Page 13: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

2.3.1 Installing Python

Ralph requires Python 2.7 which is included in the latest Ubuntu Server 12.04 systems:

$ sudo apt-get install python-dev python-virtualenv

During the installation, Ralph builds a set of required dependencies. This requires a sensible building environmentavailable:

$ sudo apt-get install build-essential libbz2-dev libfreetype6-dev libgdbm-dev$ sudo apt-get install libjpeg-dev libldap2-dev libltdl-dev libmemcached-dev$ sudo apt-get install libmysqlclient-dev libreadline-dev libsasl2-dev libsqlite3-dev$ sudo apt-get install libssl-dev libxslt1-dev ncurses-dev zlib1g-dev

setcap

One of the things Ralph does is pinging addresses to tell whether they are used by machines inside the network. Pingworks by ICMP which basically requires access to raw sockets. By design these sockets can only be opened by root.The ping tool uses the setuid bit because of that reason. Marking the python binary with setuid would create amassive security hole which is why another approach is necessary: setcap.

setcap is a tool that sets file capabilities. For Ubuntu Server it is available by installing:

$ sudo apt-get install libcap2-bin

The capability we’re after is CAP_NET_RAW which enables a binary to use raw and packet sockets. To enable this forevery system user, type:

$ sudo setcap cap_net_raw=ep /usr/bin/python2.7

Please note that we set caps directly on the binary (e.g. not on a symlink).

2.3.2 Message queue

Ralph works in a distributed fashion, communication between worker nodes happens through a central queue withRedis as the broker.

We chose Redis as the message broker because of its performance and simplicity. We require at least version 2.2because of our use of list commands which were added in that version. Ubuntu Server 12.04 LTS delivers:

$ sudo apt-get install redis-server

Since lost tasks can always be sent again, the durability guarantees which Redis provides by default are not necessary.You can significantly speed up the queue by commenting out the save lines from /etc/redis/redis.conf.

We can check the status of the Redis server:

$ redis-cli -h localhost -p 6379 -n 0 inforedis_version:2.2.12redis_git_sha1:00000000redis_git_dirty:0arch_bits:64multiplexing_api:epollprocess_id:22698uptime_in_seconds:50uptime_in_days:0lru_clock:167

2.3. Installing Ralph - advanced installation 7

Page 14: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

used_cpu_sys:0.02used_cpu_user:0.00used_cpu_sys_children:0.00used_cpu_user_children:0.00connected_clients:1connected_slaves:0client_longest_output_list:0client_biggest_input_buf:0blocked_clients:0used_memory:798824used_memory_human:780.10Kused_memory_rss:1429504mem_fragmentation_ratio:1.79use_tcmalloc:0loading:0aof_enabled:0changes_since_last_save:0bgsave_in_progress:0last_save_time:1342178903bgrewriteaof_in_progress:0total_connections_received:2total_commands_processed:3expired_keys:0evicted_keys:0keyspace_hits:0keyspace_misses:1hash_max_zipmap_entries:512hash_max_zipmap_value:64pubsub_channels:0pubsub_patterns:0vm_enabled:0 role:master

Note: Remember to configure redis in settings.py.

2.3.3 Database

In theory, any database server supported by the Django ORM may be used with Ralph. The default configuration usesSQLite which is enough for evaluation purposes and small deployments.

We use and support MySQL. You will need at least version 5.5 because it provides multiple rollback segments whichare required to maintain sensible performance with more than a handful of workers. Installation:

$ sudo apt-get install mysql-server libmysqlclient-dev libmysqld-dev

Once it’s up and running let’s set some stuff up:

$ mysqladmin -u root -p create ralph$ mysql -u root -pmysql> alter database ralph character set utf8 collate utf8_general_ci;mysql> use mysql;mysql> update user set password=password("rootpw") where user='root';mysql> create user 'ralph'@'localhost' identified by 'ralph';mysql> grant all privileges on ralph.* to 'ralph'@'localhost';mysql> flush privileges;mysql> quit$ sudo service mysql restart

8 Chapter 2. Install / Upgrade Ralph

Page 15: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

2.3.4 Caching

For small deployments the built-in in-memory cache provided by Django is enough. For larger setups we stronglyrecommend Redis:

$ sudo apt-get install redis-server

2.3.5 Apache

To use Apache as the front-end Web server for Ralph, install it:

$ sudo apt-get install apache2-mpm-worker libapache2-mod-proxy-html$ sudo a2enmod proxy$ sudo a2enmod proxy_http

Now add the Ralph site configuration to /etc/apache2/sites-enabled/ralph, restart Apache and you’re done. Alterna-tively, you can check out configuration for usage with modwsgi (you will need the ralph.wsgi file, too).

Note: Remember to adapt the project and static paths in the Apache configuration files to fit your actual systemconfiguration.

2.3.6 Ralph

system user

Unprivileged and not owned by a person:

$ sudo adduser --home /home/ralph ralph$ sudo su - ralph

virtual environment

Let’s create a virtual environment for Python in the user’s home:

$ virtualenv . --distribute --no-site-packages

The newly created virtual environment contains a directory structure mimicking /usr/local:

$ tree -dL 3.-- bin-- include| -- python2.7 -> /usr/local/include/python2.7-- lib

-- python2.7-- config -> /usr/local/lib/python2.7/config-- distutils-- encodings -> /usr/local/lib/python2.7/encodings-- lib-dynload -> /usr/local/lib/python2.7/lib-dynload-- site-packages

10 directories

2.3. Installing Ralph - advanced installation 9

Page 16: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

In any shell the user can activate the virtual environment. By doing that, the default Python executable and helperscripts will point to those within the virtual env directory structure:

$ which python/usr/local/bin/python$ . bin/activate(ralph)$ which python/home/ralph/bin/python

To automate this it’s very useful to add source /home/ralph/bin/activate to/home/ralph/.profile or /home/ralph/.bashrc. That way with each login the virtual environment isactivated and the user doesn’t have to remember to do that.

Further setup assumes an activated virtual environment.

Note: You also have to call setcap on the Python binary created in the virtualenv’s bin directory:

$ sudo setcap cap_net_raw=ep /home/ralph/bin/python

Installing from pip

Check your pip version:

(ralph)$ pip --version

If you have pip 1.3.x or 1.4.x use this command:

(ralph)$ pip install ralph

In case you have newer pip (1.5.x or newer) use slightly longer command:

(ralph)$ pip install ralph --use-mirrors --allow-all-external --allow-unverified ipaddr --allow-unverified postmarkup --allow-unverified pysphere

That’s it.

Installing from sources (bleeding edge version)

Alternatively, to live on the bleeding edge, you can clone the Ralph git repository to project and install it manually:

(ralph)$ git clone git://github.com/allegro/ralph.git project(ralph)$ cd project(ralph)$ make install

The last command will install numerous dependencies to the virtual environment we just created. It’s impor-tant that we used an activated virtual environment because without it, the dependencies would install directly in/usr/local/lib/python2.7/site-packages/ which could potentially create compatibility problems forother applications requiring other versions of the dependencies installed.

Note: If your PIL installation on Ubuntu 12.04 ends up telling:

*** TKINTER support not available

*** JPEG support not available

*** ZLIB (PNG/ZIP) support not available

*** FREETYPE2 support not available

*** LITTLECMS support not available

you should try running:

10 Chapter 2. Install / Upgrade Ralph

Page 17: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

$ sudo apt-get install libjpeg8-dev liblcms1-dev libpng12-dev$ pushd /usr/lib$ sudo ln -s x86_64-linux-gnu/libz.so libz.so$ sudo ln -s x86_64-linux-gnu/libfreetype.so libfreetype.so$ popd$ pip install -U Pillow

Now PIL should at least tell you this much:

*** TKINTER support not available--- JPEG support available--- ZLIB (PNG/ZIP) support available--- FREETYPE2 support available--- LITTLECMS support available

Note that we are not using the default PIL package from PyPI but the friendly Pillow fork which is activelymaintained by the Plone community.

Initial setup

Once installed, we can create a configuration file template:

(ralph)$ ralph makeconf

This will create a .ralph/settings file in the current user’s home directory. You can also create these settings in/etc by providing the --global option to makeconf.

After creating the configuration file, you have to customize it like described on the configuration page so that Ralphknows how to connect to your database, message broker, etc. You can skip customizing configuration for strictlyevaluation purposes, it will use SQLite and other zero configuration options.

After creating the default config file, let’s synchronize the database from sources by running the standard syncdbmanagement command:

(ralph)$ ralph syncdb --all

Django will create some tables, setup some default values and ask whether you want to create a superuser. Do so, youwill use the credentials given to test whether the setup worked. The --all switch to syncdb created all tables, evenif there are existing migrations for them. Mark all those migrations as done by running:

(ralph)$ ralph migrate --fake

Lastly, we need to link the static images, CSS files, JavaScript sources, etc. to a common place so the front-end Webserver can pick them up. That way the back-end doesn’t have to deal with static files. The command to do that issimple:

(ralph)$ ralph collectstatic -l

By default the collectstatic command copies the files. The -l option creates symlinks instead.

Python and setcap

From the project directory run:

2.3. Installing Ralph - advanced installation 11

Page 18: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

$ ralph test ralph.utilCreating test database for alias 'default'.....----------------------------------------------------------------------Ran 2 tests in 0.505s

OKDestroying test database for alias 'default'...

Back-end web server

From the project directory run:

(ralph)$ ralph run_gunicornValidating models...0 errors found

Django version 1.3, using settings 'ralph.settings'Server is runningQuit the server with CONTROL-C.2011-04-18 13:39:34 [17904] [INFO] Starting gunicorn 0.12.12011-04-18 13:39:34 [17904] [INFO] Listening at: http://127.0.0.1:8000 (17904)2011-04-18 13:39:34 [17904] [INFO] Using worker: sync2011-04-18 13:39:34 [17912] [INFO] Booting worker with pid: 17912

The service should be accessible from the localhost. You may invoke this command with a host:port argumentto see the web app from a remote host. For production use however, configure a front-end Web server (like Apachedescribed above) and run Gunicorn as a daemon. You may find example Gunicorn init.d scripts in the FAQ.

Message queue

From the project directory run:

(ralph)$ ralph rqworker -v2 default16:43:19 RQ worker started, version 0.3.716:43:1916:43:19 *** Listening on default, dc2...

This runs a single worker process. Leave it open for now, in the next step we’ll check if the communication worksalright.

2.3.7 That’s it!

If all of the above worked, you’re all set up and ready to do some actual work.

12 Chapter 2. Install / Upgrade Ralph

Page 19: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

CHAPTER 3

Ralph Windows Agent

To discover Windows based machines, we provide an Agent called Don Pedro for hardware discovery. It requiresonly .NET 2.0 environment installed, and supports Virtual Machines as well.

3.1 Installation

1. Download DonPedro Windows client here and install it on the target windows device.

2. You need to configure it. After installation, a new service called Don Pedro will register in the Windows servicesconsole. It is enabled by default, and will log messages about missing configuration file options. This file usuallyis located in c:Program FilesDonPedro and is called DonPedro.exe.config.

3. Edit configuration file and restart service. It will send information to the given ralph_url, using api_userand api_key periodically.

13

Page 20: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

14 Chapter 3. Ralph Windows Agent

Page 21: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

CHAPTER 4

Configuration

4.1 Configuration file layout

Ralph is a Django-based project. As such, in its sources it holds a default configuration file called settings.py.This file should not be touched as it can change between Ralph versions. Instead, you can place your configuration in:

• settings-local.py (next to settings.py in the source package)

• ~/.ralph/settings

• /etc/ralph/settings

Upon starting, Ralph will search those paths in the order specified above and stick to the first file it finds. Configurationin this file overrides defaults provided in settings.py.

Settings files are in their essence Python source code files. You can consult official Django documentation on variousways you can customize behaviour of the application.

4.2 Creating a default configuration file

A default configuration file can be created by invoking:

(ralph)$ ralph makeconf

This will create the ~/.ralph/settings file with default values. Ralph will not overwrite existing configuration,you can change that by adding --force to makeconf.

You can also create your configuration in /etc by adding --global to makeconf.

Warning: The settings file will contain passwords and other sensitive information. Therefore by defaultmakeconf ensures your configuration directory as well as the settings file are only accessible by the currentuser invoking makeconf.

4.3 Secret key

The single most important setting you have to change right away is the SECRET_KEY value. It is used as a seed insecret-key hashing algorithms, for instance for user passwords and form protection. Each of your Ralph installationsshould have its own unique secret key. As for its value, the longer the better.

15

Page 22: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

4.4 Database backend

We currently only support MySQL backend, though some functionality could work with sqlite backend as well.

Setting up MySQL could look like this:

DATABASES = {'default': {

'ENGINE': 'django.db.backends.mysql','NAME': 'ralph_db','USER': 'ralph_user','PASSWORD': 'ralph_password','HOST': '127.0.0.1','PORT': '3306','OPTIONS': {

"init_command": "SET storage_engine=INNODB",},

},}

4.5 Message queue broker

There is a number of Redis queues you need to have. By default they are:

• default - all control tasks go here

• cmdb_* - CMDB related tasks go here

• reports - asynchronous reports from the Web app go here

You should also create an entry for each data center you use. You can use a separate Redis server for any queue. Usethe RQ_QUEUES dictionary for that. If you only need to reuse the ’default’ Redis instance, add your queues toRQ_QUEUES_LIST.

4.6 Cache

The required CACHE backend is currently redis-cache which requires running redis instance:

CACHES = dict(default = dict(

BACKEND = 'redis_cache.cache.RedisCache',LOCATION = 'ralph_redis_master:6379',OPTIONS = dict(

DB=2,PASSWORD='ralph666',CLIENT_CLASS='redis_cache.client.DefaultClient',PARSER_CLASS='redis.connection.HiredisParser',PICKLE_VERSION=2,

),KEY_PREFIX = 'RALPH',

))

16 Chapter 4. Configuration

Page 23: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

4.7 Tracking

To configure your tracking provider, you must put your tracking code into TRACKING_CODE variable in settings foreg.

TRACKING_CODE = """<!-- Piwik --><script type="text/javascript">

var _paq = _paq || [];_paq.push(['trackPageView']);_paq.push(['enableLinkTracking']);(function() {var u=(("https:" == document.location.protocol) ? "https" : "http") + "://your-tracking-domain.local/piwik/";_paq.push(['setTrackerUrl', u+'piwik.php']);_paq.push(['setSiteId', 66]);var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript';g.defer=true; g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);

})();</script><noscript><p><img src="http://your-tracking-domain.local/piwik/piwik.php?idsite=66" style="border:0;" alt="" /></p></noscript><!-- End Piwik Code -->"""

4.7. Tracking 17

Page 24: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

18 Chapter 4. Configuration

Page 25: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

CHAPTER 5

Additional modules

5.1 CMDB

5.1.1 Overview

Ralph provides an early (experimental) version of a Configuration Management Database module.

CMDB module

Ralph’s CMDB module is an ITIL-related functionality. It enables you to manage infrastructure, and other componentsrelations. It also lets you connect CIs with events, tasks and tickets that are assigned to them. With this module youcan:

1. focus not only on infrastructure but also on business processes,

2. use layers and relations to bundle related components,

3. integrate with external systems: monitoring, deployment, version management repository, ticketing tool, andothers, keeping references between CIs and events.

Goals and Use Cases

CMDB’s main goals are to:

1) support ITIL-related processes with information on service architecture and configuration, 2) enable analysis ofimpact of failures and changes, based on CI relations, 3) enable analysis of maintainability of CIs by matching eventsto specific CI.

CMDB is designed for:

• Process Managers and Line Managers – to audit architecture and relate CIs to specific actions taken by systemadministrators and developers;

• System administrators – to assess impact of their work or observed failures;

• Decision makers – to assess costs of maintenance per CI and refer it to actual costs, P&Ls related to offeredservice.

For example:

1) There is a change planned to roll out new OS version on number of hosts – based on the CMDB relations it ispossible to assess, regardless of whether the environment is virtual or physical:

19

Page 26: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

• scope of the change – how many hosts are affected,

• impact of the change – which services are potentially affected and whether the change will require downtime orwill result in failure,

• potential coworkers – people to inform (based on Technical/Business Owner information) who need to monitor,trace and relate (if applicable) the events observed during deployment.

2) When there is a group of 50 hosts used for similar purposes and one of them is faulty without a known reason:

• CMDB will enable assessment of impact of the failure,

• it will list a number of events and relate one to another,

• based on the above and the financial information (costs of maintenance, costs of system administrator work,costs of unavailability) it will support decisions about planning changes.

System architecture overview

CMDB (Configuration Management DataBase) maintains a complete Assets information for the Change ManagementProcess. In order to do it, it tracks all events and changes in all the IT Systems used in production.

The CMDB specification requires that the data is kept in canonical form of CI’s (Configuration Items) and relationsbetween them. The CMDB data structure is organized into this form to give possibility of reporting the relations anddependencies between IT components. That makes it easy to calculate overall impact of a single change.

Right now CMDB module provides following features:

• ability to create relations between CI’s: contains, is part of, requires, is required by, is role for, has roles;

• ability to assign layers to CI’s;

• statistics of changes and reporting of most changed/inactive CI’s;

• adding custom attributes to CI’s, depeding on its type;

• ability to extend by custom layers, relations, and types.

The CMDB module federates and reconciles data from number of systems to get the big picture of your IT Infrastruc-ture Changes.

In Ralph CMDB we consume following services:

1. infrastructure monitoring systems like Zabbix,

2. service configuration systems like Puppet,

• versioning configuration,

• agent reconfiguration notifications,

3. asset management software – Ralph,

4. issue tracker – Jira recorded incident/problem tickets.

and others.

Installation

The CMDB module is included in Ralph right out of the box. Make sure the cmdb app is activated in your configura-tion by checking if cmdb is listed in INSTALLED_APPS:

20 Chapter 5. Additional modules

Page 27: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

INSTALLED_APPS=['ralph.cmdb',......]

Note: Currently the CMDB module requires MySQL database as backend. We accept patches.

Layers customization

All CIs can be grouped in layers. By default cmdb have predefined set of layers:

1. Applications

2. Databases

3. Documentation/Procedures

4. Organization Unit/Support Group

5. Hardware

6. Network

7. Services

8. Roles

All layers can be customized in admin panel. Administrator can modify: * name - name of the layer * connected types- set of connected CIType objects.By these relationships cmdb can assign CI to the appropriate layer. * icon

Adding new layers is also possible.

Federating the data

The federated database needs to be populated from third party services. However, CMDB is not a real-time database.Instead, assets and integration data must be imported at some interval in order to show up in CMDB.

Two different commandline scripts are used to populate CMDB database – ralph cmdb_sync and ralphcmdb_integration.

• To populate database with assets coming from Ralph CMDB, use cmdb_sync.

• To fill database with third party services data, use cmdb_integration.

cmdb_sync

This command line utility is used to create CI/Relations/Layers data from Ralph Assets Management Database. EveryDevice, Network, Venture, etc. must have its own counterpart in the CMDB database. To keep assets in sync withRalph core you should run ralph cmdb_sync at some interval, e.g. once per day. If you need more accurate data,set up a cron job for more frequent invocations.

Populating the CMDB database with assets:

$ ralph cmdb_sync --action=import --kind=ci

Populating the CMDB database with asset relations:

5.1. CMDB 21

Page 28: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

$ ralph cmdb_sync --action=import --kind=all-relations

For help use --help:

Usage: cmdb_sync --action=[purge|import]--kind=[ci/user-relations/all-relations/system-relations] --content-types

Options:-h, --help show this help message and exit--action=ACTION Purge all CI and Relations.--kind=KIND Choose import kind.--ids=IDS Choose ids to import.--content-types=CONTENT_TYPES

Type of content to reimport.

cmdb_integration

Federating data from third party services (choose one or all):

$ ralph cmdb_integration --cmdb_git --cmdb_jira --cmdb_zabbix

Options:

-v VERBOSITY, --verbosity=VERBOSITY Verbosity level; 0=minimal output, 1=normaloutput, 2=verbose output, 3=very verbose output

--settings=SETTINGS The Python path to a settings module, e.g. “myproject.settings.main”.If this isn’t provided, the DJANGO_SETTINGS_MODULE environmentvariable will be used.

--pythonpath=PYTHONPATH A directory to add to the Python path, e.g.“/home/djangoprojects/myproject”.

--traceback Print traceback on exception

--cmdb_zabbix Trigger cmdb_zabbix plugin

--cmdb_git Trigger cmdb_git plugin

--cmdb_assets Trigger cmdb_assets plugin

--cmdb_jira Trigger cmdb_jira plugin

--remote Runs on remote worker

-d DAYS, --days=DAYS Number of days from now back to be checked

--version show program’s version number and exit

-h, --help show this help message and exit

Zabbix integration

Events triggered from Zabbix give us information about, for example:

• processor usage is to high,

• free RAM is too low,

• disk usage is too low.

22 Chapter 5. Additional modules

Page 29: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

We collect this data using Zabbix Integration API v 2.0. It simply uses REST services for retrieving:

• hosts id from Zabbix,

• trigger information.

Information from Zabbix shows up on the CI preview screen in the ‘Monitoring events’ section.

CMDB database of hosts have to be populated with host name(ci name = hostname) in order to connect the triggers tothem.

Note: If you want, the zabbix plugin can register missing CI’s hostnames while importing the data. You have to setthe ZABBIX_IMPORT_HOSTS to True in this case. By default, no zabbix hosts are registered in the CMDB databasewhile importing(ZABBIX_IMPORT_HOSTS=False).

Setup

Add to settings:

ZABBIX_USER="..."ZABBIX_PASSWORD="..."ZABBIX_URL="..."ZABBIX_IMPORT_HOSTS=False

and run:

$ ralph cmdb_integration --zabbix_hosts --zabbix_triggers

to create Zabbix relations and download trigger data.

Puppet Agents integration

The Puppet agent sends report in YAML format after every reconfiguration. That report describes what has changedafter host reconfiguration. In order to use this mechanism, you should change configuration of Puppet Master to pointthe puppet reports URL to the CMDB URL:

## /etc/puppet/puppet.conf#

[agent]report = truereporturl = http://your_cmdb_url/cmdb/rest/notify_puppet_agent

Every puppet report is saved into the database. You can see it from CI View tab called ‘Agent events’.

If you use Puppet Dashboard and have already specified reporturl, there is a trick to allow multiple URLs to begiven. Since Puppet doesn’t support specifying multiple URLs at the moment, you can use this example report script:

$ cat /usr/lib/ruby/1.8/puppet/reports/cmdb.rb

require 'puppet'require 'net/http'require 'uri'

Puppet::Reports.register_report(:cmdb) do

desc <<-DESC

5.1. CMDB 23

Page 30: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

CMDB Report exampleDESC

def processurl = URI.parse("(your_ralph_url)/cmdb/rest/notify_puppet_agent/")req = Net::HTTP::Post.new(url.path)req.body = self.to_yamlreq.content_type = "application/x-yaml"Net::HTTP.new(url.host, url.port).start {|http|

http.request(req)}

endend

Jira Integration

You can show Jira issues relating to the given CI by using Jira integration mechanism.

Setup

Set options:

JIRA_USER="jira_user"JIRA_PASSWORD="jira_pass"JIRA_URL="http://jiraurl" # main url, without trailing slashesJIRA_CI_CUSTOM_FIELD_NAME="customfield_number"

where JIRA_CI_CUSTOM_FIELD_NAME is name of custom ci field added to Jira, which contains CI UID key.

Then run (or add a cron job):

$ ralph cmdb_integration --jira

to download all Problems/Incidents from remote Jira server into the CMDB database.

Fisheye Integration

You can track changes in Puppet configurations stored in Fisheye/GIT/SVN/ repository by running:

$ ralph cmdb_integration --git

Splunk

If you configure SPLUNK_LOGGER_PORT and SPLUNK_LOGGER_HOST, then information about CIChangeGit,CIChangePuppet will be sent to Splunk. In Splunk you must configure new Data Input with TCP port in Splunk.For more information about configure Splunk go to

API

More information about accessing to the CMDB can be found in CMDB available resources

24 Chapter 5. Additional modules

Page 31: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

Future Releases

There are following features planned for future releases:

1. autodection of Applications and Databases used on hosts,

2. reports/dashboards for Management use,

3. visualization of CMDB data,

4. integration with more systems, including security testing.

5.1.2 API

CMDB available resources

Resource DescriptionBUSINESSLINE list of CI’s whose type is a serviceCI list of CICICHANGE list of change on CICICHANGEGIT list of change in GIT repositoryCICHANGEPUPPET list of change from PuppetCICHANGEZABBIXTRIGGER list of change from ZabbixCICHANGECMDBHISTORY list of changeshistory on CICILAYERS list of all available layers CI’sCIOWNERS list of all ownersCIRELATIONS relationships between CI’sCITYPES list of all available types CI’sSERVICE list of CI’s whose type is a service

CI

Retrieving To get a list of all CIs, issue a GET request

Example

method GETURL http://localhost:8000/api/v0.9/ci/?limit=1headers Accept: application/json

Authorization: ApiKey your_username:your_api_key

The above request will return:

{"meta":{

"limit":1,"next":"/api/v0.9/ci/?&limit=2","offset":0,"previous":null,"total_count":123

},"objects":[

{"added_manually":false,"barcode":"778866","business_service":false,

5.1. CMDB 25

Page 32: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

"bussiness_owner":[

],"cache_version":0,"created":"2012-08-20T16:02:14","id":"1","layers":[

{"id":5,"name":"Hardware"

}],"modified":"2012-08-20T16:02:14","name":"local.dc","object_id":24403,"pci_scope":false,"resource_uri":"/api/v0.9/ci/1/","state":2,"status":2,"technical_owner":[

],"technical_service":true,"type":{

"id":2,"name":"Device"

},"uid":"dd-123","zabbix_id":null

}]

}

Filtering Available parameters:

startswith fields: name, barcode

exact fields: name, barcode, bussiness_owners, layers, pci_scope, type,technical_owners

Example usage:

startswith http://localhost:/api/v0.9/ci/?field_name__startswith=phrase&username=your_username&api_key=your_api_key

exact http://localhost:/api/v0.9/ci/?field_name=phrase&username=your_username&api_key=your_api_key

Adding To add a new CI issue a POST request to /api/v0.9/ci/

Example:

method POSTURL http://ralph.example.com/api/v0.9/ci/head-ers

Accept: application/jsonContent-Type: application/jsonAuthorization: ApiKey your_username:your_api_key

Request body:

26 Chapter 5. Additional modules

Page 33: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

{"added_manually": false,"attributes": [{

"name": "Coolness","value": 1

}],"barcode": "zzzzaaabbb","business_owners": [

"/api/v0.9/ciowners/15/"],"business_service": false,"cache_version": 0,"created": "2012-08-20T16:02:14","layers": ["/api/v0.9/cilayers/5/"

],"modified": "2012-08-20T16:02:14","name": "DC2","object_id": 24405,"pci_scope": false,"resource_uri": "/api/v0.9/ci/2/","state": 2,"status": 2,"technical_owners": [

"/api/v0.9/ciowners/16/","/api/v0.9/ciowners/4/"

],"technical_service": true,"type": "/api/v0.9/citypes/2/","uid": "man-2440534","zabbix_id": null

}

On success, the above request will return a response with empty body, status 201 and i.a. this header:

Location: http://ralph.example.com/api/v0.9/ci/3/

Editing

First example - PUT

method PUTURL http://ralph.example.com/api/v0.9/ci/3head-ers

Accept: application/jsonContent-Type: application/jsonAuthorization: ApiKey your_username:your_api_key

Request body:

{"added_manually": false,"attributes": [{

"name": "Coolness","value": 1

}],

5.1. CMDB 27

Page 34: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

"barcode": "zzzzaaabbb","business_owners": [

"/api/v0.9/ciowners/15/"],"business_service": false,"cache_version": 0,"created": "2012-08-20T16:02:14","layers": ["/api/v0.9/cilayers/5/"

],"modified": "2012-08-20T16:02:14","name": "DC2","object_id": 24405,"pci_scope": false,"resource_uri": "/api/v0.9/ci/2/","state": 2,"status": 2,"technical_owners": [

"/api/v0.9/ciowners/16/"],"technical_service": true,"type": "/api/v0.9/citypes/2/","uid": "man-2440534","zabbix_id": null

}

The above request will edit the whole CI. On success the response will have HTTP status 204

Example 2 - PATCH

method PATCHURL http://ralph.example.com/api/v0.9/ci/3head-ers

Accept: application/jsonContent-Type: application/jsonAuthorization: ApiKey your_username:your_api_key

Request body:

{"business_owners": [

"/api/v0.9/ciowners/15/","/api/v0.9/ciowners/1/","/api/v0.9/ciowners/2/","/api/v0.9/ciowners/3/"

]}

The above request will change the business owners of a CI, and leave other data unchanged. On success it will returnHTTP status 202.

Editing relations via CI endpoint In API v0.10 you can edit relations and filter by related CIs:

The CIs are retrieved and edited with related field in ci:

"related": [{

"ci": "/api/v0.10/ci/1/","dir": "OUTGOING","type": "CONTAINS"

28 Chapter 5. Additional modules

Page 35: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

}, {"ci": "/api/v0.10/ci/3/","dir": "INCOMING","type": "HASROLE"

}]

To search for children or parent of a given CI, you need to specify the CI id as child or parent e.g./api/v0.10/ci/?child=1&child=10.

BUSINESSLINE

• link

http://localhost:8000/api/v0.9/businessline/

• HTTP Methods

– GET

• example returned data

{"meta":{

"limit":1,"next":"/api/v0.9/businessline/?username=username&limit=2&format=json&api_key=api_key","offset":0,"previous":null,"total_count":10

},"objects":[

{"added_manually":false,"barcode":null,"business_service":false,"cache_version":0,"created":"2012-08-20T16:02:14","id":"777","modified":"2012-08-20T16:02:14","name":"Financial services","object_id":1,"pci_scope":false,"resource_uri":"/api/v0.9/businessline/777/","state":2,"status":2,"technical_service":true,"uid":"bl-1","zabbix_id":null

}]

}

CICHANGE

• link

5.1. CMDB 29

Page 36: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

http://localhost:8000/api/v0.9/cichange/

• HTTP Methods

– GET

• example returned data

{"meta":{

"limit":1,"next":"/api/v0.9/cichange/?username=username&limit=2&format=json&api_key=api_key","offset":0,"previous":null,"total_count":665

},"objects":[

{"cache_version":0,"created":"2012-08-20T16:05:43","external_key":"","id":"123","message":"","modified":"2012-08-20T16:05:45","object_id":2,"priority":3,"registration_type":4,"resource_uri":"/api/v0.9/cichange/123/","time":"2012-08-02T09:59:08","type":2

}]

}

CICHANGECMDBHISTORY

• link

http://localhost:8000/api/v0.9/cichangecmdbhistory/

• HTTP Methods

– GET

• example returned data

{"meta":{

"limit":1,"next":"/api/v0.9/cichangecmdbhistory/?username=username&limit=2&format=json&api_key=api_key","offset":0,"previous":null,"total_count":123

},"objects":[

{"cache_version":1,"ci":"/api/v0.9/ci/5/","comment":"Record updated.",

30 Chapter 5. Additional modules

Page 37: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

"created":"2012-09-22T03:04:48","field_name":"parent","id":"2","modified":"2012-09-22T03:04:48","new_value":"Rack 666 (Device)","old_value":"None","resource_uri":"/api/v0.9/cichangecmdbhistory/2/","time":"2012-09-22T03:04:48"

}]

}

CILAYERS

• link

http://localhost:8000/api/v0.9/cilayers/

• HTTP Methods

– GET

• example returned data

{"meta":{

"limit":1,"next":"/api/v0.9/cilayers/?username=username&limit=2&format=json&api_key=api_key","offset":0,"previous":null,"total_count":8

},"objects":[

{"id":"1","name":"Applications","resource_uri":"/api/v0.9/cilayers/1/"

}]

}

CIOWNERS

• link

http://localhost:8000/api/v0.9/ciowners/

• HTTP Methods

– GET

• example returned data

{"meta": {

"limit": 1,"next": "/api/v0.9/ciowners/?username=username&limit=2&format=json&api_key=api_key",

5.1. CMDB 31

Page 38: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

"offset": 0,"previous": null,"total_count": 175

},"objects": [

{"cache_version": 0,"created": "2012-09-22T16:07:15","email": "[email protected]","first_name": "John","id": "1","last_name": "Ralph","modified": "2012-10-24T12:07:15","resource_uri": "/api/v0.9/ciowner/1/"

}]

}

Ability to filter the resource CIOWNERS

Availability methods:

• startswith

– fields first_name, last_name, email

• exact

– fields first_name, last_name, email

CIRELATIONS

• link

http://localhost:8000/api/v0.9/cirelations/

• HTTP Methods

– GET

• example returned data

{"meta":{

"limit":1,"next":"/api/v0.9/cirelations/?username=username&limit=2&format=json&api_key=api_key","offset":0,"previous":null,"total_count":3568

},"objects":[

{"cache_version":0,"child":4436,"created":"2012-08-20T16:05:42","id":"4444","modified":"2012-08-20T16:05:42","parent":556699,"readonly":true,"resource_uri":"/api/v0.9/cirelation/4444/",

32 Chapter 5. Additional modules

Page 39: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

"type":2}

]}

CITYPES

• link

http://localhost:8000/api/v0.9/citypes/

• HTTP Methods

– GET

• example returned data

{"meta":{

"limit":1,"next":"/api/v0.9/citypes/?username=username&limit=2&format=json&api_key=api_key","offset":0,"previous":null,"total_count":10

},"objects":[

{"id":"1","name":"Application","resource_uri":"/api/v0.9/citypes/1/"

}]

}

CICHANGEGIT

• link

http:/localhost:8000/api/v0.9/cichangegit/

• HTTP Methods

– GET

– POST

• example returned data

{"meta":{

"limit":1,"next":"/api/v0.9/cichangegit/?username=username&limit=2&format=json&api_key=api_key","offset":0,"previous":null,"total_count":4054

},"objects":[

{

5.1. CMDB 33

Page 40: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

"author":"Ralph <[email protected]>","cache_version":0,"changeset":"b263871ac2093d2b658ae4d6096cc756d069f3a9","comment":"Minor improvements","created":"2012-08-20T16:02:15","file_paths":"conf/crontab#modules/test.txt","id":"2178","modified":"2012-08-20T16:02:15","resource_uri":"/api/v0.9/cichangegit/2178/","time":null

}]

}

CICHANGEPUPPET

• link

http:/localhost:8000/api/v0.9/cichangepuppet/

• HTTP Methods

– GET

– POST

• example returned data

{"meta":{

"limit":1,"next":"/api/v0.9/cichangepuppet/?username=username&limit=2&format=json&api_key=api_key","offset":0,"previous":null,"total_count":12

},"objects":[

{"cache_version":0,"configuration_version":"a9e826a","created":"2012-08-20T16:05:38","host":"ralph.local","id":"2","kind":"apply","modified":"2012-08-20T16:05:39","resource_uri":"/api/v0.9/cichangepuppet/2/","status":"failed","time":"2012-08-02T09:59:08"

}]

}

CICHANGEZABBIXTRIGGER

• link

34 Chapter 5. Additional modules

Page 41: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

http:/localhost:8000/api/v0.9/cichangezabbixtrigger/

• HTTP Methods

– GET

– POST

• example returned data

{"meta":{

"limit":1,"next":"/api/v0.9/cichangezabbixtrigger/?username=username&limit=2&format=json&api_key=api_key","offset":0,"previous":null,"total_count":2

},"objects":[

{"cache_version":0,"comments":"add more network card","created":"2012-11-20T00:00:00","description":"overload network","host":"ralph.local","host_id":12,"id":"1","lastchange":"no change","modified":"2012-11-20T00:00:00","priority":1,"resource_uri":"/api/v0.9/cichangezabbixtrigger/1/","status":2,"trigger_id":1

}]

}

SERVICE

• link

http://localhost:8000/api/v0.9/service/

• HTTP Methods

– GET

• example returned data

{"meta":{

"limit":1,"next":"/api/v0.9/service/","offset":0,"previous":null,"total_count":141

},"objects":[

{

5.1. CMDB 35

Page 42: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

"added_manually":false,"barcode":null,"business_line":"Financial services","business_person":"Ralph Kovalsky","business_person_mail":"","business_service":false,"cache_version":0,"created":"2012-08-20T16:02:14","external_key":"XNX-666","id":"10973","it_person":"John Ron","it_person_mail":"[email protected]","location":"PL","modified":"2012-08-20T16:02:14","name":"allegro.pl","object_id":1,"pci_scope":false,"resource_uri":"/api/v0.9/service/10973/","state":"Active","status":2,"technical_service":true,"uid":"bs-1","zabbix_id":null

}]

}

36 Chapter 5. Additional modules

Page 43: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

CHAPTER 6

Extending Ralph

6.1 Writing custom SCAN plugins

6.1.1 PUSH - REST API interface

The easiest way is to push some data using your favorite tool/language through the API. Ralph Core will force you toaccept the changes before saving.

Benefits:

• use any language you want

• can store plugins outside of Ralph Core system

• more compatibility across new Ralph releases

• PUSH mode

Let’s write the easiest SCAN PUSH plugin. For example, you want to list hypervisor machines and register them withthe Ralph interface.

To do this you have to:

1. Obtain an API Key from the Ralph interface - on the bottom part of the page you will see your login name(preference) click on it, and choose “Api key”. You will see your api key there.

2. Prepare your script which generates JSON data.

Example file /tmp/data.json

{"data": {

"date": "2014-01-01 01:01:01","device": {

"disk_shares": [],"disks": [

{"family": "XENSRC PVDISK SCSI Disk Device","label": "XENSRC PVDISK SCSI Disk Device","mount_point": "\\\\.\\PHYSICALDRIVE0","serial_number": "ca009e3f-83a3-48","size": "40607"

}],"fibrechannel_cards": [

37

Page 44: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

],"installed_software": [

{"label": "Windows Driver Package - Citrix Systems Inc.","model_name": "Windows Driver Package - Citrix Systems","path": "Citrix Systems Inc. - Windows Driver Package","version": "05/09/2013 7.0.0.86"

},

],"mac_addresses": ["de:ad:be:ef:ca:fe"],"memory": [],"model_name": [

"HP Blade Center XXL"],"processors": [{

"cores": "1","family": "Virtual Intel64 Family 6 Model 62 Stepping 4","index": "CPU0","label": "Virtual Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz","model_name": "Virtual Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz 2600Mhz","speed": "2600"

},{

"cores": "1","family": "Virtual Intel64 Family 6 Model 62 Stepping 4","index": "CPU1","label": "Virtual Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz","model_name": "Virtual Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz 2600Mhz","speed": "2600"

}],"results_priority": {

"disk_shares": 30,"disks": 30,"fibrechannel_cards": 60,"installed_software": 60,"mac_addresses": 50,"memory": 60,"model_name": 25,"processors": 60,"serial_number": 20,"system_cores_count": 60,"system_ip_addresses": 60,"system_memory": 60,"system_storage": 30

},"serial_number": "JAX1037K0C6","system_cores_count": "8","system_ip_addresses": [

"127.0.0.1"],"system_memory": "8183","system_storage": "91545"

},"messages": [

"This is a test"

38 Chapter 6. Extending Ralph

Page 45: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

],"plugin": "donpedro","status": "success"

}}

2. Send JSON data to the API interface using your script (REST call), or via commandline like this

curl -XPOST https://ralph.office/api/v0.9/scanresult/ -d @/tmp/data.json -H "Authorization: ApiKey user.name:api_key" -H "Content-type: application/json"

3. View & accept your data using GUI: you can use direct URL pasting your IP Address into the URLhttp://ralph.address/ui/scan/status/127.0.0.1/ - or just navigate to your IP Address usingNetworks / Scan tab - you will see ‘Full Scan’ link.

6.2 PULL - Generic SCAN plugins

Use this if your hardware is a generic one, and can be periodically scanned alongside other existing plugins like http,snmp, ping.

First-class SCAN plugin allows you to reuse some features like:

• you don’t have to reinvent the ping scans, snmp scanning, http family discoering

• but - Python knowledge required :)

• strictly integrated with existing codebase(we accept pull requests :))

• see example plugin: https://github.com/allegro/ralph/blob/develop/src/ralph/scan/plugins/hp_oa.py

Create a file in src/ralph/scan/plugins which provides scan_address function, for example something like this

def scan_address(ip_address, **kwargs):snmp_name = (kwargs.get('snmp_name', '') or '').lower()if snmp_name and "onboard administrator" not in snmp_name:

raise NoMatchError('It is not HP OA.')if kwargs.get('http_family', '') not in ('Unspecified', 'RomPager', 'HP'):

raise NoMatchError('It is not HP OA.')messages = []result = get_base_result_template('hp_oa', messages)try:

device_info = _hp_oa(ip_address)except (IncompatibleAnswerError, IncompleteAnswerError) as e:

messages.append(unicode(e))result['status'] = 'error'

else:result['status'] = 'success'result['device'] = device_info

return result

Function should return a dict object with keys: - status: string (“error”, “success”) - device: the same datasubkey as in JSON PUSH interface, e.g { “serial_number” : “sn”, “model_name”: “test”}

Raise NoMatchError if the plugin didn’t match the device you’re scanning.

6.2. PULL - Generic SCAN plugins 39

Page 46: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

6.3 Writing own module

All Ralph apps(CMDB, Assets, Scrooge) are based on the same engine. There’s way to make new custom moduleextending Ralph functionality. They are pinned to the ralph bar with custom icon.

If you want to make complete new module from scratch, you need to subclass the Ralph Module class.

If you need any default settings for your app, you can manipulate self.settings in __init__ of your class.

Then you need to point to your RalphModule subclass in entry points:

entry_points={'django.pluggable_app': [

'assets = ralph_assets.app:Assets',],

]

40 Chapter 6. Extending Ralph

Page 47: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

CHAPTER 7

Scan - Device discovery

Scan is a new discovery mechanism for Ralph which is stable and fast.

Ralph is able to periodically scan your all networks/environments and detect hardware information, software configu-ration and location. Currently we have 30 plugins for hundreds of common hardware, but it’s very easy to write yourown plugin for the specific king of hardware. It’s possible to enter this information manually too.

7.1 Preparing

You need to have rqworker running on the environment you want to scan. You do that with the command:

(ralph)$ ralph rqworker [your_worker_name]

It’s possible to make some workers to only process the addresses from certain environments. The environment defini-tions have a queue parameter which tells to which worker queue the discovery requests should be sent. When startinga worker you can provide queue names as parameters to specify on which queues the workers should listen on.

It is advised to have the scan command called from a Cron job on the server at least once a day, so that the informationin the database is up to date.

7.2 Scanning existing device

The best way to use scan is using GUI.

1. From any device view select ‘Scan’ tab.

2. Choose IP Address for scan.

3. Choose appropriate plugins you want to use, or select ‘all’. There is some information on the right side frompre-scan plugin which try to detect SNMP version used, and http service available.

41

Page 48: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

4. Click ‘Scan’ and view and accept results on the next screen.

7.3 Scanning new devices

1. You have to add network, and discovery environment using admin panel.

2. Go to ‘Networks’ module and find network you want to scan.

3. Chose ‘Autoscan’ tab.

4. If network was not scanned before you should click ‘Scan now’. IP Addresses will be shown to you.

5. Click on given IP address to view scan results, or if ‘Full scan’ column is filled in, you could immediately viewscan results.

6. Now you can view and accept scan results.

42 Chapter 7. Scan - Device discovery

Page 49: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

7.4 Plugins configuration

Most plugins will require some configuration before they can be successfully used by Ralph. This is usually the loginand password that they need to use to log into whatever service they use. All that configuration should go to the~/.ralph/settings file.

Warning: Make sure that the settings file is not readable to users who shouldn’t see all those passwords!

You will need to have that configuration file on every worker that is supposed to run discovery.

7.5 Discovery plugins

Ralph comes with a number of discovery plugins built in. Some of them are necessary for discovery to function, otherscan be safely skipped.

7.5.1 Ping Plugin

This plugin requires no additional settings. It will ping the specified IP address to check whether it is available. Mostdiscovery plugins will not run if this plugin failed. This plugin doesn’t create any devices in the database.

7.5.2 HTTP Plugin

This plugin will attempt to connect to ports 80 and 443 of the specified IP address and try to get a page using HTTPor HTTPS, respectively. Then it will parse its response headers and body content, and attempt to guess the ven-dor and model of the device in question, using a number of hard-coded heuristics. This plugin doesn’t require anyconfiguration. This plugin doesn’t create any devices in the database.

7.5.3 SNMP Plugin

This plugin will try to connect to the specified IP address through the SNMP protocol, and retrieve its System Nameproperty. To function properly, this plugin needs to know the list of SNMP communities to try, which you set in theSNMP_PLUGIN_COMMUNITIES variable. Optionally, this plugin can also attempt to use SNMP version 3 – then it

7.4. Plugins configuration 43

Page 50: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

also needs SNMP_V3_USER, SNMP_V3_AUTH_KEY and SNMP_V3_PRIV_KEY set. This plugin doesn’t create anydevices in the database, but collects information that is later used by many other plugins.

7.5.4 SNMP MAC Plugin

This plugin will attempt to get the list of device’s MAC hardware addresses through the SNMP protocol. In addition,it may be able to retrieve the model name and serial number for some models of devices. It doesn’t require anyadditional configuration, apart from that already done for the SNMP Plugin. If it retrieves the MAC addresses or aserial number, it will create a device in Ralph’s database.

7.5.5 IPMI Plugin

This plugin will try to connect to the specified IP using the IPMI protocol, and attempt to retrieve information aboutthe device’s vendor, model, serial number, MAC addresses and hardware components. If it succeeds, it creates acorresponding device in the Ralph’s database. For proper operation this plugin requires a ipmitool binary to beinstalled, and the IPMI_USER and IPMI_PASSWORD settings variables set.

7.5.6 HTTP Supermicro Plugin

This plugin will attempt to log into the web interface of a Supermicro server management, and scrap the informationabout its hardware MAC addresses. If successful, it will create a corresponding device in Ralph’s database. It will usethe same credentials as the IPMI Plugin.

7.5.7 SSH Linux Plugin

This plugin will attempt to connect to the specified IP address using SSH, log into the configured user account andretrieve information about the device’s hardware using common linux commands. This plugin requires that the remotesystem allows logging in using the SSH_USER and SSH_PASSWORD or XEN_USER and XEN_PASSWORD as cre-dentials. It also requires that this user is allowed to run sudo dmidecode, ip, hostname, uname, df and read/proc/meminfo and /proc/cpuinfo. If the plugin manages to retrieve the MAC addresses or device’s serialnumber, it creates a corresponding entry in Ralph’s database.

7.5.8 SSH Proxmox Plugin

This plugin will attempt to connect to the specified IP address using SSH, log into the root account using configuredSSH_PASSWORD and retrieve information about the virtual servers running in a Proxmox cluster on this server. It willadd the information about those virtual servers to the Ralph’s database.

7.5.9 Proxmox 2/3 Plugin

This plugin is a slightly improved version of SSH Proxmox Plugin. The main difference here is that apart fromusing SSH, it uses Proxmox API for data retrieving, which is available for Proxmox 2.x and 3.x. Therefore, it allowsfor more detailed queries and convenient separation of plugins for further development (i.e. SSH Proxmox Pluginfor 1.x and Proxmox 2/3 Plugin for 2.x and 3.x). Apart from those differences, this plugin is configured exactlythe same as the previous one.

44 Chapter 7. Scan - Device discovery

Page 51: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

7.5.10 SSH XEN Plugin

This plugin will attempt to connect to the specified IP address using SSH, log into it configured XEN_USER andXEN_PASSWORD and retrieve information about the virtual servers running in a XEN cluster on this server. It willadd the information about those virtual servers to the Ralph’s database. For this plugin to work correctly, the serverneeds to have the account configured to allow login and executing of the following commands:

sudo xe vif-list params=vm-name-label,MACsudo xe vm-disk-list vdi-params=sr-uuid,uuid,virtual-size vbd-params=vm-name-label,type,devicesudo xe sr-list params=uuid,physical-size,typesudo xe vm-list params=uuid,name-label,power-state,VCPUs-number,memory-actual

7.5.11 SSH Ganetti Plugin

This plugin will attempt to connect to the specified IP address using SSH, log into it configured SSH_USER andSSH_PASSWORD and retrieve information about the virtual servers running in a Ganetti cluster on this server. It willadd the information about those virtual servers to the Ralph’s database.

7.6 Integration with external services

Ralph can communicate with some external services.

7.6.1 OpenStack

If you configure the variables OPENSTACK_URL, OPENSTACK_USER and OPENSTACK_PASSWORD to point to thenova API of your OpenStack instance, then you can use the command:

(ralph)$ ralph openstack

to pull in the billing information for OpenStack tenants for the previous day. New “openstack” components will bethen created in the catalog, where you can set the prices for them. That information is then displayed in the “Venture”tab summary.

You can add an optional --remote parameter to make the command run on any RQ worker that listens on theopenstack queue.

7.6.2 Zabbix

If you configure ZABBIX_URL, ZABBIX_USER and ZABBIX_PASSWORD, with the addition ofZABBIX_DEFAULT_GROUP, then you can use the command:

(ralph)$ ralph zabbixregister

to automatically create Zabbix hosts and host templates for all the devices that have a Zabbix integration “template”variable set in their roles.

You can add an optional --remote parameter to make the command run on any RQ worker that listens on thezabbix queue.

7.6. Integration with external services 45

Page 52: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

7.6.3 Splunk

If you configure SPLUNK_URL, SPLUNK_USER and SPLUNK_PASSWORD, then you can use the command:

(ralph)$ ralph splunk

to download usage information about all the hosts from Splunk. New components will be created in the catalog, whereyou can set their prices. That information is then displayed in the “Venture” tab summary.

46 Chapter 7. Scan - Device discovery

Page 53: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

CHAPTER 8

The device browser

The main feature of the Ralph web interface is the browser for your discovered devices. Depending on your needs andpermissions, you can browse them in five ways:

• The “racks” browser lets you see the physical organisation of your datacenter, indicating where every device islocated.

• The “ventures” browser lets you browse by the organisations that own the devices, and by the services to whichthey belong.

• The “networks” browser enables you to see your datacenter from the point of view of the network addresses.

• The “CMDB” browser displays the devices and other elements relevant to change management, together withtheir relations and changes.

• Finally, the “advanced search” browser lets you create custom lists of devices based on many attributes set onthem, such as name, model, components, serial number or change history.

8.1 Viewing devices

No matter which browser you use, you will see a tabbed view with a list of the devices. Each of the tabs will displaya different set of columns in the list, and after clicking on a device name, different form with information about thatdevice.

8.1.1 Info

This tab displays the general information about the device, such as its name, model, serial number and barcode, ownerand role, physical position etc. It also displays a number of links to related devices and pages, depending on the typeof the device, such as virtual machine’s hypervisor or blade server’s management address.

8.1.2 Components

This tab shows the information about detected contents of the device. It lists the model and serial numbers of all ofits physical components, such as processors, memory, disks and extension cards. It also lists the software that wasdetected on the device, together with its versions.

47

Page 54: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

8.1.3 Addresses

This tab shows everything that is related to network: the list of IP addresses assigned to the device, the relevant DHCPand DNS configuration entries, and the list of relevant loadbalancer pools, together with their state.

8.1.4 History

In this tab you can see the history of all changes to the device in the database, together with dates, comments andpeople responsible for the change. It’s useful when you need to track what happened with the device in the past.

8.1.5 Discover

Using this tab, you can force re-running of the discovery process for any of the device’s IP addresses (or even enter acustom IP address by hand). It will show you the logs from the discovery process as it happens.

Note: Note that this is equivalent to running the discovery from a command line on the server which hosts the webapplication – the task is not sent to external workers. If your workers are in different private networks or have differentaccess to the devices you are managing, then the results of manual discovery may be different from the automaticdiscovery done by the workers.

8.1.6 Roles

Visible only in the “Ventures” section, this tab shows you all the device roles defined in that venture.

8.1.7 Venture

Only displayed in the “Ventures” section, shows information about the currently selected venture. You can see asummary of costs for selected time period, together with a graph showing how the costs changed in time.

8.1.8 CMDB

This tab displays information relevant to change management. More details in the CMDB documentation.

8.2 Editing devices

Depending on your permissions, you may be able to change the attributes of devices that you are viewing. Every timeyou make a change, you have to provide a comment describing your change for the change history.

Once any of the fields have been changed manually, a small hand icon is displayed next to that field. That means, thatthe value of that field will not be updated automatically now – to not overwrite the manual changes. You can click onthat icon in order to remove it and allow automatic changes of the field.

There’s one more restriction here - when a device is assigned to an asset, you can not change its position fields (i.e.parent, dc, rack, position, orientation). In order to do that, you should use “Assets” module instead. This should beconsidered as a temporary workaround, because in the future, position will be stored only in the “Assets” module.

48 Chapter 8. The device browser

Page 55: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

CHAPTER 9

Server deployment

9.1 Overview

Ralph has some mechanisms for automating deployment of servers. At the moment only physical servers are sup-ported, virtual server deployment is planned.

The deployment process has to perform several tasks:

• releasing any DNS names, DHCP entries and other resources associated with the old role of the server,

• assigning an IP address, together with corresponding DNS and DHCP entries,

• assigning the server to a new venture,

• assigning a new role for the server in Puppet,

• booting the server through PXE with a selected boot image and reinstalling its system.

In order to perform those tasks on a server, the deployment of a server goes through a number of steps:

• open,

• in progress,

• done.

A newly started deployment always starts as “open”. In that stage all the deployment plugins are executed, clearingold DNS and DHCP entries, creating new ones and assigning the server to a new Puppet role and venture. At that pointthe status is changed to “in progress” and the server has to be rebooted in order to install new operating system on it.As soon as the new system is installed and Puppet applies the server’s role, it sends a signal to Ralph that switches thestatus of the deployment to “done”. At this point the deployment is finished and it is archived.

9.2 Interface

9.2.1 Individual deployment

Deployment can be started by clicking on a “deploy” button at the bottom of the “info” tab of a device in Ralph. Forthe button to be visible, the device has to have the “verified” checkbox checked. Once that is done, deployment is theonly way to change the device’s venture and role.

The deployment form that appears lets you pick the desired new venture, role, IP address and hostname for the server,as well as the MAC address that should be used for booting it, and the boot image to boot from.

49

Page 56: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

9.2.2 Bulk deployment

It is also possible to start deployments in bulk. The “add device” tab in the “racks” section has an option called“servers” that lets you specify a CSV file with all the required information, validates it and automatically fills inmissing information, and then starts deployments in bulk from it.

9.2.3 Programmatic Deployment of VMs

The URL /api/add_vm/ can be used for a quick deployment of VMs. To perform it you need to send a POST requestwith JSON, YAML or XML data. This data should contain the following keys:

network: The name of the network for the new machine

management-ip: The IP of the container that will host the VM

mac: The MAC address of VMs network interface

venture: The symbol of the venture

venture-role: The name of the venture role

Ralph will create a new VM and also configure powerdns and DHCP for it.

9.3 Plugins

The deployment plugins are executed with the ralph deploy command regularly by cron. That command iteratesover all “open” deployments and executes all plugins that haven’t been yet successful for that deployment, but haveall their requirements ready.

9.3.1 Clean plugin

The “clean” plugin is responsible for removing old information about a server from the Ralph database and also fromthe DNS and DHCP configurations. It performs the following tasks:

• remove all DHCP entries for the IP addresses associated with the server,

• remove all DNS entries for the IP addresses associated with the server,

• remove all DHCP entries for the MAC addresses associated with the server,

• disassociate all the IP addresses from the server,

• remove all software information associated with the server,

• remove all disk share information associated with the server,

• remove the operating system information associated with the server,

• disassociate all sub-devices,

• reset the uptime information,

• add a remark to the user comments for that server,

• associate the new IP address with the server.

This plugin should be always run at the beginning of deployment. It has no requirements.

50 Chapter 9. Server deployment

Page 57: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

9.3.2 Role plugin

The “role” plugin is responsible for setting the server’s new venture and role in the Ralph’s database.

9.3.3 DNS plugin

The “dns” plugin is responsible for creating a DNS “A” entry, and the related “PTR” entry, for the new IP address ofthe server.

9.3.4 DHCP plugin

The “dhcp” plugin is responsible for updating the DHCP entries in the Ralph database, and then for waiting untilall the DHCP servers have the updated documentation. It will keep failing until all configured DHCP servers havedownloaded the new configuration.

9.3.5 Reboot plugin

This plugin is responsible for rebooting the physical server once all the other plugins have finished their work. Thisplugin is currently disabled and the servers have to be restarted manually.

9.4 Boot images

At the end of the deployment process, the server needs to be restarted and it has to boot one of the prepared bootimages that installs a new operating system. This is achieved using the bootp and PXE protocols.

To control that, Ralph lets you configure which boot images should be used for every deployment, and then servesthose images at the /pxe/ URL. The exact file being served depends on the IP that is requesting it.

The DHCP configuration generated by Ralph contains an additional header for the IP addresses that have an active de-ployment. That header makes the server boot from network, with a small Linux image (ePXE) that in turns downloadsthe correct image from Ralph through HTTP and boots it. The exact value of that header can be configured for everyenvironment separately, as the next server.

Once the system installation is complete, the system should request /pxe/DONE/ URL, which causes Ralph to markthe deployment as finished. Ralph knows which deployment to mark as finished by the IP address of the request.

9.4. Boot images 51

Page 58: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

52 Chapter 9. Server deployment

Page 59: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

CHAPTER 10

DNS configuration

The way Ralph stores and manipulates the information about domain names in its database is compatible with theway the PowerDNS daemon does it – so you can just point an instance of PowerDNS to Ralph’s database and have allchanges done through Ralph immediately reflected in PowerDNS configuration.

10.1 Importing configuration

Ralph also has a command for importing a zone file into its database, so that you can migrate your existing DNSconfiguration easily:

ralph dnsimport <filename>

Note, that this command is not suitable for updating an existing zone configuration – it’s only good for creating a newzone.

53

Page 60: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

54 Chapter 10. DNS configuration

Page 61: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

CHAPTER 11

DHCP configuration

Ralph can generate configuration for your DHCP servers. Unfortunately, we didn’t find any DHCP server thatcould use a database for storing its configuration directly, so to keep the configuration updated, you will needto generate it from Ralph periodically and reload your DHCP server when it changes. There is a script calledralph_dhcp_agent.py distributed with Ralph in the contrib directory that makes it easier to do.

11.1 Ralph DHCP agent

This script is supposed to be called periodically by cron. It will download a new DHCP configuration for the server onwhich it runs from Ralph, compare its date with the date of the current configuration, and restart your DHCP server ifthe downloaded configuration is newer.

11.2 Configured DHCP servers

Ralph can optionally keep a list of all DHCP servers in its data centers. When a DHCP server that is on that listdownloads a fresh DHCP configuration from Ralph, Ralph will note this fact in the database. This is later used duringserver deployment to wait for all DHCP servers to update their configuration. If a DHCP server is not on the list, Ralphwill not wait for it to update before proceeding with deployment.

11.3 Importing and exporting DHCP configuration

You can use the dhcpimport and dhcpexport Ralph commands to import or export DHCP entries.

55

Page 62: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

56 Chapter 11. DHCP configuration

Page 63: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

CHAPTER 12

Notifications

12.1 Overview

Notifications is a simple app to send and archive your emails. Some features:

• send email asynchronoulsy by rq queue,

• supports HTML and TXT emails,

• supports Django template engine to render emails,

• supports max retries.

12.2 Example of use

Simple example:

from ralph.notifications import send_email

send_email(receivers=['[email protected]', '[email protected]'],sender='[email protected]',subject='New device was discovered',html_template='simple',txt_template='simple',variables={'content': 'Notifications content...'},

)

12.3 Configuration

Notifications provides two extra settings:

• NOTIFICATIONS_MAX_ATTEMPTS – max attemps (default 10)

• NOTIFICATIONS_QUEUE_NAME – name of rq queue which it is use for sending email (default default)

57

Page 64: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

58 Chapter 12. Notifications

Page 65: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

CHAPTER 13

API

Various components of ralph suite expose a REST-ful API that can be used both for querying the database and popu-lating it with data. The API utilises tastypie to handle your requests. json, xml, yaml or plist format can be usedfor data serialization and deserialization.

Current version of the API: v0.9. The API specification is unstable now.

13.1 Authentication

To authenticate yourself you need to provide your ApiKey in a header:

Authorization: ApiKey your_username:your_api_key

In order to obtain the api_key:

1. Click your username in the lower right corner of the application.

2. Choose “My API key” from the menu.

13.2 Output format

There are two ways of setting the format of output:

1. By setting the Accept header to the correct MIME-type:

2. By adding a format parameter with the desired format name

Format name Mimetypejson application/jsonxml application/xmlyaml text/xyamlplist application/x-plist

NOTE: In order to use plist format you need to install biplist package which is currently not installed by default inralph distribution.

13.3 Input format

You can use any of the above formats for input. The Content-Type header should be set as above.

59

Page 66: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

13.4 HTTP methods

The following methods can be used in the API. Consult the API reference of specific module for more precise expla-nations.

Method On a collection On a single resourceGET Get full list of resources Get resource detailsPOST Add a new resource UnusedPUT Replace the whole collection (!) Edit the resource (you need to provide all data)PATCH Unused Edit the resource (you only need to provide changed data)DELETE Remove the whole collection (!) Remove the resource

13.5 Some notes

1. When using the POST method you should expect to receive HTTP status 201 response. This response willcontain Location header with the URL of the created resource. The response body would be empty.

2. The related resource will be specified in one of two ways:

(a) The URL of the related resource

(b) As the details

You may use any of these in input.

API references for modules:

CMDB available resources

60 Chapter 13. API

Page 67: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

CHAPTER 14

Frequently Asked Questions

14.1 Integration

14.1.1 How can I set up LDAP authentication?

You will need to install django-auth-ldap and python-ldap using pip. Then add LDAP as an authenticationbackend in your local settings:

AUTHENTICATION_BACKENDS = ('django_auth_ldap.backend.LDAPBackend','django.contrib.auth.backends.ModelBackend',

)LOGGING['loggers']['django_auth_ldap'] = {

'handlers': ['file'],'propagate': True,'level': 'DEBUG',

}

You will need to configure the LDAP connection as well as mapping remote users and groups to local ones. For detailsconsult the official django-auth-ldap documentation. For example, connecting to an Active Directory service mightlook like this:

import ldapfrom django_auth_ldap.config import LDAPSearch, GroupOfNamesTypeAUTH_LDAP_SERVER_URI = "ldap://activedirectory.domain:389"AUTH_LDAP_BIND_DN = "secret"AUTH_LDAP_BIND_PASSWORD = "secret"AUTH_LDAP_PROTOCOL_VERSION = 3AUTH_LDAP_USER_USERNAME_ATTR = "sAMAccountName"AUTH_LDAP_USER_SEARCH_BASE = "DC=allegrogroup,DC=internal"AUTH_LDAP_USER_SEARCH_FILTER = '(&(objectClass=*)({0}=%(user)s))'.format(AUTH_LDAP_USER_USERNAME_ATTR)

AUTH_LDAP_USER_SEARCH = LDAPSearch(AUTH_LDAP_USER_SEARCH_BASE,ldap.SCOPE_SUBTREE, AUTH_LDAP_USER_SEARCH_FILTER)

AUTH_LDAP_USER_ATTR_MAP = {"first_name": "givenName", "last_name": "sn","email": "mail"}

AUTH_LDAP_PROFILE_ATTR_MAP = {"company": "company","manager": "manager","department": "department","employee_id": "employeeID","location": "officeName",

61

Page 68: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

"country": "ISO-country-code",}

However, when using OpenDJ as a LDAP server, AUTH_LDAP_USER_USERNAME_ATTR should be equal to uid:

AUTH_LDAP_USER_USERNAME_ATTR = "uid"

For other implementations objectClass may have the following values:

• Active Directory: objectClass=user,

• Novell eDirectory: objectClass=inetOrgPerson,

• Open LDAP: objectClass=posixAccount

Manager is special field and is treated as reference to another user, for example “CN=John Smith,OU=TOR,OU=Corp-Users,DC=mydomain,DC=internal” is mapped to “John Smith” text.

Country is special field, the value of this field must be a country code in the ISO 3166-1 alfa-2 format.

Ralph provides ldap groups to django groups mapping. All what you need to do are:

• import custom MappedGroupOfNamesType,

• set up group mirroring,

• declare mapping.

from ralph.account.ldap import MappedGroupOfNamesTypeAUTH_LDAP_GROUP_MAPPING = {

'CN=_gr_ralph,OU=Other,DC=mygroups,DC=domain': "active",'CN=_gr_ralph_assets_buyer,OU=Other,DC=mygroups,DC=domain': "assets-buyer",'CN=_gr_ralph_assets_helper,OU=Other,DC=mygroups,DC=domain': "assets-helper",'CN=_gr_ralph_assets_staff,OU=Other,DC=mygroups,DC=domain': "assets-staff",'CN=_gr_ralph_admin,OU=Other,DC=mygroups,DC=domain': "superuser",'CN=_gr_ralph_staff,OU=Other,DC=mygroups,DC=domain': "staff",

}AUTH_LDAP_MIRROR_GROUPS = TrueAUTH_LDAP_GROUP_TYPE = MappedGroupOfNamesType(name_attr="cn")AUTH_LDAP_GROUP_SEARCH = LDAPSearch("DC=organization,DC=internal",

ldap.SCOPE_SUBTREE, '(objectClass=group)')

Note: For OpenDJ implementation AUTH_LDAP_GROUP_MAPPING is not obligatory. AUTH_LDAP_GROUP_TYPEand AUTH_LDAP_GROUP_SEARCH should be set as follows:

from django_auth_ldap.config import GroupOfUniqueNamesTypeAUTH_LDAP_GROUP_TYPE = GroupOfUniqueNamesType()AUTH_LDAP_GROUP_SEARCH = LDAPSearch("DC=organization,DC=internal",

ldap.SCOPE_SUBTREE, '(structuralObjectClass=groupOfUniqueNames)')

If you want to define ldap groups with names identical to ralph roles, you shouldn’t declare mappingAUTH_LDAP_GROUP_MAPPING. If there are any one mapping defined another groups will be filtered. Some groupshave special meanings. For example users need to be in active to log in, superuser gives superuser privileges.You can read more info in Groups.

You can define users filter, if you don’t want to import all users to ralph:

AUTH_LDAP_USER_FILTER = '(|(memberOf=CN=_gr_ralph_group1,OU=something,'\'DC=mygroup,DC=domain)(memberOf=CN=_gr_ralph_group2,OU=something else,'\'DC=mygroups,DC=domain))'

In case of OpenDJ please use isMemberOf instead of memberOf.

62 Chapter 14. Frequently Asked Questions

Page 69: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

To synchronize user list you must run command:

ralph ldap_sync

During the process, script will report progress on every 100-th item loaded.

14.2 Gunicorn

14.2.1 Can I start Gunicorn using the traditional start-stop-daemon?

Sure, here is the init.d recipe for Debian/Ubuntu: /etc/init.d/gunicorn. Just alter the CONFDIR andVENV_ACTIVATE variables. Note: service gunicorn restart only HUPs the server. If an actual restartis necessary, use the service gunicorn force-restart command.

If you happen to have a script like this for another operating system, contact us so to include it here.

14.3 MySQL

14.3.1 The web app shows error screens with database warnings about incorrectcharacters.

On many systems the default configuration of MySQL is not optimal. Make sure that your tables are using UTF-8 asthe character set, with compatible collation and InnoDB storage engine. Example:

mysql> alter table TABLENAME engine=innodb;mysql> alter table TABLENAME convert to character set utf8 collate utf8_general_ci;

14.3.2 My worker creates a new database connection on each task.

This is a known limitation of Django. The best solution is to set up a mysql-proxy instance which will reuse actualdatabase connections and set up Ralph to use that. First install mysql-proxy:

$ sudo apt-get install mysql-proxy

Then edit /etc/default/mysql-proxy so it says:

ENABLED="true"OPTIONS="--proxy-backend-addresses=mysqlserverhost.local:3306 --log-level=info --log-use-syslog --proxy-address=127.0.0.1:4041 --admin-username=ralph --admin-password=ralph --admin-lua-script=/usr/lib/mysql-proxy/lua/admin.lua"

Start the proxy:

$ sudo service mysql-proxy start

In /var/log/syslog you should see:

Jul 25 10:44:14 s10337 mysql-proxy: 2012-07-25 10:44:14: (message) mysql-proxy 0.8.1 startedJul 25 10:44:14 s10337 mysql-proxy: 2012-07-25 10:44:14: (message) proxy listening on port 127.0.0.1:4041Jul 25 10:44:14 s10337 mysql-proxy: 2012-07-25 10:44:14: (message) added read/write backend: mysqlserverhost.local:3306

Then alter your settings so the DATABASES dictionary points at the proxy address and not at the actual database,restart Ralph and you’re done.

14.2. Gunicorn 63

Page 70: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

14.3.3 The web app creates a new database connection on each request.

See above.

14.3.4 My worker leaves too many connections to the database open.

See above.

14.4 RQ workers

14.4.1 How to check how many tasks are waiting on the queue?

Just install rq-dashboard to control RQ queues:

$ pip install rq-dashboard

To use it, just run rq-dashboard from commandline, and fire up browser on port 9181:

$ rq-dashboardRunning on http://0.0.0.0:9181/

14.5 TCP/IP

14.5.1 There are large amounts of sockets in TIME_WAIT state on the worker ma-chine. What is this?

Sockets that are closed wait for 60 more seconds to handle possible duplicate packets and ensure the other partyreceived the ACK. For massively concurrent workers this can lead to tens of thousands of sockets in the TIME_WAITstate. The worker machines are dedicated to scan the local network so you can safely shorten keepalive to 5 * 30seconds and the timeout interval to 10 seconds and by issuing:

$ sysctl -w net.ipv4.tcp_fin_timeout=10$ sysctl -w net.ipv4.tcp_keepalive_probes=5$ sysctl -w net.ipv4.tcp_keepalive_intvl=30

Additionally, if you don’t use a load balancer on the worker machine, you can safely recycle TIME_WAIT sockets:

$ sysctl -w net.ipv4.tcp_tw_reuse=1$ sysctl -w net.ipv4.tcp_tw_recycle=1

The current number of waiting connections can be checked by:

$ sudo netstat -natup | grep "^tcp" | wc -l

14.5.2 On a large subnetwork I’m getting ipv4: Neighbour table overflow.in dmesg.

Your ARP table is overflowing. Increase the limits:

64 Chapter 14. Frequently Asked Questions

Page 71: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

$ sudo sysctl -w net.ipv4.neigh.default.gc_thresh3=8192$ sudo sysctl -w net.ipv4.neigh.default.gc_thresh2=8192$ sudo sysctl -w net.ipv4.neigh.default.gc_thresh1=4096$ sudo sysctl -w net.ipv4.neigh.default.base_reachable_time=86400$ sudo sysctl -w net.ipv4.neigh.default.gc_stale_time=86400

14.5.3 How to handle "No buffer space available" errors on sockets?

See the two above.

14.5. TCP/IP 65

Page 72: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

66 Chapter 14. Frequently Asked Questions

Page 73: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

CHAPTER 15

Permissions

Different users can have different permissions in Ralph. The permissions are edited through the admin interface, inthe user list. There are two kinds of permissions: user permissions, for direct access to the data through the admininterface, and bound permissions, which give access to different parts and functionalities of the user interface.

In addition, a user who has “staff” status will see a link to the admin interface, while any user with the “superuser”status will automatically gain all possible permissions.

67

Page 74: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

15.1 List of bound permissions

Action 1 Object ScopeREAD Data center

structureGLOBAL

EDIT Ventures and roles GLOBALCREATE+DELETE Devices GLOBALEDIT Generic device

infoGLOBAL

EDIT Financial deviceinfo

GLOBAL

EDIT Device supportinfo

GLOBAL

EDIT DNS information GLOBALACCESS Discovery GLOBALREAD Device

managementGLOBAL

ACCESS Admin GLOBALREAD Device group VENTURE 2

READ Devices in a group VENTURE 3

READ Financial devicegroup info

VENTURE 3

READ Generic deviceinfo

VENTURE 3

READ Venture and roleinfo

VENTURE 3

READ Financial deviceinfo

VENTURE 3

READ Device supportinfo

VENTURE 3

15.2 Groups

Instead of giving permissions to every user separately, ralph use group-based permissions. Each group defined belowrepresents role with defined set of permissions. You can add users to these groups to give them access to read andwrite proper part of data.

There are default groups defined:

• assets-buyer - user can view and modify assets financial data,

• assets-helper - user can modify assets assignee and localization,

• assets-staff - user has permission to manage assets data in administrator panel.

If you want to integrate Ralph with ldap, you will see these three metagroups usefull:

• superuser,

• staff,

• active.1EDIT = CREATE, UPDATE and DELETE2Results are filtered per ventures and roles the user has access to.

68 Chapter 15. Permissions

Page 75: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

These groups are translated into is_GROUPNAME user’s flags defined in django. Be careful of defining groups withthat names, because users will be added to them automatically after login through ldap.

15.3 API Access

In order for the users to be able to access the web API programmatically, they need to have an API key generated forthem – this can be done on the user’s page in the admin interface.

15.4 List of bound permissions

Resource Permbladeserver read_dc_structurebusinessline read_configuration_item_info_genericci read_configuration_item_info_genericcichange read_configuration_item_info_genericcichangecmdbhistory read_configuration_item_info_genericcichangegit read_configuration_item_info_gitcichangepuppet read_configuration_item_info_puppetcichangezabbixtrigger read_configuration_item_info_genericcilayers read_configuration_item_info_genericciowners read_configuration_item_info_genericcirelation read_configuration_item_info_genericcitypes read_configuration_item_info_genericdepartment read_dc_structuredeployment read_deploymentdev read_dc_structuredevicewithpricing read_dc_structureipaddress read_network_structuremodel read_dc_structuremodelgroup read_dc_structurephysicalserver read_dc_structurerackserver read_dc_structurerole read_dc_structurerolelight read_dc_structureroleproperty read_dc_structurerolepropertytype read_dc_structurerolepropertytypevalue read_dc_structurerolepropertyvalue read_dc_structureservice read_configuration_item_info_genericventure read_dc_structureventurelight read_dc_structurevirtualserver read_dc_structureglobal_module_access has_assets_accessglobal_module_access has_core_accessglobal_module_access has_scrooge_access

15.4. List of bound permissions 69

Page 76: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

70 Chapter 15. Permissions

Page 77: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

CHAPTER 16

Quickstart

Let’s learn Ralph by example. Throughout this tutorial, we’ll walk you through:

• adding asset information, licences and support

• scanning asset details and configuration

• access billing information

16.1 Assets

16.1.1 Fitlering the assets

Let’s start with the main screen. Here you find all your hardware assets which are in the database. Use the left columnfor filtering of the assets.

There are two types of assets – devices and parts. A device could be a blade server, and a part is a component of thisserver, for example memory or hard disk drive. A part can be assigned to a single device at a time. You can move partsfrom one device to another when you need it.

16.1.2 Adding Assets

If you want add asset you need to fill a few required fields. Look at the screen below (you can zoom-in the image inyour browser if you want) The fields in bold are required. Rest of fields are optional.

Let’s describe each of the fields:

• Basic info:

71

Page 78: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

– Type - a read only field for data center

– Model - choose a model for asset, (you can type a couple of letters to search for a given model. If noresult is found, just click “Add” button to add it)

– Inventory number - an alphanumeric value in your stock

– Warehouse - the place where the asset is located

– Location - a more exact location of the device in the building/room

– Status - an asset’s lifetime indicator. Newly bought assets has status “new”. You can change it asrequired according to your own work flow

– Task url - url to task in ticket system

– Additional remarks - field for various data

– Service name - service name to which this asset belongs

– Property of - company to which this asset belongs

– Hostname - read-only field telling the name of host (from Ralph-core device)

– Service catalog - Default service (for which the service is a device example: cache, www)

– Environment - points to environment which asset belongs to

– Region - set region for this asset (see region page for details)

• Financial Info:

– Order number - number of the order where this asset is included

– Invoice date - date of the invoice where this asset is included

– Invoice number - number of the invoice where this asset is included

– Price - unit price of this asset

– Provider - name of the provider of this asset

– Depreciation rate - number of months in which asset depreciates

– Source - asset was purchased or salvaged

– Request date - date of submission of the demand for this asset

– Provider order date - date when order of this asset was provided

– Delivery date - date of asset delivery

– Depreciation end date - the end day of the depreciation

– Budget info - name of budget which funds this asset

– Force depreciation - force depreciation for this asset despite of depreciation end date value

• User info:

– User - points to user of this asset

– Owner - points to a owner of this asset

• Aditional info:

– Data center - points to a data center which contains this asset

– Server room - points to a server room which contains this asset

– Rack - points to a rack which contains this asset

72 Chapter 16. Quickstart

Page 79: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

– Position - points to position in rack from 0 to ‘max u’

– Orientation - side of rack, depends on position

if position = 0 options are: left, right

if position > 0 options are: front, back, middle

– Slot number - points to slot number in blade when asset model is blade

– Ralph device id - points to to Ralph-Core device

– SN/Sns - serial numbers

– Barcode/Barcodes - barcodes number

16.1.3 Quick Scan IP Address

Ralph is able to periodically scan your all networks/environments and detect hardware information, software configu-ration and location.

But in this case we will use One-shot quickscan feature to scan localhost as an example.

Open Core tabs and click Quick Scan

Insert IP Address 127.0.0.1 (press enter)

And Click ‘Scan’ button

After scanning asset we have a view device information

16.1. Assets 73

Page 80: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

You can change the settings detected by scanner and save your changes to the asset.

16.1.4 Adding Parts

In the same way you can add parts to the database, and then bind the parts to devices. To do this, choose “Add part”from the menu.

• When a part is marked as salvaged, you can enter the old barcode data here.

Asset fields has been split into sections in forms:

• Basic info:

74 Chapter 16. Quickstart

Page 81: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

– Type - a read only field for data center, back office or administration for back offic. Administration isused for assets like buildings etc.

– Model - type a couple of letters to search for a given model. If no result is found, just click “Add”button to add it.

– Inventory number -

– Warehouse - the place where the asset is located.

– Location - a more exact location of the device in the building/room.

– Status - an asset’s lifetime indicator. Newly bought assets has status “new”. You can change it asrequired according to your own work flow.

– Task url - url to task in ticket system

– Additional remarks - additional info.

– Service name - service name to which the asset belongs

– Property of - to which the company belongs asset

• Financial Info:

– Price - the unit price of the asset.

– Provider - the name of the provider of the asset.

– Depreciation rate - number of months this device deprecates

– Source - if this device was purchased or salvaged

– Request date - date of submission of the demand for the device.

– Delivery date - date of device delivery.

– Deprecation end date - the end day of the depreciation

– Order number, Invoice date, Invoice no, Provider order date, Budget info.

• User info:

– User - device user.

– Owner - device owner.

• Aditional info:

– U level - “U” level of installation device.

– U height - how large the device is, in “U”.

– Ralph device id - ID device detected by Ralph Scan.

16.1.5 Bulk Editing

It is often required to edit multiple assets at once. For example, when you want to move them from one warehouse toanother. There is a special mode called “bulk edit” for this case.

To activate this mode, go to the search screen, and select multiple assets using check marks on the left side.

16.1. Assets 75

Page 82: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

When ready, choose “Edit selected” from the bulk edit actions.

On the next screen you can edit those records all at once by changing the appropriate fields. When you fill one fieldwith the desired value, you can propagate this value to all records by clicking on the “plus” mark near the current cell.

76 Chapter 16. Quickstart

Page 83: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

16.1.6 Work Flow and Statuses

In this version there are no limits for moving assets from one status to another. You can freely change statuses. Allchanges will be recorded, allowing you to inspect the flow later.

16.2 Licences

Ralph Assets allows you to store information about software licences. Adding and editing is performed in much thesame way as in assets.

16.2.1 Adding Licence

To add a licence, click the “Add licence” option from the top of submenu.

16.2. Licences 77

Page 84: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

Licence fields are split into 2 section: Basic info and Financial info. Financial info contains field, Number ofpurchased items. This field capacity to store Multi-Seat licence.

16.2.2 Relations

Licences may be related to a user or device. In asset and user form, during the search are shown only unassignedlicence, that is, those that have still free slots.

16.3 Supports

Ralph Assets allows you to store information about supports. Adding and editing is performed in much the same wayas in assets.

78 Chapter 16. Quickstart

Page 85: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

16.3.1 Adding Support

To add a support, click the “Add support” option from the top of submenu.

16.4 Scrooge

Scrooge module brings billing functionality to Ralph. Using Ralph Scrooge, you can retrieve information on the useof resources from many other systems and charge other services. Scrooge generates flexible and accurate cost reportsand lets you refer to historical usages and costs.

Ralph Scrooge is a combination of IT management and accounting software. By using Scrooge your company canoptimize the costs of internal services and departments, by reviewing their structure and dependencies.

16.4. Scrooge 79

Page 86: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

16.4.1 Costs report

A detailed report of costs for each service

16.4.2 Monhtly costs

Calculate monthly costs based on invoices which are added from Assets.

80 Chapter 16. Quickstart

Page 87: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

Select a date for the report, and then click the Recalculate costs.

After generating a report, you can close it by clicking “Accept costs”

16.5 Data center view (DC View)

There are two perspectives:

• data center view: lets you see the physical organisation of your data center, indicating where every rack islocated

• rack view: lets you see the physical organisation of your rack, indicating where every device is located

16.5. Data center view (DC View) 81

Page 88: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

16.5.1 Adding rack

You can also add rack on this view (this is the recommended way of racks adding). To achieve that, execute thesesteps:

• from the main menu (top of Ralph’s page) click DC View

• then pick data center on the left side (e.g.: ‘DC A’)

• click Edit tab

• put a rack on data center map by left click, then you should have image similar to

• then fill fields name and description for newly creating rack

• the last step is to click ‘send’ button and compare the effect to this picture

16.6 Admin

Administration interface is accessible from within the menu.

Here you can define

82 Chapter 16. Quickstart

Page 89: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

• models,

• categories,

• warehouses,

• other dictionary data.

16.6. Admin 83

Page 90: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

84 Chapter 16. Quickstart

Page 91: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

CHAPTER 17

Change Log

17.1 2.3.1

Released on April 23, 2015

17.1.1 New features

• Changed default STATICFILES_STORAGE to cached.

• Moved visualization to new section (DC view).

• Added networks to top menu with option to hide it (HIDE_MENU setting).

• Added mechanism generating demo data as CLI command.

17.1.2 Fixes

• Fixed getting name of default pool for load balancers.

• Transactional save on scan form.

• Removed lck.activitylog from Ralph.

• Fixed unicode error and empty country by default in LDAP login.

17.2 2.3.0

Released on April 13, 2015

17.2.1 New features

• Added data center and racks visualization.

• Ralph requires ralph_assets package.

• Improved Xen detection.

• Better ssh communication with cisco switches.

• Added possibility to store databases in Ralph and better support for storing load balancers virtual servers.

85

Page 92: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

• Updated docs for Don Pedro agent and Ralph’s installation process.

• We’ve moved documentation to the rtd: http://ralph.readthedocs.org/en/latest/.

• Docker is the official way to easy install Ralph.

17.2.2 Minor improvements

• SCAN:

– Detaching logical subdevices not found by scan: Previously only physical subdevices not found byscan were detached. Extended this feature on logical children.

– Detect Dell family in scan, when headers not contains Server

– Puppet-plugin: added expanduser call on cert paths.

– Puppet plugin can get data from puppetdb-api.

– ‘Force autoscan’ is now triggered only when SNMP name is missing.

• DEPLOY:

– Added two missing features to deploy/clean plugin: The hostname is now copied from deploymentand copying venture/role from deployment.

– Changed the required permission for VM creation - You need core access to create a VM via API.

– Added new entry point to API to provide possibility to change IP address after deployment.

• GUI:

– Added management IP in ‘Addresses’ tab (device view).

– Scan form - now it’s possible to add some new components to the existing device.

• CMDB:

– Set CI.state default value to ACTIVE.

• OTHER:

– The design of top bar is now in line with the Scrooge UI.

– Scrooge API: Databases and Load balancer virtual servers added.

– Added department to search form.

– Functionality to inject custom tracking code.

– Admin panel: changing management and management ip addresses blocked.

– ralph makeconf set pluggable apps to the reasonable defaults.

– For devices with assigned Asset (only without is_blade flag) it is no longer possible to change position.

– You can now set user’s country using LDAP attribute.

– Added Powerdns Record resource to REST API.

17.2.3 Fixes

• Fix for MAC detecting in IDRAC plugin.

• Parent and management fields are now readonly when an asset is assigned. Before this change we could’t saveform.

86 Chapter 17. Change Log

Page 93: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

• Updated parse_lshw(..) to work with puppetdb_api. Used better msg when no facts found.

• Fixed docker installation.

• Scan form now creates IPAddress object when does not exist.

17.3 2.1.0

Released on October 14, 2014

This version contains huge code clean-ups (some really old parts were removed), several bugfixes, slightly redesignedUI, improved integration with other componenets (i.e. Assets, Scrooge) and some new features as well (conceptsof ‘Services’ and ‘Environments’, ‘Pending Changes’ view, detection of network connections between devices viaLLDP).

• CORE: Added service/environment validation to device editing/creating forms.

• CORE: Fixes for displaying device’s components and changes for ‘parts’ in scan results.

• CORE: Fix for propagating changes of parent rack/dc.

• CORE: Improved checks for required asset.

• CORE: ‘Services’ view added.

• CORE: Fix for ‘Home Page’ option in user’s preferences view.

• CORE: Network connections detected via LLDP.

• CORE: Improved handling of assets that should be linked to devices.

• CORE: Improved handling of ventures that shouldn’t be shown in Ralph.

• CORE: Improvements for the GUI.

• CORE: Added search fields for ‘service catalog’ and ‘device environment’.

• CORE: Removed significant parts of obsolete code.

• CORE: After sign in, redirect to home of user-accessible module.

• CORE: Improved deployment API.

• SCAN: Better changes detection.

• SCAN: Improved handling of blacklisted serial numbers.

• SCAN: Scan status view.

• CMDB: API shows more data.

17.4 2.0.1

Released on August 20, 2014

This is a bugfix release, with some small improvements here and there and one new feature (‘notifications’ module).

• CORE: (CI/Travis/Coveralls) Added Sphinx checker.

• SCAN: Small fix for the ‘force autoscan’ routine.

• SCAN: Improved detection of Juniper switches.

• CORE: Added new filter to the sidebar search (‘Devices without linked asset’).

17.3. 2.1.0 87

Page 94: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

• CORE: Added possibility to bulk-edit ‘name’, ‘venture’, ‘role’ and ‘physical parent device’.

• CORE: Improved ‘DNS Records’ form validation (detection of duplicate records).

• CORE: Some small improvements related to integration with ‘ralph_assets’ and ‘ralph_pricing’ (e.g. a scriptfor uploading data re: venture/IPs ownership).

• CORE: Added ‘notifications’ module (a simple app for sending and archiving e-mails when you want to benotified of certain events, e.g device’s configuration change).

• SCAN: Fix for ‘ssh_xen’ plugin (reference to a non-existing variable).

• CORE: Added ‘DeviceEnvironment’ model along with adding ‘service’ and ‘device_environment’ fields on‘Device’ model (needed for future features).

• CORE: Added ‘venture’ field to the ‘IPAddress’ resource in API.

• SCAN: Minor fixes for ‘ssh_cisco_catalyst’ and ‘ssh_cisco_asa’ plugins (e.g. NotConfiguredError could breakall Scan processes).

• SCAN: ‘management’ field on ‘Device’ model is no longer ignored (‘ssh_proxmox’ plugin mostly).

• CORE: Fix for syncs with LDAP.

• SCAN: Fix for sysinfo extraction in ‘ssh_3par’ plugin.

• DonPedro: added normalization of WWNs and some additional command-line options for the output generation.

• SCAN: Enabled saving of the results in ‘mount_shares’ postprocessing plugin.

• CORE: Added missing permissions checks to the views.

17.5 2.0.0-stable

Released on July 9, 2014

This is a stable release.

• SCAN: Disk shares detection - disk shares without physical volume in OS are now detected, better merging ofresults.

• SCAN: ssh_proxmox changes - root user is now not required.

• SCAN: SNMP - AES priv protocol support.

• SCAN: SSH AIX - added normalization for wwns from aix plugin.

• SCAN: Scan postprocess is not disabled by default.

• SCAN: MAC addresses normalization.

• SCAN: [vmware plugin] subdevices w/o MAC addresses shouldn’t be included in scan results.

• SCAN: Fixed 3par plugin #892 return results instead device_info.

• SCAN: Fixed ascii encoding problem in ssh_xen plugin.

• SCAN: Onstor now collects diskshare mounts.

• SCAN: Fixed getting info from multipath when there are multipath config warnings.

• Feature/pricing api - shares - venture and virtual filters - pricing api: shares changed (back) to share mounts;added venture param and virtual mounts filter

• CMDB: New semantics - used uid instead of id for JIRA.

88 Chapter 17. Change Log

Page 95: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

• CMDB: Inactive CI’s are not displayed by default, use checkbox to include them optionally.

• CMDB: Changes importing are now handled by searching by creation date.

• CMDB: Collecting events that can possibly affect a CI (events on children).

• DHCP: Fix protect against IP addresses with the same domain tests.

• CORE: Pluggable apps permissions and ralph_permission decorator. Improved permissions to pluggable apps;ralph_permission decorator could now be applied to dispatch method (before only to post/get/etc methods);

• CORE: Fixed sorting by network address/gateway in admin (incl. migration). Network model gets new fieldgateway_as_int, which is used for sorting by “Gateway address” column (“Network address” column now usesmin_ip field for this).

• CORE: Implemented 3 bound permissions per Ralph application (has_core_access, has_asset_access,has_scrooge_access).

• CORE: Disk shares in admin are now loading faster.

• CORE: Added getting device by ip address or remark to the pricing api.

• CORE: Fixed sorting by network address/gateway in admin (incl. migration).

• CORE: Pillow upgraded to 2.2.0.

• CORE: Added FC cards to the pricing API.

• CORE: Readonly widget has better appeareance.

• CORE: Added Docker installation method.

• DonPedro: Better FC and share mounts detection.

• DonPedro: Additional logging and mac addresses normalization.

17.6 2.0.0-rc8

Released on June 3, 2014

This is a final bugfix RC Release with new features. It brings Quickscan feature and better API compatibility, as wellas many scan, networks and ui stability improvements.

• SCAN: Added “Quick scan” features which is the quickest way to scan given ip address.

• SCAN: Now scan post processings plugins are running from main scan job.

• SCAN: [hp_oa plugin] added ‘Apache’ to known HTTP family names.

• SCAN: Manual prescan (autoscan) shouldn’t be run as a separate job.

• SCAN: Fix for UnicodeEncodeError. Sometimes plugins can return non ASCII characters...

• SCAN: Timeout of rq_jobs is now configurable.

• SCAN: Fix for Proxmox3 (family recognizing + listening port).

• SCAN: ssh_ibm_bladecenter fixed better choices finding (for components or device types).

• SCAN: Added autoscan (prescan) at the beginning of the manual scan.

• SCAN: Added Quickstan feature for quickly scanning given IP Address.

• SCAN: [vmware plugin] subdevices w/o MAC addresses shouldn’t be included in scan results.

• SCAN: 3par plugin now works correctly - return results instead device_info.

17.6. 2.0.0-rc8 89

Page 96: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

• CMDB: Events are now bound many-to-many to CIs.

• CMDB: Inactive CIs are not displayed by default.

• CMDB: Unified the search of CIs in CMDB.

• CMDB: Corrected icon class for venturerole.

• CMDB: New ralph-independent way of setting icons for CIs.

• CMDB: provided correcting ownership duplicates.

• CMDB: Event is propagated from parent CI to its children.

• API: fixed api for pricing.

• API: State is no longer copied in Service API.

• CORE: Fix test-with-coveralls make command - convert spaces to tab. Ommit test files in coverage.

• CORE: Update Travis badge.

• CORE: Override for a django bug with “View on site”.

• CORE: Improved mapping ad groups -> django groups.

• CORE: Fixed ‘Bulk edit’ button on ‘Ventures’ and ‘Racks’ views.

• CORE: Networks - Fixed Handling networks with gereric IDs instead of names.

• NETWORKS: Networks performance improved - extended caching timeout.

17.7 2.0.0-rc7

Released on May 15, 2014

This is a 7th Release Candidate release with bugfixes only.

• CORE: Fixed ‘Bulk edit’ button on ‘Ventures’ and ‘Racks’ views.

• CORE: Handling networks using IDs instead of their names.

• CORE: Fixed and improved/cleaned ‘Bulk edit’ form.

• CORE: Got rid of ‘Model Group’ and ‘Model’ columns in ‘Software’ tab.

• CMDB: Additional CIs for CMDB events.

• CMDB: sAMAccuntName can be synchronised from AD for CIOwners.

• SCAN: Whole new SCAN documentation prepared.

17.8 2.0.0-rc6

Released on April 28, 2014

This is a 6th Release Candidate release with more testing.

• SCAN: Stability improvements and fixes.

90 Chapter 17. Change Log

Page 97: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

17.9 2.0.0-rc5

Released on May 15, 2014

This is a 5th Release Candidate release.

• many fixes

17.10 2.0.0-rc4

Released on May 15, 2014

This is a 4th Release Candidate release.

• Scan - special queues for UI calls

• many fixes

17.11 2.0.0-rc3

Released on May 15, 2014

New features:

• CORE: added logical parent for stacked devices, when physical parent is not enough.

• DHCP: configuration file for DHCP can be generated for multiple environments or data centers at once.

Optimizations:

• NETWORKS: performance improvements: reduced unresponsive rendering of networks tree to ~ 1 sec

• SCAN: performance improvements: reduced time of traversing through large number of intersecting networks

• CORE: many cmdb, scan, deployment fixes.

17.12 2.0.0-rc2

Released on May 15, 2014

New features:

• SCAN: Much more advanced Scan module with great performance and real plugins architecture with JSONAPI.

• SCAN: New vmware plugin for discovering virtual machines.

• SCAN: Cisco Catalyst and Juniper switches detection with recognizing stacked subswitches added.

• NETWORKS: Completely new Network panel which allows you to manage IP addresses and netmasks easily.

• DNS: Added additional validation for DNS form (one PTR is required now).

• DHCP: Added additional validation for DHCP form.

• Environments - place where you can configure discovery queue or hosts naming temeplate.

• LDAP group mapping allows you to more specific permissions setting directly via LDAP.

17.9. 2.0.0-rc5 91

Page 98: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

Optimizations:

• DHCP config - fixes for networks and entries.

• DHCP config - large (10x) speed improvements while generating configs.

• Updated ralph_dhcp_agent.

• New white theme.

• Ralph CLI integrated into the UI.

Core changes:

• CORE: Reworked Dependency Injection of Ralph submodules thanks to DjangoPluggableApp, giving morepower and DRY-ness.

• SCAN: Upgraded detection of newer Dell machines using IDRAC protocol.

• SCAN: Fixed xen hypervisor discovery, where virtuals were incorrectly assigned to the master cluster.

• Fixed bug where gateway was always required.

• CMDB: Fixed compatibility with Zabbix where zabbix_id was out of range (#726)

• CMDB: Fixed filtering Incidents/Problems using start date, end date.

• CMDB: API: Added impact links to the CI’s.

• CMDB: Improved CMDB API documentation.

• CMDB: Fixed Jira<->CMDB integration where only first 1000 issues were imported.

• CMDB: Fixed CMDB bugs where customfields where not visible correctly on particular CITypes.

• CMDB: Allowed CMDB to register own CITypes via Admin Panel.

17.13 2.0.0-rc1

Released on May 15, 2014

This is release with new features.

• Added completely new Scan module - new DC discovery mechanism which allows you to better maintainperiodic scans, and much easier to write new discovery plugins using JSON API.

• Custom fields defaults (from venture_role) now appears correctly in the API.

• Added API for Scan module.

• CMDB Api documentation refactored.

• Tastypie API fixed.

17.14 1.2.9

Released on November 06, 2013

This is semi-final :) hotfix release.

• Fixed API problem.

• Fixed incompatible inquiry problem.

92 Chapter 17. Change Log

Page 99: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

17.15 1.2.8

Released on November 04, 2013

This is hotfix release - fixes broken dependency.

• Fixed django-bob dependecy.

17.16 1.2.7

Released on October 31, 2013

This is as bugfix release.

• Added new search field in device - Deprecation (based on Device.deprecation_kind)

• Added Asset tab for views with informations about devices

• Added info on form validation errors (wishlist 15); added terabytes as unit in size_divisor.

• Venture dropdown on Info now displays items in proper hierarchy.

• Fixed links to Jira tickets in CMDB’s Jira Changes, Problems and Incidents.

• Venture’s deletion in admin is now disabled; name/symbol cannot be changed once verified (schema migrationon Venture model).

• Fixed http plugin - recognition Cisco ASDM 7.1

• Improved asynchronous report logic

• New column in assets - is discovered

• New search field in devices - deprecation kind

• New search field in assets - deprecation rate

• Some changes in load balancer addresses view

17.17 1.2.6

Released on August 08, 2013

This is as bugfix release.

• Fixed plugin ssh_cisco_asa - plugin not responding,

• Added new resources to API: Network, NetworkKind.

• Added network_details to Ipaddress API resource.

• Extra costs that don’t appear in the given time range are not displayed in the venture summery view.

• Numeric position field no longer required.

• Barcode field (in admin) can be set to None for more than one devices.

• Fixed owners links in admin/business/ventures; fixed admin history change.

17.15. 1.2.8 93

Page 100: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

17.18 1.2.5

Released on July 17, 2013

This is a minor bugfix release. Bugfixes in the discovery module and documentation enhancements.

• Added documentation for the discovery subsystem.

• Added new Xeon processors support.

• Added data_center and rack to the puppet classifier output.

• Fixed DonPedro ‘ipaddress’ KeyError.

• Disabled reboot plugin for the deployment.

• Fixed XEN disk discovery.

• Added property_types to the puppet classifier response.

• Ralph search results are now unique.

• Fixed border-case for lshw discovery when response tag is none.

• Fixed OpenStack plugin - assigning costs to the wrong device

17.19 1.2.4

Released on June 18, 2013

This is a bugfix release.

• Bugfixes in discovery module.

• Extended APIs for assets and pricing.

17.20 1.2.3

Released on June 7, 2013

This is a bugfix release.

• Enhancements to the Ventures - added Profit Center and Business Segment information.

• Added ability to import Ventures data(PC, Business Segment) from CSV file.

• Added API integration with Ralph Pricing and Ralph Assets.

• Fixed puppet classifier crashing on models without model group.

• Fixed 3PAR detection.

• Better error reporting for discovery errors.

• PostgresSQL support provided.

• Fixed hostname validation in the deployment area.

• Testing profiles updated.

• Fixed out of range error while discovering devices with unknown Networks.

94 Chapter 17. Change Log

Page 101: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

17.21 1.2.2

Released on April 23, 2013

This is a bugfix release.

• Removed Git, hostname and stty process forking.

• Cleaned up plugins chains.

• Fixed pagination, templates and filters in the CMDB.

17.22 1.2.1

Released on April 16, 2013

This is a bugfix release.

• Fixed bug in the Catalog and Account areas.

• API permissions fixed.

17.23 1.2.0

Released on April 15, 2013

This is a major release. It brings new big features and bugfixes. Added new modules: asset management, ralph beastcommand line client, windows software discovery. Replaced workers architecture with RQ. New integrations withexternal systems. And much more.

• Replaced Celery asynchronous worker engine with RQ, see: http://python-rq.org.

• Introduced Ralph commandline tool - Beast, see: https://github.com/allegro/ralph_beast.

• Introduced Offline Asset Mgmt module for Ralph, see: https://github.com/allegro/ralph_assets.

• Discovery improvements: added Ganeti devices support, Juniper and Nortel switches, 3ware controllers. Addednew Puppet REST integration.

• Introduced discovery for Windows Sofware via Don-Pedro plugin and extended ability to search software ver-sions using complex operators (<, <=, >, >= etc).

• CMDB-Splunk integration introduced.

• Reports are now asynchronous (don’t block the UI anymore, happen on the queue).

• Added User Preferences framework - for now with the ability to change landing page per user.

• REST API extended - new filters and new resources (owners).

• Deployment improvements: statuses plugin fixed, duplicating networks added, firstfreeip function fixed.

• Performance improvements in the CMDB.

• Many Ralph UI bugs and discovery fixes.

17.21. 1.2.2 95

Page 102: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

17.24 1.1.18

Released on March 19, 2013

This is a major release. It brings new big features and bugfixes. Introduced 3rd party module for Ralph - Offline AssetsManagement Added CMDB - Splunk integration. Added archivization feature for CMDB. Added AutoCI feature forCMDB. Improved Jira integration. Added ability to discover Windows software using don pedro plugin. Discovery ofhardware fixed and improved.

• Added CMDB - Splunk integration.

• Added archivization feature for CMDB.

• Added Autoci feature for CMDB.

• Improved jira integration.

• Added ability to discover Windows software using don pedro plugin.

• Discovery of hardware fixed and improved.

17.25 1.1.17

Released on February 19, 2013

This is a bugfix release.

• Editable layers in CMDB.

• Bugfixes in discovery plugins and CMDB.

• Performance improvements in CMDB report.

17.26 1.1.16

Released on February 07, 2013

This is a major release with new features.

• Adding next-server to DHCP configuration for devices in deployment.

• A new report for device costs.

• Improved CMDB impact report.

• The ability to import DNS records from a CSV file.

• Show separate count for physical devices in ventures report.

• More bugfixes in the discovery plugins.

17.27 1.1.15

Released on January 16, 2013

This is a major release with new features.

• Added custom DHCP configuration for networks and DHCP servers.

96 Chapter 17. Change Log

Page 103: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

• Networks can now be marked as non-unique, which prevents their IP addresses from being added to devices.

• Next free hostname and IP address are now displayed in the Addresses tab.

• Bugfixes in discovery plugins.

17.28 1.1.14

Released on January 07, 2013

This is a bugfix release.

• Add detailed costs to the Ventures report,

• Fix incorrect use of concurrent_get_or_create in discovery plugins

• Fix the clean deployment plugin to re-connect the ip address

17.29 1.1.13

Released on December 31, 2012

This is a bugfix release.

• Allow bulk deployment to re-use existing devices

• Clean up the way in which the discovery plugins create components

• Allow racks in different data centers to have the same name

17.30 1.1.12

Released on December 20, 2012.

This is a bugfix release.

• Dell PowerEdge servers supported

• introduced pricing groups for disk shares

• interpolation of variables in preboot files supported

• simplified deployment workflow (no issue tracked based acceptance involved)

• mass deployment

• discovery fixes

17.31 1.1.11

Released on December 5, 2012.

This is a bugfix release.

• Fix bugs in the search and add device forms

17.28. 1.1.14 97

Page 104: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

17.32 1.1.10

Released on December 5, 2012.

This is a bugfix release as well as new discovery and usability features.

• support for SNMPv3 in discovery

• DHCP config improvements: proper hostnames from PTR records; support for syncing entries and networksfrom a specific DC only

• DNS/DHCP addresses tab redesigned for usability and performance

• improved search for software components and discovering software versions

• discovery fixes

17.33 1.1.9

Released on November 26, 2012.

This is a bugfix release. Fixes regressions in discovery from version 1.1.9 and introduces DiscoveryWarnings fortracking problems with discovery.

• Fixes for discovery regressions from 1.1.8

• DiscoveryWarnings introduced

17.34 1.1.8

Released on November 22, 2012.

This is a major release. Includes system-level storage detection, improved CPU information for Windows machines,ability to edit DNS information straight from the Addresses tab on a device. CMDB now includes an impact report.

• system-level storage detection stored in the OperatingSystem component

• improved CPU information in DonPedro Windows agent

• CPU information is stored in history for financial reports

• DNS entries can be edited on the Addresses tab for every device

• CMDB: impact report introduced, API for CI changes, layers and types

• Installed software packages reported by Puppet are stored in the inventory database

• Base64 support for compressed Puppet fact values

• Minor bugfixes

17.35 1.1.7

Released on November 8, 2012.

This is a bugfix release. Includes fixes in IPMI, SSG and Xen discovery as well as minor CMDB and DNS adminimprovements. DHCP agent script is now compatible with Python 2.4 (for usage in RedHat 5.x environments).

98 Chapter 17. Change Log

Page 105: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

• Stability improved for discovering SSG firewalls

• ralph_dhcp_agent.py is now compatible with Python 2.4

• Uses the forked django-powerdns-dnssec package for improved PowerDNS support

• Xen discovery support fixed (memory was reported in wrong units)

• IPMI discovery improved for Sun and Supermicro servers

• Minor CMDB improvements

• Minor bugfixes

17.36 1.1.6

Released on October 29, 2012.

This is a bugfix release. Includes fixes in CMDB, device admin, device report and unit tests.

• CMDB fixes: owners not required when saving a CI, cycles in relationships are detected, only manual changesgenerate tickets in external trackers

• fixed issue #183: “Unknown” rack unsupported

• device admin fixes: model validatation, saving uses priorities

• paramiko library used for SSH connectivity instead of the ssh fork

• minor device report fixes

• unit tests improved

17.37 1.1.5

Released on October 19, 2012.

This is a bugfix release. Fixes order of database migrations and several problems with running unit tests. Djangoversion bumped to 1.4.2.

• bumped Django version to 1.4.2

• fixes order of database migrations

• fixes a problem in Django 1.4.x with built-in unit tests failing because of settings used

• minor CMDB fixes

• more unit tests

17.38 1.1.4

Released on October 15, 2012.

This is a minor release. Adds role properties to the RESTful API. Fixes deprecation so that deprecated devices nolonger report a monthly cost.

• role properties available in API

• virtual CPU count in the main ventures report

17.36. 1.1.6 99

Page 106: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

• deprecated devices now have a zero monthly cost

17.39 1.1.3

Released on October 10, 2012.

This is a bugfix release. Contains fixes in UI and discovery code, as well as shows cloud usage in the main venturereport.

• cloud usage is visible in the main ventures report

• several minor fixes in UI and new plugins

17.40 1.1.2

Released on October 8, 2012.

This is a bugfix release. Includes a new experimental discovery agent for Windows called Donpedro as well as twonew discovery plugins for Xen hypervisors and Linux machines not controlled by Puppet. Fixes bugs in UI, CMDBand discovery.

• Donpedro introduced: a new dedicated discovery agent for Windows. Works as a background Windowsservice; a lightweight alternative to SCCM

• a new plugin to discover Xen hypervisors (with support for information about pools and hardware usage)

• a new ssh_linux plugin that discovers Linux machines by logging into them; an alternative to Puppet store-config

• lots of minor bugfixes in UI, CMDB and discovery

17.41 1.1.1

Released on September 24, 2012.

This is a bugfix release. Includes fixes in discovery and UI code, as well as updates in the price catalog: history ofchanges is tracked and the UI for specifying price per unit of size is now easier to use.

• Price catalog updated: history of changes tracked, a more intuitive UI for prices per unit of size

• bug fixes in discovery and UI

17.42 1.1.0

Released on September 19, 2012.

This is a feature release. Includes support for deployment of physical hosts using PXE, simplified financial model(components can be now priced by unit of size, e.g. by core or GiB) and upgraded reporting system. Includes minorbug fixes.

• Deployment of new machines using PXE implemented

• CMDB: change acceptance

• DHCP can be served and reconfigured remotely

100 Chapter 17. Change Log

Page 107: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

• Improved reports: new report types for devices, main menu entry for generic reports, a details view for devicesin reports

• API supports throttling

• A new component kind, OperatingSystem, with information about CPU, memory and disk storage visiblefrom the operating system

• Operating system components included in pricing

• OpenStack pricing now includes pricing margins

• Extra costs are now a dictionary

• Improved date pickers in UI

17.43 1.0.6

Released on August 20, 2012.

This is a bugfix release. Includes fixes in CMDB and UI code, as well as a preliminary timeline view for CMDB,usability improvements in editing CI relations.

• Pricing: cached prices updated after changes in the catalog; component price calculation includes custom sizeswhen relevant

• ralph commands no longer display the unhelpful “Error opening file for reading: Permission denied” message

• Usability improvements in editing CI relations

• Preliminary timeline view for CMDB added

• Git configuration change from Puppet agent now knows if a change was successful

• minor bugfixes

17.44 1.0.5

Released on August 13, 2012.

This is a bugfix release. Includes fixes in CMDB, discovery and UI code, as well as the possibility to specify extraqueries for OpenStack. Local storage costs are now also counted for Proxmox virtual machines.

• OpenStack plugin now accepts OPENSTACK_EXTRA_QUERIES setting, containing a list of tuples in the form(url, query) of additional data sources to check.

• make the discovery plugins use soft delete

• the proxmox discovery plugin now counts local storage used

• added a “delete” link in the addresses view

• positions in racks are now numbered from the bottom

• CMDB: enabled removing relations, faster git handling

• bugfixes in CMDB and UI code

17.43. 1.0.6 101

Page 108: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

17.45 1.0.4

Released on August 08, 2012.

This version has report and rack views, as well as some improvements in the user interface and important bug fixes inthe discovery plugins. You can now delete from the database old devices that are no longer needed.

• edit links for devices and components

• soft-deletable devices

• a view showing physical layout of racks

• add a filter form in the networks view

• small usability improvements in the history user interface

• added a “zabbixregister” command for automatically creating hosts and host templates in Zabbix

• bugfixes in the CMDB

• bugfixes in the discovery plugins

17.46 1.0.3

Released on August 01, 2012.

This is a bugfix release. Includes fixes for minor issues in the Web app and ability to run CMDB integration pluginsremotely. It introduces a rudimentary reports tab on device lists.

• a rudimentary reports tab on device lists to filter devices according to specified rules

• venture tree collapsible

• CMDB integration scripts integrated into framework

• CMDB supports distributed plugins

• minor fixes in the Web app

17.47 1.0.2

Released on July 23, 2012.

This is a bugfix release. It introduces the ability to create new devices manually (without autodiscovery) and fixesseveral minor issues.

• ralph chains command to list available plug-in chains

• fixed regression from 1.0.1: settings-local.py works correctly again

• ability to create new devices from the web application

• several minor bugfixes

• added cmdb charts for dashboard

102 Chapter 17. Change Log

Page 109: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

17.48 1.0.1

Released on July 18, 2012.

This is a bugfix release. It fixes several small problems with initial setup and configuration, and makes it easier tomanage settings.

• ralph management command introduced as a shortcut to python manage.py

• ralph makeconf management command introduced to create configuration from a template

• PyPI package fixed by including all resources in the source package

• minor fixes for the SQLite backend

• minor documentation fixes and updates

17.49 1.0.0

Released on July 16, 2012.

This is the first release of Ralph.

• initial release

17.48. 1.0.1 103

Page 110: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

104 Chapter 17. Change Log

Page 111: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

CHAPTER 18

License

Copyright 2011-2014 Allegro Group

Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.

105

Page 112: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Ralph Documentation, Release 2.3.1

106 Chapter 18. License

Page 113: Ralph Documentation - Read the Docs · 2.2 Upgrading an existing installation ... Ralph Documentation, ... This guide assumes Ubuntu Server 12.04/14.04 LTS and presents shell

Index

AAddresses, 48API Access, 69API key, 69

Bbound permissions, 67

CCMDB, 48Components, 47

DDiscover, 48

Hhand icon, 48History, 48

IInfo, 47

Lloadbalancer, 48

Mmanual changes, 48

Ppermissions, 67

RRoles, 48

SSECRET_KEY, 15staff, 67superuser, 67

Uuser permissions, 67

VVenture, 48

107