From bb0881f91d4459e06af94a11072a2d45cde46cf5 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Fri, 12 Jun 2015 17:09:21 +0000 Subject: [PATCH] Create stackalytics.o.o under -infra Change-Id: I9afa912abee38fb2732e97df06d72788b57d53df Depends-On: If62b3f633000cc6380d892cad0a2160136ce8ca4 Signed-off-by: Paul Belanger --- doc/source/stackalytics.rst | 39 +++++++++++++++++++ doc/source/systems.rst | 1 + manifests/site.pp | 12 ++++++ modules.env | 1 + modules/openstack_project/manifests/cacti.pp | 1 + .../manifests/stackalytics.pp | 17 ++++++++ 6 files changed, 71 insertions(+) create mode 100644 doc/source/stackalytics.rst create mode 100644 modules/openstack_project/manifests/stackalytics.pp diff --git a/doc/source/stackalytics.rst b/doc/source/stackalytics.rst new file mode 100644 index 0000000000..acbb45f019 --- /dev/null +++ b/doc/source/stackalytics.rst @@ -0,0 +1,39 @@ +:title: Stackalytics + +.. _stackalytics: + +Stackalytics +############ + +Stackalytics is a service that collects and processes development activity +data such as commits, lines of code changed, code reviews and blueprints then +makes it possible to visualize it in a convenient web dashboard. The +Stackalytics dashboard makes it possible to view data by project, company, +contributor, and other factors. + +The primary data sources for Stackalytics are the OpenStack Git repositories +and the Gerrit review history. + +At a Glance +=========== + +:Hosts: + * http://stackalytics.openstack.org +:Puppet: + * https://git.openstack.org/cgit/openstack-infra/puppet-stackalytics/tree/ + * :file:`modules/openstack_project/manifests/stackalytics.pp` +:Projects: + * https://git.openstack.org/cgit/openstack/stackalytics +:Documentation: + * https://wiki.openstack.org/wiki/Stackalytics +:Bugs: + * https://bugs.launchpad.net/stackalytics + +Installation +============ + +Gerrit Events +------------- + +Create a dedicated service account, described in :ref:`request-account-label`, +in order to properly stream events from :ref:`gerrit`. diff --git a/doc/source/systems.rst b/doc/source/systems.rst index 8d4e5f85ec..9441c0c859 100644 --- a/doc/source/systems.rst +++ b/doc/source/systems.rst @@ -23,6 +23,7 @@ Major Systems paste planet puppet + stackalytics static bandersnatch lists diff --git a/manifests/site.pp b/manifests/site.pp index 58b3348f85..c5ff920a1e 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -145,6 +145,18 @@ node 'health.openstack.org' { } } +# Node-OS: trusty +node 'stackalytics.openstack.org' { + class { 'openstack_project::server': + iptables_public_tcp_ports => [80], + sysadmins => hiera('sysadmins', []), + } + + class { 'openstack_project::stackalytics': + gerrit_ssh_user => hiera('stackalytics_gerrit_ssh_user'), + stackalytics_ssh_private_key => hiera('stackalytics_ssh_private_key_contents'), + } +} # Node-OS: precise node 'jenkins.openstack.org' { diff --git a/modules.env b/modules.env index d744d2aaea..863412bb87 100644 --- a/modules.env +++ b/modules.env @@ -122,6 +122,7 @@ INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-simpleproxy"]="o INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-snmpd"]="origin/master" INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-ssh"]="origin/master" INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-ssl_cert_check"]="origin/master" +INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-stackalytics"]="origin/master" INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-statusbot"]="origin/master" INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-storyboard"]="origin/master" INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-subunit2sql"]="origin/master" diff --git a/modules/openstack_project/manifests/cacti.pp b/modules/openstack_project/manifests/cacti.pp index 4616e83e18..c0997c0c55 100644 --- a/modules/openstack_project/manifests/cacti.pp +++ b/modules/openstack_project/manifests/cacti.pp @@ -152,6 +152,7 @@ class openstack_project::cacti ( 'release.slave.openstack.org', 'review-dev.openstack.org', 'review.openstack.org', + 'stackalytics.openstack.org', 'static.openstack.org', 'status.openstack.org', 'subunit-worker01.openstack.org', diff --git a/modules/openstack_project/manifests/stackalytics.pp b/modules/openstack_project/manifests/stackalytics.pp new file mode 100644 index 0000000000..1a678b7acc --- /dev/null +++ b/modules/openstack_project/manifests/stackalytics.pp @@ -0,0 +1,17 @@ +# == Class: openstack_project::stackalytics +# +class openstack_project::stackalytics ( + $gerrit_ssh_user, + $stackalytics_ssh_private_key, + $vhost_name = $::fqdn, +) { + class { '::stackalytics': + gerrit_ssh_user => $gerrit_ssh_user, + stackalytics_ssh_private_key => $stackalytics_ssh_private_key, + vhost_name => $vhost_name, + } + + realize ( + User::Virtual::Localuser['pabelanger'], + ) +}