I´ve got a question about the package installation manager 'chocolatey'. The use case is that I want to download packages from a feed (hosted on azure devOps) including dependencies and save them somewhere on my computer. So I could install these packages later from a local source.
Is it possible to do so? If yes how can I do this
Thanks for your effort! For Further questions don't hesitate to comment my question
Steps 1:
Download artifact from the Azure DevOps feed and save it on the computer.
1. Open power shell and login DevOps via the code az login
2. Please refer to this doc and run the code to download the artifact from the Azure DevOps feed.
az artifacts universal download --organization https://dev.azure.com/{org} --feed feed name --name package name --version verion ID --path .
Step 2:
In this step, you can call chocolatey-install-package command to achieve installing local package. Just run this script in command line task.
Related
I defined an Azure DevOps CI pipeline that deploys a database to Azure SQL Instance. After this step a script is run to update pip. I am doing all this to run unit tests on the deployed database.
script: |
python -m pip install --upgrade pip
displayName: 'Updating pip to latest version.'
This step is failing with;
##[error]Cmd.exe exited with code '-1073741515'.
I added user defined capabilities as seen in the image below. Initially I was targeting C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64 but that didn't work.
I had to copy Python3.9 into a directory x64 and create a version file. So I tried including pip thinking that perhaps the issue might be similar despite a different error message.
I also made sure that pip.exe is on the path.
There have been issues at every stage of the CI pipeline after migrating from a Microsoft Agent to a self-hosted agent on my local machine, those steps produced errors which were more verbose with messages that were less obtuse. I am struggling to find any useful information on this. It is an error that appears many different contexts making it further difficult to diagnose.
In databricks there is the following magic command $sh, that allows you run bash commands in a notebook.
For example if I wanted to run the following code in Databrick:
pip install great_expectations
I would issue the following code:
%sh
pip install great_expectations
Can someone let me know what the equivalent is with Apache Spark notebook in Azure Synapse?
It may well be that it isn't possible with Azure Synapse but I don't know.
Just to add to this question, in Databricks when I run the following command
great_expectations init
The command remains stuck in running, see image
However, what I would expect from a regular Linux OS when I run the same code would be
OK to proceed? [Y/n]:
Is there something I could add to
great_expectations init
To make the code return
OK to proceed? [Y/n]:
Thanks
Azure Synapse Analytics Spark pool supports - Only following magic commands are supported in Synapse pipeline : %%pyspark, %%spark, %%csharp, %%sql.
Python packages can be installed from repositories like PyPI and Conda-Forge by providing an environment specification file.
Steps to install python package in Synapse Spark pool.
Step1: Get the packages details like name & version from pypi.org
Note: (great_expectations) and (0.13.19)
Step2: Create a requirements.txt file using the above name and version.
Step3: Upload the package to the Synapse Spark Pool.
Step4: Save and wait for applying packages settings in Synapse Spark pools.
Step5: Verify installed libraries
To verify if the correct versions of the correct libraries are installed from PyPI, run the following code:
import pkg_resources
for d in pkg_resources.working_set:
print(d)
For more details, refer to Manage Python libraries for Apache Spark in Azure Synapse Analytics.
I am installing devspace in my local windows machine using npm
npm install -g devspace
after installed, it needs to Finish installation of DevSpace CLI, in which the following request is failed
Error requesting URL: https://github.com/devspace-cloud/devspace/releases/download/v5.1.0/devspace-windows-amd64.exe
I think it's because of my machine is using the company's proxy. However, I don't know how to config proxy in devspace (just like git, for example).
DevSpace maintainer here. Instead of using npm, you can also download the release binary manually from GitHub: https://github.com/devspace-cloud/devspace/releases/
You can just do this:
Download the devspace-windows-amd64.exe for a release
Rename the downloaded file to devspace.exe
Save the devspace.exe file in a folder (and add this folder to your PATH environment variable) => You may need to restart after changing the PATH variable
That's basically what the npm installer does as well but it seems like it is unable to download the binary from GitHub. This may be because of a proxy or because of anything related to GitHub (your company may hit the rate limit or something else).
The server on which i wish to install gitlab is unable to download the gitlab package as shown below.
# curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh
curl: (6) Could not resolve host: packages.gitlab.com; Unknown error
Can you please help with some solution and especially an alternate link where i can download the package from web browser.
I will then upload the installer to my server and then install it in offline mode.
The GitLab Documentation has instructions on manual install, which includes a where to download.
For the Community edition, you can find the list of packages here: https://packages.gitlab.com/gitlab/gitlab-ce
I want to use Jenkins for creating RPM packages to deploy code and scripts onto a Linux redhat machine(s)
So the applications are a mix of technologies (no compiling needed) i just need to package up the applications deploy them to the correct location restart apache
Would anybody have some instructions on how to do these steps for a total Newbie:
Some questions:
Do i need to install jenkins on a local linux machine if im going to be creating RPM's that will be deployed on to linux redhat machine (i was hoping to install jenkins on windows)
Does anybody have a example of creating a package out of a local folder (no source control for the moment)
I want to just specify the directory of where to take the code from and specify where to deploy the code to on a machine the rpm is installed on
On the destination machine i want to run something like
yum -install mypackage-version12.rpm
and it will install the code/scripts to the specified directory and restart apache
i need an example of this also.
Thanks
You can install Jenkins on a different machine, but you generally must have a Jenkins "node", "slave", "agent" installed on a machine that can generate RPM packages.
Running each step of the RPM package setup is putting all the steps to build within Jenkins. It works much better if you extend your build system to build the RPM, and have Jenkins do what it does best, manage the build (schedule, etc), not micro-manage the build (do the steps).
Depending on what you currently have as your build system, this might include ant directives to setup the rpm build tree, copy in the .spec file, and a executable call to rpmbuild.
Jenkins can easily call a post-build task to do this, or you might want to configure a mini "fake" project that does the update, depending on tastes.
As an aside, for a yum command to work without using the --localinstall option, you will need to have a web server set up, the new RPM copied to the right folder on the web server, and the indexing files rebuilt (repobuild is the script to do so, if I recall correctly).
On the client machine (where the package will be installed), you will need to have a yum configuration that directs the client machine to include the web server as one of the known yum repositories.
Why not use an Docker images to build the RPM inside it though a dedicated stage ?
Your code needs to provide /rpm/SPEC files and inside the Docker (Jenkins) you can have a Jenkinsfile like :
mkdir -p ./rpm/BUILD && cd ./rpm/ && for f in ./SPECS/*; do rpmbuild --define \"_topdir \$(pwd)/\" --define \"_builddir \$(pwd)/BUILD\" -bb \$f;
And you are done.