Skip to content

Commit

Permalink
Merge pull request #14 from diegoakechi/salt-standalone
Browse files Browse the repository at this point in the history
Install the Salt files on the salt-shared location from 15-SP1
  • Loading branch information
arbulu89 authored Jun 4, 2019
2 parents e7bd84d + 41e966c commit c822beb
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 28 deletions.
15 changes: 13 additions & 2 deletions habootstrap-formula.changes
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
-------------------------------------------------------------------
Fri May 31 13:14:43 UTC 2019 - Diego Vinicius Akechi <[email protected]>

- Version bump 0.2.0
* Include the salt-formulas-configuration dependency on
SLE/Leap 15-SP1 and higher. This package configures the shared salt
formulas location (/usr/share/salt-formulas) to be used by SUMA 4.0
or salt in standalone mode.
* Drops the habootstrap-formula-suma package, as the forms metadata
will be available only on SUMA 4.0 using the shared location.

-------------------------------------------------------------------
Thu May 16 09:13:17 UTC 2019 - Xabier Arbulu Insausti <[email protected]>

- Remove network repository installation
- Remove network repository installation

-------------------------------------------------------------------
Thu Apr 25 12:26:43 UTC 2019 - Diego Vinicius Akechi <[email protected]>
Expand Down Expand Up @@ -44,4 +55,4 @@ Thu Sep 06 13:25:22 UTC 2018 - [email protected]
Thu Sep 6 12:37:13 UTC 2018 - [email protected]

- Initial version

51 changes: 25 additions & 26 deletions habootstrap-formula.spec
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

# See also http://en.opensuse.org/openSUSE:Specfile_guidelines
%define fname cluster
%define fdir %{_datadir}/susemanager/formulas
%define fdir %{_datadir}/salt-formulas

Name: habootstrap-formula
Version: 0.1.0
Version: 0.2.0
Group: System/Packages
Release: 1
Release: 0
Summary: HA cluster (crmsh) deployment salt formula

License: Apache-2.0
Expand All @@ -33,28 +33,32 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
Requires: salt-shaptools

# On SLE/Leap 15-SP1 and TW requires the new salt-formula configuration location.
%if ! (0%{?sle_version:1} && 0%{?sle_version} < 150100)
Requires: salt-formulas-configuration
%endif

%description
HA cluster (crmsh) deployment salt formula

# package to deploy on SUMA specific path.
%package suma
Summary: HA cluster (crmsh) deployment salt formula (SUMA specific)
Requires: salt-shaptools

%description suma
HA Cluster Bootstrap Salt Formula for SUSE Manager. Used to configure a basic HA cluster.
HA cluster salt deployment formula. This formula is capable to perform
the HA cluster bootstrap actions (init, join, remove) using standalone salt
or via SUSE Manager formulas with forms, available on SUSE Manager 4.0.

%prep
%setup -q

%build

%install

# before SUMA 4.0/15-SP1, install on the standard Salt Location.
%if 0%{?sle_version:1} && 0%{?sle_version} < 150100

mkdir -p %{buildroot}/srv/salt/
cp -R %{fname} %{buildroot}/srv/salt

# SUMA Specific
%else

# On SUMA 4.0/15-SP1, a single shared directory will be used.
mkdir -p %{buildroot}%{fdir}/states/%{fname}
mkdir -p %{buildroot}%{fdir}/metadata/%{fname}
cp -R %{fname} %{buildroot}%{fdir}/states
Expand All @@ -64,39 +68,34 @@ then
cp -R metadata.yml %{buildroot}%{fdir}/metadata/%{fname}
fi

%endif

%if 0%{?sle_version:1} && 0%{?sle_version} < 150100

%files
%defattr(-,root,root,-)
# %license macro is not available on older releases
%if 0%{?sle_version} <= 120300
%doc LICENSE
%else
%license LICENSE
%endif
%doc README.md
/srv/salt/%{fname}

%dir %attr(0755, root, salt) /srv/salt

%else

%files suma
%files
%defattr(-,root,root,-)
# %license macro is not available on older releases
%if 0%{?sle_version} <= 120300
%doc LICENSE
%else
%license LICENSE
%endif
%doc README.md
%dir %{_datadir}/susemanager
%dir %{fdir}
%dir %{fdir}/states
%dir %{fdir}/metadata
%{fdir}/states/%{fname}
%{fdir}/metadata/%{fname}

%dir %attr(0755, root, salt) %{_datadir}/susemanager
%dir %attr(0755, root, salt) %{fdir}
%dir %attr(0755, root, salt) %{fdir}/states
%dir %attr(0755, root, salt) %{fdir}/metadata

%endif

%changelog

0 comments on commit c822beb

Please sign in to comment.