Commit Graph

34 Commits

Author SHA1 Message Date
Clark Boylan f668e192ac Define reply_to_email_address
Puppet 4 was complaining that this variable was undefined. Define it to
make this warning go away.

We switch away from scope.lookupvar for consistency with the rest of the
var lookups in this file and to keep our conditional short.

Change-Id: I64cc9660a72bf5ab096c9c6f29080a838df5ddea
2019-03-07 08:28:25 -08:00
Clark Boylan 8cb841cb64 Fix second ServerAdmin conditional
There are two ServerAdmin entries in the https vhost erb template. One
for port 80 and one for port 443. The previous change only fixed the
issue for port 80. Fix this for port 443 too.

Additionally fix the ssl chain file variable which has the same problem.

Change-Id: Id3a36d1a3088f9ae08761f51f4073f388e2eedf8
2018-09-12 16:01:15 -07:00
Colleen Murphy 4ef66c2bee Fix undef in vhost templates
On puppet 3 an explicit undef value is evaluated as the symbol :undef in
ERB templates, while on puppet 4 the explicit undef is evaluated the
same as the implicit undef which comes to the nil value in ERB. Check
for both values to make both puppet versions happy.

Change-Id: Ib4bff7259fea2722f799745d476d1af0c34408d5
2018-09-12 18:40:50 +02:00
Adam Coldrick c4c7e17f19 Set "AllowEncodedSlashes on" in vhost templates
This is required to properly support handling requests for project by
name, where the name may contain encoded slashes. For example,

  GET /v1/projects/openstack-infra%2Fstoryboard

causes Apache to give a 404 error without this patch.

Change-Id: Ibe95dbfc28621574bac7e4af78fe1d913fa4e1b6
2018-08-01 23:24:00 +01:00
Colleen Murphy 6153eec795 Fix scope of vhost template variables
Dynamic scoping for variables in ERB templates was removed in puppet
4[1] which means that the variables defined in the manifests cannot be
found when it is referenced in the httpd::vhost defined type and will be
evaluated as nil when puppet runs. Use scope.lookupvar instead to be
explicit about the variable's source.

[1] https://puppet.com/docs/puppet/4.10/lang_updating_manifests.html#dynamic-scoping-in-erb

Change-Id: I007975c920bd12a352acdea742b841a17ecc5d17
2018-04-27 21:24:23 +02:00
Witold Bedyk 85896f5c03 Set default_url for email notification
Email notifications about task status changes triggered from Gerrit do
not include correct Story URL. Setting the default StoryBoard URL should
fix that issue.

Change-Id: Ic639e344921c4265d3471ac9bd591a4ae489ae52
Story: 2001410
Task: 6106
2018-04-18 20:42:46 +00:00
Jeremy Stanley e5040616f3 Use utf8mb4 for MySQL database charset
The default "utf8" character set for MySQL only supports up to
3-byte codepoints. In order to support text with 4-byte codepoints
(at the expense of some additional storage) explicitly use "utf8mb4"
instead when creating and connecting to the database.

Change-Id: I25bd7b5d2a904dad3e13efaf2da94cce205bcc0b
2018-03-27 17:32:50 +00:00
Jeremy Stanley 762bed13d4 Wildcard the VirtualHost directive addresses
On systems where the site FQDN is mapped to the loopback interface
in /etc/hosts, Apache doesn't apply the vhost configuration on
incoming connections to other addresses/interfaces. Apache
recommends wildcarding VirtualHost directives these days, and it's
something we already hard-code in other modules (e.g. puppet-zuul).

This _could_ conceivably cause complication for anyone trying to
coinstall this module on a server hosting other sites without
name-based hosting configured correctly, but that should be an
increasingly unusual configuration.

Change-Id: I11f5b586c4f7b42017c2eb78af4be87211343381
2016-05-18 20:43:20 +00:00
Monty Taylor dc490e0e31 Update SSLProtocol and SSLCipherSuite
SSLv2 and SSLv3 should never be used. Update the protocol and cipher
suite lines to match the recommendations by the OpenStack Security team.
This includes opt-in to only TLS and strong ciphers.

Change-Id: I25168293cd822b2838252a71890e0c43b5a7b8f0
2016-03-01 08:05:12 -06:00
Adam Coldrick 9d27b4e5d6 Add config template for the email plugin
Change-Id: Iafa85f86cc10f0cd4c45224e45038a9d5594f9d7
2016-01-04 15:32:10 +00:00
Michael Krotscheck 9cff9d2142 Added new OAuth Parameters
Storyboard.conf now accepts authorization_code_ttl and a list of
valid_oauth_clients.

