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

Completely offline install script doesn't work #1040

Open
DennisL68 opened this issue Aug 6, 2024 · 6 comments
Open

Completely offline install script doesn't work #1040

DennisL68 opened this issue Aug 6, 2024 · 6 comments
Labels
0 - Waiting on User Insufficient information for issue or PR, issue may be closed if no response from user

Comments

@DennisL68
Copy link

What New Or Updated Would You Like To See?

The script at Completely offline install should be replaced with.

  1. Download https://community.chocolatey.org/install.ps1 to local drive
  2. Run .\install.ps1 -ChocolateyDownloadUrl <c:\downloadpath\chocolatey.x.x.x.nupkg>

Why Is It Needed?

The script at Completely offline install doesn't install Chocolatey properly and the command won't be available in any new PowerShell sessions.

@pauby
Copy link
Member

pauby commented Aug 6, 2024

The script in the docs is intended to be used to install Chocolatey CLI from a separate repository and allows multiple options. The steps you provide don't go through that.

Step 2 doesn't take into account the credentials for the repository, the compression method, the execution policy etc.

The script at Completely offline install doesn't install Chocolatey properly

What doesn't work?

the command won't be available in any new PowerShell sessions

Which command? choco?

@LeaDevelop
Copy link
Contributor

I volunter to take care of this issue, got time next week.
I set up offline installer couple of weeks ago, can follow official docs again and verify if something could be improved and compare it to the reported.

@LeaDevelop
Copy link
Contributor

LeaDevelop commented Oct 1, 2024

Hey @DennisL68, if could please answer on pauby's questions. Could also help out if you point out exact section of documentation that you took, where it got confusing and lead you to opening issue and proposing approach you shared.

I ran with success by following next steps (could not find any issue with install.ps1):

  1. Prerequisites are present on Windows machine:

    • PowerShell 3.0+
    • .NET Framework 4.8+
    • 7zip or you can enable windows built in option in install.ps1 file
      • set $env:chocolateyUseWindowsCompression = 'true'
  2. https://community.chocolatey.org/install.ps1 downloaded and located into your preferred directory, for this example I used
    C:\OfflineInstaller

  3. Downloaded latest chocolatey package and located to same directory as install.ps1

  4. In install.ps1 file I edited value for $ChocolateyDownloadUrl =

[CmdletBinding(DefaultParameterSetName = 'Default')]
param(
    # The URL to download Chocolatey from. This defaults to the value of
    # $env:chocolateyDownloadUrl, if it is set, and otherwise falls back to the
    # official Chocolatey community repository to download the Chocolatey package.
    # Can be used for offline installation by providing a path to a Chocolatey.nupkg.
    [Parameter(Mandatory = $false)]
    [string]
    $ChocolateyDownloadUrl = 'file:C:\OfflineInstaller\chocolatey.2.3.0.nupkg',
  1. Opened up PowerShell and ran install.ps1

I personally wished when I was fresh to Chocolatey and had my first time preparing offline installer to find plain simple Powershell solution offline instructions as I just shared above. Instead of Puppet, I feel it's easier for onboarding flow to build up the understanding instead of skip onto configuration management. I also kind of missed out on the install.ps1 link and instead went with puppet proposed but I wasn't going to use Puppet, so I got lost in the read flow there a little. I feel if we understand the base ground first we'll also be able to switch it to installing chocolatey via configuration management but that is just me 😊 I simply made me personal note back then and use it whenever I'd need it. Am curious if it's just me or there are more who had such experience and we could use small improvement in reader flow there.

@pauby pauby added the 0 - Waiting on User Insufficient information for issue or PR, issue may be closed if no response from user label Oct 2, 2024
@DennisL68
Copy link
Author

@LeaDevelop

I'll have a look at it next week. We are about to reinstall that server anyway soon along with detailed instructions.

So this is something I'll need to do soon anyway 👍

@LeaDevelop
Copy link
Contributor

@DennisL68 how did it go?

@DennisL68
Copy link
Author

Not there yet :/

We had to prioritize a big migration work first that is still under due.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - Waiting on User Insufficient information for issue or PR, issue may be closed if no response from user
Projects
None yet
Development

No branches or pull requests

3 participants