Downloading modules from PowerShell Gallery with PowerShell v2 - powershell-2.0

PowerShell v2 has no access to the PowerShell Gallery. Backports of the Install-Module of module PowerShellGet only exist for v3 and v4. The PowerShell Gallery does not offer/allow manual download.
I looked for the code of module PowerShellGet to find out how the download works (to re-implement or run manually), but could not find its code.
How can I download modules for/with PowerShell v2? I hope there is a basic schema I could follow.

Related

How to create Azure DevOps Release Task for .NET Core 3.0 Self-contained app

I have a .NET Core 3.0 self-contained CLI app and I would like to make it available in Azure DevOps Release Pipelines Task. I wish to have task like "Use MyApp". Something like "Use Node" or "Use .NET Core" style. The task flow would be like these:
Task1: Use MyApp
Download EXE file from github
Set PATH to include the location of EXE
Task2: Run MyApp
Run MyApp with args from Az DevOps GUI
I have been going through many articles but I have yet to see any EXE file example. This is the closest I can get but it was NPM package. Do I need to package my CLI app into NPM, if thats even possible? https://devkimchi.com/2019/07/03/building-azure-devops-extension-on-azure-devops-2/
Thanks for advise. //Ardi
After mashing-up various samples, I finaly made this to work. I still have chose Node+Typescript instead of Powershell.
Here's a code how I wrapped a self-contained app EXE file and made available as Azure Pipelines Task.
https://github.com/rdagumampan/yuniql-azure-pipelines-tasks

Where is nuget.exe in the .net core docker SDK

I'm using the mcr.microsoft.com/dotnet/core/sdk:3.0-buster image to build a docker image, but I need to add the Telerick nuget feed source. I can pass in a nuget.config file and it will work, so I know nuget itself is working when the dotnet restore operation runs.
Nuget must be in that image somewhere, but apparently not in the path. So when I try to run this in my Dockerfile:
RUN nuget.exe sources add -Name telerik -Source https://nuget.telerik.com/nuget/ -username myusername -password mypassword
I get the error:
/bin/sh: 1: nuget.exe: not found
Where is nuget.exe in the dotnet core docker image?
The nuget CLI itself is not included with the .NET Core SDK itself.
The .NET Core SDK includes a subset of nuget functionality as built-in. For other functionality, you have to fall back to workarounds.
Telerik docs point out that you have to put your configuration in the Nuget.config file in .NET Core.

What are the powershell module version dependencies for Terraform azure provider?

Currently using terraform = 0.11.14 and azurerm provider = 1.29.0. Where can I find the required powershell modules / versions for my current azurerm provider version?
For example is Az.Accounts 1.6.0 ok for my current azurerm provider or do I need an older version?
Windows 10
Powershell 5.1
I am not aware that there is the required PowerShell modules/versions for the current Azure provider version. It's recommended to use the latest Azure PowerShell module version. If you're interested in the Azure provider's latest features, you could check out the changelog for version information and release notes.
For the error in your comment, it indicated that your existing PowerShell session is "locking" the module by loading possible elements from it. Since local-exec provider invokes a process on the machine running Terraform, not on the resource. When you run it in terraform, it actually runs on local PowerShell. I don't think it will be related to the terraform version. This error might be due to your existing PowerShell session. You could exit it or open a new PowerShell session. Refer to this.
Hope it helps.

Steps to create Cloud Dataflow template using the Python SDK

I have created Pipeline in Python using Apache Beam SDK, and Dataflow jobs are running perfectly from command-line.
Now, I'd like to run those jobs from UI. For that i have to create template file for my job. I found steps to create template in Java using maven.
But how do I do it using the Python SDK?
Templates are available for creation in the Dataflow Python SDK since April of 2017. Here is the documentation.
To run a template, no SDK is needed (which is the main problem templates try to solve), so you can run them from the UI, REST API, or CL and here is how.

Java library for Docker repository?

Is there a Java library for Docker repository? I couldn't find any. I know there are few docker api libraries, but I am looking one for the repository.
My use case includes pushing to local repo and removing from it.
I am talking about this: https://docs.docker.com/registry/spec/api/
Actually there are only official API and SDK for python and go.
Develop with Docker Engine SDKs and API
You can find other unofficial API's for Java and C, for example, but I haven't tested their efficiency.

Resources