Skip to content

Commit

Permalink
add support of cloud-hypervisor and ch-remote binary
Browse files Browse the repository at this point in the history
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
  • Loading branch information
nitishkumar71 committed Jan 14, 2024
1 parent 3c1c94f commit 6b6cbdf
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -735,8 +735,10 @@ There are 56 apps that you can install on your cluster.
| [bun](https://github.com/oven-sh/bun) | Bun is an incredibly fast JavaScript runtime, bundler, transpiler and package manager – all in one. |
| [butane](https://github.com/coreos/butane) | Translates human readable Butane Configs into machine readable Ignition Configs |
| [caddy](https://github.com/caddyserver/caddy) | Caddy is an extensible server platform that uses TLS by default |
| [ch-remote](https://github.com/cloud-hypervisor/cloud-hypervisor) | The ch-remote binary is used for controlling an running Virtual Machine. |
| [cilium](https://github.com/cilium/cilium-cli) | CLI to install, manage & troubleshoot Kubernetes clusters running Cilium. |
| [civo](https://github.com/civo/cli) | CLI for interacting with your Civo resources. |
| [cloud-hypervisor](https://github.com/cloud-hypervisor/cloud-hypervisor) | Cloud Hypervisor is an open source Virtual Machine Monitor (VMM) that runs on top of the KVM hypervisor and the Microsoft Hypervisor (MSHV). |
| [clusterawsadm](https://github.com/kubernetes-sigs/cluster-api-provider-aws) | Kubernetes Cluster API Provider AWS Management Utility |
| [clusterctl](https://github.com/kubernetes-sigs/cluster-api) | The clusterctl CLI tool handles the lifecycle of a Cluster API management cluster |
| [cmctl](https://github.com/cert-manager/cert-manager) | cmctl is a CLI tool that helps you manage cert-manager and its resources inside your cluster. |
Expand Down Expand Up @@ -868,6 +870,6 @@ There are 56 apps that you can install on your cluster.
| [waypoint](https://github.com/hashicorp/waypoint) | Easy application deployment for Kubernetes and Amazon ECS |
| [yq](https://github.com/mikefarah/yq) | Portable command-line YAML processor. |
| [yt-dlp](https://github.com/yt-dlp/yt-dlp) | Fork of youtube-dl with additional features and fixes |
There are 144 tools, use `arkade get NAME` to download one.
There are 146 tools, use `arkade get NAME` to download one.

> Note to contributors, run `arkade get --format markdown` to generate this list
64 changes: 64 additions & 0 deletions pkg/get/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6869,3 +6869,67 @@ func Test_DownloadSnowMachine(t *testing.T) {
}
}
}

func Test_DownloadCloudHypervisor(t *testing.T) {
tools := MakeTools()
name := "cloud-hypervisor"
const version = "v36.1"

tool := getTool(name, tools)

tests := []test{
{
os: "linux",
arch: arch64bit,
version: version,
url: `https://github.com/cloud-hypervisor/cloud-hypervisor/releases/download/v36.1/cloud-hypervisor-static`,
},
{
os: "linux",
arch: archARM64,
version: version,
url: `https://github.com/cloud-hypervisor/cloud-hypervisor/releases/download/v36.1/cloud-hypervisor-static-aarch64`,
},
}
for _, tc := range tests {
got, err := tool.GetURL(tc.os, tc.arch, tc.version, false)
if err != nil {
t.Fatal(err)
}
if got != tc.url {
t.Errorf("want: %s, got: %s", tc.url, got)
}
}
}

func Test_DownloadCloudHypervisorRemote(t *testing.T) {
tools := MakeTools()
name := "ch-remote"
const version = "v36.1"

tool := getTool(name, tools)

tests := []test{
{
os: "linux",
arch: arch64bit,
version: version,
url: `https://github.com/cloud-hypervisor/cloud-hypervisor/releases/download/v36.1/ch-remote-static`,
},
{
os: "linux",
arch: archARM64,
version: version,
url: `https://github.com/cloud-hypervisor/cloud-hypervisor/releases/download/v36.1/ch-remote-static-aarch64`,
},
}
for _, tc := range tests {
got, err := tool.GetURL(tc.os, tc.arch, tc.version, false)
if err != nil {
t.Fatal(err)
}
if got != tc.url {
t.Errorf("want: %s, got: %s", tc.url, got)
}
}
}
35 changes: 35 additions & 0 deletions pkg/get/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -3957,5 +3957,40 @@ https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Repo}}
{{- end -}}`,
})

tools = append(tools,
Tool{
Owner: "cloud-hypervisor",
Repo: "cloud-hypervisor",
Name: "cloud-hypervisor",
Description: "Cloud Hypervisor is an open source Virtual Machine Monitor (VMM) that runs on top of the KVM hypervisor and the Microsoft Hypervisor (MSHV).",
BinaryTemplate: `
{{ $os := .OS }}
{{ $arch := .Arch }}
{{ $ext := "" }}
{{- if (eq .Arch "aarch64") -}}
{{ $ext = "-aarch64" }}
{{- end -}}
cloud-hypervisor-static{{$ext}}`,
})

tools = append(tools,
Tool{
Owner: "cloud-hypervisor",
Repo: "cloud-hypervisor",
Name: "ch-remote",
Description: "The ch-remote binary is used for controlling an running Virtual Machine.",
BinaryTemplate: `
{{ $os := .OS }}
{{ $arch := .Arch }}
{{ $ext := "" }}
{{- if (eq .Arch "aarch64") -}}
{{ $ext = "-aarch64" }}
{{- end -}}
ch-remote-static{{$ext}}`,
})
return tools
}

0 comments on commit 6b6cbdf

Please sign in to comment.