Sodium: Machine list blank
-
Yes, it just showed up.
-
@marcinozga said in Sodium: Machine list blank:
Yes, it just showed up.
If you have further issues please let me know, I'll always do my best to get back to you as quick as I can. We may be early on in development (which we fully acknowledge) but we really are trying to do our best for the community.
-
@quixoticjeremy will do, thanks.
-
I think we've just not looked at the install - is it really installing twice or just updating if already installed? Should be simple enough to make a test for choco being already available.
-
@quixoticjustin said in Sodium: Machine list blank:
I think we've just not looked at the install - is it really installing twice or just updating if already installed? Should be simple enough to make a test for choco being already available.
One of 3 things happens:
a. choco is already installed, it fails doesn't do anything and moves on to the next step
b. choco is not up to date: it updates
c. choco is not installed: it installs. -
@marcinozga said in Sodium: Machine list blank:
Perhaps msi installer would be a better idea here.
The issue with an MSI installer is managing the updates. In this case, we are leveraging the existing Salt and Chocolatey frameworks for agent management and agent updates. If we move to MSI it would simplify the initial install, but make updates much more complicated. And it would greatly expand the back end infrastructure to package updates.
At some point we anticipate needing an MSI, but it will bring a lot of problems with it.
-
This post is deleted! -
This is what happens:
Getting latest version of the Chocolatey package for download. Getting Chocolatey from https://chocolatey.org/api/v2/package/chocolatey/0.10.7. Extracting %LOCALAPPDATA%\Temp\chocolatey\chocInstall\chocolatey.zip to %LOCALAPPDATA%\chocolatey\chocInstall... Installing chocolatey on this machine Creating ChocolateyInstall as an environment variable (targeting 'Machine') Setting ChocolateyInstall to 'C:\ProgramData\chocolatey' WARNING: It's very likely you will need to close and reopen your shell before you can use choco. Restricting write permissions to Administrators We are setting up the Chocolatey package repository. The packages themselves go to 'C:\ProgramData\chocolatey\lib' (i.e. C:\ProgramData\chocolatey\lib\yourPackageName). A shim file for the command line goes to 'C:\ProgramData\chocolatey\bin' and points to an executable in 'C:\ProgramData\chocolatey\lib\yourPackageName'. Creating Chocolatey folders if they do not already exist. WARNING: You can safely ignore errors related to missing log files when upgrading from a version of Chocolatey less than 0.9.9. 'Batch file could not be found' is also safe to ignore. 'The system cannot find the file specified' - also safe. WARNING: Not setting tab completion: Profile file does not exist at '\\path-to-my-documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'. Chocolatey (choco.exe) is now ready. You can call choco from anywhere, command line or powershell by typing choco. Run choco /? for a list of functions. You may need to shut down and restart powershell and/or consoles first prior to using choco. Ensuring chocolatey commands are on the path Ensuring chocolatey.nupkg is in the lib folder D:\download>choco install saltminion -y Chocolatey v0.10.7 Installing the following packages: saltminion By installing you accept licenses for the packages. saltminion v2017.7.1 already installed. Use --force to reinstall, specify a version to install, or try upgrade. Chocolatey installed 0/1 packages. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). Warnings: - saltminion - saltminion v2017.7.1 already installed. Use --force to reinstall, specify a version to install, or try upgrade. D:\download>icacls "c:\salt\bin\Lib\site-packages\salt\" /grant "Authenticated Users":(OI)(CI)R Invalid parameter "Users:(OI)(CI)R " D:\download>echo random-string-here 1>>c:\salt\bin\lib\site-packages\salt\companyName.txt D:\download>echo master: na1.waxquixotic.com 1>>c:\salt\conf\minion.d\mast.conf D:\download>Restart-Service salt-minion 'Restart-Service' is not recognized as an internal or external command, operable program or batch file.
This looks like it installed Chocolatey on top of existing one. I manage Chocolatey installs with Ansible, so latest version should be installed already.
-
@marcinozga said in Sodium: Machine list blank:
This is what happens:
Getting latest version of the Chocolatey package for download. Getting Chocolatey from https://chocolatey.org/api/v2/package/chocolatey/0.10.7. Extracting %LOCALAPPDATA%\Temp\chocolatey\chocInstall\chocolatey.zip to %LOCALAPPDATA%\chocolatey\chocInstall... Installing chocolatey on this machine Creating ChocolateyInstall as an environment variable (targeting 'Machine') Setting ChocolateyInstall to 'C:\ProgramData\chocolatey' WARNING: It's very likely you will need to close and reopen your shell before you can use choco. Restricting write permissions to Administrators We are setting up the Chocolatey package repository. The packages themselves go to 'C:\ProgramData\chocolatey\lib' (i.e. C:\ProgramData\chocolatey\lib\yourPackageName). A shim file for the command line goes to 'C:\ProgramData\chocolatey\bin' and points to an executable in 'C:\ProgramData\chocolatey\lib\yourPackageName'. Creating Chocolatey folders if they do not already exist. WARNING: You can safely ignore errors related to missing log files when upgrading from a version of Chocolatey less than 0.9.9. 'Batch file could not be found' is also safe to ignore. 'The system cannot find the file specified' - also safe. WARNING: Not setting tab completion: Profile file does not exist at '\\path-to-my-documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'. Chocolatey (choco.exe) is now ready. You can call choco from anywhere, command line or powershell by typing choco. Run choco /? for a list of functions. You may need to shut down and restart powershell and/or consoles first prior to using choco. Ensuring chocolatey commands are on the path Ensuring chocolatey.nupkg is in the lib folder D:\download>choco install saltminion -y Chocolatey v0.10.7 Installing the following packages: saltminion By installing you accept licenses for the packages. saltminion v2017.7.1 already installed. Use --force to reinstall, specify a version to install, or try upgrade. Chocolatey installed 0/1 packages. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). Warnings: - saltminion - saltminion v2017.7.1 already installed. Use --force to reinstall, specify a version to install, or try upgrade. D:\download>icacls "c:\salt\bin\Lib\site-packages\salt\" /grant "Authenticated Users":(OI)(CI)R Invalid parameter "Users:(OI)(CI)R " D:\download>echo random-string-here 1>>c:\salt\bin\lib\site-packages\salt\companyName.txt D:\download>echo master: na1.waxquixotic.com 1>>c:\salt\conf\minion.d\mast.conf D:\download>Restart-Service salt-minion 'Restart-Service' is not recognized as an internal or external command, operable program or batch file.
This looks like it installed Chocolatey on top of existing one. I manage Chocolatey installs with Ansible, so latest version should be installed already.
Interesting. Definitely different what I've seen in testing. I'll be sure to take a look at this moving forward. I hadn't coded detection because it had been simply failing out and moving to the next step when it was present in my tests. I'll take a look at this in the very near future.
-
@QuixoticJustin can you add this to my list?
-
I just realized installing it with Ansible is really elegant solution here:
--- - hosts: windows tasks: - name: Install sodium agent win_chocolatey: name: saltminion state: latest - name: Copy companyName.txt template: src: companyName.txt.j2 dst: c:\salt\bin\lib\site-packages\salt\companyName.txt - name: Copy config file template: src: mast.conf.j2 dest: c:\salt\conf\minion.d\mast.conf - name: Set permissions win_acl: path: c:\salt\bin\Lib\site-packages\salt\ user: "Authenticated Users" rights: Read type: allow state: present notify: - restart salt handlers: - name: restart salt win_service: name: salt-minion state: restarted
And that would do it, one would need to create 2 files, companyName.txt.j2 and mast.conf.j2 with either variables, or just directly with proper values. If someone is already using Ansible, they should easily be able to do that.