4 Don't use git to store binary files that are built from source such as PDF files or Virtual Machine Images.
\r
6 What is Artifact Repository
\r
7 ---------------------------
\r
9 An artifact repository is akin to what Subversion is to source code, i.e. it is a way of versioning code binary artifacts. In the Java world these artifacts could be jars, wars, ears, fully fledged applications, libraries or a collections of libraries that are packaged. (Read the rest from `the reference <http://blogs.collab.net/subversion/why-you-should-be-using-an-artifact-repository-part-1>`_.)
\r
11 What will be used as Artifact Repository for OPNFV
\r
12 --------------------------------------------------
\r
14 It has been decided to use Google Storage as OPNFV Artifact Repository.
\r
16 This is due to not having enough storage in OPNFV infrastructure and installing/managing a robust Artifact Repository is not straightforward.
\r
21 There are number of different alternatives that can serve as Artifact Repository Manager (ARM).
\r
23 Well known ones are
\r
25 * `JFrog Artifactory <http://www.jfrog.com/open-source/>`_
\r
26 * `Sonatype Nexus <http://www.sonatype.org/nexus/>`_
\r
27 * `Apache Archiva <http://archiva.apache.org/index.cgi>`_
\r
28 * `Swift <https://wiki.openstack.org/wiki/Swift>`_
\r
29 * `Google Cloud Storage <https://cloud.google.com/storage/>`_
\r
31 What other OSS Projects Use
\r
32 ---------------------------
\r
34 Different OSS Projects use different ARMs as listed below.
\r
36 * OpenDaylight: Sonatype Nexus. (provided by Linux Foundation.) `https://wiki.opendaylight.org/view/Infrastructure:Nexus <https://wiki.opendaylight.org/view/Infrastructure:Nexus>`_.
\r
37 * OpenStack: Uses tarball site. `http://tarballs.openstack.org/ <http://tarballs.openstack.org/>`_.
\r
38 * Apache: Sonatype Nexus. `https://repository.apache.org/ <https://repository.apache.org/>`_.
\r
43 Binaries/packages that are produced by CI can be deployed/uploaded to Artifact Repository making it possible to reuse artifacts during later stages of CI. They can be consumed by individual developers/organizations as well.
\r
45 Whatever is produced by CI can always be tracked by doing this when needed.
\r
47 Uploading artifacts using REST
\r
48 ------------------------------
\r
50 Both Artifactory and Nexus provide REST APIs to upload/manipulate artifacts. Below are the links to some examples.
\r
52 * `How can I programatically upload an artifact into Nexus? <https://support.sonatype.com/entries/22189106-How-can-I-programatically-upload-an-artifact-into-Nexus->`_
\r
53 * `Deploy Artifact to Artifactory <http://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-DeployArtifact>`_
\r
55 Uploading artifacts using Jenkins Plugins
\r
56 -----------------------------------------
\r
58 Jenkins has number of plugins that offer integration of different ARMs. One of the examples is `Artifactory Plugin <https://wiki.jenkins-ci.org/display/JENKINS/Artifactory+Plugin>`_.
\r
63 This is a summary of various email discussions on the topic of where to store large binary image files. Typical examples include videos, virtual machine images, software installers, ISOs for Operating Systems.
\r
65 Since many developers check their source code into the GIT repository it may seem natural to just place the files you've built into the repo too. This can work okay for a single developer working on a project over the weekends but with a team working on many components that need to be tested and integrated this won't scale.
\r
67 The way git works, no revision of any file is ever lost. So if you ever check in a big file, the repository will always contain it, and a git clone will be that much slower for every clone from that point onward.
\r
69 The golden rule of revision control systems applies: check in your build scripts, not your build products.
\r
71 Unfortunately, it only takes one person to start doing this and we end up with huge repositories. Please don't do this. It will make your computers sad. Thankfully, gerrit and code review systems are a massive disincentive to doing this.
\r
73 You definitely need to avoid storing binary images in git. This is what artifact repositories are for, like `Nexus or Artifactory <https://twiki.auscope.org/wiki/Grid/NexusVsArtifactory>`_
\r
75 A “centralized image repository” is needed that can store multiple versions of various virtual machines and have something like /latest pointing to the newest uploaded image. It could be a simple nginx server that stores the output images from any jenkins job if it's successful, for instance. Any “client” would be able to fetch the latest “autorelease” using `https://server/image/latest <https://server/image/latest>`_ to get the latest image or `https://server/stcv/1.1 <https://server/stcv/1.1>`_ and so on for any older image.
\r
77 For the specific project “vswitch performance characterization”, we have a directory as place holder to store the VM images. The VM images are not going to be in git repo. We use the same working git repository inside VM to run initial setup, and save the VM image in the host.
\r
79 TAG: GIT repository file download section
\r