Commit Graph

49 Commits

Author SHA1 Message Date
Ashutosh Mishra 0e50d17b8d Added the correct CentOs 9 stream repo for Cri-o Installation.
In CentOs 9 stream repo added gpgkey url along with baseurl.

Closes-Bug: #2041788
Change-Id: I601eb22df31b33f680996eea98dc8e49d0fbb612
2023-10-30 06:11:39 +00:00
Yasufumi Ogawa 0052374411 Failed to launch kubelet after rebooting
The default behavior of crio service is `disable` if you install it with
devstack. So, kubelet cannot launch after rebooting a host because crio
isn't run on the host before. To fix the issue, enable crio in systemctl
while installing kubeadm.

Change-Id: Ic042494d1cd588fb2b06f7e1d5544206b20b5ad6
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
2023-07-26 17:37:16 +00:00
psingla f2fd4303cf Adding cri-o repository for centos system
cri-o repository for centos need to be added in
/etc/yum.repos.d to successfully install cri-o on centos system.

Change-Id: I6b215cb0efb3c53e97a4a6605e94a262c0d04f25
2023-02-27 15:33:34 +01:00
Hongbin Lu f8e786f0d5 Support installing specific version of docker
Change-Id: I12015c28f6f8ffc125097a14514a6a90a20cf35b
2023-02-24 15:11:33 +00:00
Roman Dobosz bdc0b49ce3 Install apparmor tools also for Ubuntu Focal.
k8s gate is still on focal, so patch which unblock the apparmor for
jammy does not affect it. Here is the fix for focal as well.

Change-Id: I2a9bc69a59e7d6d21d61e79115d5a3c726c73ab0
2023-02-23 18:36:19 +01:00
Roman Dobosz 38835f2c54 Use flannel preferred configuration.
On the Github repository, flannel team has stated[1], that for k8s 1.17+
the yaml file[2] with flannel config should be used. This patch is
changing it, as old version stopped to work.

[1] https://github.com/flannel-io/flannel#deploying-flannel-manually
[2] https://github.com/flannel-io/flannel/releases/latest/download/kube-flannel.yml

Change-Id: Ib7af55304714d8e91f5e9c63cb1501fb515553d6
2023-02-22 12:38:38 +01:00
Roman Dobosz c101497703 Bump k8s version.
Kubernetes 1.19 is long gone over a year now. Current minimal supported
version is 1.23.x. It is also last version, which supports docker-shim.
In this patch we propose to bump the version of k8s to 1.23.16 and crio
to 1.23.

Change-Id: I822217e769cc5cd041032fb2302c3a9c130d11ff
2023-02-22 12:38:09 +01:00
Roman Dobosz f3cbfa21ff Change default kubernetes registry to current one.
Last year, kubernetes community has made a move from k8s.gcr.io to
registry.k8s.io. Currently images on k8s.gcr.io has been stopped from
serving therefore, there is a need to migrate to the new one.

Change-Id: I20305b380d26fdaa30632107b29debc519e13e54
2023-02-21 17:39:02 +01:00
Roman Dobosz 6c468e5293 Fix issue with lack of apparmor.
Recently there are failures observed with docker installations. Newest
version (23.x) started to fail to create containers, when there are no
tools for apparmor available, and yet, this feature is enabled on
kernel, which is true in case of Ubuntu Jammy (22.04) stable release.

There are couple[1] of bugs[2] reported to the upstream, and as a
workaround, proposal is to install apparmor.

[1] https://github.com/moby/moby/issues/44900
[2] https://github.com/moby/moby/issues/44970

Change-Id: Ie10de8a8b074daa19ba4a882528e78cd1ee74245
2023-02-21 17:37:51 +01:00
Roman Dobosz aef3c9209b Fix the issue with default_sysctls for cri-o.
In earlier version of cri-o (at least that been seen in 1.18) cri-o
packages have default configuration stored as /etc/crio/crio.conf, with
all the default values defined. Setting a value for the key means that
was a need to actually change the default. In version up to 1.23 there
was even no configuration stored at all, but starting from 1.24, all the
default config options has been commented out, and only section names
are not commented.

Similar situation has been detected for registry configuration, but here
it is even more difficult, as in recent version toml format has been
used instead of ini.

