-
Notifications
You must be signed in to change notification settings - Fork 0
/
cockpit-ceph-installer.spec
54 lines (42 loc) · 1.99 KB
/
cockpit-ceph-installer.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Name: ceph-installer
Version: 0.8
Release: 6%{?dist}
Summary: Cockpit plugin for Ceph cluster installation
License: LGPLv2+
Source: ceph-installer-%{version}.tar.gz
BuildArch: noarch
Requires: ansible-runner-service >= 0.9
Requires: ceph-ansible >= 3.1
Requires: cockpit
Requires: cockpit-bridge
%description
This package installs a plugin for cockpit that provides a a graphical means of installing a Ceph cluster. The plugin handles UI interaction and makes API calls to the ansible-runner-service API daemon, running on localhost, to run Ansible playbooks to handle the installation.
%prep
%setup -q -n ceph-installer-%{version}
%install
mkdir -p %{buildroot}%{_datadir}/cockpit/%{name}
install -m 0644 dist/* %{buildroot}%{_datadir}/cockpit/%{name}/
mkdir -p %{buildroot}%{_datadir}/metainfo/
install -m 0644 ./org.cockpit-project.%{name}.metainfo.xml %{buildroot}%{_datadir}/metainfo/
%post
if [ "$1" = 1 ]; then
systemctl enable --now cockpit.service
# rename the project folder, and symlink to ceph-ansible
mv %{_datadir}/ansible-runner-service/project %{_datadir}/ansible-runner-service/project_default
ln -s /usr/share/ceph-ansible %{_datadir}/ansible-runner-service/project
# copy the sample playbooks for installation, so they're available to the runner-service
cp %{_datadir}/ceph-ansible/site.yml.sample %{_datadir}/ceph-ansible/site.yml
cp %{_datadir}/ceph-ansible/site-docker.yml.sample %{_datadir}/ceph-ansible/site-docker.yml
cp %{_datadir}/ceph-ansible/site-docker.yml.sample %{_datadir}/ceph-ansible/site-container.yml
# TODO: Could change ansible-runner-service target_user parm = ceph (default will be root)
# i.e add the parameter and restart runner-service daemon
fi
%files
%{_datadir}/cockpit/*
%{_datadir}/metainfo/*
%changelog
* Sun Mar 17 2019 Paul Cuzner <[email protected]> 0.8.6
- Added 'save' step in deploy workflow, enabling ansible vars to be manually updated
* Sun Dec 16 2018 Paul Cuzner <[email protected]> 0.8
- Initial rpm build
- First functionally complete version