Skip to content

Commit

Permalink
Adding support to upgrade kernel while building AMI (#447)
Browse files Browse the repository at this point in the history
  • Loading branch information
abeer91 authored Apr 8, 2020
1 parent d6e021b commit fcf6ea5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions eks-worker-al2.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,17 @@
"ADDITIONAL_YUM_REPOS={{user `additional_yum_repos`}}"
]
},
{
"type": "shell",
"remote_folder": "{{ user `remote_folder`}}",
"expect_disconnect": true,
"script": "{{template_dir}}/scripts/upgrade_kernel.sh"
},
{
"type": "shell",
"remote_folder": "{{ user `remote_folder`}}",
"script": "{{template_dir}}/scripts/install-worker.sh",
"pause_before": "90s",
"environment_vars": [
"KUBERNETES_VERSION={{user `kubernetes_version`}}",
"KUBERNETES_BUILD_DATE={{user `kubernetes_build_date`}}",
Expand Down
8 changes: 8 additions & 0 deletions scripts/upgrade_kernel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -o pipefail
set -o nounset
set -o errexit

sudo yum update -y kernel
sudo reboot

0 comments on commit fcf6ea5

Please sign in to comment.