Change-Id: I29495a0b640c3ca097cca8c17349df5cc42388de
2015-03-04 09:27:27 -08:00
Michael Krotscheck 936abca6a6 Updated storyboard configuration for pymysql.
In order to support Python3, https://review.openstack.org/#/c/152339/ is switching
to a mysql driver that's supported by Python3. This updates the puppet module to use
the new connection string.

Change-Id: Id5d9eacd8de5700675848d3129b189fad07a221b
2015-02-23 12:36:15 -08:00
Michael Krotscheck 12bb2c8d42 Moved working_directory configuration element into correct block.
The working_directory config flag was in [oauth] block, when
it should have been in [default].

Change-Id: I4f6d632d7dce4c856cba2569246ab6101224de60
2015-02-23 12:34:38 -08:00
Michael Krotscheck 27b9f13f0b Disabled Cron workers on Storyboard.
Storyboard is currently failing because of requests to get the working
directory are failing. This disables that configuration option so
we have some time to investigate.

Change-Id: I8d0b8d6ce350836b8eba5822e1aa6e9920d7dc8e
2015-01-20 09:13:21 -08:00
Marton Kiss 7fe4951d7d Add missing working directory to filesystem and storyboard config
Solves the directory creation issue mentioned in that patch:
https://review.openstack.org/#/c/148592/

Change-Id: I9bef14d695c9bb1bb29790132566d4ed04bec544
2015-01-20 16:46:50 +01:00
Jenkins 8a7d4342d1 Merge "Added Cron and Token Cleanup to configuration." 2015-01-19 21:40:21 +00:00
Michael Krotscheck aca28c6fa2 Added Cron and Token Cleanup to configuration.
This patch adds the new oauth config section from
https://review.openstack.org/144355, as well as the cron enabling
flag from https://review.openstack.org/129609/. Both are defaulted
to false in storyboard, so until this patch lands the features
will not be enabled.

Change-Id: Iedd1d8fb9b734c4356a922b6781395249ae14ed4
2015-01-06 10:53:13 -08:00
Jeremy Stanley 8cb968cea0 Allow overriding the cert/key file paths
* manifests/cert.pp: This adds the flexibility to depend on
existing files even if they're created as part of the storyboard
dependency chain, though with the loss of some error handling if a
deployer neglects to ensure the file itself exists before starting
the apache daemon.

Change-Id: I62d0bc7899703d7cc17f402cf34bd92357f44b58
2015-01-05 19:02:05 +00:00
Michael Krotscheck 3a5c3825b8 Added command path to puppet-storyboard
This provides the full path to storyboard-worker-daemon to
our sysvinit script.

Change-Id: Iae0606d3a0b6b8ca211fc50232c631238ca80e50
2014-10-03 14:04:13 -07:00
Jenkins 64417796b8 Merge "StoryBoard Deferred Processors" 2014-09-29 19:57:06 +00:00
Michael Krotscheck 23410116c6 Added CORS configuration to puppet-storyboard
Storyboard will soon support CORS, which is configured via
storyboard.conf. This patch adds the two relevant properties
to the puppet module, and makes them accessible in
storyboard::application.

Depends on https://review.openstack.org/#/c/124163/

Change-Id: I33a33076a18a9192b067a9f6f08d752ff8c22e3b
2014-09-25 14:48:51 -07:00
Michael Krotscheck 59a1fb57da StoryBoard Deferred Processors
This patch adds a puppet module that will start up N worker threads
to handle messages sent to the deferred processing queue. It does so
by making use of the new storyboard-worker-daemon command
created in the below patch. Both upstart and sysvinit scripts are
provided, with sysvinit being the default.

https://review.openstack.org/#/c/122890/

Change-Id: I5565cbf8062457d343d3e02dbfaae2852a359d91
Story: 96
2014-09-24 17:39:48 -07:00
Spencer Krum 8c4feb93f8 Compare values to :undef to test for existence
Change-Id: I87a7268ae56737a507faafb510801fd5b21a04d2
2014-09-12 11:19:41 -07:00
James E. Blair 9d04e4d824 Spell 'server_admin' consistently
The template and manifest used different spellings.

