-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Dipankar Das <[email protected]>
- Loading branch information
1 parent
a9bee9e
commit b228a41
Showing
5 changed files
with
126 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,21 +51,21 @@ jobs: | |
run: | | ||
Set-PSDebug -Trace 2 | ||
cd .\scripts | ||
.\builder.ps1 | ||
.\builder-mock.ps1 | ||
echo "KSCTL_BIN=$env:LOCALAPPDATA\ksctl\ksctl.exe" >> $env:GITHUB_ENV | ||
- name: build ksctl linux | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
run: | | ||
set -x | ||
make install_linux | ||
make install_linux_mock | ||
echo "KSCTL_BIN=ksctl" >> "${GITHUB_ENV}" | ||
- name: build ksctl macos | ||
if: ${{ matrix.os == 'macos-latest' }} | ||
run: | | ||
set -x | ||
make install_macos_intel | ||
make install_macos_intel_mock | ||
echo "KSCTL_BIN=ksctl" >> "${GITHUB_ENV}" | ||
- name: version | ||
|
@@ -76,29 +76,48 @@ jobs: | |
run: | | ||
${{ env.KSCTL_BIN }} create civo -n demo -r LON1 --nodeSizeMP "g4s.kube.small" --version 1.27.1 --verbose -1 -s store-local --yes | ||
${{ env.KSCTL_BIN }} info -p civo -n demo -r LON1 --verbose -1 -s store-local | ||
${{env.KSCTL_BIN}} create ha-civo -n ha-demo-k3s --nodeSizeDS "fake.small" --version 1.27.1 --nodeSizeLB "fake.small" --nodeSizeCP "fake.small" --nodeSizeWP "fake.small" -s store-local -r LON1 --verbose -1 --yes --bootstrap k3s | ||
${{env.KSCTL_BIN}} info -p ha-civo -n ha-demo-k3s -s store-local -r LON1 --verbose -1 | ||
${{env.KSCTL_BIN}} create ha-civo -n ha-demo-kubeadm --nodeSizeDS "fake.small" --version 1.28 --nodeSizeLB "fake.small" --nodeSizeCP "fake.small" --nodeSizeWP "fake.small" -s store-local -r LON1 --verbose -1 --yes --bootstrap kubeadm | ||
${{env.KSCTL_BIN}} info ha-civo -n ha-demo-kubeadm -s store-local -r LON1 --verbose -1 | ||
- name: azure create | ||
run: | | ||
${{env.KSCTL_BIN}} create azure -n demo -r fake --nodeSizeMP "fake" -s store-local --version 1.27.1 --verbose -1 --yes | ||
${{env.KSCTL_BIN}} info -p azure -n demo -r fake -s store-local --verbose -1 | ||
${{env.KSCTL_BIN}} create ha-azure -n ha-demo-k3s --nodeSizeDS "fake" --version 1.27.1 --nodeSizeLB "fake" --nodeSizeCP "fake" --nodeSizeWP "fake" -r fake --verbose -1 -s store-local --yes --bootstrap k3s | ||
${{env.KSCTL_BIN}} info -p ha-azure -n ha-demo-k3s -r fake -s store-local --verbose -1 | ||
${{env.KSCTL_BIN}} create ha-azure -n ha-demo-kubeadm --nodeSizeDS "fake" --version 1.28 --nodeSizeLB "fake" --nodeSizeCP "fake" --nodeSizeWP "fake" -r fake --verbose -1 -s store-local --yes --bootstrap kubeadm | ||
${{env.KSCTL_BIN}} info -p ha-azure -n ha-demo-kubeadm -r fake -s store-local --verbose -1 | ||
- name: aws create | ||
run: | | ||
# ${{env.KSCTL_BIN}} create aws -n demo -r fake --nodeSizeMP "fake" --version 1.27.1 -s store-local --verbose -1 --yes | ||
#${{env.KSCTL_BIN}} info -p aws -n demo -r fake -s store-local --verbose -1 | ||
${{env.KSCTL_BIN}} create ha-aws -n ha-demo-k3s --nodeSizeDS "fake" --version 1.27.1 --nodeSizeLB "fake" --nodeSizeCP "fake" --nodeSizeWP "fake" -r fake --verbose -1 -s store-local --yes --bootstrap k3s | ||
${{env.KSCTL_BIN}} info -p ha-aws -n ha-demo-k3s -r fake -s store-local --verbose -1 | ||
${{env.KSCTL_BIN}} create ha-aws -n ha-demo-kubeadm --nodeSizeDS "fake" --version 1.28 --nodeSizeLB "fake" --nodeSizeCP "fake" --nodeSizeWP "fake" -r fake --verbose -1 -s store-local --yes --bootstrap kubeadm | ||
${{env.KSCTL_BIN}} info -p ha-aws -n ha-demo-kubeadm -r fake -s store-local --verbose -1 | ||
- name: local create | ||
run: | | ||
${{env.KSCTL_BIN}} create local -n demolocal --version 1.27.1 --verbose -1 -s store-local --yes | ||
${{env.KSCTL_BIN}} info -p local -n demolocal -s store-local --verbose -1 | ||
- name: local create mongodb | ||
|
@@ -113,6 +132,7 @@ jobs: | |
mongo | ||
export MONGODB_URI="mongodb://root:[email protected]:27017" | ||
${{env.KSCTL_BIN}} create local -n demolocal-extmongo -s external-store-mongodb --verbose -1 --yes | ||
${{env.KSCTL_BIN}} info -p local -n demolocal-extmongo -s external-store-mongodb --verbose -1 | ||
- name: civo get | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#Requires -Version 5 | ||
|
||
$erroractionpreference = 'stop' # quit if anything goes wrong | ||
|
||
if (($PSVersionTable.PSVersion.Major) -lt 5) { | ||
Write-Output "PowerShell 5 or later is required to run Ksctl." | ||
Write-Output "Upgrade PowerShell: https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-windows-powershell" | ||
break | ||
} | ||
|
||
Write-Host "Welcome to Installation" -ForegroundColor DarkGreen | ||
|
||
$env:GOOS = 'windows' | ||
$env:GOARCH = 'amd64' | ||
Set-Location .\.. | ||
|
||
Set-Location .\cli\ | ||
|
||
go build -tags testing-civo,testing-azure,testing-aws,testing-local -v -o ksctl.exe . | ||
|
||
#Move-Item ksctl.exe $env:USERPROFILE\.ksctl\ | ||
|
||
$localAppDataPath = $env:LOCALAPPDATA | ||
$ksctl = Join-Path "$localAppDataPath" 'ksctl' | ||
|
||
Write-Information "Path of AppDataPath $ksctl" | ||
|
||
New-Item -ItemType Directory -Force -Path $ksctl | Out-Null | ||
|
||
Copy-Item ksctl.exe -Destination "$ksctl/" -Force | Out-Null | ||
|
||
Remove-Item ksctl.exe | ||
|
||
Set-Location ..\.. | Out-Null | ||
|
||
Write-Host "[V] Finished Installation" -ForegroundColor DarkGreen | ||
Write-Host "" | ||
Write-Host "To run ksctl globally, please follow these steps:" -ForegroundColor Cyan | ||
Write-Host "" | ||
Write-Host " 1. Run the following command as administrator: ``setx PATH `"`$env:path;$ksctl`" -m``" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
cd .. || echo -e "\033[1;31mUnable to cd into ksctl root\033[0m\n" | ||
|
||
# Get the binary from the source code | ||
cd cli || echo -e "\033[1;31mPath couldn't be found\033[0m\n" | ||
# Check if sudo access | ||
go get -d | ||
go build -tags testing-civo,testing-azure,testing-aws,testing-local -v -o ksctl . | ||
chmod +x ksctl | ||
|
||
sudo mv -v ksctl /usr/local/bin/ksctl | ||
|
||
echo -e "\033[1;32mINSTALL COMPLETE\033[0m\n" | ||
|
||
cd - || echo -e "\033[1;31mFailed to move to previous directory\033[0m\n" |