From f9cba3058220514c4290733b2e46fb8e840448c9 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 12 Aug 2018 10:09:20 -0500 Subject: [PATCH] koji: Add playbooks for Koji The `koji.yml` playbook can be used to deploy an entire Koji ecosystem. It is composed of three smaller playbooks: * `koji-hub.yml`: Deploys the Koji hub, GC, and Kojira * `koji-web.yml`: Deploys the Koji Web GUI * `koji-builder.yml`: Deploys the Koji builder --- hosts | 10 ++++++++++ koji-builder.yml | 4 ++++ koji-hub.yml | 9 +++++++++ koji-web.yml | 4 ++++ koji.yml | 8 ++++++++ 5 files changed, 35 insertions(+) create mode 100644 koji-builder.yml create mode 100644 koji-hub.yml create mode 100644 koji-web.yml create mode 100644 koji.yml diff --git a/hosts b/hosts index c0ece3a..4e3ad33 100644 --- a/hosts +++ b/hosts @@ -36,6 +36,16 @@ git0.pyrocufflink.blue [jenkins-slave] cm0.pyrocufflink.blue +[koji:children] +koji-builder +koji-hub + +[koji-builder] + +[koji-hub] + +[koji-web] + [named-server:children] pyrocufflink-dns diff --git a/koji-builder.yml b/koji-builder.yml new file mode 100644 index 0000000..41e5cc9 --- /dev/null +++ b/koji-builder.yml @@ -0,0 +1,4 @@ +- hosts: koji-builder + roles: + - ssh-hostkeys + - koji-builder diff --git a/koji-hub.yml b/koji-hub.yml new file mode 100644 index 0000000..68cb28b --- /dev/null +++ b/koji-hub.yml @@ -0,0 +1,9 @@ +- hosts: koji-hub + roles: + - postgresql-server + - apache + - koji-hub + - cronie + - koji-gc + - kojira + - koji-client diff --git a/koji-web.yml b/koji-web.yml new file mode 100644 index 0000000..954ea15 --- /dev/null +++ b/koji-web.yml @@ -0,0 +1,4 @@ +- hosts: koji-web + roles: + - apache + - koji-web diff --git a/koji.yml b/koji.yml new file mode 100644 index 0000000..95629b6 --- /dev/null +++ b/koji.yml @@ -0,0 +1,8 @@ +- import_playbook: koji-hub.yml +- import_playbook: koji-web.yml +# For new installations, it is not safe to start kojid immediately, as the +# `koji add-host` command needs to be run first to avoid the "User n is not a +# host" error. Until a `koji_user` module exists to automatically handle this, +# it is best to simply let the user handle it and explicitly apply the +# `koji-builder.yml` platbook later +#- import_playbook: koji-builder.yml