Add auxiliary repository
Configures empty auxiliary repository for ubuntu and centos that is enabled by default. Change-Id: I87f848bd13f7402bd608e5d50c488392739ca0a3 blueprint separate-mos-from-linux
This commit is contained in:
parent
867028fe78
commit
1222d7721e
@ -14,7 +14,7 @@ ADMIN_IP="<%= @admin_ipaddress %>"
|
||||
LOCAL_IP="127.0.0.1"
|
||||
|
||||
#Version of Fuel to deploy
|
||||
VERSION=$(awk '/release/{gsub(/"/, "");print $2}' /etc/fuel/version.yaml || echo <%= @release %>)
|
||||
VERSION=$(awk '/^[[:space:]]+release/{gsub(/"/, "");print $2}' /etc/fuel/version.yaml || echo <%= @release %>)
|
||||
IMAGE_PREFIX="fuel"
|
||||
# busybox image for storage containers
|
||||
BUSYBOX_IMAGE="busybox.tar.gz"
|
||||
|
@ -35,7 +35,7 @@ class { 'nailgun::host':
|
||||
nailgun_user => $nailgun_user,
|
||||
dns_domain => $::fuel_settings['DNS_DOMAIN'],
|
||||
dns_search => $::fuel_settings['DNS_SEARCH'],
|
||||
|
||||
repo_root => "/var/www/nailgun/${::fuel_version['VERSION']['openstack_version']}",
|
||||
}
|
||||
|
||||
class { 'openstack::clocksync':
|
||||
|
@ -29,7 +29,7 @@ class { 'nailgun::host':
|
||||
nailgun_user => $nailgun_user,
|
||||
dns_domain => $::fuel_settings['DNS_DOMAIN'],
|
||||
dns_search => $::fuel_settings['DNS_SEARCH'],
|
||||
|
||||
repo_root => "/var/www/nailgun/${::fuel_version['VERSION']['openstack_version']}",
|
||||
}
|
||||
|
||||
class { "openstack::clocksync":
|
||||
|
8
deployment/puppet/nailgun/files/Release-auxiliary
Normal file
8
deployment/puppet/nailgun/files/Release-auxiliary
Normal file
@ -0,0 +1,8 @@
|
||||
Origin: Mirantis
|
||||
Label: auxiliary
|
||||
Suite: auxiliary
|
||||
Codename: auxiliary
|
||||
Date: Mon, 15 Apr 2015 00:00:01 UTC
|
||||
Architectures: amd64
|
||||
Components: main restricted
|
||||
Description: Auxiliary
|
65
deployment/puppet/nailgun/manifests/auxiliaryrepos.pp
Normal file
65
deployment/puppet/nailgun/manifests/auxiliaryrepos.pp
Normal file
@ -0,0 +1,65 @@
|
||||
class nailgun::auxiliaryrepos(
|
||||
$repo_root = '/var/www/nailgun',
|
||||
){
|
||||
|
||||
$centos_dir = "${repo_root}/centos/auxiliary/"
|
||||
$ubuntu_dir = "${repo_root}/ubuntu/auxiliary/"
|
||||
|
||||
file { $centos_dir:
|
||||
ensure => directory,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
}
|
||||
|
||||
File[$centos_dir] ->
|
||||
Package['createrepo'] ->
|
||||
Exec["createrepo ${centos_dir}"] ->
|
||||
Yumrepo['auxiliary']
|
||||
|
||||
yumrepo { 'auxiliary':
|
||||
name => 'auxiliary',
|
||||
descr => 'auxillary',
|
||||
baseurl => "file://${centos_dir}",
|
||||
gpgcheck => '0',
|
||||
}
|
||||
|
||||
package { 'createrepo':
|
||||
ensure => latest,
|
||||
}
|
||||
|
||||
exec { "createrepo ${centos_dir}":
|
||||
path => '/bin:/sbin:/usr/bin:/usr/sbin',
|
||||
cwd => $centos_dir,
|
||||
creates => "${centos_dir}/repodata/repomd.xml",
|
||||
}
|
||||
|
||||
$release_files = [
|
||||
"${ubuntu_dir}/dists/auxiliary/Release",
|
||||
"${ubuntu_dir}/dists/auxiliary/main/binary-amd64/Release",
|
||||
"${ubuntu_dir}/dists/auxiliary/restricted/binary-amd64/Release"]
|
||||
|
||||
Exec['create_ubuntu_repo_dirs'] ->
|
||||
Exec['create_ubuntu_repo_Packages'] ->
|
||||
File[$release_files]
|
||||
|
||||
exec { 'create_ubuntu_repo_dirs':
|
||||
path => '/bin:/sbin:/usr/bin:/usr/sbin',
|
||||
command => "bash -c \"mkdir -p ${ubuntu_dir}/pool/{main,restricted} ${ubuntu_dir}/dists/auxiliary/{main,restricted}/binary-amd64/\"",
|
||||
creates => "${ubuntu_dir}/pool",
|
||||
}
|
||||
|
||||
exec { 'create_ubuntu_repo_Packages':
|
||||
path => '/bin:/sbin:/usr/bin:/usr/sbin',
|
||||
command => "bash -c \"touch ${ubuntu_dir}/dists/auxiliary/{main,restricted}/binary-amd64/Packages\"",
|
||||
creates => "${ubuntu_dir}/dists/auxiliary/main/binary-amd64/Packages",
|
||||
}
|
||||
|
||||
file { $release_files:
|
||||
ensure => file,
|
||||
source => 'puppet:///modules/nailgun/Release-auxiliary',
|
||||
mode => '0644',
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
}
|
||||
}
|
@ -6,6 +6,7 @@ $dns_domain = 'domain.tld',
|
||||
$nailgun_group = 'nailgun',
|
||||
$nailgun_user = 'nailgun',
|
||||
$gem_source = 'http://localhost/gems/',
|
||||
$repo_root = '/var/www/nailgun',
|
||||
) {
|
||||
#Enable cobbler's iptables rules even if Cobbler not called
|
||||
include cobbler::iptables
|
||||
@ -18,6 +19,10 @@ $gem_source = 'http://localhost/gems/',
|
||||
} ->
|
||||
class { 'nailgun::iptables': }
|
||||
|
||||
class { 'nailgun::auxiliaryrepos':
|
||||
repo_root => $repo_root,
|
||||
}
|
||||
|
||||
nailgun::sshkeygen { '/root/.ssh/id_rsa':
|
||||
homedir => '/root',
|
||||
username => 'root',
|
||||
|
Loading…
Reference in New Issue
Block a user