{"id":16777295,"url":"https://github.com/githubixx/ansible-role-containerd","last_synced_at":"2025-03-22T00:31:02.683Z","repository":{"id":38297328,"uuid":"404827784","full_name":"githubixx/ansible-role-containerd","owner":"githubixx","description":"Ansible role to install containerd","archived":false,"fork":false,"pushed_at":"2025-01-15T20:40:51.000Z","size":115,"stargazers_count":10,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T06:22:51.953Z","etag":null,"topics":["ansible","ansible-role","container","containerd","containers","cri","docker","k8s","kubernetes","oci"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/githubixx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSES/GPL-3.0-or-later.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-09T18:22:31.000Z","updated_at":"2025-01-15T20:40:29.000Z","dependencies_parsed_at":"2023-01-31T08:35:12.341Z","dependency_job_id":"1d6eb5ae-ad71-4333-836c-18f82f6ee03f","html_url":"https://github.com/githubixx/ansible-role-containerd","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubixx%2Fansible-role-containerd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubixx%2Fansible-role-containerd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubixx%2Fansible-role-containerd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubixx%2Fansible-role-containerd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/githubixx","download_url":"https://codeload.github.com/githubixx/ansible-role-containerd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244890102,"owners_count":20527030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-role","container","containerd","containers","cri","docker","k8s","kubernetes","oci"],"created_at":"2024-10-13T07:24:17.898Z","updated_at":"2025-03-22T00:31:02.676Z","avatar_url":"https://github.com/githubixx.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nCopyright (C) 2021-2025 Robert Wimmer\nSPDX-License-Identifier: GPL-3.0-or-later\n--\u003e\n\n# ansible-role-containerd\n\nAnsible role to install [containerd](https://github.com/containerd/containerd). `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.\n\n## Changelog\n\n**Change history:**\n\nSee full [CHANGELOG](https://github.com/githubixx/ansible-role-containerd/blob/master/CHANGELOG.md)\n\n**Recent changes:**\n\n## 0.14.0+2.0.2\n\n**Note**: This a major release update to `containerd` version `2.0.2`! Please read the [changelog of containerd v2.0.2](https://github.com/containerd/containerd/blob/main/docs/containerd-2.0.md) accordingly! In general if you haven't used any \"exotic\" features so far this version of the Ansible role should cover everything already and upgrading should be smooth. Nevertheless you should test the changes before!\n\n- **POTENTIALLY BREAKING**\n  - `containerd_config` variable value was adjusted to to meet `containerd` configuration requirements of version `3`. Please see [Full configuration](https://github.com/containerd/containerd/blob/main/docs/cri/config.md#full-configuration) for all possible values. If you haven't adjusted this variable then there should be no need to change anything and upgrading should be smooth.\n  - update list of containerd binaries in `containerd_binaries` variable. `containerd-shim-runc-v1` and `containerd-shim` were removed as no longer provided by upstream.\n\n- **UPDATE**\n  - update `containerd` to `v2.0.2`\n  - `templates/etc/systemd/system/containerd.service.j2`: add `dbus.service` to `After=`\n\n- **MOLECULE**\n  - adjust expected output of `ctr pull` command\n\n## 0.13.2+1.7.22\n\n- **UPDATE**\n  - update `containerd` to `v1.7.22`\n\n## 0.13.1+1.7.20\n\n- **UPDATE**\n  - update `containerd` to `v1.7.20`\n\n## 0.13.0+1.7.19\n\n- **FEATURE**\n  - add support for Ubuntu 24.04\n\n- **UPDATE**\n  - update `containerd` to `v1.7.19`\n\n## Installation\n\n- Directly download from Github (change into Ansible role directory before cloning):\n`git clone https://github.com/githubixx/ansible-role-containerd.git githubixx.containerd`\n\n- Via `ansible-galaxy` command and download directly from Ansible Galaxy:\n`ansible-galaxy install role githubixx.containerd`\n\n- Create a `requirements.yml` file with the following content (this will download the role from Github) and install with\n`ansible-galaxy role install -r requirements.yml`:\n\n```yaml\n---\nroles:\n  - name: githubixx.containerd\n    src: https://github.com/githubixx/ansible-role-containerd.git\n    version: 0.14.0+2.0.2\n```\n\n## Role Variables\n\n```yaml\n# Only value \"base\" is currently supported\ncontainerd_flavor: \"base\"\n\n# containerd version to install\ncontainerd_version: \"2.0.2\"\n\n# Directory where to store \"containerd\" binaries\ncontainerd_binary_directory: \"/usr/local/bin\"\n\n# Location of containerd configuration file\ncontainerd_config_directory: \"/etc/containerd\"\n\n# Directory to store the archive\ncontainerd_tmp_directory: \"{{ lookup('env', 'TMPDIR') | default('/tmp', true) }}\"\n\n# Owner/group of \"containerd\" binaries. If the variables are not set\n# the resulting binary will be owned by the current user.\ncontainerd_owner: \"root\"\ncontainerd_group: \"root\"\n\n# Specifies the permissions of the \"containerd\" binaries\ncontainerd_binary_mode: \"0755\"\n\n# Operating system\n# Possible options: \"linux\", \"windows\"\ncontainerd_os: \"linux\"\n\n# Processor architecture \"containerd\" should run on.\n# Other possible values: \"arm64\",\"arm\"\ncontainerd_arch: \"amd64\"\n\n# Name of the archive file name\ncontainerd_archive_base: \"containerd-{{ containerd_version }}-{{ containerd_os }}-{{ containerd_arch }}.tar.gz\"\n\n# The containerd download URL (normally no need to change it)\ncontainerd_url: \"https://github.com/containerd/containerd/releases/download/v{{ containerd_version }}/{{ containerd_archive_base }}\"\n\n# containerd systemd service settings\ncontainerd_service_settings:\n  \"ExecStartPre\": \"{{ modprobe_location }} overlay\"\n  \"ExecStart\": \"{{ containerd_binary_directory }}/containerd\"\n  \"Restart\": \"always\"\n  \"RestartSec\": \"5\"\n  \"Type\": \"notify\"\n  \"Delegate\": \"yes\"\n  \"KillMode\": \"process\"\n  \"OOMScoreAdjust\": \"-999\"\n  \"LimitNOFILE\": \"1048576\"\n  \"LimitNPROC\": \"infinity\"\n  \"LimitCORE\": \"infinity\"\n\n# Content of configuration file of \"containerd\". The settings below are the\n# settings that are either different to the default \"containerd\" settings or\n# stated explicitly to make important settings more visible even if they're\n# default. So these settings will override the default settings.\n#\n# The default \"containerd\" configuration can be generated with this command:\n#\n# containerd config default\n#\n# A full configuration example with all possible options is also available here:\n# https://github.com/containerd/containerd/blob/main/docs/cri/config.md#full-configuration\n#\n# Also if you want to adjust settings please consult the CRI Plugin Config Guide:\n# https://github.com/containerd/containerd/blob/main/docs/cri/config.md\n#\n# Difference to default configuration:\n#\n# - In 'plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.runc.options' the\n#   setting \"SystemdCgroup\" is set to \"true\" instead of \"false\". This is relevant for\n#   Kubernetes e.g. Also see:\n#   https://kubernetes.io/docs/setup/production-environment/container-runtimes/#containerd-systemd)\n#\ncontainerd_config: |\n  version = 3\n  [plugins]\n    [plugins.'io.containerd.cri.v1.runtime']\n      [plugins.'io.containerd.cri.v1.runtime'.containerd]\n        default_runtime_name = 'runc'\n        [plugins.'io.containerd.cri.v1.runtime'.containerd.runtimes]\n          [plugins.'io.containerd.cri.v1.runtime'.containerd.runtimes.runc]\n            runtime_type = 'io.containerd.runc.v2'\n            [plugins.'io.containerd.cri.v1.runtime'.containerd.runtimes.runc.options]\n              BinaryName = '/usr/local/sbin/runc'\n              SystemdCgroup = true\n      [plugins.'io.containerd.cri.v1.runtime'.cni]\n        bin_dir = '/opt/cni/bin'\n        conf_dir = '/etc/cni/net.d'\n```\n\n## Dependencies\n\nOptional dependencies (e.g. needed for Kubernetes):\n\n- [runc](https://github.com/githubixx/ansible-role-runc)\n- [CNI](https://github.com/githubixx/ansible-role-cni)\n\nYou can use every other `runc` and `CNI` role of course.\n\n## Example Playbook\n\n```yaml\n- hosts: your-host\n  roles:\n    - githubixx.containerd\n```\n\nMore examples are available in the [Molecule tests](https://github.com/githubixx/ansible-role-containerd/tree/master/molecule/kvm).\n\n## Testing\n\nThis role has a small test setup that is created using [Molecule](https://github.com/ansible-community/molecule), libvirt (vagrant-libvirt) and QEMU/KVM. Please see my blog post [Testing Ansible roles with Molecule, libvirt (vagrant-libvirt) and QEMU/KVM](https://www.tauceti.blog/posts/testing-ansible-roles-with-molecule-libvirt-vagrant-qemu-kvm/) how to setup. The test configuration is [here](https://github.com/githubixx/ansible-role-containerd/tree/master/molecule/kvm).\n\nAfterwards molecule can be executed:\n\n```bash\nmolecule converge\n```\n\nThis will setup a few virtual machines (VM) with different supported Linux operating systems and installs `containerd`, `runc` and the `CNI` plugins (which are needed by Kubernetes e.g.).\n\nA small verification step is also included. It pulls a nginx container and runs it to make sure that `containerd` is setup correctly and is able to run container images:\n\n```bash\nmolecule verify\n```\n\nTo clean up run\n\n```bash\nmolecule destroy\n```\n\n## License\n\nGNU GENERAL PUBLIC LICENSE Version 3\n\n## Author Information\n\n[http://www.tauceti.blog](http://www.tauceti.blog)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithubixx%2Fansible-role-containerd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithubixx%2Fansible-role-containerd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithubixx%2Fansible-role-containerd/lists"}