On Xenial, the nodejs puppet module tries to create a symlink from
/usr/bin/node to /usr/bin/nodejs. Depending on the resource ordering,
this might happen before or after the nodejs package creates its own
/usr/bin/node. If puppet has the chance to make the symlink itself, it
breaks node by creating a broken link cycle. This patch uses the
legacy_debian_symlinks parameter to prevent the puppet module from doing
that. This problem was fixed and the option was deprecated and removed
in later versions of the nodejs puppet module, so we will have to remove
the parameter if we update the nodejs module.
Use v2.3.0 of nodejs. node.js 0.12 is EOL so update to the oldest LTS
release which is 6.x. It automaticaly detects the symlink argument so
this is not required.
Using repo_url_suffix implies nodesource packaging, whose nodejs
package bundles the npm executable rather than having it in a
separate package. Attempting to set npm_package_ensure to present
results in dependency resolution conflict when the module attempts
to install the distro's npm package which conflicts with the nodejs
package being installed from nodesource. This is consistent with the
behavior described by
This commit removes the venv handling from the api puppet module. The
venv added unecessary complexity to the puppet module and made things a
bit fragile. Since this is typically deployed on a standalone server
there wasn't really a reason to do this.
The nodejs module does not install npm by default, and it is needed in
order to use it as a package provider. Also remove the npm package test
from beaker, since it makes no sense for package 'npm' to be installed
by provider 'npm'.
Pandas now has a build dep on cython. So to actually install an api
server now we need to ensure that cython is installed on the machine.
This commit adds that to api.pp manifest.
A new run metadata key, build_newrev, started showing up in the db
recently.  It's not actually something we want to expose, since it
is unique for each job and not something we can group on. This commit
adds it to the list of ignored keys so we don't have to see it
This commit switches the backend used on the api server to be the dbm
file backend with using memcached for distributed locking. This enables
having an async worker, but avoids the size limitations with storing
the cached data in memcached directly.
This commit adds installing and configuring memcached to the api
server. It then configures the api server to use memcached for it's
local response cache. This is needed to enable the async worker from
openstack-health change I0fd29839c72ca2fdfb4c4724bb3da7e283e3d27d.
This commit adds a cache_expiration parameter to make the cache
expiration for the api configurable. By default it sets it 15min
(which is half of the far more conservative openstack-health default)
to match the longest e-r query times seen in testing.
The openstack_health class has been recently extended to include
deployment to E-R, a new data source for OpenStack Health.
The E-R repo and revions are hardcoded in the class, which prevents
using the new E-R feature in downstream deployments that have an own
Adding repo and revision at class level solves that.
This commits adds the installation of elastic-recheck and the
configuration to the openstack-health api server for using the
additional data source. This depends on openstack-health change:
Icf203668690419c38f6d6be6b6fe4af8462845f3 to work, however it's not a
hard dependency because we can land this first without any issues.
If we do it'll mean the api server will be configured and start using
the data as soon as the openstack-health change lands.
This commit adds the ubuntu packages needed to build lxml which is now
being pulled it because of the addition of rss support to
openstack-health's api server.
This commit adds the missing apache2-utils package to the api server.
The apache2 startup (because of mod_cache I guess) is requiring the
use of htcacheclean. However, it's not present on the system. By
installing it, this should fix the issue.
We are possibly hitting timeouts pip installing larger dependencies
that require c compilations as part of the install. This commit bumps
the timeout to fix this.
This commit switches the api server from installing the requirements
file with pip install, via the ::python::requirements class, to using
pip install -U explicitly via an exec. We need to use -U to ensure
we're pulling in the latest version of subunit2sql that's valid,
otherwise the version won't be in sync with our database which can
potentially cause issues.
OpenStack Health api has a new functionality that allows users to
retrieve the grouping keys used on the dashboard page.
A few of them simply don't make sense for the users, since they
are too granular.
This commit includes a new default configuration that will ignore
these keys. In case you are interested on how I come up with these keys,
please check this patch: https://review.openstack.org/#/c/240453/
Alteration of the Apache configuration for apply in the Ubuntu Precise.
It was changed for mod_disk_cache because mod_cache_disk not exist for the
Precise and check Apache Version due the parameter "Require all Granted".
Co-Authored-By: Maitê Balhester <firstname.lastname@example.org>
While applying this module downstream we noticed that its acceptance
tests were broken.
During the process of fixing them we noticed that the reason for this
were the changes made in the manifest 'openstack_health::frontend'.
Apparently a new manifest was created to take care of installing the
The first step in order to fix this was adapting the tests to use this
new manifest instead of the former. While doing so we noticed that the
apache vhost template file was not being generated correctly. That
happened because it was binding agains 'openstack_health::frontend',
which now did not have the parameters necessary.
So, in order to make the whole acceptance test suite work, it was
necessary updating the vhost template file as well.
Co-Authored-By: Danilo Ramalho <email@example.com>
This commit adds enabling mod_cache to the api server to enable some
server side caching. We don't need to update the data in real time on
the dashboard and performing some server side caching will improve
the dashboard performance. It'll also decrease the load we'll put on
that poor trove node in rax cloud we're running subunit2sql on.
We had a complicated series of execs to build and copy files into the
docroot. Unfortunately these haven't worked as expected but we can
simplify the puppet by using a file resource to manage the copy of the
build for us.
This commit adds a missing refreshonly from the exec to run the mv
which moves the build dir to the output dir. Previously we were
running this on every exec which caused failures when a new build
wasn't run. This should address this by only running the mv when we
build the js.
This commit adds a site.pp file which is used to deploy the frontend
to a directory instead of setting up a vhost. When deploying this on
status.o.o we need to put the dashboard in a dir on an existing vhost
instead of deploying a seperate one. This commit adds the class to do
Due to the magic of non-determinism that is python packaging for
whatever reason the wsgi_script entrypoint is not being generated
when installing openstack-health in non-editable mode. So while we
wait for the local witch doctor to remove the curse from the system
this switches to using editable installs to move forward.
As part of this change the exec for running pip to install
openstack-health is also improved.
This is a initial version of how to deploy OpenStack-Health.
This script provisions openstack-health as it is today. This will be a
foundation for future deployments, once the application becomes more
Co-Authored-By: Bruno Tavares <firstname.lastname@example.org>
Co-Authored-By: Caio Carrara <email@example.com>