Install project-config by puppet instead of git clone

Change-Id: Ib0b564bf5b8e848ed2f7a303675cfe6df16d3297
This commit is contained in:
Alexey Khivin 2016-04-29 13:58:27 +03:00
parent 1a31e5251c
commit eba9931ba5
8 changed files with 24 additions and 15 deletions

View File

@ -94,7 +94,6 @@ Methods:
Then:
- $.createLdapConfiguration()
- $.instance.setHieraValue( 'gerrit_war_url', $this.warUrl)
- $.instance.setHieraValue( 'project_config_repo', 'https://review.fuel-infra.org/open-paas/project-config')
- $.instance.setHieraValue( 'gerrit_github_token', '')
- $.instance.setHieraValue( 'github_project_username', 'mirademo')
- $.instance.setHieraValue( 'github_project_password', 'github_project_password')

View File

@ -5,6 +5,12 @@ node default {
$ldap_dn = domain2dn(hiera("ldap_domain"))
$ldap_ip = hiera('ldap_ip')
if ! defined(Class['project_config']) {
class { 'project_config':
url => hiera('project_config_repo'),
}
}
class { 'openstack_project::server':
iptables_public_tcp_ports => [80, 443, 8081, 29418],
sysadmins => hiera('sysadmins', []),
@ -86,10 +92,4 @@ node default {
# user => "puppet",
#
# }
if ! defined(Class['project_config']) {
class { 'project_config':
url => hiera('project_config_repo'),
}
}
}

View File

@ -1,4 +1,11 @@
node default {
if ! defined(Class['project_config']) {
class { 'project_config':
url => hiera('project_config_repo'),
}
}
class { 'openstack_project::jenkins':
jenkins_password => '',
jenkins_ssh_private_key => '',

View File

@ -69,7 +69,6 @@ Methods:
- $jenkinsHost: $.detectPrimaryIP($.jenkins.instance)
- $.instance.setHieraValue('jenkins_host', $jenkinsHost)
detectPrimaryIP:
Arguments:
- instance:

View File

@ -4,6 +4,12 @@ node default {
iptables_public_tcp_ports => [80],
}
if ! defined(Class['project_config']) {
class { 'project_config':
url => hiera('project_config_repo'),
}
}
class { 'nodepool':
mysql_root_password => hiera('nodepool_mysql_root_password'),
mysql_password => hiera('nodepool_mysql_password'),

View File

@ -6,7 +6,10 @@ Namespaces:
puppet: io.murano.opaas.puppet
Name: SystemConfig
Properties:
projectConfigRepo:
Contract: $.string().notNull()
Default: 'https://review.fuel-infra.org/open-paas/project-config'
Methods:
installOnTheNode:
Arguments:
@ -16,3 +19,4 @@ Methods:
- $resources: new(sys:Resources)
- $template: $resources.yaml('SystemConfig.template')
- $instance.agent.call($template, $resources)
- $instance.setHieraValue( 'project_config_repo', $this.projectConfigRepo)

View File

@ -11,10 +11,6 @@ cd system-config
cp -r modules/ /etc/puppet/
git clone https://review.fuel-infra.org/open-paas/project-config
cp -r project-config/ /etc/
# Should be installed on the each node to use
# domain2dn function
puppet module install datacentred-ldap

View File

@ -19,7 +19,6 @@ Properties:
Contract: $.class(puppet:PuppetInstance).notNull()
gerrit:
Contract: $.class(Gerrit)
Methods:
.init:
Body:
@ -86,7 +85,6 @@ Methods:
Else:
- $gerritHost: $gerritInstance.ipAddresses[0]
- $.instance.setHieraValue('project_config_repo', 'https://review.fuel-infra.org/open-paas/project-config')
- $.instance.setHieraValue('gerrit_server', $gerritHost)
- $.instance.setHieraValue('gerrit_user', 'zuul')
- $.instance.setHieraValue('gerrit_ssh_host_key', $.gerrit.instance.getHieraValue('gerrit_ssh_rsa_pubkey_contents'))