ansible: add playbook for deploying a mozreview CI environment (bug 1294805) r?gps,glob,smacleod draft
authorMāris Fogels <mars@mozilla.com>
Thu, 01 Sep 2016 15:13:15 -0400
changeset 9574 fc193b6ef8089046247cb2a9893abdb43eff3c25
parent 9571 709ea5056f06cc437736e9c3b5019dd4dd7231e9
child 9575 56a3e00ff32dc30cb3f8beaecdfa02e43268c8cc
push id1224
push usermfogels@mozilla.com
push dateWed, 14 Sep 2016 15:17:26 +0000
reviewersgps, glob, smacleod
bugs1294805
ansible: add playbook for deploying a mozreview CI environment (bug 1294805) r?gps,glob,smacleod Add a playbook for deploying Jenkins and a mozreview test environment onto a host. The 'jenkins' user on the host can then check out and run the mozreview test suite. The Jenkins jobs that automatically run the test suite are kept outside of version control. MozReview-Commit-ID: JhaunTTMti7
ansible/deploy-mozreview-ci.yml
new file mode 100644
--- /dev/null
+++ b/ansible/deploy-mozreview-ci.yml
@@ -0,0 +1,26 @@
+# vim:ft=ansible:
+---
+
+- hosts: mozreview-ci
+  become: yes
+
+  pre_tasks:
+    # This is a hack to force the user to think about and set an appropriate
+    # admin user and password for the current environment.  This keeps us from
+    # accidentally deploying the Jenkins default admin username and default
+    # admin password.
+    - fail: msg="You must set the 'jenkins_admin_username_override' variable before running this playbook"
+      when: jenkins_admin_username_override is undefined
+
+    - fail: msg="You must set the 'jenkins_admin_password_override' variable before running this playbook"
+      when: jenkins_admin_password_override is undefined
+
+  roles:
+    - { role: geerlingguy.jenkins,
+        jenkins_http_port: 80,
+        jenkins_repo_url: "http://pkg.jenkins.io/redhat-stable/jenkins.repo",
+        jenkins_repo_key_url: "http://pkg.jenkins.io/redhat-stable/jenkins.io.key",
+        jenkins_admin_username: "{{ jenkins_admin_username_override }}",
+        jenkins_admin_password: "{{ jenkins_admin_password_override }}"}
+    - { role: vct-dev-environment,
+        test_user: jenkins }