|
148 | 148 | ############################################################################### |
149 | 149 | sudo dnf install -y runc-${RUNC_VERSION} |
150 | 150 | if [[ "$INSTALL_CONTAINERD_FROM_S3" == "true" ]]; then |
151 | | - CONTAINERD_BINARIES=( |
152 | | - containerd |
153 | | - containerd-shim-runc-v2 |
154 | | - ctr |
155 | | - ) |
156 | | - for binary in "${CONTAINERD_BINARIES[@]}"; do |
157 | | - echo "Installing containerd from S3..." |
158 | | - aws s3 cp --region ${BINARY_BUCKET_REGION} s3://${BINARY_BUCKET_NAME}/containerd/${CONTAINERD_VERSION}/${MACHINE}/${binary} . |
159 | | - sudo chmod +x $binary |
160 | | - sudo mv $binary /usr/bin/ |
161 | | - # exclude containerd from yum.conf as versionlock doesn't work in this case |
162 | | - echo "exclude=containerd*" | sudo tee -a /etc/dnf/dnf.conf |
163 | | - done |
164 | | - sudo mkdir -p /var/lib/containerd |
| 151 | + aws s3 cp --region ${BINARY_BUCKET_REGION} s3://${BINARY_BUCKET_NAME}/containerd/containerd-${CONTAINERD_VERSION}.${MACHINE}.rpm ${WORKING_DIR}/containerd/ |
| 152 | + sudo dnf install -y ${WORKING_DIR}/containerd/containerd-${CONTAINERD_VERSION}.${MACHINE}.rpm |
165 | 153 | else |
166 | 154 | sudo dnf install -y containerd-${CONTAINERD_VERSION} |
167 | | - sudo dnf versionlock containerd-* |
168 | 155 | fi |
| 156 | +sudo dnf versionlock containerd-* |
169 | 157 |
|
170 | 158 | # generate and store containerd version in file /etc/eks/containerd-version.txt |
171 | 159 | containerd --version | sudo tee /etc/eks/containerd-version.txt |
@@ -254,17 +242,7 @@ sudo mv $ECR_CREDENTIAL_PROVIDER_BINARY /etc/eks/image-credential-provider/ |
254 | 242 | ### SOCI Snapshotter ########################################################## |
255 | 243 | ############################################################################### |
256 | 244 |
|
257 | | -# dnf will still try to install containerd from Amazon Linux as a dependency, |
258 | | -# and it will break because we explicitly exclude it in favor of our manual |
259 | | -# version in order to version lock it. dnf doesn't recognize the locally |
260 | | -# installed version. |
261 | | -# Use `--disableexcludes=all` to allow downloading containerd RPM (but not installing it). |
262 | | -# TODO consider installing a stub package that provides containerd so that we can |
263 | | -# do this the normal way with dnf. |
264 | | -SOCI_RPM_DIR=$(mktemp -d) |
265 | | -sudo dnf install -y --downloadonly --downloaddir="${SOCI_RPM_DIR}" --disableexcludes=all soci-snapshotter |
266 | | -# This will break if we need other deps besides containerd. |
267 | | -sudo rpm -i --nodeps "${SOCI_RPM_DIR}/soci-snapshotter*.rpm" |
| 245 | +sudo dnf install -y soci-snapshotter |
268 | 246 | sudo systemctl enable soci-snapshotter.socket |
269 | 247 |
|
270 | 248 | ################################################################################ |
|
0 commit comments