0

I am starting to use Chocolatey with Artifactory as my main source and I need a machine to act as a source for another that has no Internet.

Scenario:

Machine A install packageA and packageB pulled from Artifactory (Internet access). All good here.

Machine B has no Internet access and can only talk to Machine A.

Is it possible to configure Machine A as a proxy to Artifactory for Machine B? Basically, Machine A would be a source for Machine B and Machine A would have Artifactory as its source.

enter image description here

Squirrel
  • 1,283
  • 1
  • 13
  • 22

1 Answers1

0

I am going to make some guesses here, so please correct me if anything is incorrect...

Most Chocolatey Packages that exist on the Chocolatey Community Feed are wrappers around the native installers, that exist on the internet, and which are downloaded at installation time. These installer packages are placed onto the first machine, so that the installation can happen, however, Chocolatey is also quite good at tidying up after itself (where it can) to minimise the amount of space taken up on the hard drive.

As a result, what you are describing likely won't be possible, without introducing the concept of package internalization. This is described in detail here, an important part being this:

NOTE: Many repositories have a concept of a proxy repository. Unlike NuGet repositories, you likely DO NOT WANT a proxied NuGet/Chocolatey repository pointing to the community repository. They only cache packages - cached is not the same concept as internalized. To reuse packages from the community repository in a reliable way, you need to internalize them. The community repository is subject to distribution rights, which means many packages need to download things from the internet at runtime. That's unreliable and a no go for many organizations. You can use Package Internalizer or manually internalize packages you want to use from the community repository.

If you go through the process of internalizing the packages, then any computer on your network, that doesn't have internet access, will be able to consume, and install, those packages.

Gary Ewan Park
  • 17,610
  • 5
  • 42
  • 60
  • Thank you for the feedback. I uploaded an image that shows the scenario. Hopefully it will help clarify what I described. Machine A has access to the Internet; thus, can get packages from a remote artifactory source. Machine B only has access to Machine A and I need to install packages on Machine B. Not sure if it is possible with Chocolatey as I am still new to it. – Squirrel May 09 '18 at 13:25
  • Are you using a licensed version of Chocolatey, or the OSS version? – Gary Ewan Park May 09 '18 at 13:28
  • For now, OSS. I am trying to make sure I can cover my main scenario before investing on it. – Squirrel May 09 '18 at 13:30
  • Short answer... Chocolatey doesn't provide anything here, today, that helps with this. You would need to stand up another Artifactory instance on Site B, and have it mirror what is in Site A. Or, you would need to look to download the packages from Site A into "something" else in Site B. – Gary Ewan Park May 09 '18 at 13:34
  • That "something else" would be a local share that you download the packages into, that Chocolatey could use as a source, or something like Chocolatey Simple.Server. The addition of the packages into this extra source is not something that you will get for "free", you will likely need to script something to download/internalize the packages, and put them into the correct location. – Gary Ewan Park May 11 '18 at 08:09