With this patch all of the cases has been covered.

Change-Id: Ia1b3dee3979841e798cec11c02ba1412dccef6c2
2022-12-02 08:44:12 +01:00
Zuul a6494044ff Merge "Fix docker group name" 2022-11-24 14:13:30 +00:00
Yasufumi Ogawa a7295a5201 Fix to be prompted to add apt repos
Fix devstack installation for crio is prompted while running
apt-add-repository.

Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Change-Id: I66d69d5df254af027baf1d359130d4423fe3c4a9
2022-11-24 06:47:10 +00:00
Martin André b648421624 Fix docker group name
devstack-plugin-container wrongfully assumes that the stack user name
is also the name of the group under which install the docker daemon.
This can cause devstack to install docker in such a way that the stack
user does not have permissions to access the docker socket, as seen in
[3].

[1] https://opendev.org/openstack/devstack-plugin-container
[2] https://github.com/openstack/devstack-plugin-container/blob/f09c5c9/devstack/lib/docker#L27
[3] https://github.com/gophercloud/gophercloud/pull/2380#issuecomment-1094295137

Closes-Bug: 1970129
Change-Id: Id5f1fa24ebb09db10f0d56e4d6b111be66869b5a
2022-04-24 21:42:40 +02:00
Zuul b323f5b71a Merge "Docker and kubernetes package installation on CentosStream" 2022-03-28 09:00:53 +00:00
yangjianfeng f935202d39 Support config pause image for crio
In some places of which network environment was limited, ciro can't
pull images from k8s.gcr.io. This patch add a variable
`CRIO_PAUSE_IMAGE` in order to the developer who located in these
places can set the ciro to pull pause container images from
repository that they can access.

