From f63448ee17dee070fb3519ed216a24c007f6d4b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulises=20Gasc=C3=B3n?= Date: Sun, 1 Sep 2024 01:09:36 +0200 Subject: [PATCH] feat: restore Orka Packer variables and plugins https://github.com/nodejs/build/issues/3686 --- orka/templates/README.md | 12 ------- orka/templates/macos-13-arm-test.pkr.hcl | 39 ++++++++++++++++++++++ orka/templates/macos-13-intel-test.pkr.hcl | 39 ++++++++++++++++++++++ orka/templates/plugins.pkr.hcl | 8 ----- orka/templates/variables.pkr.hcl | 29 ---------------- 5 files changed, 78 insertions(+), 49 deletions(-) delete mode 100644 orka/templates/plugins.pkr.hcl delete mode 100644 orka/templates/variables.pkr.hcl diff --git a/orka/templates/README.md b/orka/templates/README.md index 759dff45c..d96c658b8 100644 --- a/orka/templates/README.md +++ b/orka/templates/README.md @@ -46,12 +46,6 @@ You need to load the environment variables: ## Validate the template -You can validate all the templates by running the following command: - -```shell -packer validate -var "orka_endpoint=$ORKA_ENDPOINT" -var "orka_auth_token=$ORKA_AUTH_TOKEN" -var "ssh_default_username=$SSH_DEFAULT_USERNAME" -var "ssh_default_password=$SSH_DEFAULT_PASSWORD" -var "ssh_test_password=$SSH_TEST_PASSWORD" -var "ssh_test_puclic_key=$SSH_TEST_PUBLIC_KEY" . -``` - You can validate a specific template by running the following command: ```shell @@ -60,12 +54,6 @@ packer validate -var "orka_endpoint=$ORKA_ENDPOINT" -var "orka_auth_token=$ORKA_ ## Build the image -You can build all the templates by running the following command: - -```shell -packer build -var "orka_endpoint=$ORKA_ENDPOINT" -var "orka_auth_token=$ORKA_AUTH_TOKEN" -var "ssh_default_username=$SSH_DEFAULT_USERNAME" -var "ssh_default_password=$SSH_DEFAULT_PASSWORD" -var "ssh_test_password=$SSH_TEST_PASSWORD" -var "ssh_test_puclic_key=$SSH_TEST_PUBLIC_KEY" . -``` - You can build a specific template by running the following command: ```shell diff --git a/orka/templates/macos-13-arm-test.pkr.hcl b/orka/templates/macos-13-arm-test.pkr.hcl index 7445fd31b..f3307b4aa 100644 --- a/orka/templates/macos-13-arm-test.pkr.hcl +++ b/orka/templates/macos-13-arm-test.pkr.hcl @@ -1,3 +1,42 @@ +variable "orka_endpoint" { + type = string + default = "" +} + +variable "orka_auth_token" { + type = string + default = "" +} + +variable "ssh_default_username" { + type = string + default = "" +} + +variable "ssh_default_password" { + type = string + default = "" +} + +variable "ssh_test_public_key" { + type = string + default = "" +} + +variable "ssh_test_password" { + type = string + default = "" +} + +packer { + required_plugins { + macstadium-orka = { + version = "~> 3.0" + source = "github.com/macstadium/macstadium-orka" + } + } +} + source "macstadium-orka" "macos13-arm-test-image" { source_image = "macos13-arm-base.orkasi" image_name = "macos13-arm-test-latest.orkasi" diff --git a/orka/templates/macos-13-intel-test.pkr.hcl b/orka/templates/macos-13-intel-test.pkr.hcl index 80957df71..58fba9440 100644 --- a/orka/templates/macos-13-intel-test.pkr.hcl +++ b/orka/templates/macos-13-intel-test.pkr.hcl @@ -1,3 +1,42 @@ +variable "orka_endpoint" { + type = string + default = "" +} + +variable "orka_auth_token" { + type = string + default = "" +} + +variable "ssh_default_username" { + type = string + default = "" +} + +variable "ssh_default_password" { + type = string + default = "" +} + +variable "ssh_test_public_key" { + type = string + default = "" +} + +variable "ssh_test_password" { + type = string + default = "" +} + +packer { + required_plugins { + macstadium-orka = { + version = "~> 3.0" + source = "github.com/macstadium/macstadium-orka" + } + } +} + source "macstadium-orka" "macos13-intel-test-image" { source_image = "macos13-intel-base.img" image_name = "macos13-intel-test-latest.img" diff --git a/orka/templates/plugins.pkr.hcl b/orka/templates/plugins.pkr.hcl deleted file mode 100644 index b6f5a3d92..000000000 --- a/orka/templates/plugins.pkr.hcl +++ /dev/null @@ -1,8 +0,0 @@ -packer { - required_plugins { - macstadium-orka = { - version = "~> 3.0" - source = "github.com/macstadium/macstadium-orka" - } - } -} \ No newline at end of file diff --git a/orka/templates/variables.pkr.hcl b/orka/templates/variables.pkr.hcl deleted file mode 100644 index 1bd41165a..000000000 --- a/orka/templates/variables.pkr.hcl +++ /dev/null @@ -1,29 +0,0 @@ -variable "orka_endpoint" { - type = string - default = "" -} - -variable "orka_auth_token" { - type = string - default = "" -} - -variable "ssh_default_username" { - type = string - default = "" -} - -variable "ssh_default_password" { - type = string - default = "" -} - -variable "ssh_test_public_key" { - type = string - default = "" -} - -variable "ssh_test_password" { - type = string - default = "" -} \ No newline at end of file