git.lirion.de

Of git, get, and gud

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormail_redacted_for_web 2016-03-29 16:22:26 -0700
committermail_redacted_for_web 2016-03-29 16:22:26 -0700
commit6a44737d043f4140ab0116f619f79f913701df4c (patch)
treeea493c5fcbe965c7379ea806d83f217388023242
parent55f983ffc9e6e92113ceea0bc51efb6b69d32f13 (diff)
parentb3519dd48cebfcdbf1dea4b42e8857e21e6f05a2 (diff)
downloadcontrol-repo-template-6a44737d043f4140ab0116f619f79f913701df4c.tar.bz2
Merge pull request #28 from npwalker/move_profiles_out_into_their_own_modules
Move profiles out into their own modules
-rw-r--r--Puppetfile12
-rw-r--r--site/profile/files/puppetmaster/update-classes.sh11
-rw-r--r--site/profile/manifests/gitlab.pp24
-rw-r--r--site/profile/manifests/puppetmaster.pp52
-rw-r--r--site/profile/manifests/stash.pp28
-rw-r--r--site/role/manifests/all_in_one_pe.pp2
-rw-r--r--site/role/manifests/gitlab.pp5
7 files changed, 13 insertions, 121 deletions
diff --git a/Puppetfile b/Puppetfile
index 5c64227..02e2c31 100644
--- a/Puppetfile
+++ b/Puppetfile
@@ -40,3 +40,15 @@ mod 'gms',
mod 'pltraining-rbac',
:git => 'https://github.com/puppetlabs/pltraining-rbac',
:ref => '2f60e1789a721ce83f8df061e13f8bf81cd4e4ce'
+
+mod 'rampup_profile_puppetmaster',
+ :git => 'https://github.com/PuppetLabs-RampUpProgram/RampUp_profile_puppetmaster',
+ :branch => 'master'
+
+mod 'rampup_profile_gitlab',
+ :git => 'https://github.com/PuppetLabs-RampUpProgram/RampUp_profile_gitlab',
+ :branch => 'master'
+
+mod 'rampup_profile_stash',
+ :git => 'https://github.com/PuppetLabs-RampUpProgram/RampUp_profile_stash',
+ :branch => 'master'
diff --git a/site/profile/files/puppetmaster/update-classes.sh b/site/profile/files/puppetmaster/update-classes.sh
deleted file mode 100644
index fc33026..0000000
--- a/site/profile/files/puppetmaster/update-classes.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#https://docs.puppetlabs.com/pe/latest/nc_update_classes.html#post-v1update-classes
-
-CONFDIR=$(puppet master --configprint confdir)
-
-CERT=$(puppet master --confdir ${CONFDIR} --configprint hostcert)
-CACERT=$(puppet master --confdir ${CONFDIR} --configprint localcacert)
-PRVKEY=$(puppet master --confdir ${CONFDIR} --configprint hostprivkey)
-OPTIONS="--cert ${CERT} --cacert ${CACERT} --key ${PRVKEY}"
-CONSOLE=$(awk '/server: /{print $NF}' ${CONFDIR}/classifier.yaml)
-
-curl -k -X POST ${OPTIONS} "https://${CONSOLE}:4433/classifier-api/v1/update-classes"
diff --git a/site/profile/manifests/gitlab.pp b/site/profile/manifests/gitlab.pp
deleted file mode 100644
index 72c57e5..0000000
--- a/site/profile/manifests/gitlab.pp
+++ /dev/null
@@ -1,24 +0,0 @@
-class profile::gitlab {
-
- file { ['/etc/gitlab', '/etc/gitlab/ssl'] :
- ensure => directory,
- }
-
- file { "/etc/gitlab/ssl/${::fqdn}.key" :
- ensure => file,
- source => "${::settings::privatekeydir}/${::trusted['certname']}.pem",
- notify => Exec['gitlab_reconfigure'],
- }
-
- file { "/etc/gitlab/ssl/${::fqdn}.crt" :
- ensure => file,
- source => "${::settings::certdir}/${::trusted['certname']}.pem",
- notify => Exec['gitlab_reconfigure'],
- }
-
- class { 'gitlab':
- external_url => hiera( 'gms_server_url', "https://${::fqdn}") ,
- require => File["/etc/gitlab/ssl/${::fqdn}.key", "/etc/gitlab/ssl/${::fqdn}.key"],
- }
-
-}
diff --git a/site/profile/manifests/puppetmaster.pp b/site/profile/manifests/puppetmaster.pp
deleted file mode 100644
index 0e68ddb..0000000
--- a/site/profile/manifests/puppetmaster.pp
+++ /dev/null
@@ -1,52 +0,0 @@
-class profile::puppetmaster {
-
- $hiera_yaml = "${::settings::confdir}/hiera.yaml"
-
- class { 'hiera':
- hierarchy => [
- 'virtual/%{::virtual}',
- 'nodes/%{::trusted.certname}',
- 'common',
- ],
- hiera_yaml => $hiera_yaml,
- datadir => '/etc/puppetlabs/code/environments/%{environment}/hieradata',
- owner => 'pe-puppet',
- group => 'pe-puppet',
- notify => Service['pe-puppetserver'],
- }
-
- ini_setting { 'puppet.conf hiera_config master section' :
- ensure => absent,
- path => "${::settings::confdir}/puppet.conf",
- section => 'master',
- setting => 'hiera_config',
- value => $hiera_yaml,
- notify => Service['pe-puppetserver'],
- }
-
- #remove the default hiera.yaml from the code-staging directory
- #after the next code manager deployment it should be removed
- #from the live codedir
- file { '/etc/puppetlabs/code-staging/hiera.yaml' :
- ensure => absent,
- }
-
- #Lay down update-classes.sh for use in r10k postrun_command
- #This is configured via the pe_r10k::postrun key in hiera
- file { '/usr/local/bin/update-classes.sh' :
- ensure => file,
- source => 'puppet:///modules/profile/puppetmaster/update-classes.sh',
- mode => '0755',
- }
-
- #https://docs.puppetlabs.com/puppet/latest/reference/config_file_environment.html#environmenttimeout
- ini_setting { 'environment_timeout = unlimited':
- ensure => present,
- path => '/etc/puppetlabs/puppet/puppet.conf',
- section => 'main',
- setting => 'environment_timeout',
- value => 'unlimited',
- notify => Service['pe-puppetserver'],
- }
-
-}
diff --git a/site/profile/manifests/stash.pp b/site/profile/manifests/stash.pp
deleted file mode 100644
index 18b0468..0000000
--- a/site/profile/manifests/stash.pp
+++ /dev/null
@@ -1,28 +0,0 @@
-class profile::stash {
-
- class { 'java' :
- version => present,
- } ->
-
- class { 'postgresql::globals':
- manage_package_repo => true,
- version => '9.4',
- }->
- class { 'postgresql::server': } ->
-
- postgresql::server::db { 'stash':
- user => 'stash',
- password => postgresql_password('stash', 'password'),
- } ->
-
- class { 'stash':
- javahome => '/etc/alternatives/java_sdk',
- #dev.mode grants a 24-hour license for testing
- java_opts => '-Datlassian.dev.mode=true',
- }
-
- file { '/opt/puppetlabs/bin/stash_mco.rb':
- source => 'puppet:///modules/r10k/stash_mco.rb',
- }
-
-}
diff --git a/site/role/manifests/all_in_one_pe.pp b/site/role/manifests/all_in_one_pe.pp
index 5f72a30..dd2b988 100644
--- a/site/role/manifests/all_in_one_pe.pp
+++ b/site/role/manifests/all_in_one_pe.pp
@@ -1,6 +1,6 @@
class role::all_in_one_pe {
- include profile::puppetmaster
+ include rampup_profile_puppetmaster
include pe_code_manager_webhook
}
diff --git a/site/role/manifests/gitlab.pp b/site/role/manifests/gitlab.pp
deleted file mode 100644
index 1f459d6..0000000
--- a/site/role/manifests/gitlab.pp
+++ /dev/null
@@ -1,5 +0,0 @@
-class role::gitlab {
-
- include profile::gitlab
-
-}