Deploy debian package for multiple distros into Jfrog Artifactory? - artifactory

What is the right procedure to deploy a debian package built for different distros into the same Jfrog debian artifactory repo?
Just uploading to the same path, but with different deb.distribution properties does not work, they all get uploaded to the same place and clobber the previous upload.
Including the distribution name into the package name is ugly, but would of course work. Is there a better way?

You simply post the different debian to different locations within the Jfrog artifactory repository. The trick is that the repository layout has nothing to do with the aptitude API, which retrieves debians regardless of their location according to the requested metadata (deb.distribution, deb.version etc).

Related

How do I delete a specific Jfrog build with the cli (and its corresponding artifact)

I'm confused about how to perform this operation, it almost seems like it's not supported. Looking at the docs I see no examples for deleting a specific build version: https://www.jfrog.com/confluence/display/CLI/CLI+for+JFrog+Artifactory#CLIforJFrogArtifactory-DiscardingOldBuildsfromArtifactory
I use build discarding now, but that's not what this is. I want to remove a specific build version and its corresponding artifact, not use --max-days or --max-builds. How is this possible? I want to delete the build AND the artifact.
I use Jfrog to host an internal helm repo, helm has no built-in command to delete a chart from a remote repo.
For deleting a specific artifact of a build using jfrog cli run
jfrog rt delete --build build-name/build-number
Parse --dry-run to know which artifacts would have been deleted.
More info on CLIforJFrogArtifactory-DeletingFile.

Install net-snmp on RHEL without yum (or any other package managing software)

Currently I'm working on installing the net-snmp package on bunch of RHEL servers (versions vary from 5.x ~ 6.x).
To be specific, I need net-snmp.x86_64 and net-snmp-utils.x86_64 to create /etc/snmp/snmpd.conf file.
In normal cases, I'd just use yum to simply install them but the servers I'm working on has a firewall blocking all connections except the ones specified in the firewall.
I'm also not allowed to configure the firewall to enable yum to download the packages online due to security reasons (not sure why, though).
So I downloaded the net-snmp-5.8.tar.gz file to my PC and SCP'd it to the servers and tried to manually install it there.
But since I'm no expert on this, I just couldn't get them installed with the information online.
The files seem to be running but it doesn't create the snmpd.conf file that I need, or any other SNMP configs.
Is there a guide to installing these packages properly using the tar.gz file? Or is there something wrong here?
Thanks in advance :)
Have you run the snmpconf script? If I remember correctly it should have been installed along with net-snmp and it will generate an snmpd.conf file that is at least a good starting point if not the final one you'll want.

Artifactory: Converting remote repo to local repo

My employer has been misusing Bintray as our binary repository for some time. We are finally moving to Artifactory instead and closing down Bintray. But this seems to be an almost impossible task. There is no way of exporting Bintray repos to a zip. Downloading the repos means manually downloading each file from the UI or through their API. I have tried two approaches for automation:
1) wget for crawling our bintray like this:
wget -e robots=off -o ~/wget.log -w 1 -m -np --user --password "https://.bintray.com"
which yielded all of the files in the repos. But this only solves half the problem. I couldn't find out how to import the files to a repository in artifactory (all the repos are over 100mbs each and therefore can't be uploaded, for some reason).
2) I set the Bintray repos up as remote repositories and enabled Active Replication. That seems to have worked for now. But I don't know if they will be removed when the Bintray account is moved or even if they are stored in Artifactory. Therefore I would like to convert the remote repo to a local repo, to make sure that it is permanently stored in artifactory is there a way of doing this? If so, how?
I'll try to address both of your questions below.
What do you mean you can't upload more than 100mb? Which version of Artifactory are you using? On-prem or SaaS-based installation? How are you trying to upload your files to Artifactory? Have you tried to import the content by using the import feature of Artifactory? (Admin --> Import&Export --> repository Import)
It sounds like you are using the UI for the upload, and if so you can configure the max upload size in Admin --> General Configuration page.
If you mean that you have all of the content from Bintray cached in your remote repository cache in Artifactory just use the "Copy" or "Move" option and move the content to a local repository. This will ensure that all of the content is stored locally.

Does Artifactory with Yum integration always pull from public mirror as opposed to local repo if possible?

I setup a test artifactory server and downloaded some test rpms from a public mirror and then deployed these rpms through artifactory to a local artifactory yum repo (the whole point of this is to test artifactory w/ yum integration). So then I set everything else up and did a bunch of testing so generally speaking the environment has been shown to work (meaning artifactory.repo is config'd correctly and whatever else needed to be done). However. If I "yum install some.rpm" an rpm that is BOTH STORED LOCALLY IN MY ARTIFACTORY YUM REPO and ALSO AVAILABLE IN THE PUBLIC MIRRORS, yum will pull from the public mirror.
How do I deal with this?
Should I deal with this?
Or should I just let yum pull from the public mirror all the time and only use artifactory with yum for my company's rpms?
I mean, what if I want to just build my own repo and not deal with the public mirrors in some cases...?
Is there anything that can "preference" this stuff as opposed to just blowing away the public mirror repo config files in /etc/yum.repos.d/?
Well, it depends on your usecase.
By default Artifactory remote repositories also come with a local cache where they store all downloaded artifacts - so using a local repository to store the same artifacts is redundant.
You can config your yum client to pull from either the remote, local or both if you'd like - it has it's own internal ordering for which one it will access first.
You would mainly use a local repository for cases where you want to be 100% certain only specific versions are used in your build and don't want to rely on what the yum client will choose as an appropriate version, or for cases where you build your own packages for internal use and don't want anyone from 'outside' (outside the team/company whatever) having access to them.

what repository does sbt 0.13.7 reside in?

I'm apparently missing a repository because when I specify sbt version 0.13.7 I get
org.scala-sbt#sbt;0.13.7: not found
I'm using Artifactory locally to cache all my dependencies, and I need to add the correct repository to my Artifactory.
It also fails to find 0.13.6 but it works with 0.13.5 so I must have already downloaded that version on to my local machine.
We're still working on moving this into scala-sbt.org, but you can find the artifactory instructions we worked up with JFrog here: https://docs.google.com/a/typesafe.com/document/d/18fGjMz21J4-JMHXfDH4OyGOXu8NvWfsG4q83S9RT64M/edit
Oh, and the repository is repo.typesafe.com/typesafe/releases (but as an ivy repository)

Resources