Skip to content

Commit 1861ee8

Browse files
Merge pull request #57 from oracle-quickstart/ubuntu-24.04
Update cloud init to support Ubuntu 24.04
2 parents 01bdcd5 + 1229666 commit 1861ee8

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

files/oke-ubuntu-cloud-init.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
#!/bin/bash
22
set -x
33

4-
distrib_codename=$(lsb_release -c -s)
4+
source /etc/os-release
5+
56
kubernetes_version=$1
67
oke_package_version="${kubernetes_version:1}"
78
oke_package_repo_version="${oke_package_version:0:4}"
89
oke_package_name="oci-oke-node-all-$oke_package_version"
9-
oke_package_repo="https://odx-oke.objectstorage.us-sanjose-1.oci.customer-oci.com/n/odx-oke/b/okn-repositories/o/prod/ubuntu-$distrib_codename/kubernetes-$oke_package_repo_version"
10+
oke_package_repo="https://odx-oke.objectstorage.us-sanjose-1.oci.customer-oci.com/n/odx-oke/b/okn-repositories/o/prod/ubuntu-$VERSION_CODENAME/kubernetes-$oke_package_repo_version"
1011

1112
# Add OKE Ubuntu package repo
12-
add-apt-repository -y "deb [trusted=yes] $oke_package_repo stable main"
13+
tee /etc/apt/sources.list.d/oke-node-client.sources <<EOF
14+
Enabled: yes
15+
Types: deb
16+
URIs: https://odx-oke.objectstorage.us-sanjose-1.oci.customer-oci.com/n/odx-oke/b/okn-repositories/o/prod/ubuntu-$VERSION_CODENAME/kubernetes-$oke_package_repo_version
17+
Suites: stable
18+
Components: main
19+
Trusted: yes
20+
EOF
1321

1422
# Wait for apt lock and install the package
1523
while fuser /var/{lib/{dpkg/{lock,lock-frontend},apt/lists},cache/apt/archives}/lock >/dev/null 2>&1; do

0 commit comments

Comments
 (0)