Change-Id: I093f7adfbfca1db040b73af96f8fb11adcb1699b
2014-09-12 10:53:48 -07:00
Spencer Krum bca18fff5b Template was comparing to :undefined
Change-Id: Id6f502dcaa09e7be86863fcbe007f20d644280b4
2014-09-11 17:10:44 -07:00
James E. Blair cd3f27298d Make enable notifications a flag
So that it can be disabled.

Change-Id: I04d20b491cfa0c897160d9fc78c37a164cd09122
2014-08-26 18:40:19 +00:00
Michael Krotscheck 05cee0f709 Support Apache 2.4.3
Apache version 2.4.3 changes the Order Allow,Deny security
configuration options. This patch modifies the input parameters
as well as the vhost templates in order to support it.

Change-Id: I179ffa924fed204c45a08ba19ea4acdc519edda2
2014-08-20 09:25:22 -10:00
Michael Krotscheck fb38fa63b3 Added RabbitMQ to StoryBoard
In order to support subscriptions in StoryBoard, we're adding a
queueing system to support triggered events. The specification in
question is #95307, which goes into detail on the various different
options evaluated. I also anticipate that this system can be used
for report generation.

Change-Id: Ia4cc91f1e75365a9fb41ca163e55548023233412
Story: 96
2014-08-13 11:31:14 -07:00
Michael Krotscheck 4fdd12b7f5 Modularized StoryBoard Module
In order to get the puppet module for storyboard up to a level where
we can publish it to puppetforge, I did some work on it to create
separate modules which can be used by anyone to install storyboard.

- API and Webclient are now installed via storyboard::application,
  which assumes that you can provide the DB connection criteria.
- storyboard::cert is now a separate class, which accepts either
  files or strings, which generates the SSL certificate and chain
  files for storyboard.
- storyboard::params is our dependency checker.
- storyboard::init will install a standalone, entirely
  self-contained instance of storyboard.
- Added various puppet module files necessary for eventual
  deployment to puppetforge.
- Added README.md documentation for later puppetforge addition.

This patch also includes a new module: example42-puppi, which is a
series of convenience utilities useful for deployment. For example,
puppi::netinstall (used here) will fetch tarballs and zip files and
extract them into a provided directory. It also contains changes to
the storyboard configuration for the new refresh token support patch
in #94363

Change-Id: I6ab8c24b308df38774fc0694d218dcb5022cd899
2014-08-13 00:14:39 +00:00
Monty Taylor 4e5338a964 Put a default section header above the TTL
Turns out that ini files need section headers.

Change-Id: Ia6c715fa4e47135ad3a81577db9a8749342b654d
2014-08-13 00:14:39 +00:00
Nikita Konovalov 716abb695f Storyboard token expiration increased
Expiration is set to 24 hours.
This should be merged before https://review.openstack.org/#/c/84107/

Change-Id: Ie3ba222caf2b8c6c20ffcac0cbd94bc8b4e2a83d
2014-08-13 00:14:39 +00:00
Monty Taylor 3382feb884 Make storyboard run over ssl
We're doing auth now, so we should really do it over SSL.

The cert contents are already in hiera.

Change-Id: Ia939e228785168705840acd6d377e6c25ba3370d
2014-08-13 00:14:39 +00:00
Michael Krotscheck 0e8c762a74 Added Authorization Header flag to storyboard module
We can't log into storyboard right now because we never told wsgi
to forward the Authorization header. This fixes that.

For more information:
https://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIPassAuthorization

Change-Id: Ibf8fb17569e7bb249801a8bd6971d0aa0f3ecaac
2014-08-13 00:14:39 +00:00
Ruslan Kamaldinov cee4845d02 Add Storyboard puppet module
There are two major parts being installed with this module:
1. storyboard-api - REST API service served  with
   apache mod_wsgi module
2. storyboard-webclient - static html/css/js files.
   This project is built and published to tarballs.o.o,
   from where it'll be installed with this puppet module

This module requires three configs from Hiera:
* storyboard_db_host
* storyboard_db_password
* storyboard_db_user

Installed projects:
* http://git.openstack.org/cgit/openstack-infra/storyboard/
* http://git.openstack.org/cgit/openstack-infra/storyboard-webclient/

Things to be added in later commits:
* Documentation for ci.openstack.org.
* Configure logging (once supported by storyboard.)
* SSL.

Change-Id: If3da06f8d20a6282036f1f9f063c25a6d0db60c6
2014-08-13 00:14:14 +00:00