- Updated on May 29 to accommodate etcd container not having
/bin/shavailable anymore.
curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
| # This script will explain how to transfer a file to EC2 using SSM ONLY! | |
| # You will need to have permission to run SSM commands on the target machine and have sudo access as well | |
| # Infos | |
| INSTANCE_ID=i-1234567890 | |
| FILE_NAME=the_file.tar.gz | |
| # Step 1: Run command on machine to install netcat and dump from port to filename | |
| # < Start session |
| package main | |
| import ( | |
| "database/sql" | |
| "fmt" | |
| "net" | |
| "os" | |
| "github.com/go-sql-driver/mysql" | |
| "golang.org/x/crypto/ssh" |
| def triggeredBy = "---" | |
| def iterateCause(b) { | |
| upstreamcause = b.getCause(hudson.model.Cause.UpstreamCause.class) | |
| if (upstreamcause != null) { | |
| job = Jenkins.getInstance().getItemByFullName(upstreamcause.getUpstreamProject(), hudson.model.Job.class) | |
| if (job != null) { | |
| upstream = job.getBuildByNumber(upstreamcause.getUpstreamBuild()) | |
| if (upstream != null) { | |
| iterateBuild(upstream) |
| Function Get-DirHash { | |
| [Cmdletbinding()] | |
| Param( | |
| [Parameter(Mandatory=$true)] | |
| [ValidateScript({ | |
| if(Test-Path -Path $_ -ErrorAction SilentlyContinue) | |
| { | |
| return $true | |
| } | |
| else |
| $ComputerName = "New Name" | |
| Remove-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "Hostname" | |
| Remove-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "NV Hostname" | |
| Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Computername\Computername" -name "Computername" -value $ComputerName | |
| Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Computername\ActiveComputername" -name "Computername" -value $ComputerName | |
| Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "Hostname" -value $ComputerName | |
| Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "NV Hostname" -value $ComputerName | |
| Set-ItemProperty -path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" -name "AltDefaultDomainName" -value $ComputerName |