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
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ packer-service_Capi.aarch64: packer-ubuntu2404.aarch64 $(DIR_EXPORT)/service_Cap
packer-service_OneKS: packer-alpine321 $(DIR_EXPORT)/service_OneKS.qcow2
@$(INFO) "Packer service_OneKS done"

packer-service_OneKS.aarch64: packer-alpine321.aarch64 $(DIR_EXPORT)/service_OneKS.aarch64.qcow2
@$(INFO) "Packer service_OneKS.aarch64 done"

# run packer build for given distro or service
$(DIR_EXPORT)/service_OneKE_storage.qcow2:
qemu-img create -f qcow2 $(DIR_EXPORT)/service_OneKE_storage.qcow2 10G
Expand Down
3 changes: 2 additions & 1 deletion Makefile.config
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ SERVICES_AMD64 := service_Wordpress service_VRouter service_OneKE service_OneKEa
service_Vllm service_Capi service_FabricManager service_OneKS service_example \
service_Nim

SERVICES_ARM64 := service_VRouter.aarch64 service_Vllm.aarch64 service_Capi.aarch64 service_SlurmController.aarch64 service_SlurmWorker.aarch64
SERVICES_ARM64 := service_VRouter.aarch64 service_Vllm.aarch64 service_Capi.aarch64 service_SlurmController.aarch64 service_SlurmWorker.aarch64 \
service_OneKS.aarch64

WINDOWS := windows10Home windows10HomeN windows10HomeSingleLanguage \
windows10Pro windows10ProN \
Expand Down
9 changes: 6 additions & 3 deletions appliances/OneKS/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
require_relative 'config'
require 'base64'
require 'open3'
require 'rbconfig'

# Base module for OpenNebula services
module Service
Expand All @@ -39,25 +40,27 @@ module OneKS
def install
msg :info, 'OneKS::install'

arch = RbConfig::CONFIG['host_cpu'] =~ /arm64|aarch64/ ? 'arm64' : 'amd64'

msg :info, "Download Clusterctl: #{ONEKS_CLUSTERCTL_VERSION}"
clusterctl_url = 'https://github.com/kubernetes-sigs/cluster-api/releases/download/' \
"v#{ONEKS_CLUSTERCTL_VERSION}/clusterctl-linux-amd64"
"v#{ONEKS_CLUSTERCTL_VERSION}/clusterctl-linux-#{arch}"
bash <<~SCRIPT
curl -fsSL #{clusterctl_url} \
| install -o 0 -g 0 -m u=rwx,go= -D /dev/fd/0 '/usr/local/bin/clusterctl'
SCRIPT

msg :info, "Download Kind: #{ONEKS_KIND_VERSION}"
kind_url = 'https://github.com/kubernetes-sigs/kind/releases/download/' \
"v#{ONEKS_KIND_VERSION}/kind-linux-amd64"
"v#{ONEKS_KIND_VERSION}/kind-linux-#{arch}"
bash <<~SCRIPT
curl -fsSL #{kind_url} \
| install -o 0 -g 0 -m u=rwx,go= -D /dev/fd/0 '/usr/local/bin/kind'
SCRIPT

msg :info, "Download Kubectl: #{ONEKS_KUBECTL_VERSION}"
bash <<~SCRIPT
curl -fsSL 'https://dl.k8s.io/release/v#{ONEKS_KUBECTL_VERSION}/bin/linux/amd64/kubectl' \
curl -fsSL 'https://dl.k8s.io/release/v#{ONEKS_KUBECTL_VERSION}/bin/linux/#{arch}/kubectl' \
| install -o 0 -g 0 -m u=rwx,go= -D /dev/fd/0 '/usr/local/bin/kubectl'
SCRIPT

Expand Down