The `CRIO_PAUSE_COMMAND` used to configure crio's `pause_command`
(the pause container's bootstrap command), in order to the developer
can use the special pause image the they customized.

Change-Id: Ib0d4c42870d40ef583546758513a36b906c7663b
2022-03-22 12:39:51 +08:00
yangjianfeng 90b4089cda Support config image repository for kubeadm
In some places of which network environment was limited, kubeadm
can't pull images from k8s.gcr.io. This patch add a variable
`KUBEADMIN_IMAGE_REPOSITORY` in order to the developer who located in
these places can set the kubeadm to pull container images from
repository that they can access.

Change-Id: I14aed50077ef0760635e575770fd2274cb759c53
2022-03-20 11:54:26 +08:00
Ashutosh f09c5c9342 Docker and kubernetes package installation on CentosStream
Change-Id: Icafab048c43c6591c6cdafb13f34ed1f40258f22
2022-03-04 04:36:29 +00:00
Roman Dobosz 4759935527 Allow ICMP between pods for CRI-O.
By default, CRI-O doesn't allow to have ICMP traffic between the pods
and pods to/from host. It's convenient to have such ability for testing
and debugging purpose.

In this patch there is added appropriate configuration to crio.conf, and
also a setting to disable it if needed.

Change-Id: I1133815d9cbce311313bff7a219a9b3939390660
2021-11-17 09:45:20 +01:00
Roman Dobosz bd98565f99 Provide right path to the runc binary for Ubuntu and CRI-O installation.
There are also two new configuration option introduced:

- CNI_PLUGIN_DIR
- CNI_CONF_DIR

which, if defined, are used to configure crio paths for plugins and
networks config.

Change-Id: Ica4277b06740f8dca3ff5be77432cf6ab2f3cdeb
2021-11-02 17:04:16 +01:00
Roman Dobosz d4de1bb990 Change repos from projectatomic to kubic OBS project.
Since projectatomic Ubuntu builds are deprecated, and advice was to
consult upstream documentation[1], Kubernetes with cri-o now rely on
Kubic project, which (among the others) provides packages for Ubuntu
20.04. Let us switch for those.

[1] https://kubernetes.io/docs/setup/production-environment/container-runtimes/#cri-o

Change-Id: Ib06753d22f8859eefedc031094851b052f4105b6
2021-01-25 13:32:40 +01:00
Ghanshyam Mann 74bf39e6a6 Migrate devstack-plugin-container jobs to focal
As per victoria cycle testing runtime and community goal[1]
we need to migrate upstream CI/CD to Ubuntu Focal(20.04).

Tempest based jobs will be migrate automatically once devstack
base job start running on Focal(Depends-On). This commit migrates
devstack-plugin-container job to run on focal.

Depends-On: https://review.opendev.org/#/c/734700

[1] https://governance.openstack.org/tc/goals/selected/victoria/migrate-ci-cd-jobs-to-ubuntu-focal.html

Change-Id: I1a3ac070027805691fc1007458ac02567f847ae9
2020-09-13 04:05:37 +00:00
Hongbin Lu 9620216b35 Tolerate non-existing of cni config file
Change-Id: I761bf9344651ec196471ca57bf0b29184a69e161
2020-05-05 01:26:18 +00:00
Zuul f5983f3c02 Merge "Configure kata runtime for containerd" 2020-05-01 00:14:28 +00:00
Hongbin Lu 129c4e89ee Add bashate job
Change-Id: I74d09678958ad5e5dec4cbacb450973a31fcf9ba
2020-04-25 22:58:54 +00:00
Hongbin Lu dc944062c3 Configure kata runtime for containerd
Change-Id: I9d9d223effcaa94d0b1b25210a24aaa313353f05
2020-04-12 00:27:23 +00:00
Hongbin Lu 401029e617 Fix https://review.opendev.org/#/c/705361/
We need to configure CNI plugin first, then configure and restart
containerd. In before, the order is reverse so the CNI config
is not picked.

Change-Id: I1c0e753b19289c339e44f288cae02d7ee2957da6
2020-02-22 21:20:48 +00:00
Hongbin Lu d80ff940e1 Support enabling CRI for containerd
Installing docker will install the CRI plugin for containerd.
This commit support enabling the CRI-containerd plugin.
By default, this is disabled.

Change-Id: Ica8d5f91ae77d1d6599bfadc4031552016ad8953
2020-02-10 03:31:11 +00:00
Zuul ac7cd2f4a5 Merge "Add Kubernetes job" 2019-08-28 16:33:40 +00:00
Hongbin Lu 4ea3481486 Add support for kata container
Change-Id: I8de21dd0317734711ba3778c241a428f0325ea85
2019-07-08 05:28:19 +00:00
Hongbin Lu 735bde961d Add Kubernetes job
Change-Id: I2c75c81521ed8a53627119b231f526508154e34d
2019-06-17 02:22:33 +00:00
Hongbin Lu 80f8d7f260 Support k8s installation
Add support for installing kubernetes cluster via devstack.
It uses kubeadm to bootstrap the k8s cluster.

Change-Id: I7877ceda08bbdab807116a13d74ff884136dc501
2019-05-07 03:57:24 +00:00
Michał Dulko f896c23116 Support cri-o in CentOS and Fedora
This commit adds support for installing cri-o as container engine in
CentOS and Fedora. Tested on CentOS 7.6 and Fedora 28.

Change-Id: I0e10e06156e02397b5cd64efe802869d0e96b231
2019-02-05 19:57:59 +01:00
Feng Shengqin b8ff250e97 Configure the dokcer daemon for IPv6
Change-Id: If190af800a8c28e2cf4ae320a770c40847cd18e6
2019-01-29 09:44:38 +08:00
Zuul 7e44a59c1e Merge "Skip linux-image-extra-$(uname -r) on 18.04" 2018-11-30 10:14:08 +00:00
Michał Dulko 63c7b8eddc Add support for CRI-O as container engine
This commit adds support for CRI-O. Support for Fedora/CentOS is in
progress.

Change-Id: Ib049d66058429e499f5d0932c4a749820bec73ff
2018-11-29 09:33:32 +01:00
Michał Dulko 17a865e064 Skip linux-image-extra-$(uname -r) on 18.04
Seems like aforementioned package is not available on Ubuntu 18.04
(Bionic). This commit excludes that version from installation of Docker.

Change-Id: Ib1864497dd19caadf9077386ce278712e4f5de8f
2018-11-27 19:47:33 +01:00
Feng Shengqin 54aa82d99f Support live_restore for keeping all running containers
Change-Id: I5ca480bab5cb402dd7bd29f78dd8b6a639060fcf
2018-04-10 16:21:34 +08:00
Daniel Mellado 83acf1400e Disable clear containers by default
ENABLE_CLEAR_CONTAINER should be set to false by default as they're
relying on third party repos which could break devstack installation at
some point.

Change-Id: I99b26650f6c68e8563dcde589bda7ccdc6a19a46
2018-01-25 12:44:48 +00:00
Madhuri Kumari f4b1a02959 Add support for Clear Container Runtime
This patch installs Clear Container[1] as one of the runtime
for docker.

[1] https://clearlinux.org/features/intel%C2%AE-clear-containers

Change-Id: Ibacebf84ce1ff68a779589c7c9e17916503cafab
2018-01-09 10:16:22 +05:30
Antoni Segura Puimedon f3c2d301fb
Add configurable docker cgroupdriver
Some distros docker packaging use systemd instead of cgroupfs as the
cgroupdriver. This patch allows users to choose their cgroupdriver.

Change-Id: I95b51591d0aa5495ec583c3c87c77942109b4067
Signed-off-by: Antoni Segura Puimedon <antonisp@celebdor.com>
2017-10-27 10:54:28 +02:00
Hongbin Lu 718e499466 Set debug mode according to ENABLE_DEBUG_LOG_LEVEL
Docker turn off debug mode by default, but the non-debug mode
doesn't provide enough information for development. It is handy
to have a way to turn on the debug mode.

Change-Id: I403ea7cc43b0b0808bfac3ec6f9ac7586f4723f6
2017-09-27 23:04:40 +00:00
Hongbin Lu b8f4f066ba Make docker group configurable
In devstack gate, jobs might be run with users other than $STACK_USER,
so the docker group should be configurable.

Change-Id: I64665b9883094d5603f3e737a1c08d924a058960
2017-09-21 20:01:17 +00:00
Hongbin Lu 3a078f9768 Remove duplicated session in systemd unit file
The session 'Service' is duplicated in the docker systemd drop-in.

Change-Id: Ia391052c4376be207ff5e43fb18ddcb5251a0784
2017-07-04 22:28:57 +00:00
Hongbin Lu 1f79d17844 Prevent devstack exit on printing warning msg
It looks the function 'warn' might return unsucessfully which
abort the devstack script. Let's use echo instead.

Change-Id: I931f3c649fb3637fd7be667644731329fa12cd07
2017-06-14 14:45:47 +00:00
Hongbin Lu e39a806b9f Handle missing of package linux-image-extra-virtual
This package doesn't present at ec2 Ubuntu instance. Docker
installation may or may not work in this case. This commit
detect the presence of these packages and print a warning.

Change-Id: I2c5b4ed1446d63949be4d181da696933df4c64f8
2017-05-27 22:57:21 +00:00
Hongbin Lu d9cbc6c325 Removing the confusing SWARM_MODE variable
The SWARM_MODE variable is for determining whether to set the
cluster_store options of docker daemon. Therefore, change it to
DOCKER_CLUSTER_STORE to make it clear.

Change-Id: I79f00c7cc158d825627ce6a9d28b053b0cf3c076
2017-04-29 13:52:43 -04:00
Hongbin Lu a6365b0570 Add gate_hook and post_test_hook
We are setting up a devstack job for this plugin. These hooks will
be leveraged by the job.

Change-Id: I751c46bcc1768894f588c0f6689555a4392082b0
2017-04-28 01:33:25 +00:00
cooldharma06 7d1bd53785 Update docker with proxy configuration
Change-Id: I7089acb561d13726511bd10ca9d60738e7f4719a
Closes-Bug: #1684057
2017-04-26 10:35:50 -04:00
Hongbin Lu 69716eb42f Add docker installation script
There are several projects that tried to install docker in different
ways. This potentially lead to failure of more than one such services
were enabled. This commit consolidate docker installation into
a devstack plugin so that other services could depend on it.

The initial script was mainly from Kuryr-libnetwork. Kuryr, Fuxi,
and Zun might leverage this script to install Docker in the future.

Change-Id: I97dbff2f361acc98b12ec6f40ab115c8548477a3
2017-04-17 17:13:45 -04:00