| 1 | [[PageOutline]] |
| 2 | |
| 3 | = How to configure tango-monitor-gmoc for GMOC reporting = |
| 4 | |
| 5 | == Introduction == |
| 6 | |
| 7 | This page explains how to install and configure the tango-monitor-gmoc package for reporting data to GMOC, on any supported operating system. The tango-monitor-gmoc package is the base package for reporting data to GMOC, and should be a dependency for any aggregate-specific software which reports data to GMOC. |
| 8 | |
| 9 | This page was written for: |
| 10 | {{{ |
| 11 | tango-monitor-gmoc-1.2.12-1 |
| 12 | }}} |
| 13 | and may not work well with earlier versions. We have tested these instructions on Ubuntu 10.04 only, but expect they will also work on CentOS. If you are running a different OS and it is not obvious how to translate the instructions, please contact GPO infra. |
| 14 | |
| 15 | ''Compatibility note: gmoc.py, the GMOC monitoring client, requires python2.6 or later. If the default python on your system is earlier than 2.6, you'll need to install a secondary python. GPO infra has done this for CentOS 5, and can provide suggestions.'' |
| 16 | |
| 17 | == Upgrading from previous versions == |
| 18 | |
| 19 | This is the first packaged version of tango-monitor-gmoc, so there are no upgrades from previous versions. |
| 20 | |
| 21 | == Variables == |
| 22 | |
| 23 | * `<cronuser>`: The user as which to run GMOC monitoring. The scripts can run as root, or as a non-root user of your choice. (At GPO, we use the `ganglia` user.) |
| 24 | * You need several pieces of identifying information for your site: |
| 25 | * `<submission_user>`: a one-word phrase describing your site, which is your username for data submission to GMOC (see step I) (e.g. `ExoGENI-BBN`) |
| 26 | * `<organization>`: a one-word name for the organization which runs the aggregates which are reporting (e.g. `ExoGENI`) |
| 27 | * `<pop>`: a one-word name for the physical location where your aggregates sit (e.g. `gpolab`) |
| 28 | When you setup your config file in step III, you will also need a few pieces of metadata about your organization and POP. |
| 29 | |
| 30 | == Steps to configure monitoring submission == |
| 31 | |
| 32 | === I. Prepare to submit authenticated monitoring data to GMOC === |
| 33 | |
| 34 | You need to do these steps if you are installing monitoring for the first time. |
| 35 | |
| 36 | 1. IF you have not yet registered your site to submit data to GMOC, generate a password for automated monitoring data submission to use. All resources managed by a given set of people use the same credential; you only need to do this step once for your entire site. '''Note: the password you use for your site registration is a new password generated for the purpose of submitting monitoring data. Do not reuse any existing passwords from your site.''' |
| 37 | |
| 38 | 2. Store your site password in a file which monitoring can use. (The password file location is configurable, but use the default unless you have a reason to do something different): |
| 39 | {{{ |
| 40 | sudo touch /usr/local/etc/monitoring_passwd |
| 41 | sudo chown <cronuser> /usr/local/etc/monitoring_passwd |
| 42 | sudo chmod 600 /usr/local/etc/monitoring_passwd |
| 43 | sudo vi /usr/local/etc/monitoring_passwd |
| 44 | }}} |
| 45 | Add exactly one line to this file, containing the monitoring password you want to use for the user `<submission_user>`. |
| 46 | |
| 47 | 3. Register site credentials: IF you have not yet registered your site to submit data to GMOC, follow the instructions at [wiki:GENIMetaOps/SiteCredentials]. |
| 48 | |
| 49 | === II. Install the monitoring software === |
| 50 | |
| 51 | Do these steps every time you install or upgrade `tango-monitor-gmoc`. |
| 52 | |
| 53 | ==== If you are installing on Ubuntu ==== |
| 54 | |
| 55 | 1. Download the `tango-monitor-gmoc_1.2.12-1_all.deb` package file from [http://software.geni.net/local-sw/], and copy it onto your reporting host, e.g. into `~/tango-monitor-gmoc_1.2.12-1_all.deb`. |
| 56 | |
| 57 | 2. Use dpkg to install the local package. This may fail due to dependencies and say it is leaving the package "unconfigured". Therefore, invoke apt-get to fix any missing dependencies: |
| 58 | {{{ |
| 59 | sudo dpkg -i ~/tango-monitor-gmoc_1.2.12-1_all.deb |
| 60 | sudo apt-get -f install |
| 61 | }}} |
| 62 | |
| 63 | ==== If you are installing on CentOS ==== |
| 64 | |
| 65 | 1. Download the `tango-monitor-gmoc-1.2.12-1.noarch.rpm` package file from [http://software.geni.net/local-sw/], and copy it onto your FOAM host, e.g. into `~/tango-monitor-gmoc-1.2.12-1.noarch.rpm`. |
| 66 | |
| 67 | 2. Use yum localinstall to install the local package. This will install the provided file, using your standard yum repositories to find any dependencies: |
| 68 | {{{ |
| 69 | sudo yum --nogpgcheck localinstall ~/tango-monitor-gmoc-1.2.12-1.noarch.rpm |
| 70 | }}} |
| 71 | |
| 72 | === III. Create required directories and files === |
| 73 | |
| 74 | * `<submission_user>`: a one-word phrase describing your site, which is your username for data submission to GMOC (see step I) (e.g. `ExoGENI-BBN`) |
| 75 | * `<organization>`: a one-word name for the organization which runs your FOAM (e.g. `ExoGENI`) |
| 76 | * `<pop>`: a one-word name for the physical location where your FOAM sits (e.g. `gpolab`) |
| 77 | |
| 78 | This step needs to be done the first time you install tango-monitor-gmoc-1.2.12-1 or later. |
| 79 | |
| 80 | 1. Populate the gmoc_monitoring configuration file: |
| 81 | * Create the config file (the file does not contain sensitive information, and may safely be left world-readable): |
| 82 | {{{ |
| 83 | /usr/local/etc/gmoc_monitoring.conf |
| 84 | }}} |
| 85 | * Edit the file and make sure to populate all variables (N.B. use single quotes to surround any value containing whitespace): |
| 86 | {{{ |
| 87 | $ cat /usr/local/etc/gmoc_monitoring.conf |
| 88 | |
| 89 | # GMOC short name which is your username for authenticated monitoring data submission |
| 90 | SITENAME=<submission_user> |
| 91 | |
| 92 | # GMOC short name of organization which manages your aggregate (may be the same as SITENAME if appropriate) |
| 93 | ORGNAME=<organization> |
| 94 | |
| 95 | # GMOC short name of "POP"/lab where your aggregate is located (may be the same as SITENAME if appropriate) |
| 96 | POPNAME=<pop> |
| 97 | |
| 98 | # Primary contact for the organization |
| 99 | ORG_PRIMARY_CONTACT_EMAIL=<primary e-mail address for your site, may be an individual address or a group address> |
| 100 | ORG_PRIMARY_CONTACT_FIRSTNAME=<a first name associated with that e-mail address> |
| 101 | ORG_PRIMARY_CONTACT_LASTNAME=<a last name associated with that e-mail address> |
| 102 | |
| 103 | # The street address of your POP |
| 104 | POPORG_ADDR_STREET='<street address of your POP>' |
| 105 | POPORG_ADDR_CITY=<city where your POP is located> |
| 106 | POPORG_ADDR_STATE=<state abbreviation of your POP> |
| 107 | POPORG_ADDR_POSTCODE=<postal code of your POP> |
| 108 | |
| 109 | # Some arbitrary name for the street address of your POP |
| 110 | POPORG_LOCATION_NAME=<short name of address, should not contain whitespace, e.g. 10_Moulton_St> |
| 111 | }}} |
| 112 | |
| 113 | === IV. Report site metadata === |
| 114 | |
| 115 | Use a reporting script to add your site metadata to GMOC's database: |
| 116 | {{{ |
| 117 | sudo -u <cronuser> /usr/bin/report_site_metadata |
| 118 | }}} |
| 119 | This should exit successfully with no output. If any output is reported, contact GMOC or GPO for debugging. |
| 120 | |
| 121 | ''Note: if you change any of the variables in your configuration file later, you will need to run `report_site_metadata` again, to get the changes into GMOC's database.'' |
| 122 | |
| 123 | === Outcome === |
| 124 | |
| 125 | At this point, your host is configured for submission of monitoring data to GMOC. To submit data for one or more specific GENI aggregates, resources, or slice authorities, install another tango-monitor package for your specific aggregate, or your own custom software which uses gmoc.py. |