diff --git a/files/openshift/jenkins.repo b/files/openshift/jenkins.repo new file mode 100644 index 0000000000..5ab0572477 --- /dev/null +++ b/files/openshift/jenkins.repo @@ -0,0 +1,5 @@ +[jenkins] +name=Jenkins +baseurl=http://pkg.jenkins-ci.org/redhat +gpgcheck=1 +gpgkey=http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key diff --git a/files/openshift/openshift-el6.repo b/files/openshift/openshift-el6.repo new file mode 100644 index 0000000000..87e34a7074 --- /dev/null +++ b/files/openshift/openshift-el6.repo @@ -0,0 +1,5 @@ +[openshift] +name=OpenShift +baseurl=http://mirror.openshift.com/pub/crankcase/rhel-6/x86_64/ +enabled=1 +gpgcheck=0 diff --git a/playbooks/openshift-el6.yml b/playbooks/openshift-el6.yml new file mode 100644 index 0000000000..eec72aeb0d --- /dev/null +++ b/playbooks/openshift-el6.yml @@ -0,0 +1,16 @@ +# restricted to run on cloud instances only +- hosts: 209.132.184.* + user: root + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - $vars/${ansible_distribution}.yml + - $private/vars.yml + + + tasks: + - include: $tasks/cloud_setup_basic.yml + - include: $tasks/openshift-el6.yml + + + handlers: + - include: $handlers/restart_services.yml diff --git a/tasks/openshift-el6.yml b/tasks/openshift-el6.yml new file mode 100644 index 0000000000..bad361f1ae --- /dev/null +++ b/tasks/openshift-el6.yml @@ -0,0 +1,54 @@ +# setup openshift broker on el6 +--- +- name: set the hostname to openshift- + action: command hostname openshift-${dist_tag} + tags: + - config + +- name: setup openshift and jenkins repos + action: copy src=$files/openshift/$item dest=/etc/yum.repos.d/$item + with_items: + - openshift-el6.repo + - jenkins.repo + +- name: install openshift pkg core + action: yum state=installed name=$item + with_items: + - mcollective + - mcollective-qpid-plugin + - mongodb + - qpid-cpp-server + - rubygem-gearchanger-mcollective-plugin + - rubygem-swingshift-mongo-plugin + - rubygem-uplift-bind-plugin + - rhc + - stickshift-broker + +- name: set selinux bools appropriately + action: seboolean state=true persistent=yes name=$item + with_items: + - httpd_unified + - httpd_can_network_connect + - httpd_can_network_relay + - named_write_master_zones + - allow_ypbind + +- name: selinux module install: stickshift + action: command semodule -i /usr/share/selinux/packages/rubygem-stickshift-common/stickshift.pp + +- name: selinux module disable: passenger + action: comand semodule -d passenger + +- name: selinux module install: other passenger + action: command semodule -i /usr/share/selinux/packages/rubygem-passenger/rubygem-passenger.pp + +- name: fix up files for selinux + action: command '$item' + with_items: + - "fixfiles -R rubygem-passenger restore" + - "fixfiles -R mod_passenger restore" + - "restorecon -rv /var/run" + - "restorecon -rv /usr/lib/ruby/gems/1.8/gems/passenger-*" + - "restorecon -rv /usr/sbin/mcollectived /var/log/mcollective.log /run/mcollective.pid" + +