Add all resource from static.kubevela.net to static folder
Signed-off-by: Amit Singh <singhamitch@outlook.com>
After Width: | Height: | Size: 291 KiB |
After Width: | Height: | Size: 459 KiB |
After Width: | Height: | Size: 113 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 300 KiB |
After Width: | Height: | Size: 431 KiB |
After Width: | Height: | Size: 201 KiB |
After Width: | Height: | Size: 316 KiB |
After Width: | Height: | Size: 334 KiB |
After Width: | Height: | Size: 316 KiB |
After Width: | Height: | Size: 187 KiB |
After Width: | Height: | Size: 340 KiB |
After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 97 KiB |
After Width: | Height: | Size: 382 KiB |
After Width: | Height: | Size: 140 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 201 KiB |
After Width: | Height: | Size: 224 KiB |
After Width: | Height: | Size: 190 KiB |
After Width: | Height: | Size: 161 KiB |
After Width: | Height: | Size: 227 KiB |
After Width: | Height: | Size: 572 KiB |
After Width: | Height: | Size: 297 KiB |
After Width: | Height: | Size: 425 KiB |
After Width: | Height: | Size: 408 KiB |
After Width: | Height: | Size: 2.6 MiB |
After Width: | Height: | Size: 296 KiB |
After Width: | Height: | Size: 2.5 MiB |
After Width: | Height: | Size: 371 KiB |
After Width: | Height: | Size: 434 KiB |
After Width: | Height: | Size: 312 KiB |
After Width: | Height: | Size: 317 KiB |
After Width: | Height: | Size: 405 KiB |
After Width: | Height: | Size: 247 KiB |
After Width: | Height: | Size: 380 KiB |
After Width: | Height: | Size: 223 KiB |
After Width: | Height: | Size: 284 KiB |
After Width: | Height: | Size: 405 KiB |
After Width: | Height: | Size: 342 KiB |
After Width: | Height: | Size: 306 KiB |
After Width: | Height: | Size: 388 KiB |
After Width: | Height: | Size: 287 KiB |
After Width: | Height: | Size: 220 KiB |
After Width: | Height: | Size: 774 KiB |
After Width: | Height: | Size: 348 KiB |
After Width: | Height: | Size: 364 KiB |
After Width: | Height: | Size: 573 KiB |
After Width: | Height: | Size: 243 KiB |
After Width: | Height: | Size: 474 KiB |
After Width: | Height: | Size: 137 KiB |
After Width: | Height: | Size: 467 KiB |
After Width: | Height: | Size: 132 KiB |
After Width: | Height: | Size: 387 KiB |
After Width: | Height: | Size: 319 KiB |
After Width: | Height: | Size: 381 KiB |
After Width: | Height: | Size: 544 KiB |
After Width: | Height: | Size: 2.5 MiB |
After Width: | Height: | Size: 370 KiB |
After Width: | Height: | Size: 3.2 MiB |
After Width: | Height: | Size: 400 KiB |
After Width: | Height: | Size: 12 MiB |
After Width: | Height: | Size: 166 KiB |
After Width: | Height: | Size: 228 KiB |
After Width: | Height: | Size: 116 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 655 KiB |
|
@ -0,0 +1,98 @@
|
|||
# Implemented based on Dapr Cli https://github.com/dapr/cli/tree/master/install
|
||||
|
||||
param (
|
||||
[string]$Version,
|
||||
[string]$VelaRoot = "c:\vela"
|
||||
)
|
||||
|
||||
Write-Output ""
|
||||
$ErrorActionPreference = 'stop'
|
||||
|
||||
#Escape space of VelaRoot path
|
||||
$VelaRoot = $VelaRoot -replace ' ', '` '
|
||||
|
||||
# Constants
|
||||
$VelaDBuildName = "velad"
|
||||
$VelaDFileName = "velad.exe"
|
||||
$VelaDFilePath = "${VelaRoot}\${VelaDFileName}"
|
||||
$RemoteURL = "https://kubevela.io/binary/velad"
|
||||
|
||||
if ((Get-ExecutionPolicy) -gt 'RemoteSigned' -or (Get-ExecutionPolicy) -eq 'ByPass') {
|
||||
Write-Output "PowerShell requires an execution policy of 'RemoteSigned'."
|
||||
Write-Output "To make this change please run:"
|
||||
Write-Output "'Set-ExecutionPolicy RemoteSigned -scope CurrentUser'"
|
||||
break
|
||||
}
|
||||
|
||||
# Change security protocol to support TLS 1.2 / 1.1 / 1.0 - old powershell uses TLS 1.0 as a default protocol
|
||||
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"
|
||||
|
||||
# Check if VelaD is installed.
|
||||
if (Test-Path $VelaDFilePath -PathType Leaf) {
|
||||
Write-Warning "velad is detected - $VelaDFilePath"
|
||||
Invoke-Expression "$VelaDFilePath version"
|
||||
Write-Output "Reinstalling VelaD..."
|
||||
}
|
||||
else {
|
||||
Write-Output "Installing VelaD..."
|
||||
}
|
||||
|
||||
# Create Vela Directory
|
||||
Write-Output "Creating $VelaRoot directory"
|
||||
New-Item -ErrorAction Ignore -Path $VelaRoot -ItemType "directory"
|
||||
if (!(Test-Path $VelaRoot -PathType Container)) {
|
||||
throw "Cannot create $VelaRoot"
|
||||
}
|
||||
|
||||
# Filter windows binary and download archive
|
||||
$os_arch = "windows-amd64"
|
||||
$vela_cli_filename = "velad"
|
||||
if (!$Version) {
|
||||
$Version = Invoke-RestMethod -Headers $githubHeader -Uri "${RemoteURL}/latest_version" -Method Get
|
||||
$Version = $Version.Trim()
|
||||
}
|
||||
if (!$Version.startswith("v")) {
|
||||
$Version = "v" + $Version
|
||||
}
|
||||
|
||||
$assetName = "${vela_cli_filename}-${os_arch}-${Version}.zip"
|
||||
$zipFileUrl = "${RemoteURL}/${Version}/${assetName}"
|
||||
|
||||
$zipFilePath = $VelaRoot + "\" + $assetName
|
||||
Write-Output "Downloading $zipFileUrl ..."
|
||||
|
||||
Invoke-WebRequest -Uri $zipFileUrl -OutFile $zipFilePath
|
||||
if (!(Test-Path $zipFilePath -PathType Leaf)) {
|
||||
throw "Failed to download Vela Cli binary - $zipFilePath"
|
||||
}
|
||||
|
||||
# Extract VelaD CLI to $VelaRoot
|
||||
Write-Output "Extracting $zipFilePath..."
|
||||
Microsoft.Powershell.Archive\Expand-Archive -Force -Path $zipFilePath -DestinationPath $VelaRoot
|
||||
$ExtractedVelaDFilePath = "${VelaRoot}\${os_arch}\${VelaDBuildName}"
|
||||
Copy-Item $ExtractedVelaDFilePath -Destination $VelaDFilePath
|
||||
if (!(Test-Path $VelaDFilePath -PathType Leaf)) {
|
||||
throw "Failed to extract VelaD archive - $zipFilePath"
|
||||
}
|
||||
|
||||
# Check the VelaD version
|
||||
Invoke-Expression "$VelaDFilePath version"
|
||||
|
||||
# Clean up zipfile
|
||||
Write-Output "Clean up $zipFilePath..."
|
||||
Remove-Item $zipFilePath -Force
|
||||
|
||||
# Add VelaRoot directory to User Path environment variable
|
||||
Write-Output "Try to add $VelaRoot to User Path Environment variable..."
|
||||
$UserPathEnvironmentVar = [Environment]::GetEnvironmentVariable("PATH", "User")
|
||||
if ($UserPathEnvironmentVar -like '*vela*') {
|
||||
Write-Output "Skipping to add $VelaRoot to User Path - $UserPathEnvironmentVar"
|
||||
}
|
||||
else {
|
||||
[System.Environment]::SetEnvironmentVariable("PATH", $UserPathEnvironmentVar + ";$VelaRoot", "User")
|
||||
$UserPathEnvironmentVar = [Environment]::GetEnvironmentVariable("PATH", "User")
|
||||
Write-Output "Added $VelaRoot to User Path - $UserPathEnvironmentVar"
|
||||
}
|
||||
|
||||
Write-Output "`r`VelaD is installed successfully."
|
||||
Write-Output "To get started with KubeVela and VelaD, please visit https://kubevela.io."
|