aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile/base
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/profile/base')
-rw-r--r--manifests/profile/base/certmonger_user.pp1
-rw-r--r--manifests/profile/base/docker.pp23
-rw-r--r--manifests/profile/base/docker_registry.pp24
-rw-r--r--manifests/profile/base/sshd.pp2
4 files changed, 39 insertions, 11 deletions
diff --git a/manifests/profile/base/certmonger_user.pp b/manifests/profile/base/certmonger_user.pp
index 424ef09..4d91ac9 100644
--- a/manifests/profile/base/certmonger_user.pp
+++ b/manifests/profile/base/certmonger_user.pp
@@ -68,6 +68,7 @@ class tripleo::profile::base::certmonger_user (
include ::tripleo::certmonger::ca::libvirt
unless empty($apache_certificates_specs) {
+ include ::tripleo::certmonger::apache_dirs
ensure_resources('tripleo::certmonger::httpd', $apache_certificates_specs)
}
unless empty($libvirt_certificates_specs) {
diff --git a/manifests/profile/base/docker.pp b/manifests/profile/base/docker.pp
index 5e18a85..4797d86 100644
--- a/manifests/profile/base/docker.pp
+++ b/manifests/profile/base/docker.pp
@@ -28,12 +28,17 @@
# Set docker_namespace to INSECURE_REGISTRY, used when a local registry
# is enabled (defaults to false)
#
+# [*registry_mirror*]
+# Configure a registry-mirror in the /etc/docker/daemon.json file.
+# (defaults to false)
+#
# [*step*]
# step defaults to hiera('step')
#
class tripleo::profile::base::docker (
$docker_namespace = undef,
$insecure_registry = false,
+ $registry_mirror = false,
$step = hiera('step'),
) {
if $step >= 1 {
@@ -64,5 +69,23 @@ class tripleo::profile::base::docker (
subscribe => Package['docker'],
notify => Service['docker'],
}
+
+ if $registry_mirror {
+ $mirror_changes = [
+ 'set dict/entry[. = "registry-mirrors"] "registry-mirrors',
+ "set dict/entry[. = \"registry-mirrors\"]/array/string \"${registry_mirror}\""
+ ]
+ } else {
+ $mirror_changes = [ 'rm dict/entry[. = "registry-mirrors"]', ]
+ }
+
+ augeas { 'docker-daemon.json':
+ lens => 'Json.lns',
+ incl => '/etc/docker/daemon.json',
+ changes => $mirror_changes,
+ subscribe => Package['docker'],
+ notify => Service['docker'],
+ }
+
}
}
diff --git a/manifests/profile/base/docker_registry.pp b/manifests/profile/base/docker_registry.pp
index 2f1783d..cb262d9 100644
--- a/manifests/profile/base/docker_registry.pp
+++ b/manifests/profile/base/docker_registry.pp
@@ -31,19 +31,28 @@
# network
# Defaults to hiera('controller_admin_host')
#
+# [*enable_container_images_build*]
+# (Optional) Whether to install tools to build docker container images
+# Defaults to hiera('enable_container_images_build', true)
+#
class tripleo::profile::base::docker_registry (
- $registry_host = hiera('controller_host'),
- $registry_port = 8787,
- $registry_admin_host = hiera('controller_admin_host'),
+ $registry_host = hiera('controller_host'),
+ $registry_port = 8787,
+ $registry_admin_host = hiera('controller_admin_host'),
+ $enable_container_images_build = hiera('enable_container_images_build', true),
) {
+
+ include ::tripleo::profile::base::docker
+
# We want a v2 registry
package{'docker-registry':
ensure => absent,
allow_virtual => false,
}
package{'docker-distribution': }
- package{'docker': }
- package{'openstack-kolla': }
+ if str2bool($enable_container_images_build) {
+ package{'openstack-kolla': }
+ }
file { '/etc/docker-distribution/registry/config.yml' :
ensure => file,
content => template('tripleo/docker_distribution/registry_config.yml.erb'),
@@ -68,9 +77,4 @@ class tripleo::profile::base::docker_registry (
enable => true,
require => Package['docker-distribution'],
}
- service { 'docker':
- ensure => running,
- enable => true,
- require => Package['docker'],
- }
}
diff --git a/manifests/profile/base/sshd.pp b/manifests/profile/base/sshd.pp
index f43089c..2b86032 100644
--- a/manifests/profile/base/sshd.pp
+++ b/manifests/profile/base/sshd.pp
@@ -32,7 +32,7 @@ class tripleo::profile::base::sshd (
$motd = hiera('MOTD', undef),
) {
- include ::ssh
+ include ::ssh::server
if $bannertext {
$filelist = [ '/etc/issue', '/etc/issue.net', ]