forked from kubernetes-sigs/kubespray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kubernetes-sigs#1544 from bogdando/rpm_spec
[WIP] Support pbr builds and prepare for RPM packaging as the ansible-kubespray artifact
- Loading branch information
Showing
6 changed files
with
209 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
%global srcname ansible_kubespray | ||
|
||
%{!?upstream_version: %global upstream_version %{version}%{?milestone}} | ||
|
||
Name: ansible-kubespray | ||
Version: XXX | ||
Release: XXX | ||
Summary: Ansible modules for installing Kubernetes | ||
|
||
Group: System Environment/Libraries | ||
License: ASL 2.0 | ||
Vendor: Kubespray <[email protected]> | ||
Url: https://github.com/kubernetes-incubator/kubespray | ||
Source0: https://github.com/kubernetes-incubator/kubespray/archive/%{upstream_version}.tar.gz | ||
|
||
BuildArch: noarch | ||
BuildRequires: git | ||
BuildRequires: python2-devel | ||
BuildRequires: python-setuptools | ||
BuildRequires: python-d2to1 | ||
BuildRequires: python-pbr | ||
|
||
Requires: ansible | ||
Requires: python-jinja2 | ||
Requires: python-netaddr | ||
|
||
%description | ||
|
||
Ansible-kubespray is a set of Ansible modules and playbooks for | ||
installing a Kubernetes cluster. If you have questions, join us | ||
on the https://slack.k8s.io, channel '#kubespray'. | ||
|
||
%prep | ||
%autosetup -n %{name}-%{upstream_version} -S git | ||
|
||
|
||
%build | ||
%{__python2} setup.py build | ||
|
||
|
||
%install | ||
export PBR_VERSION=%{version} | ||
export SKIP_PIP_INSTALL=1 | ||
%{__python2} setup.py install --skip-build --root %{buildroot} | ||
|
||
|
||
%files | ||
%doc README.md | ||
%doc inventory/inventory.example | ||
%config /etc/kubespray/ansible.cfg | ||
%config /etc/kubespray/inventory/group_vars/all.yml | ||
%config /etc/kubespray/inventory/group_vars/k8s-cluster.yml | ||
%license LICENSE | ||
%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info | ||
/usr/local/share/kubespray/roles/ | ||
/usr/local/share/kubespray/playbooks/ | ||
%defattr(-,root,root) | ||
|
||
|
||
%changelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
pbr>=1.6 | ||
ansible>=2.3.0 | ||
netaddr | ||
jinja2>=2.9.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
[metadata] | ||
name = ansible-kubespray | ||
summary = Ansible modules for installing Kubernetes | ||
description-file = | ||
README.md | ||
author = Kubespray | ||
author-email = [email protected] | ||
home-page = https://github.com/kubernetes-incubator/kubespray | ||
classifier = | ||
License :: OSI Approved :: Apache Software License | ||
Development Status :: 4 - Beta | ||
Intended Audience :: Developers | ||
Intended Audience :: System Administrators | ||
Intended Audience :: Information Technology | ||
Topic :: Utilities | ||
|
||
[global] | ||
setup-hooks = | ||
pbr.hooks.setup_hook | ||
|
||
[files] | ||
data_files = | ||
/usr/local/share/kubespray/playbooks/ = | ||
cluster.yml | ||
upgrade-cluster.yml | ||
scale.yml | ||
reset.yml | ||
extra_playbooks/upgrade-only-k8s.yml | ||
/usr/local/share/kubespray/roles = roles/* | ||
doc_files = | ||
README.md | ||
inventory/inventory.example | ||
config_files = | ||
/etc/kubespray/ = | ||
ansible.cfg | ||
/etc/kubespray/inventory/ = | ||
inventory/group_vars/all.yml | ||
inventory/group_vars/k8s-cluster.yml | ||
|
||
[wheel] | ||
universal = 1 | ||
|
||
[pbr] | ||
skip_authors = True | ||
skip_changelog = True | ||
|
||
[bdist_rpm] | ||
group = "System Environment/Libraries" | ||
requires = | ||
ansible | ||
python-jinja2 | ||
python-netaddr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright Red Hat, Inc. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
# not use this file except in compliance with the License. You may obtain | ||
# a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
|
||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['pbr'], | ||
pbr=True) |