ec4a183
Name:       resalloc-aws
ec4a183
Summary:    Resource allocator scripts for AWS
a0aec65
Version:    1.7
9ef3546
Release:    1%{?dist}
ec4a183
License:    GPLv2+
ec4a183
URL:        https://github.com/praiskup/resalloc-aws
ec4a183
BuildArch:  noarch
ec4a183
ec4a183
Requires: awscli
ec4a183
ec4a183
# Source is created by:
ec4a183
# git clone %%url && cd copr
ec4a183
# tito build --tgz --tag %%name-%%version-%%release
ec4a183
Source0: %{name}-%{version}.tar.gz
ec4a183
ec4a183
# This one is bundled, though it is GPLv2+, too.
ec4a183
Source1: https://raw.githubusercontent.com/praiskup/wait-for-ssh/main/wait-for-ssh
ec4a183
ec4a183
ec4a183
%description
ec4a183
When allocating/removing a machine in AWS/EC2 from command-line, there are many
ec4a183
non-trivial options in the 'aws-cli' command.  This project provides a
ec4a183
simplified wrapping command.
ec4a183
ec4a183
The 'resalloc-aws-new' script is able to (a) start a machine, (b) wait till SSH
ec4a183
is available and (c) run a specified playbook.
ec4a183
ec4a183
The 'resalloc-aws-delete' removes a machine started by 'resalloc-aws-new'
ec4a183
script.
ec4a183
ec4a183
These scripts are primarily designed to be used with 'resalloc-server', but they
ec4a183
might be used separately.
ec4a183
ec4a183
ec4a183
%prep
ec4a183
%setup -q
ec4a183
ec4a183
ec4a183
%build
ec4a183
sed '1c#! %{__python3}' %SOURCE1 > %{name}-wait-for-ssh
ec4a183
ec4a183
ec4a183
%install
ec4a183
mkdir -p %{buildroot}%{_bindir}
ec4a183
install -p -m 0755 bin/resalloc-aws-new %{buildroot}%{_bindir}
ec4a183
install -p -m 0755 bin/resalloc-aws-delete %{buildroot}%{_bindir}
2fc7ee9
install -p -m 0755 bin/resalloc-aws-list %{buildroot}%{_bindir}
7e45821
install -p -m 0755 bin/resalloc-aws-minimal-spot-zone %{buildroot}%{_bindir}
ec4a183
install -p -m 0755 %{name}-wait-for-ssh %{buildroot}%{_bindir}/resalloc-aws-wait-for-ssh
ec4a183
ec4a183
ec4a183
%files
ec4a183
%license COPYING
ec4a183
%doc README.md
ec4a183
%{_bindir}/%{name}-delete
ec4a183
%{_bindir}/%{name}-new
2fc7ee9
%{_bindir}/%{name}-list
7e45821
%{_bindir}/%{name}-minimal-spot-zone
ec4a183
%{_bindir}/%{name}-wait-for-ssh
ec4a183
ec4a183
ec4a183
%changelog
a0aec65
* Thu Nov 23 2023 Pavel Raiskup <praiskup@redhat.com> 1.7-1
a0aec65
- resalloc-aws-new: run playbook with stdin=/dev/null
a0aec65
- resalloc-aws-list: no need to double-kill "shutting-down" instances
a0aec65
7e45821
* Wed Nov 22 2023 Pavel Raiskup <praiskup@redhat.com> 1.6-1
7e45821
- resalloc-aws-list: don't list terminated instances
7e45821
- resalloc-aws-minimal-spot-zone helper
7e45821
9ef3546
* Fri Sep 01 2023 Pavel Raiskup <praiskup@redhat.com> 1.5-1
9ef3546
- resalloc-aws-new: add `--root-volume-size` option (svashisht@redhat.com)
34c9971
dcb02fd
* Wed May 10 2023 Pavel Raiskup <praiskup@redhat.com> 1.4-1
dcb02fd
- resalloc-aws-new: use gp3 volume for the root filesystem (frostyx@email.cz)
dcb02fd
- Update the wait-for-ssh submodule (praiskup@redhat.com)
1e2cddd
2fc7ee9
* Wed Jun 22 2022 Pavel Raiskup <praiskup@redhat.com> 1.3-1
2fc7ee9
- New script resalloc-aws-list
2fc7ee9
11d4f49
* Tue Mar 22 2022 Pavel Raiskup <praiskup@redhat.com> 1.2-1
11d4f49
- resalloc-aws-new: tag volumes started with new instances
b99fdfb
ec4a183
* Fri Oct 15 2021 Pavel Raiskup <praiskup@redhat.com> 1.1-1
ec4a183
- spec: package-review fixes (praiskup@redhat.com)
ec4a183
ec4a183
* Tue Oct 12 2021 Pavel Raiskup <praiskup@redhat.com> 1-1
ec4a183
- new package built with tito