This repository has been archived by the owner on Sep 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
add INI file for panels plugin #67
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# panels-specific functionality. | ||
# TODO: probably should move this file into its own puppet module | ||
# TODO: need to make config handling more generic, this should work with ANY plugin, and not be panels-specific | ||
|
||
class uber::plugin_panels ( | ||
$git_repo = "https://github.com/magfest/panels", | ||
$git_branch = "master", | ||
$hide_schedule = true, | ||
) { | ||
uber::repo { "${uber::plugins_dir}/panels": | ||
source => $git_repo, | ||
revision => $git_branch, | ||
require => File["${uber::plugins_dir}"], | ||
} | ||
|
||
file { "${uber::plugins_dir}/panels/development.ini": | ||
ensure => present, | ||
mode => 660, | ||
content => template('uber/panels-development.ini.erb'), | ||
require => [ Uber::Repo["${uber::plugins_dir}/panels"] ], | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# THIS FILE IS GENERATED BY PUPPET | ||
# DO NOT EDIT DIRECTLY, INSTEAD EDIT THE .erb template | ||
|
||
hide_schedule = "<%= @hide_schedule %>" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this interact with the
uber::plugins::extra_plugins
setting in e.g.event-prime.yaml
? Like, what would happen if we had two different values for the Git repos?Since this just defines a puppet management class, I assume this is NOT required for all deploys which use the
ubersystem-puppet
repo. Like, an event could install a set of plugins that doesn't include this one? Or is this now required for every deploy usingubersystem-puppet
? (I wouldn't have a real problem with that sinceubersystem-puppet
is pretty much just MAGFest at this point and Docker seems to be the way other events are deploying, but I figured it was worth asking.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK so the answer to this is yes, slightly by design, but easily changable Two main pieces:
our puppet setup isn't elegant enough to handle INI files for other plugins without creating an explicit class for them. this is lame and something that should be fixed as discusssed in Add real support for plugin-specific INI settings #53
there might be situations where a plugin does need to do something more complex than just INI stuff, and does legitimately need its own puppet class like plugin_panels and plugin_hotel which we have now.
how we're handling what puppet classes get included for a "default" install is the following puppet class which contains the definition of a default set of classes which compromise a reasonable starting point for uber deploys.
This starts here in the event-prime.yaml file which is a magfest-specific .yaml that lives in magfest-specific production-config repo:
roles::uber_server
is a class that our puppet module provides which has all the manifests needed to setup a reasonable default uber server. If an event wants to do something slightly different they can include their own specialization of this named hypothetical things like:roles::magfest_prime_uber_server
orroles::rams_frontend_uber_server
orroles::magfest_replicated_uber_db_only
.Our "roles::uber_server" has the following line in it:
uber::profile_rams_full_stack
is a class which defines a reasonably default install of uber, and whose paramaters can be overriden by the .yaml files. it looks like this:The idea here being that this is a reasonable default. As we start moving functionality out of core (like panels, barcodes, etc), we could use this to define a reasonable default set of plugins and nginx, db, backend, firewall, info for how to run as a daemon, etc.
If an event wanted to do something different (like, say, run JUST sideboard+plugins on one server, db on another, and nginx on another), they could define stuff like
profile_frontend
,profile_db
,profile_nginx
. The config for all 3 of these boxes can still be centrally managed by puppet like we do now, but the various parts would go in different places.So the answer is: yes, we include panels plugin by default, but someone could also super-easily write their own profile in their own event-specific puppet module that decides not to include it.
From a design standpoint, there's an open question of "which set of plugins should be included in every uber install". From a practical implementation standpoint right now, there's a little more work (not much) to make this a little less hardcoded.
I figured since Magfest is the only one using it though, and it's really easy to point a deploy at a fork of the ubersystem-puppet module by modifying your fabric_settings.ini, this isn't really hurting anything, and anyone can change the default profile in their own fork with zero effort.
How all this works with docker is an open question, this is kind of orthagonal to what docker does and I'd expect a dockerized version of a magfest deploy to probably look similar, but instead of copying uber files onto the server, it's instead copying docker containers around. The config stuff like INI's etc would probably be managed identically to how we're doing it today. Buuuuuut, not actually sure about that yet, just a first guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One other thing: It's also possible to remove panels_plugin from profile_rams_full_stack and include it in a magfest-specific file like event-prime.yaml, by doing the following:
The question then really becomes "should panels be a default plugin for all RAMS installations"? If yes, then it's ok to put it in profile_rams_full_stack. If no, then it would be better to put it as I have above in a magfest-specific .yaml file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And, also, we don't have to make this decision if #53 is a thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That all sounds great, so this all gets a +1 from me. Thanks for such a thorough explanation.