-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #249 from ComputeCanada/includes
Replace site.pp definition of node includes by site.yaml
- Loading branch information
Showing
25 changed files
with
461 additions
and
471 deletions.
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
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
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,60 @@ | ||
--- | ||
lookup_options: | ||
magic_castle::site::all: | ||
merge: 'first' | ||
magic_castle::site::tags: | ||
merge: 'hash' | ||
magic_castle::site::not_tags: | ||
merge: 'hash' | ||
|
||
magic_castle::site::all: | ||
- profile::base | ||
- profile::consul | ||
- profile::users::local | ||
- profile::sssd::client | ||
- profile::metrics::node_exporter | ||
- swap_file | ||
|
||
magic_castle::site::tags: | ||
dtn: | ||
- profile::globus | ||
login: | ||
- profile::fail2ban | ||
- profile::cvmfs::client | ||
- profile::slurm::submitter | ||
- profile::ssh::hostbased_auth::client | ||
mfa: | ||
- profile::mfa | ||
mgmt: | ||
- mysql::server | ||
- profile::freeipa::server | ||
- profile::metrics::server | ||
- profile::metrics::slurm_exporter | ||
- profile::rsyslog::server | ||
- profile::squid::server | ||
- profile::slurm::controller | ||
- profile::freeipa::mokey | ||
- profile::slurm::accounting | ||
- profile::accounts | ||
- profile::users::ldap | ||
node: | ||
- profile::cvmfs::client | ||
- profile::gpu | ||
- profile::jupyterhub::node | ||
- profile::slurm::node | ||
- profile::ssh::hostbased_auth::client | ||
- profile::ssh::hostbased_auth::server | ||
- profile::metrics::slurm_job_exporter | ||
nfs: | ||
- profile::nfs::server | ||
- profile::cvmfs::alien_cache | ||
proxy: | ||
- profile::jupyterhub::hub | ||
- profile::reverse_proxy | ||
|
||
magic_castle::site::not_tags: | ||
nfs: | ||
- profile::nfs::client | ||
mgmt: | ||
- profile::freeipa::client | ||
- profile::rsyslog::client |
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 |
---|---|---|
@@ -1,78 +1,31 @@ | ||
stage { ['first', 'second']: } | ||
Stage['first'] -> Stage['second'] -> Stage['main'] | ||
|
||
node default { | ||
$instance_tags = lookup("terraform.instances.${facts['networking']['hostname']}.tags") | ||
|
||
if 'puppet' in $instance_tags { | ||
include profile::consul::server | ||
} else { | ||
include profile::consul::client | ||
} | ||
|
||
include profile::base | ||
include profile::users::local | ||
include profile::sssd::client | ||
include profile::metrics::node_exporter | ||
|
||
if 'login' in $instance_tags { | ||
include profile::fail2ban | ||
include profile::cvmfs::client | ||
include profile::slurm::submitter | ||
include profile::ssh::hostbased_auth::client | ||
} | ||
|
||
if 'mgmt' in $instance_tags { | ||
include profile::freeipa::server | ||
|
||
include profile::metrics::server | ||
include profile::metrics::slurm_exporter | ||
include profile::rsyslog::server | ||
include profile::squid::server | ||
include profile::slurm::controller | ||
|
||
include profile::freeipa::mokey | ||
include profile::slurm::accounting | ||
|
||
include profile::accounts | ||
include profile::users::ldap | ||
} else { | ||
include profile::freeipa::client | ||
include profile::rsyslog::client | ||
} | ||
|
||
if 'node' in $instance_tags { | ||
include profile::cvmfs::client | ||
include profile::gpu | ||
include profile::jupyterhub::node | ||
|
||
include profile::slurm::node | ||
include profile::ssh::hostbased_auth::client | ||
include profile::ssh::hostbased_auth::server | ||
|
||
include profile::metrics::slurm_job_exporter | ||
|
||
Class['profile::nfs::client'] -> Service['slurmd'] | ||
Class['profile::gpu'] -> Service['slurmd'] | ||
} | ||
|
||
if 'nfs' in $instance_tags { | ||
include profile::nfs::server | ||
include profile::cvmfs::alien_cache | ||
$include_all = lookup('magic_castle::site::all', undef, undef, []) | ||
|
||
$include_tags = flatten( | ||
$instance_tags.map | $tag | { | ||
lookup("magic_castle::site::tags.${tag}", undef, undef, []) | ||
} | ||
) | ||
|
||
$include_not_tags = flatten( | ||
lookup('magic_castle::site::not_tags', undef, undef, {}).map | $tag, $classes | { | ||
if ! ($tag in $instance_tags) { | ||
$classes | ||
} else { | ||
[] | ||
} | ||
} | ||
) | ||
|
||
if lookup('magic_castle::site::enable_chaos', undef, undef, false) { | ||
$classes = shuffle($include_all + $include_tags + $include_not_tags) | ||
notify { 'Chaos order': | ||
message => String($classes), | ||
} | ||
} else { | ||
include profile::nfs::client | ||
} | ||
|
||
if 'proxy' in $instance_tags { | ||
include profile::jupyterhub::hub | ||
include profile::reverse_proxy | ||
} | ||
|
||
if 'dtn' in $instance_tags { | ||
include profile::globus | ||
} | ||
|
||
if 'mfa' in $instance_tags { | ||
include profile::mfa | ||
$classes = $include_all + $include_tags + $include_not_tags | ||
} | ||
include($classes) | ||
} |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.