summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.tito/packages/.readme3
-rw-r--r--.tito/packages/openshift-ansible1
-rw-r--r--.tito/tito.props5
-rw-r--r--README.md4
-rw-r--r--README_AWS.md4
-rw-r--r--openshift-ansible.spec197
-rw-r--r--roles/openshift_master/handlers/main.yml2
-rw-r--r--roles/openshift_master/tasks/main.yml5
-rw-r--r--roles/openshift_node/handlers/main.yml1
-rw-r--r--roles/openshift_node/tasks/main.yml5
10 files changed, 216 insertions, 11 deletions
diff --git a/.tito/packages/.readme b/.tito/packages/.readme
new file mode 100644
index 000000000..b9411e2d1
--- /dev/null
+++ b/.tito/packages/.readme
@@ -0,0 +1,3 @@
+the .tito/packages directory contains metadata files
+named after their packages. Each file has the latest tagged
+version and the project's relative directory.
diff --git a/.tito/packages/openshift-ansible b/.tito/packages/openshift-ansible
new file mode 100644
index 000000000..adbed6b1d
--- /dev/null
+++ b/.tito/packages/openshift-ansible
@@ -0,0 +1 @@
+3.0.2-1 ./
diff --git a/.tito/tito.props b/.tito/tito.props
new file mode 100644
index 000000000..eab3f190d
--- /dev/null
+++ b/.tito/tito.props
@@ -0,0 +1,5 @@
+[buildconfig]
+builder = tito.builder.Builder
+tagger = tito.tagger.VersionTagger
+changelog_do_not_remove_cherrypick = 0
+changelog_format = %s (%ae)
diff --git a/README.md b/README.md
index 489f9b8e9..635df36a0 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-#Openshift and Atomic Enterprise Ansible
+#OpenShift and Atomic Enterprise Ansible
-This repo contains Ansible code for Openshift and Atomic Enterprise.
+This repo contains Ansible code for OpenShift and Atomic Enterprise.
##Setup
- Install base dependencies:
diff --git a/README_AWS.md b/README_AWS.md
index 3a5790eb3..6757e2892 100644
--- a/README_AWS.md
+++ b/README_AWS.md
@@ -38,8 +38,8 @@ You may also want to allow access from the outside world on the following ports:
• 80 - Web Apps
• 443 - Web Apps (https)
• 4789 - SDN / VXLAN
-• 8443 - Openshift Console
-• 10250 - kubelet
+• 8443 - OpenShift Console
+• 10250 - kubelet
```
diff --git a/openshift-ansible.spec b/openshift-ansible.spec
new file mode 100644
index 000000000..0c754a7b9
--- /dev/null
+++ b/openshift-ansible.spec
@@ -0,0 +1,197 @@
+# %commit is intended to be set by tito custom builders provided
+# in the .tito/lib directory. The values in this spec file will not be kept up to date.
+%{!?commit:
+%global commit c64d09e528ca433832c6b6e6f5c7734a9cc8ee6f
+}
+
+Name: openshift-ansible
+Version: 3.0.2
+Release: 1%{?dist}
+Summary: Openshift and Atomic Enterprise Ansible
+License: ASL 2.0
+URL: https://github.com/openshift/openshift-ansible
+Source0: https://github.com/openshift/openshift-ansible/archive/%{commit}/%{name}-%{version}.tar.gz
+BuildArch: noarch
+
+Requires: ansible
+
+%description
+Openshift and Atomic Enterprise Ansible
+
+This repo contains Ansible code and playbooks
+for Openshift and Atomic Enterprise.
+
+%prep
+%setup -q
+
+%build
+
+
+%install
+# Base openshift-ansible install
+mkdir -p %{buildroot}%{_datadir}/%{name}
+mkdir -p %{buildroot}%{_datadir}/ansible/%{name}
+mkdir -p %{buildroot}%{_datadir}/ansible_plugins
+
+# openshift-ansible-bin install
+mkdir -p %{buildroot}%{_bindir}
+mkdir -p %{buildroot}%{python_sitelib}/openshift_ansible
+mkdir -p %{buildroot}/etc/bash_completion.d
+mkdir -p %{buildroot}/etc/openshift_ansible
+cp -p bin/{ossh,oscp,opssh,opscp,ohi} %{buildroot}%{_bindir}
+cp -pP bin/openshift_ansible/* %{buildroot}%{python_sitelib}/openshift_ansible
+cp -p bin/ossh_bash_completion %{buildroot}/etc/bash_completion.d
+cp -p bin/openshift_ansible.conf.example %{buildroot}/etc/openshift_ansible/openshift_ansible.conf
+# Fix links
+rm -f %{buildroot}%{python_sitelib}/openshift_ansible/multi_ec2.py
+rm -f %{buildroot}%{python_sitelib}/openshift_ansible/aws
+ln -sf %{_datadir}/ansible/inventory/multi_ec2.py %{buildroot}%{python_sitelib}/openshift_ansible/multi_ec2.py
+ln -sf %{_datadir}/ansible/inventory/aws %{buildroot}%{python_sitelib}/openshift_ansible/aws
+
+# openshift-ansible-docs install
+# -docs are currently just %doc, no install needed
+
+# openshift-ansible-inventory install
+mkdir -p %{buildroot}/etc/ansible
+mkdir -p %{buildroot}%{_datadir}/ansible/inventory
+mkdir -p %{buildroot}%{_datadir}/ansible/inventory/aws
+mkdir -p %{buildroot}%{_datadir}/ansible/inventory/gce
+cp -p inventory/multi_ec2.py %{buildroot}%{_datadir}/ansible/inventory
+cp -p inventory/multi_ec2.yaml.example %{buildroot}/etc/ansible/multi_ec2.yaml
+cp -p inventory/aws/hosts/ec2.py %{buildroot}%{_datadir}/ansible/inventory/aws
+cp -p inventory/gce/hosts/gce.py %{buildroot}%{_datadir}/ansible/inventory/gce
+
+# openshift-ansible-playbooks install
+cp -rp playbooks %{buildroot}%{_datadir}/ansible/%{name}/
+
+# openshift-ansible-roles install
+cp -rp roles %{buildroot}%{_datadir}/ansible/%{name}/
+
+# openshift-ansible-filter-plugins install
+cp -rp filter_plugins %{buildroot}%{_datadir}/ansible_plugins/
+
+# openshift-ansible-lookup-plugins install
+cp -rp lookup_plugins %{buildroot}%{_datadir}/ansible_plugins/
+
+# Base openshift-ansible files
+%files
+%doc LICENSE.md README*
+%dir %{_datadir}/ansible/%{name}
+
+# ----------------------------------------------------------------------------------
+# openshift-ansible-bin subpackage
+# ----------------------------------------------------------------------------------
+%package bin
+Summary: Openshift and Atomic Enterprise Ansible Scripts for working with metadata hosts
+Requires: %{name}-inventory
+Requires: python2
+BuildRequires: python2-devel
+BuildArch: noarch
+
+%description bin
+Scripts to make it nicer when working with hosts that are defined only by metadata.
+
+%files bin
+%{_bindir}/*
+%{python_sitelib}/openshift_ansible/
+/etc/bash_completion.d/*
+%config(noreplace) /etc/openshift_ansible/
+
+
+# ----------------------------------------------------------------------------------
+# openshift-ansible-docs subpackage
+# ----------------------------------------------------------------------------------
+%package docs
+Summary: Openshift and Atomic Enterprise Ansible documents
+Requires: %{name}
+BuildArch: noarch
+
+%description docs
+%{summary}.
+
+%files docs
+%doc docs
+
+# ----------------------------------------------------------------------------------
+# openshift-ansible-inventory subpackage
+# ----------------------------------------------------------------------------------
+%package inventory
+Summary: Openshift and Atomic Enterprise Ansible Inventories
+Requires: python2
+BuildArch: noarch
+
+%description inventory
+Ansible Inventories used with the openshift-ansible scripts and playbooks.
+
+%files inventory
+%config(noreplace) /etc/ansible/*
+%dir %{_datadir}/ansible/inventory
+%{_datadir}/ansible/inventory/multi_ec2.py*
+%{_datadir}/ansible/inventory/aws/ec2.py*
+%{_datadir}/ansible/inventory/gce/gce.py*
+
+
+# ----------------------------------------------------------------------------------
+# openshift-ansible-playbooks subpackage
+# ----------------------------------------------------------------------------------
+%package playbooks
+Summary: Openshift and Atomic Enterprise Ansible Playbooks
+Requires: %{name}
+BuildArch: noarch
+
+%description playbooks
+%{summary}.
+
+%files playbooks
+%{_datadir}/ansible/%{name}/playbooks
+
+
+# ----------------------------------------------------------------------------------
+# openshift-ansible-roles subpackage
+# ----------------------------------------------------------------------------------
+%package roles
+Summary: Openshift and Atomic Enterprise Ansible roles
+Requires: %{name}
+BuildArch: noarch
+
+%description roles
+%{summary}.
+
+%files roles
+%{_datadir}/ansible/%{name}/roles
+
+
+# ----------------------------------------------------------------------------------
+# openshift-ansible-filter-plugins subpackage
+# ----------------------------------------------------------------------------------
+%package filter-plugins
+Summary: Openshift and Atomic Enterprise Ansible filter plugins
+Requires: %{name}
+BuildArch: noarch
+
+%description filter-plugins
+%{summary}.
+
+%files filter-plugins
+%{_datadir}/ansible_plugins/filter_plugins
+
+
+# ----------------------------------------------------------------------------------
+# openshift-ansible-lookup-plugins subpackage
+# ----------------------------------------------------------------------------------
+%package lookup-plugins
+Summary: Openshift and Atomic Enterprise Ansible lookup plugins
+Requires: %{name}
+BuildArch: noarch
+
+%description lookup-plugins
+%{summary}.
+
+%files lookup-plugins
+%{_datadir}/ansible_plugins/lookup_plugins
+
+
+%changelog
+* Mon Oct 19 2015 Troy Dawson <tdawson@redhat.com> 3.0.2-1
+- Initial Package
+
diff --git a/roles/openshift_master/handlers/main.yml b/roles/openshift_master/handlers/main.yml
index 2981979e0..37028e0f6 100644
--- a/roles/openshift_master/handlers/main.yml
+++ b/roles/openshift_master/handlers/main.yml
@@ -1,4 +1,4 @@
---
- name: restart master
service: name={{ openshift.common.service_type }}-master state=restarted
- when: not openshift_master_ha | bool
+ when: (not openshift_master_ha | bool) and (not master_service_status_changed | default(false))
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index a5c1a805c..fca41307d 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/roles/openshift_master/tasks/main.yml
@@ -141,9 +141,8 @@
when: not openshift_master_ha | bool
register: start_result
-- name: pause to prevent service restart from interfering with bootstrapping
- pause: seconds=30
- when: start_result | changed
+- set_fact:
+ master_service_status_changed = start_result | changed
- name: Install cluster packages
yum: pkg=pcs state=present
diff --git a/roles/openshift_node/handlers/main.yml b/roles/openshift_node/handlers/main.yml
index 633f3ed13..447ca85f3 100644
--- a/roles/openshift_node/handlers/main.yml
+++ b/roles/openshift_node/handlers/main.yml
@@ -1,6 +1,7 @@
---
- name: restart node
service: name={{ openshift.common.service_type }}-node state=restarted
+ when: not node_service_status_changed | default(false)
- name: restart docker
service: name=docker state=restarted
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml
index 4ebb007f6..98271c8b3 100644
--- a/roles/openshift_node/tasks/main.yml
+++ b/roles/openshift_node/tasks/main.yml
@@ -132,6 +132,5 @@
service: name={{ openshift.common.service_type }}-node enabled=yes state=started
register: start_result
-- name: pause to prevent service restart from interfering with bootstrapping
- pause: seconds=30
- when: start_result | changed
+- set_fact:
+ node_service_status_changed = start_result | changed