diff --git a/.gitignore b/.gitignore index e69de29..2fb7be2 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/ahc-tools-0.2.0.tar.gz diff --git a/ahc-tools.spec b/ahc-tools.spec new file mode 100644 index 0000000..dd00eaa --- /dev/null +++ b/ahc-tools.spec @@ -0,0 +1,74 @@ +%{?!_licensedir:%global license %%doc} +%{!?upstream_version: %global upstream_version %{version}} + +Name: ahc-tools +Summary: Tools for RDO-Manager automatic health checks +Version: 0.2.0 +Release: 1%{?dist} +License: ASL 2.0 +URL: https://pypi.python.org/pypi/ahc-tools + +Source0: https://pypi.python.org/packages/source/a/ahc-tools/ahc-tools-%{upstream_version}.tar.gz +Source1: compute.specs +Source2: control.specs +Source3: state +Source4: compute.cmdb.example +Source5: control.cmdb.example + +BuildArch: noarch +BuildRequires: python-setuptools +BuildRequires: python2-devel +BuildRequires: python-pbr +Requires: python-hardware +Requires: python-ironicclient +Requires: python-swiftclient +Requires: python-oslo-config + +%description +Reporting and matching tools for RDO-manager automatic health checks. + +%prep +%autosetup -v -p 1 -n %{name}-%{upstream_version} + +rm -rf *.egg-info + +# Remove the requirements file so that pbr hooks don't add it +# to distutils requires_dist config +rm -rf {test-,}requirements.txt tools/{pip,test}-requires + +%build +%{__python2} setup.py build + +%install +%{__python2} setup.py install -O1 --skip-build --root=%{buildroot} + +# configuration contains passwords, thus 640 +install -p -D -m 640 example.conf %{buildroot}/%{_sysconfdir}/ahc-tools/ahc-tools.conf + +# edeploy matching configuration files +install -p -D -m 644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/ahc-tools/edeploy/compute.specs +install -p -D -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/ahc-tools/edeploy/control.specs +install -p -D -m 644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/ahc-tools/edeploy/state +install -p -D -m 644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/ahc-tools/edeploy/compute.cmdb.example +install -p -D -m 644 %{SOURCE5} %{buildroot}/%{_sysconfdir}/ahc-tools/edeploy/control.cmdb.example + +%files +%license LICENSE +%config(noreplace) %attr(-,root,root) %{_sysconfdir}/ahc-tools +%doc README.rst +%{python2_sitelib}/ahc_tools* +%exclude %{python2_sitelib}/ahc_tools/test* +%{_bindir}/ahc-report +%{_bindir}/ahc-match + +%changelog +* Fri Jun 19 2015 John Trowbridge - 0.2.0-1 +- Add ahc-tools.conf to store Ironic and Swift API credentials +- Add dependency on python-swiftclient + +* Fri May 08 2015 John Trowbridge - 0.1.1-1 +- Add default configuration for using edeploy matching + +* Tue Apr 28 2015 John Trowbridge - 0.1.0-1 +- Initial package build + diff --git a/compute.cmdb.example b/compute.cmdb.example new file mode 100644 index 0000000..1f4276e --- /dev/null +++ b/compute.cmdb.example @@ -0,0 +1,14 @@ +[{'bios_settings': {'ProcVirtualization': 'Enabled'}, + 'logical_disks': ({'disk_type': 'hdd', + 'interface_type': 'sas', + 'is_root_volume': 'true', + 'raid_level': '1+0', + 'size_gb': 50, + 'volume_name': 'root_volume'}, + {'disk_type': 'hdd', + 'interface_type': 'sas', + 'number_of_physical_disks': 3, + 'raid_level': '5', + 'size_gb': 100, + 'volume_name': 'data_volume'}), + 'used': 1}] \ No newline at end of file diff --git a/compute.specs b/compute.specs new file mode 100644 index 0000000..107dd70 --- /dev/null +++ b/compute.specs @@ -0,0 +1,5 @@ +[ + ('disk', '$disk', 'size', 'gt(4)'), + ('network', '$eth', 'ipv4', 'network(192.0.2.0/24)'), + ('memory', 'total', 'size', 'ge(4294967296)'), +] diff --git a/control.cmdb.example b/control.cmdb.example new file mode 100644 index 0000000..c3b5259 --- /dev/null +++ b/control.cmdb.example @@ -0,0 +1,14 @@ +[{'bios_settings': {'ProcVirtualization': 'Disabled'}, + 'logical_disks': ({'disk_type': 'hdd', + 'interface_type': 'sas', + 'is_root_volume': 'true', + 'raid_level': '1+0', + 'size_gb': 50, + 'volume_name': 'root_volume'}, + {'disk_type': 'hdd', + 'interface_type': 'sas', + 'number_of_physical_disks': 3, + 'raid_level': '5', + 'size_gb': 100, + 'volume_name': 'data_volume'}), + 'used': 1}] \ No newline at end of file diff --git a/control.specs b/control.specs new file mode 100644 index 0000000..107dd70 --- /dev/null +++ b/control.specs @@ -0,0 +1,5 @@ +[ + ('disk', '$disk', 'size', 'gt(4)'), + ('network', '$eth', 'ipv4', 'network(192.0.2.0/24)'), + ('memory', 'total', 'size', 'ge(4294967296)'), +] diff --git a/sources b/sources index e69de29..6461220 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +4a45f11e2a54eabbe0b8ec73bb336fd4 ahc-tools-0.2.0.tar.gz diff --git a/state b/state new file mode 100644 index 0000000..5462512 --- /dev/null +++ b/state @@ -0,0 +1 @@ +[('control', '1'), ('compute', '*')]