Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions images/ubuntu/scripts/build/configure-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ mkdir -p /etc/skel/.config/configstore
set_etc_environment_variable "XDG_CONFIG_HOME" '$HOME/.config'

# Change waagent entries to use /mnt for swap file
sed -i 's/ResourceDisk.Format=n/ResourceDisk.Format=y/g' /etc/waagent.conf
sed -i 's/ResourceDisk.EnableSwap=n/ResourceDisk.EnableSwap=y/g' /etc/waagent.conf
sed -i 's/ResourceDisk.SwapSizeMB=0/ResourceDisk.SwapSizeMB=4096/g' /etc/waagent.conf
# sed -i 's/ResourceDisk.Format=n/ResourceDisk.Format=y/g' /etc/waagent.conf
# sed -i 's/ResourceDisk.EnableSwap=n/ResourceDisk.EnableSwap=y/g' /etc/waagent.conf
# sed -i 's/ResourceDisk.SwapSizeMB=0/ResourceDisk.SwapSizeMB=4096/g' /etc/waagent.conf

# Add localhost alias to ::1 IPv6
sed -i 's/::1 ip6-localhost ip6-loopback/::1 localhost ip6-localhost ip6-loopback/g' /etc/hosts
Expand Down
24 changes: 12 additions & 12 deletions images/ubuntu/scripts/build/install-kubernetes-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ rm -f /etc/apt/sources.list.d/kubernetes.list
# Install Helm
curl -fsSL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash

# Download minikube
curl -fsSL -O https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
# # Download minikube
# curl -fsSL -O https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64

# Supply chain security - minikube
minikube_hash=$(get_checksum_from_github_release "kubernetes/minikube" "linux-amd64" "latest" "SHA256")
use_checksum_comparison "minikube-linux-amd64" "${minikube_hash}"
# # Supply chain security - minikube
# minikube_hash=$(get_checksum_from_github_release "kubernetes/minikube" "linux-amd64" "latest" "SHA256")
# use_checksum_comparison "minikube-linux-amd64" "${minikube_hash}"

# Install minikube
install minikube-linux-amd64 /usr/local/bin/minikube
# # Install minikube
# install minikube-linux-amd64 /usr/local/bin/minikube

# Install kustomize
download_url="https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
curl -fsSL "$download_url" | bash
mv kustomize /usr/local/bin
# # Install kustomize
# download_url="https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
# curl -fsSL "$download_url" | bash
# mv kustomize /usr/local/bin

invoke_tests "Tools" "Kubernetes tools"
# invoke_tests "Tools" "Kubernetes tools"
16 changes: 8 additions & 8 deletions images/ubuntu/templates/ubuntu-20.04.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ source "azure-arm" "build_image" {
dynamic "azure_tag" {
for_each = var.azure_tags
content {
name = azure_tag.key
name = azure_tag.key
value = azure_tag.value
}
}
Expand All @@ -194,9 +194,9 @@ build {
}

provisioner "shell" {
environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}","DEBIAN_FRONTEND=noninteractive"]
environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "DEBIAN_FRONTEND=noninteractive"]
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
scripts = [
scripts = [
"${path.root}/../scripts/build/install-ms-repos.sh",
"${path.root}/../scripts/build/configure-apt-sources.sh",
"${path.root}/../scripts/build/configure-apt.sh"
Expand All @@ -215,7 +215,7 @@ build {

provisioner "file" {
destination = "${var.image_folder}"
sources = [
sources = [
"${path.root}/../assets/post-gen",
"${path.root}/../scripts/tests",
"${path.root}/../scripts/docs-gen"
Expand All @@ -234,7 +234,7 @@ build {

provisioner "shell" {
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
inline = [
inline = [
"mv ${var.image_folder}/docs-gen ${var.image_folder}/SoftwareReport",
"mv ${var.image_folder}/post-gen ${var.image_folder}/post-generation"
]
Expand Down Expand Up @@ -273,7 +273,7 @@ build {
provisioner "shell" {
environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}", "DEBIAN_FRONTEND=noninteractive"]
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
scripts = [
scripts = [
"${path.root}/../scripts/build/install-actions-cache.sh",
"${path.root}/../scripts/build/install-runner-package.sh",
"${path.root}/../scripts/build/install-apt-common.sh",
Expand Down Expand Up @@ -385,8 +385,8 @@ build {
}

provisioner "shell" {
environment_vars = ["IMAGE_VERSION=${var.image_version}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}"]
inline = [
environment_vars = ["IMAGE_VERSION=${var.image_version}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}"]
inline = [
"pwsh -Command Write-Host Running Generate-SoftwareReport.ps1 script",
"pwsh -File ${var.image_folder}/SoftwareReport/Generate-SoftwareReport.ps1 -OutputDirectory ${var.image_folder}",
"pwsh -Command Write-Host Running RunAll-Tests.ps1 script",
Expand Down
12 changes: 6 additions & 6 deletions images/ubuntu/templates/ubuntu-22.04.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ source "azure-arm" "build_image" {
dynamic "azure_tag" {
for_each = var.azure_tags
content {
name = azure_tag.key
name = azure_tag.key
value = azure_tag.value
}
}
Expand All @@ -194,9 +194,9 @@ build {
}

provisioner "shell" {
environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}","DEBIAN_FRONTEND=noninteractive"]
environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "DEBIAN_FRONTEND=noninteractive"]
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
scripts = [
scripts = [
"${path.root}/../scripts/build/install-ms-repos.sh",
"${path.root}/../scripts/build/configure-apt-sources.sh",
"${path.root}/../scripts/build/configure-apt.sh"
Expand All @@ -215,7 +215,7 @@ build {

provisioner "file" {
destination = "${var.image_folder}"
sources = [
sources = [
"${path.root}/../assets/post-gen",
"${path.root}/../scripts/tests",
"${path.root}/../scripts/docs-gen"
Expand All @@ -234,7 +234,7 @@ build {

provisioner "shell" {
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
inline = [
inline = [
"mv ${var.image_folder}/docs-gen ${var.image_folder}/SoftwareReport",
"mv ${var.image_folder}/post-gen ${var.image_folder}/post-generation"
]
Expand Down Expand Up @@ -273,7 +273,7 @@ build {
provisioner "shell" {
environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}", "DEBIAN_FRONTEND=noninteractive"]
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
scripts = [
scripts = [
"${path.root}/../scripts/build/install-actions-cache.sh",
"${path.root}/../scripts/build/install-runner-package.sh",
"${path.root}/../scripts/build/install-apt-common.sh",
Expand Down
Loading