2.7 KiB
Setting up a Rancher development environment
To set up an environment to develop on Rancher Windows repositories, you can take the following steps.
Initial Setup
Initialize all the Terraform modules used in this guide:
terraform -chdir=terraform/azure_server init
Note: Windows requires an RSA-based SSH key pair.
Connecting to Azure
The Terraform modules used in this guide assume that the user has already authenticated their current machine to Azure by following the guidance of the Azure Terraform Provider.
Using VSCode Remote Explorer (optional)
For developers who use VSCode, it may be useful to install the Remote Explorer extension, which makes it far easier to launch terminals or view files on a remote machine.
Provision a Windows development server
To provision a Windows development server in Azure, run the following Terraform command at the root of this repository to create an Windows server with Rancher Developer Tools installed:
TF_NAME_PREFIX="clippy-test"
terraform -chdir=terraform/azure_server apply -var="name=${TF_NAME_PREFIX}-server" -var-file="examples/windows_dev.tfvars"
Setting up repositories
Once all initialization scripts have finished running, your Windows host should have the following tools installed:
Note: To enable WSL, you may have to run the following command manually while logged in as
adminuser:
& C:\Windows\System32\wsl\ubuntu1804.exe install --rootAfter running this command, you should be able to run
bashto hop into the WSL terminal.
It also adds two PowerShell functions to your profile:
Clone-Repo <repository>: this function takes in a repository likerancher/windowsand clones it to the pathC:\go\src\github.com\<repository>directory on your host.Go-Repo <repository>: given a repository in the same format asClone-Repoexpects (i.e.rancher/windows), this changes your current working directory toC:\go\src\github.com\<repository>
To install all the basic windows Repositories on your host, run the following command:
Clone-Repo rancher/wins
Clone-Repo rancher/windows
Clone-Repo rancher/Rancher-Plugin-gMSA