From 7bb8a83e28f154a36b19ce9c673fe63d02b41d42 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Feb 05 2020 10:53:41 +0000 Subject: [PATCH 1/5] Add Ken Dreyer's koji-playbooks as a git submodule Signed-off-by: Nils Philippsen --- diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..86ae722 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "koji-playbooks"] + path = koji-playbooks + url = https://github.com/ktdreyer/koji-playbooks.git diff --git a/README.rst b/README.rst index ff0b343..ba046e0 100644 --- a/README.rst +++ b/README.rst @@ -5,12 +5,13 @@ This project hosts a Vagrantfile meant to make it easy to deploy koji in a local VM for development purpose. It relies on the playbook provided at: https://github.com/ktdreyer/koji-playbooks -which should be cloned in the same folder as this project. To run the project:: - git clone git@github.com:ktdreyer/koji-playbooks.git git clone ssh://git@pagure.io/koji-vagrant.git + cd koji-vagrant + git submodule init + git submodule update Edit the playbook to specify that ansible should be ran using python3:: @@ -23,10 +24,6 @@ And adjust it to:: vars: ansible_python_interpreter: /usr/bin/python3 -Then move to the koji-vagrant project:: - - cd koji-vagrant - Create the SSL certs needed by koji:: python3 koji-ssl-admin new-ca @@ -36,7 +33,7 @@ Create the SSL certs needed by koji:: Move the SSL certs into there expected location:: - cp koji-ca.* kojidev.example.com.* ../koji-playbooks/roles/koji-hub/files + cp koji-ca.* kojidev.example.com.* koji-playbooks/roles/koji-hub/files Start the VM:: diff --git a/Vagrantfile b/Vagrantfile index b353df6..0c2b04a 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -41,7 +41,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # bootstrap and run with ansible config.vm.provision "ansible" do |ansible| - ansible.playbook = "../koji-playbooks/setup-koji.yml" + ansible.playbook = "koji-playbooks/setup-koji.yml" end diff --git a/koji-playbooks b/koji-playbooks new file mode 160000 index 0000000..05223ae --- /dev/null +++ b/koji-playbooks @@ -0,0 +1 @@ +Subproject commit 05223aea46b6274d4e0589fce750d8139e3465fc From c70c6e9e0aea05b90709292721894754d6bb9213 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Feb 05 2020 10:53:43 +0000 Subject: [PATCH 2/5] Polish the README a bit Signed-off-by: Nils Philippsen --- diff --git a/README.rst b/README.rst index ba046e0..bb9a1b4 100644 --- a/README.rst +++ b/README.rst @@ -2,9 +2,10 @@ koji-vagrant ============ This project hosts a Vagrantfile meant to make it easy to deploy koji in a local -VM for development purpose. +VM for development purposes. -It relies on the playbook provided at: https://github.com/ktdreyer/koji-playbooks +It relies on Ken Dreyer's Ansible playbooks for Koji provided at: +https://github.com/ktdreyer/koji-playbooks To run the project:: From 35419b8352c27767922aa384195a7a984ecdf84b Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Feb 05 2020 10:53:43 +0000 Subject: [PATCH 3/5] Use F31 Cloud as base image This way we don't have to change the playbook to use Python 3. Signed-off-by: Nils Philippsen --- diff --git a/README.rst b/README.rst index bb9a1b4..8b65581 100644 --- a/README.rst +++ b/README.rst @@ -14,17 +14,6 @@ To run the project:: git submodule init git submodule update -Edit the playbook to specify that ansible should be ran using python3:: - - vim koji-playbooks/setup-koji.yml - -And adjust it to:: - - - name: manage Koji VM - hosts: all - vars: - ansible_python_interpreter: /usr/bin/python3 - Create the SSL certs needed by koji:: python3 koji-ssl-admin new-ca diff --git a/Vagrantfile b/Vagrantfile index 0c2b04a..af0e3df 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -6,9 +6,9 @@ require 'etc' VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| - config.vm.box_url = "https://download.fedoraproject.org/pub/fedora/linux/releases/30/Cloud/x86_64/images/Fedora-Cloud-Base-Vagrant-30-1.2.x86_64.vagrant-libvirt.box" - config.vm.box = "f30-cloud-libvirt" - config.vm.box_download_checksum = "2ae5aad7621ce7735c905bf6b882d391949f8bfa3534b8631c9b2161126ca2f0" + config.vm.box_url = "https://download.fedoraproject.org/pub/fedora/linux/releases/31/Cloud/x86_64/images/Fedora-Cloud-Base-Vagrant-31-1.9.x86_64.vagrant-libvirt.box" + config.vm.box = "f31-cloud-libvirt" + config.vm.box_download_checksum = "c0b34a1a81f6d43b8b0261016fb4354c6a2a5895569dddf0da13286e3759237d" config.vm.box_download_checksum_type = "sha256" # Forward traffic on the host to the development server on the guest. From dcf8acd564e17d287376fe4ad061c7623b1b19d0 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Feb 05 2020 10:53:44 +0000 Subject: [PATCH 4/5] Use up-to-date keyword for setting host name The "vm.host_name" keyword is a legacy from Vagrant 1.x. Signed-off-by: Nils Philippsen --- diff --git a/Vagrantfile b/Vagrantfile index af0e3df..b621f22 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -47,7 +47,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # Create the kojii dev box config.vm.define "koji" do |koji| - koji.vm.host_name = "kojidev.example.com" + koji.vm.hostname = "kojidev.example.com" koji.vm.provider :libvirt do |domain| # Season to taste From 573c4aeca2e05e0b3c04f037f8472f5bdd73dca7 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Feb 05 2020 10:53:44 +0000 Subject: [PATCH 5/5] Set Ansible compatibility mode Fewer warnings... :) Signed-off-by: Nils Philippsen --- diff --git a/Vagrantfile b/Vagrantfile index b621f22..6e340a9 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -41,6 +41,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # bootstrap and run with ansible config.vm.provision "ansible" do |ansible| + ansible.compatibility_mode = "2.0" ansible.playbook = "koji-playbooks/setup-koji.yml" end