Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extra information in install.ps1 to help users #5690

Closed
wants to merge 1 commit into from

Conversation

manuelbuil
Copy link
Contributor

Proposed Changes

RKE2 docs already explain that the $PATH should be set with [System.Environment]::SetEnvironmentVariable but the current installation.ps1 is not specifying that. Therefore, a user might set the PATH as explained in the script and still see problems because rke2 can't find containerd in the PATH. This PR adds some extra information

Types of Changes

Docs

Verification

No need

Testing

Linked Issues

User-Facing Change


Further Comments

@manuelbuil manuelbuil requested a review from a team as a code owner April 8, 2024 17:39
@@ -726,7 +726,7 @@ switch ($Method) {
Install-AirgapTarball -CommitHash $Commit -InstallAgentImageDir $AgentImagesDir -TempAirgapTarball $TMP_AIRGAP_TARBALL -ExpectedImageAirgapChecksum $AIRGAP_CHECKSUM_EXPECTED -TempImageChecksums $TMP_AIRGAP_CHECKSUMS
Test-TarballChecksum -Tarball $TMP_BINARY_TARBALL -ExpectedChecksum $BINARY_CHECKSUM_EXPECTED
Expand-Tarball -InstallPath $TarPrefix -Tarball $TMP_BINARY_TARBALL
Write-InfoLog "install complete; you may want to run: `$env:PATH+=`";$TarPrefix\bin;C:\var\lib\rancher\rke2\bin`""
Write-InfoLog "install complete; you may want to run: `$env:PATH+=`";$TarPrefix\bin;C:\var\lib\rancher\rke2\bin`" or use [System.Environment]::SetEnvironmentVariable if rke2 will run as a service"
Copy link
Member

@brandond brandond Apr 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Under what circumstances would rke2 not run as a service? I don't think anyone is out there running rke2 agents from the command prompt.

Do we need some changes to properly set up the environment for the service when installing it, so that the correct paths are in its environment without any additional action from the user?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean adding it as part of the RKE2 windows code? Probably a better approach and we forget about changing the PATH. Let me see how we could do this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found the culprit! #5698

@manuelbuil manuelbuil closed this Apr 10, 2024
@manuelbuil manuelbuil deleted the helpWinUsers branch April 10, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants