Skip to content

Commit

Permalink
Added spec files and tito configs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Wiest committed Mar 24, 2015
1 parent a7e3b23 commit 9672990
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 32 deletions.
44 changes: 44 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# openshift-ansible RPM Build instructions
We use tito to make building and tracking revisions easy.

For more information on tito, please see the [Tito home page](http://rm-rf.ca/tito "Tito home page").


## Build openshift-ansible-bin
- Change into openshift-ansible/bin
```
cd openshift-ansible/bin
```
- Build a test package (no tagging needed)
```
tito build --test --rpm
```
- Tag a new build (bumps version number and adds log entries)
```
tito tag
```
- Follow the on screen tito instructions to push the tags
- Build a new package based on the latest tag information
```
tito build --rpm
```


## Build openshift-ansible-inventory
- Change into openshift-ansible/inventory
```
cd openshift-ansible/inventory
```
- Build a test package (no tagging needed)
```
tito build --test --rpm
```
- Tag a new build (bumps version number and adds log entries)
```
tito tag
```
- Follow the on screen tito instructions to push the tags
- Build a new package based on the latest tag information
```
tito build --rpm
```
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Setup
- [AWS](README_AWS.md)
- [GCE](README_GCE.md)

- Build
- [How to build the openshift-ansible rpms](BUILD.md)

- Directory Structure:
- [cloud.rb](cloud.rb) - light wrapper around Ansible
- [cluster.sh](cluster.sh) - easily create OpenShift 3 clusters
Expand Down
25 changes: 0 additions & 25 deletions bin/README_BUILD

This file was deleted.

14 changes: 7 additions & 7 deletions bin/openshift-ansible-bin.spec
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Summary: OpenShift Operations files for mirror
Summary: OpenShift Ansible Scripts for working with metadata hosts
Name: openshift-ansible-bin
Version: 0.0.1
Version: 0.0.0
Release: 1%{?dist}
License: ASL 2.0
URL: https://github.com/openshift/openshift-ansible
Source0: %{name}-%{version}.tar.gz
Requires: python2
Requires: python2, openshift-ansible-inventory
BuildRequires: python2-devel
BuildArch: noarch

Expand All @@ -18,17 +18,17 @@ Scripts to make it nicer when working with hosts that are defined only by metada
%build

%install
mkdir -p %{buildroot}/usr/bin
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{python_sitelib}/openshift_ansible
mkdir -p %{buildroot}/etc/bash_completion.d

cp -p ossh oscp opssh %{buildroot}/usr/bin
cp -p ossh oscp opssh %{buildroot}%{_bindir}
cp -p awsutil.py %{buildroot}%{python_sitelib}/openshift_ansible
cp -p ossh_bash_completion %{buildroot}/etc/bash_completion.d

%files
/usr/bin/*
%{python_sitelib}/openshift_ansible/*
%{_bindir}/*
%{python_sitelib}/openshift_ansible/
/etc/bash_completion.d/*

%changelog
37 changes: 37 additions & 0 deletions inventory/openshift-ansible-inventory.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Summary: OpenShift Ansible Inventories
Name: openshift-ansible-inventory
Version: 0.0.0
Release: 1%{?dist}
License: ASL 2.0
URL: https://github.com/openshift/openshift-ansible
Source0: %{name}-%{version}.tar.gz
Requires: python2
BuildRequires: python2-devel
BuildArch: noarch

%description
Ansible Inventories used with the openshift-ansible scripts and playbooks.

%prep
%setup -q

%build

%install
mkdir -p %{buildroot}/usr/share/ansible/inventory
mkdir -p %{buildroot}/usr/share/ansible/inventory/aws
mkdir -p %{buildroot}/usr/share/ansible/inventory/gce

cp -p multi_ec2.py multi_ec2.yaml.example %{buildroot}/usr/share/ansible/inventory
cp -p aws/ec2.py aws/ec2.ini %{buildroot}/usr/share/ansible/inventory/aws
cp -p gce/gce.py %{buildroot}/usr/share/ansible/inventory/gce

%files
%dir /usr/share/ansible/inventory
/usr/share/ansible/inventory/multi_ec2.py*
/usr/share/ansible/inventory/multi_ec2.yaml.example
/usr/share/ansible/inventory/aws/ec2.py*
%config(noreplace) /usr/share/ansible/inventory/aws/ec2.ini
/usr/share/ansible/inventory/gce/gce.py*

%changelog

0 comments on commit 9672990

Please sign in to comment.