forked from microsoft/azurelinux
-
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.
Add containerd2 package (microsoft#11427)
As containerd 2.0 GA recently, we want to provide containerd 2.0 in azure linux 3.0 to enhance our distro. Currently we wanted to keep the current containerd version in the existing package and offer container 2.0 in a new package so that users can try and test as their needs. This PR is adds a new containerd2 package with version 2.0.0.
- Loading branch information
1 parent
f9f05ce
commit 8ebe049
Showing
7 changed files
with
128 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,15 @@ | ||
[Unit] | ||
Description=containerd container runtime | ||
Documentation=https://containerd.io | ||
After=network.target | ||
|
||
[Service] | ||
ExecStartPre=/sbin/modprobe overlay | ||
ExecStart=/usr/bin/containerd | ||
Restart=always | ||
Delegate=yes | ||
KillMode=process | ||
OOMScoreAdjust=-999 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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,9 @@ | ||
version = 2 | ||
[plugins] | ||
[plugins."io.containerd.grpc.v1.cri"] | ||
[plugins."io.containerd.grpc.v1.cri".containerd] | ||
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes] | ||
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc] | ||
runtime_type = "io.containerd.runc.v2" | ||
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options] | ||
SystemdCgroup = true |
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,7 @@ | ||
{ | ||
"Signatures": { | ||
"containerd.service": "a07bfcf412669b06673190b0779f48e652c9adcf1758289e849a00802804eec8", | ||
"containerd.toml": "5b3821236f09b4c858e0e098bbe1400f4dbbb47d360e39d21c61858b088c2896", | ||
"containerd-2.0.0.tar.gz": "346d644e1b96e1f4a39bfe9d1eb0eb01ca676f806c12d95e5dbe35325bbc1780" | ||
} | ||
} |
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,85 @@ | ||
%global debug_package %{nil} | ||
%define upstream_name containerd | ||
%define commit_hash 207ad711eabd375a01713109a8a197d197ff6542 | ||
|
||
Summary: Industry-standard container runtime | ||
Name: %{upstream_name}2 | ||
Version: 2.0.0 | ||
Release: 1%{?dist} | ||
License: ASL 2.0 | ||
Group: Tools/Container | ||
URL: https://www.containerd.io | ||
Vendor: Microsoft Corporation | ||
Distribution: Azure Linux | ||
|
||
Source0: https://github.com/containerd/containerd/archive/v%{version}.tar.gz#/%{upstream_name}-%{version}.tar.gz | ||
Source1: containerd.service | ||
Source2: containerd.toml | ||
|
||
%{?systemd_requires} | ||
|
||
BuildRequires: golang | ||
BuildRequires: go-md2man | ||
BuildRequires: make | ||
BuildRequires: systemd-rpm-macros | ||
|
||
Requires: runc >= 1.2.2 | ||
|
||
%description | ||
containerd is an industry-standard container runtime with an emphasis on | ||
simplicity, robustness and portability. It is available as a daemon for Linux | ||
and Windows, which can manage the complete container lifecycle of its host | ||
system: image transfer and storage, container execution and supervision, | ||
low-level storage and network attachments, etc. | ||
|
||
containerd is designed to be embedded into a larger system, rather than being | ||
used directly by developers or end-users. | ||
|
||
%prep | ||
%autosetup -p1 -n %{upstream_name}-%{version} | ||
|
||
%build | ||
export BUILDTAGS="-mod=vendor" | ||
make VERSION="%{version}" REVISION="%{commit_hash}" binaries man | ||
|
||
%check | ||
export BUILDTAGS="-mod=vendor" | ||
make VERSION="%{version}" REVISION="%{commit_hash}" test | ||
|
||
%install | ||
make VERSION="%{version}" REVISION="%{commit_hash}" DESTDIR="%{buildroot}" PREFIX="/usr" install install-man | ||
|
||
mkdir -p %{buildroot}/%{_unitdir} | ||
install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/containerd.service | ||
install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/containerd/config.toml | ||
install -vdm 755 %{buildroot}/opt/containerd/{bin,lib} | ||
|
||
%post | ||
%systemd_post containerd.service | ||
|
||
if [ $1 -eq 1 ]; then # Package install | ||
systemctl enable containerd.service > /dev/null 2>&1 || : | ||
systemctl start containerd.service > /dev/null 2>&1 || : | ||
fi | ||
|
||
%preun | ||
%systemd_preun containerd.service | ||
|
||
%postun | ||
%systemd_postun_with_restart containerd.service | ||
|
||
%files | ||
%license LICENSE NOTICE | ||
%{_bindir}/* | ||
%{_mandir}/* | ||
%config(noreplace) %{_unitdir}/containerd.service | ||
%config(noreplace) %{_sysconfdir}/containerd/config.toml | ||
%dir /opt/containerd | ||
%dir /opt/containerd/bin | ||
%dir /opt/containerd/lib | ||
|
||
%changelog | ||
* Wed Dec 11 2024 Nan Liu <[email protected]> - 2.0.0-1 | ||
- Created a standalone package for containerd 2.0.0 | ||
- Initial CBL-Mariner import from Azure | ||
- Initial version and License verified |
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