--- /dev/null
+---
+- hosts: puddle
+ roles:
+ - common
+ - puddle
--- /dev/null
+---
+# The name of the unprivileged user that will run puddle
+puddle_user: puddle
--- /dev/null
+---
+
+- name: restart nginx
+ service:
+ name: nginx
+ state: restarted
+
+- name: restart faucet
+ service:
+ name: faucet
+ state: restarted
--- /dev/null
+---
+dependencies:
+ - role: secrets
--- /dev/null
+---
+- name: add ceph puddle config dir
+ file:
+ path: /etc/puddle/ceph
+ owner: root
+ group: root
+ mode: 0755
+ state: directory
+
+- name: add ceph puddle config files
+ template:
+ src: "{{ item }}.conf"
+ dest: "/etc/puddle/ceph/{{ item }}.conf"
+ owner: root
+ group: root
+ mode: 0644
+ with_items:
+ - ceph-1.2-rhel-6
+ - ceph-1.2-rhel-7
+ - rh-common-rhel-6
+ - rh-common-rhel-7
+ - ceph-1.3-rhel-7
+
+- name: add rcm-kerberos config file
+ template:
+ src: 'rcm-kerberos.conf'
+ dest: '/etc/rcm-kerberos.conf'
+ owner: root
+ group: root
+ mode: 0644
+
+# Note: this file must be installed on the host independent of ansible.
+- name: set permissions on keytab
+ file:
+ path: "{{ puddle.kerberos_keytab }}"
+ owner: root
+ group: puddle
+ mode: 0640
+
+- name: add faucet config file
+ template:
+ src: 'faucet.conf'
+ dest: '/etc/puddle/faucet.conf'
+ owner: root
+ group: root
+ mode: 0644
+ notify:
+ - restart faucet
--- /dev/null
+---
+- name: add ceph distill config dir
+ file:
+ path: /etc/distill/ceph
+ owner: root
+ group: root
+ mode: 0755
+ state: directory
+
+- name: add distill config files
+ template:
+ src: "../../templates/distill/{{ item }}"
+ dest: "/etc/distill/ceph/{{ item }}"
+ owner: root
+ group: root
+ mode: 0644
+ with_items:
+ - ceph-1.3-rhel-7.conf
+ - comps-ceph-1.3-rhel-7.xml
+ - run-distill.conf
+ - variants-ceph-1.3-rhel-7.xml
+
+# distill requires this symlink in order to run.
+- name: symlink /mnt/brew
+ file:
+ src: /mnt/redhat/brewroot
+ dest: /mnt/brew
+ owner: root
+ group: root
+ state: link
+
+- name: create destinations (targets) for distill trees (composes)
+ file:
+ path: /var/www/{{ ansible_hostname }}/htdocs/distill/{{ item }}-trees
+ owner: "{{ puddle_user }}"
+ mode: 0755
+ state: directory
+ with_items:
+ - 1.3-candidate
+ # 1.3-pending
+
+- name: add ceph wrapper script for run-distill
+ template:
+ src: '../../templates/distill/ceph-distill'
+ dest: '/usr/local/bin/ceph-distill'
+ owner: root
+ group: root
+ mode: 0755
--- /dev/null
+---
+- name: install distill
+ yum:
+ name: "{{ item }}"
+ state: present
+ with_items:
+ - distill
+ - distill-utils
--- /dev/null
+---
+- name: enable rel-eng repositories
+ template:
+ src: eng-rhel-7.repo
+ dest: /etc/yum.repos.d/eng-rhel-7.repo
+ owner: root
+ group: root
+ mode: 0644
+
+- name: install puddle and dependencies
+ yum:
+ name: "{{ item }}"
+ state: present
+ with_items:
+ - puddle
+ - rcm-kerberos
+ - krb5-workstation
+ - kstart
+
+- name: Add a new unprivileged UID to run puddle
+ user:
+ name: "{{ puddle_user }}"
+ state: present
+ home: '/etc/puddle'
+ createhome: no
+ system: yes
--- /dev/null
+---
+- fail:
+ msg: "Puddle is only relevant on RHEL"
+ when: ansible_distribution != 'RedHat'
+
+# install puddle
+- include: install.yml
+
+# configure NFS
+- include: nfs.yml
+
+# configure puddle
+- include: configure.yml
+
+# install and configure web server
+- include: nginx.yml
+ tags:
+ - nginx
+
+# install and configure distill
+- include: distill/install.yml
+- include: distill/configure.yml
--- /dev/null
+---
+
+- name: install nfs client
+ yum:
+ name: nfs-utils
+ state: present
+
+- name: Mount /mnt/redhat
+ mount:
+ name: /mnt/redhat
+ src: "{{ puddle.mnt_redhat_nfs_src }}"
+ fstype: nfs
+ opts: 'ro,nosuid,nodev,hard,intr,bg,noatime,nodiratime,nfsvers=3,tcp,rsize=8192,wsize=8192'
+ state: mounted
--- /dev/null
+---
+- name: install nginx web server
+ yum: name=nginx state=present
+
+- name: create nginx docroot
+ file:
+ path: "/var/www/{{ ansible_hostname }}/htdocs"
+ owner: "{{ puddle_user }}"
+ mode: 0755
+ state: directory
+
+- name: configure nginx
+ template:
+ src: nginx.conf
+ dest: /etc/nginx/nginx.conf
+ notify:
+ - restart nginx
+
+- name: start the nginx service
+ service: name=nginx state=started enabled=yes
--- /dev/null
+#
+# {{ ansible_managed }}
+#
+
+[puddle]
+type = errata
+errata_release = CEPH-1.2
+errata_whitelist = no
+product_name = RHCeph
+version = 1.2-RHEL-6
+rootdir = /var/www/{{ ansible_hostname }}/htdocs/puddles
+emails = {{ puddle.emails }}
+signed = yes
+rhndir = no
+mashroot = /tmp/mash/ceph
+brewroot = {{ puddle.brewroot_url }}
+topurl = {{ puddle.topurl }}/puddles
+announcer = {{ puddle.announcer }}
+publish = no
+cdndir = no
+
+
+[RH6-CEPH-CALAMARI-1.2]
+variant = RH6-CEPH-CALAMARI-1.2
+external = {{ puddle.rhel_6_z_repo_url }}
+keys = fd431d51,f21541eb
+
+[RH6-CEPH-INSTALLER-1.2]
+variant = RH6-CEPH-INSTALLER-1.2
+external = {{ puddle.rhel_6_z_repo_url }}
+keys = fd431d51,f21541eb
+
+[RH6-CEPH-MON-1.2]
+variant = RH6-CEPH-MON-1.2
+external = {{ puddle.rhel_6_z_repo_url }}
+keys = fd431d51,f21541eb
+
+[RH6-CEPH-OSD-1.2]
+variant = RH6-CEPH-OSD-1.2
+external = {{ puddle.rhel_6_z_repo_url }}
+keys = fd431d51,f21541eb
--- /dev/null
+#
+# {{ ansible_managed }}
+#
+
+[puddle]
+type = errata
+errata_release = CEPH-1.2
+errata_whitelist = no
+product_name = RHCeph
+version = 1.2-RHEL-7
+rootdir = /var/www/{{ ansible_hostname }}/htdocs/puddles
+emails = {{ puddle.emails }}
+signed = yes
+rhndir = no
+mashroot = /tmp/mash/ceph
+brewroot = {{ puddle.brewroot_url }}
+topurl = {{ puddle.topurl }}/puddles
+announcer = {{ puddle.announcer }}
+publish = no
+cdndir = no
+
+
+[Server-RH7-CEPH-CALAMARI-1.2]
+variant = Server-RH7-CEPH-CALAMARI-1.2
+external = {{ puddle.rhel_7_z_repo_url }}
+keys = fd431d51,f21541eb
+
+[Server-RH7-CEPH-INSTALLER-1.2]
+variant = Server-RH7-CEPH-INSTALLER-1.2
+external = {{ puddle.rhel_7_z_repo_url }}
+keys = fd431d51,f21541eb
+
+[Server-RH7-CEPH-MON-1.2]
+variant = Server-RH7-CEPH-MON-1.2
+external = {{ puddle.rhel_7_z_repo_url }}
+keys = fd431d51,f21541eb
+
+[Server-RH7-CEPH-OSD-1.2]
+variant = Server-RH7-CEPH-OSD-1.2
+external = {{ puddle.rhel_7_z_repo_url }}
+keys = fd431d51,f21541eb
--- /dev/null
+#
+# {{ ansible_managed }}
+#
+
+[puddle]
+type = errata
+errata_release = CEPH-1.3.0
+errata_whitelist = no
+errata_blacklist = no
+product_name = RHCeph
+version = 1.3-RHEL-7
+rootdir = /var/www/{{ ansible_hostname }}/htdocs/puddles
+emails = {{ puddle.emails }}
+signed = no
+rhndir = no
+mashroot = /tmp/mash/ceph
+brewroot = {{ puddle.brewroot_url }}
+topurl = {{ puddle.topurl }}/puddles
+announcer = {{ puddle.announcer }}
+publish = no
+cdndir = no
+
+
+[Server-RH7-CEPH-CALAMARI-1.3]
+variant = Server-RH7-CEPH-CALAMARI-1.3
+external = {{ puddle.rhel_7_z_repo_url }}
+keys = fd431d51,f21541eb
+
+[Server-RH7-CEPH-INSTALLER-1.3]
+variant = Server-RH7-CEPH-INSTALLER-1.3
+external = {{ puddle.rhel_7_z_repo_url }}
+keys = fd431d51,f21541eb
+
+[Server-RH7-CEPH-MON-1.3]
+variant = Server-RH7-CEPH-MON-1.3
+external = {{ puddle.rhel_7_z_repo_url }}
+keys = fd431d51,f21541eb
+
+[Server-RH7-CEPH-OSD-1.3]
+variant = Server-RH7-CEPH-OSD-1.3
+external = {{ puddle.rhel_7_z_repo_url }}
+keys = fd431d51,f21541eb
--- /dev/null
+#
+# {{ ansible_managed }}
+#
+
+# PRODUCT INFO
+product_name = "Red Hat Ceph"
+product_short = "Ceph"
+product_version = "1.3"
+product_is_layered = True
+
+
+# BASE PRODUCT INFO (FOR A LAYERED PRODUCT ONLY)
+base_product_short = "RHEL"
+base_product_version = "7"
+base_product_name = "Red Hat Enterprise Linux"
+
+
+# GENERAL SETTINGS
+bootable = False
+comps_file = "comps-ceph-1.3-rhel-7.xml"
+variants_file = "variants-ceph-1.3-rhel-7.xml"
+
+# FD431D51 = redhatrelease2 (rhel6+ gold key)
+# F21541EB = beta2 (rhel6+ beta key)
+# None = unsigned
+sigkeys = ["FD431D51", "F21541EB", None]
+
+
+multilib_arches = ["x86_64"]
+multilib_methods = [] # devel (recommended), all, base, file, kernel, none, runtime
+
+
+# RUNROOT SETTINGS
+runroot = False
+
+
+# PKGSET
+pkgset_source = "koji" # koji, repos
+
+# PKGSET - REPOS
+# pkgset_repos format: {arch: [repo1_url, repo2_url, ...]}
+# pkgset_repos = {}
+
+# PKGSET - KOJI
+pkgset_koji_path_prefix = "/mnt/brew"
+pkgset_koji_url = "{{ distill.brewhub_url }}"
+pkgset_koji_tag = "ceph-1.3-rhel-7-candidate"
+
+
+# GATHER
+gather_method = "deps" # deps, nodeps
+gather_source = "comps" # comps, json, none
+check_deps = False
+# variant ID regex: arch: packages
+gather_lookaside_repos = [
+ ("^.*$", {
+ "x86_64": [
+ "{{ distill.rhel_7_lookaside_repo_x86_64_url }}",
+ "{{ distill.rhel_7_lookaside_repo_src_url }}",
+ ],
+ }),
+]
+
+
+createrepo_c = True
--- /dev/null
+#!/bin/bash
+
+#
+# {{ ansible_managed }}
+#
+
+# Distill's output is very large. This script wraps "run-distill" and does a
+# bit of tidying up afterwards. It removes a lot of the files that we don't
+# use, and it even deletes older composes.
+
+# The general idea is to make sure we don't run out of disk space on our VM.
+
+cd /etc/distill/ceph
+run-distill el7-test
+
+set -e
+
+# Keep this many old composes around.
+keep=20
+
+# $compose_config is this is the directory in htdocs that we want to clean up.
+compose_config=1.3-candidate-trees
+
+# Eventually we will want to refactor the rest of this script into a function
+# and loop over more compose_configs here.
+
+target=/var/www/{{ ansible_hostname }}/htdocs/distill/$compose_config
+compose_id=$(cat $target/latest-Ceph-1-RHEL-7/COMPOSE_ID)
+
+# Cleanup temporary files that we don't need and take up space
+pushd $target/latest-Ceph-1-RHEL-7
+ # Temporary work directory; not usuable by QE.
+ rm -r work
+ # These repos are not relevant. Just save the "Installer" repo.
+ rm -r compose/{Calamari,MON,OSD}
+ pushd compose/Installer
+ # Remove more things that we don't need
+ rm -r x86_64/{debug,jigdo,os}/
+ rm -r source/tree/
+ # This ISO is only the "Installer" ISO, not the unified one. Remove it.
+ rm x86_64/iso/$compose_id-Installer-x86_64-dvd1.iso*
+ rm source/iso/$compose_id-Installer-source-dvd1.iso*
+ # These checksums are for the "Installer" ISO (see above).
+ rm {source,x86_64}/iso/MD5SUM
+ rm {source,x86_64}/iso/SHA1SUM
+ rm {source,x86_64}/iso/SHA256SUM
+ # We are now left with two single "unified" ISOs in /x86_64 and in /source.
+ popd # compose/Installer
+popd # $target
+
+# Remove composes older than $keep number.
+for old in $(ls -d $target/Ceph* | tail -n +${keep}); do
+ rm -r $old
+done
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE comps PUBLIC "-//Red Hat, Inc.//DTD Comps info//EN" "comps.dtd">
+<!-- {{ ansible_managed }} -->
+<comps>
+ <group>
+ <id>calamari</id>
+ <name>Red Hat Ceph Calamari</name>
+ <description>Red Hat Ceph Calamari packages</description>
+ <default>true</default>
+ <uservisible>true</uservisible>
+ <packagelist>
+ <packagereq type="mandatory">calamari-clients</packagereq>
+ <packagereq type="mandatory">calamari-servers</packagereq>
+ <packagereq type="mandatory">salt-master</packagereq>
+ <packagereq type="mandatory">zeromq3-devel</packagereq>
+ </packagelist>
+ </group>
+
+ <group>
+ <id>ceph-installer</id>
+ <name>Red Hat Ceph Installer</name>
+ <description>Red Hat Ceph Installer packages</description>
+ <default>true</default>
+ <uservisible>true</uservisible>
+ <packagelist>
+ <packagereq type="mandatory">ceph-deploy</packagereq>
+ </packagelist>
+ </group>
+
+ <group>
+ <id>ceph-mon</id>
+ <name>Red Hat Ceph Monitor</name>
+ <description>Red Hat Ceph Monitor packages</description>
+ <default>true</default>
+ <uservisible>true</uservisible>
+ <packagelist>
+ <packagereq type="mandatory">ceph-mon</packagereq>
+ <packagereq type="mandatory">diamond</packagereq>
+ <packagereq type="mandatory">librados2-devel</packagereq>
+ <packagereq type="mandatory">librbd1-devel</packagereq>
+ <packagereq type="mandatory">salt-minion</packagereq>
+ </packagelist>
+ </group>
+
+ <group>
+ <id>ceph-osd</id>
+ <name>Red Hat Ceph OSD</name>
+ <description>Red Hat Ceph Object Storage Daemon packages</description>
+ <default>true</default>
+ <uservisible>true</uservisible>
+ <packagelist>
+ <packagereq type="mandatory">ceph-osd</packagereq>
+ <packagereq type="mandatory">diamond</packagereq>
+ <packagereq type="mandatory">librados2-devel</packagereq>
+ <packagereq type="mandatory">librbd1-devel</packagereq>
+ <packagereq type="mandatory">salt-minion</packagereq>
+ </packagelist>
+ </group>
+
+</comps>
--- /dev/null
+#
+# This file is managed by ansible, don't make changes here - they will be overwritten.
+#
+
+[el7]
+config = ceph-1.3-rhel-7.conf
+compose_type = production
+target = /mnt/redhat/devel/candidate-trees
+no_label = 0
+kerberos = 0
+kerberos_keytab = /etc/distill.$HOSTNAME.keytab
+kerberos_principal = distill/$HOSTNAME
+skip_phase =
+just_phase =
+changelogs = 0
+composedb = 0
+notification = 0
+email = kdreyer@redhat.com
+pre_compose_script =
+post_compose_script =
+
+[el7-nightly]
+config = ceph-1.3-rhel-7.conf
+compose_type = nightly
+target = /mnt/redhat/nightly
+no_label = 1
+kerberos = 0
+kerberos_keytab = /etc/distill.$HOSTNAME.keytab
+kerberos_principal = distill/$HOSTNAME
+skip_phase =
+just_phase =
+changelogs = 0
+composedb = 0
+notification = 0
+email = {{ distill.email }}
+pre_compose_script =
+post_compose_script =
+
+[el7-test]
+config = ceph-1.3-rhel-7.conf
+compose_type = test
+target = /var/www/{{ ansible_hostname }}/htdocs/distill/1.3-candidate-trees
+no_label = 1
+kerberos = 0
+kerberos_keytab = /etc/distill.$HOSTNAME.keytab
+kerberos_principal = distill/$HOSTNAME
+skip_phase =
+just_phase =
+changelogs = 0
+composedb = 0
+notification = 0
+email = {{ distill.email }}
+pre_compose_script =
+post_compose_script = compose-create-unified-isos $COMPOSE_PATH
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE variants PUBLIC "-//Red Hat, Inc.//DTD Variants info//EN" "variants.dtd">
+<!-- {{ ansible_managed }} -->
+<variants>
+
+ <variant id="Calamari" name="Calamari" type="variant">
+ <arches>
+ <arch>x86_64</arch>
+ </arches>
+ <groups>
+ <group default="true">calamari</group>
+ </groups>
+ </variant>
+
+ <variant id="Installer" name="Installer" type="variant">
+ <arches>
+ <arch>x86_64</arch>
+ </arches>
+ <groups>
+ <group default="true">ceph-installer</group>
+ </groups>
+ </variant>
+
+ <variant id="MON" name="Monitor" type="variant">
+ <arches>
+ <arch>x86_64</arch>
+ </arches>
+ <groups>
+ <group default="true">ceph-mon</group>
+ </groups>
+ </variant>
+
+ <variant id="OSD" name="Object Storage Daemon" type="variant">
+ <arches>
+ <arch>x86_64</arch>
+ </arches>
+ <groups>
+ <group default="true">ceph-osd</group>
+ </groups>
+ </variant>
+
+</variants>
--- /dev/null
+#
+# {{ ansible_managed }}
+#
+
+[eng-rhel-7]
+name=Rel-Eng Packages for RHEL 7 - $basearch
+baseurl={{ puddle.eng_rhel_7_repo_url }}
+gpgcheck=0
+enabled=1
+
+[eng-rhel-7-candidate]
+name=Rel-Eng Packages for RHEL 7 - Testing - $basearch
+baseurl={{ puddle.eng_rhel_7_candidate_repo_url }}
+gpgcheck=0
+enabled=1
--- /dev/null
+[main]
+log = /var/log/faucet.log
+
+[ceph-1.3-rhel-7]
+email = no
+config = /etc/puddle/ceph/ceph-1.3-rhel-7.conf
+window = 5
+# Once RT #345524 is completed, use "brew" with the -pending tag instead of
+# "errata".
+errata = 20313
+#brew = ceph-1.3-rhel-7-pending
+
+[ceph-1.2-rhel-7]
+email = no
+config = /etc/puddle/ceph/ceph-1.2-rhel-7.conf
+window = 5
+# TODO: file RT ticket for sync_brew_with_errata with ceph-1.2 tags
+brew = ceph-1.2-rhel-7-pending
+
+[ceph-1.2-rhel-6]
+email = no
+config = /etc/puddle/ceph/ceph-1.2-rhel-6.conf
+window = 5
+# TODO: file RT ticket for sync_brew_with_errata with ceph-1.2 tags
+brew = ceph-1.2-rhel-6-pending
--- /dev/null
+#
+# {{ ansible_managed }}
+#
+
+# For more information on configuration, see:
+# * Official English Documentation: http://nginx.org/en/docs/
+# * Official Russian Documentation: http://nginx.org/ru/docs/
+
+user nginx;
+worker_processes 1;
+
+error_log /var/log/nginx/error.log;
+#error_log /var/log/nginx/error.log notice;
+#error_log /var/log/nginx/error.log info;
+
+pid /run/nginx.pid;
+
+
+events {
+ worker_connections 1024;
+}
+
+
+http {
+ include /etc/nginx/mime.types;
+ default_type application/octet-stream;
+
+ log_format main '$remote_addr - $remote_user [$time_local] "$request" '
+ '$status $body_bytes_sent "$http_referer" '
+ '"$http_user_agent" "$http_x_forwarded_for"';
+
+ access_log /var/log/nginx/access.log main;
+
+ sendfile on;
+ #tcp_nopush on;
+
+ #keepalive_timeout 0;
+ keepalive_timeout 65;
+
+ #gzip on;
+
+ index index.html index.htm;
+
+ server_tokens off;
+
+ # Load modular configuration files from the /etc/nginx/conf.d directory.
+ # See http://nginx.org/en/docs/ngx_core_module.html#include
+ # for more information.
+ include /etc/nginx/conf.d/*.conf;
+
+ server {
+ listen 80 default_server;
+ listen [::]:80 default_server;
+ server_name localhost;
+ root /var/www/{{ ansible_hostname }}/htdocs;
+
+ location / {
+ autoindex on;
+ autoindex_exact_size off;
+ }
+
+ # Some of distill's files have no suffix and are simply plaintext.
+ location ~ (COMPOSE_ID|STATUS)$ {
+ default_type text/plain;
+ }
+
+ types {
+ # Plaintext files from puddle and distill:
+ text/plain conf log repo txt;
+ # More from distill:
+ text/plain manifest MD5SUM SHA1SUM SHA256SUM;
+ }
+
+ #access_log /var/log/nginx/host.access.log main;
+
+ }
+}
--- /dev/null
+#
+# {{ ansible_managed }}
+#
+
+[default]
+keytab = {{ puddle.kerberos_keytab }}
+principal = {{ puddle.kerberos_principal }}
--- /dev/null
+#
+# {{ ansible_managed }}
+#
+
+[puddle]
+type = errata
+#errata_release = RH-Common-ASYNC
+errata_release = no
+errata_whitelist = 20355
+product_name = RHEL-6-Server-RH-Common
+version = 6.5
+rootdir = /var/www/{{ ansible_hostname }}/htdocs/puddles
+emails = {{ puddle.emails }}
+signed = no
+rhndir = no
+mashroot = /tmp/mash/ceph
+brewroot = {{ puddle.brewroot_url }}
+topurl = {{ puddle.topurl }}/puddles
+announcer = {{ puddle.announcer }}
+publish = no
+cdndir = no
+
+
+[rh-common-rhel-6.5]
+variant = RH-Common
+external = {{ puddle.rhel_6_z_repo_url }},{{ puddle.rhel_6_common_repo_url }}
--- /dev/null
+#
+# {{ ansible_managed }}
+#
+
+[puddle]
+type = errata
+#errata_release = RH-Common-ASYNC
+errata_release = no
+errata_whitelist = 20355
+product_name = RHEL-7-RH-Common
+version = 7.1
+rootdir = /var/www/{{ ansible_hostname }}/htdocs/puddles
+emails = {{ puddle.emails }}
+signed = no
+rhndir = no
+mashroot = /tmp/mash/ceph
+brewroot = {{ puddle.brewroot_url }}
+topurl = {{ puddle.topurl }}/puddles
+announcer = {{ puddle.announcer }}
+publish = no
+cdndir = no
+
+
+[rh-common-rhel-7.1]
+variant = Server-RH-Common
+external = {{ puddle.rhel_7_z_repo_url }},{{ puddle.rhel_7_common_repo_url }}