How to set up private servers based Artifactory?

Students write Java, Maven PW basically have heard the term, and for students who are not familiar with Java, may think this is an online PW. Indeed, the PW passed down by the historical reasons for the concept, understand the literal meaning is not very good, but in recent years there are signs of gradually spread to other techniques.

 

 

Package Manager

We say, PW, in fact, refers to the package dependencies within the enterprise LAN.

 

Speaking of software libraries, it will be implicated another concept - the package manager .

 

Package Manager is automatically installed on your computer, configure, uninstall and upgrade tool combination package. Package Manager because of its convenience, to be adopted by more and more new technologies, from the older generation of rpm, dpkg, maven, to the Mesozoic npm, pypi, nuget, then the new generation helm chart, all belong to the package Manager.

 

In order to implement the package manager automatically upgrade packages and installation configuration, generally have several types of warehouse: local repository , a remote warehouse / agency warehouse , a virtual warehouse .

 

 

Warehouse type

 

01 local warehouse

Local repository is on the computer need to use the package management tool, which is typically automatically generated by the package management tool, we need to note that our warehouse is hereinafter referred to a local server locally, with local developers of different computers.

 

02 remote warehouse / warehouse agent

A remote repository / warehouse agent generally refers to a central repository, a central warehouse to build large organizations mirror sites, such as: Tsinghua mirror sites, USTC mirror sites, or a plurality of superimposed polymeric warehouse contents of the depot, such as: Ali maven repository. That is a virtual warehouse warehouse-type polymerization, the contents of multiple warehouses aggregated together to provide services.

 

PW is contained within the enterprise to take at least a local repository and a virtual warehouse of a remote repository.

 

The role of local warehouse is realized within the enterprise package release, give the other team shared after release; remote warehouse / warehouse agent role is to be pulled into a complete package relies on the Internet.

 

PW general tool also has the cache function, the same package will take a second to pull directly from the PW, avoid frequent low-speed Internet access (many are foreign central warehouse site).

 

03 virtual warehouse

Virtual warehouse jobs are available to developers to use a unified, virtual warehouse by address, not only on the Internet can obtain the full dependencies, you can also get other components within the enterprise team development. For network isolation more stringent enterprises, PW generally need to build in the DMZ in order to meet the above requirements.

 

Build Maven PW

Next comes Maven based build Artifactory PW, other types of warehouses such as NPM, PyPI, etc., and so on.

 

After logging Artifactory account with administrator privileges, you can see Repositories have under the Local Admin menu, Remote, similar to Virtual three kinds of storage, respectively, corresponding to three warehouses described earlier.

 

 

Local entering the warehouse, New type of a Maven repository, edit the page there are a lot of fields, required on a Repository Key, in order to distinguish between good multiple warehouses, the name taken maven-local, the other fields can use the default.

 

 

Then cut to the Remote Warehouse, New type of a remote Maven repository, Repository Key fields are required and RUL, Repository Key named according to the standard remote repository, URL fill a central warehouse or domestic mirror sites (available online to search) , click the Test button to make sure the network is through and remote repository is correct, save it.

 

 

The last cut to the Virtual Warehouse, New Maven a type of virtual warehouse, need to do is fill in a Repository Key, while the front of the construction of two warehouses added to the virtual warehouse.

 

 

The last cut to the Virtual Warehouse, New Maven a type of virtual warehouse, need to do is fill in a Repository Key, while the front of the construction of two warehouses added to the virtual warehouse.

 

 

As for how to publish a package, Artifactory provide manual upload function, namely the Deploy button on the map, but this practice is not common, more often we pass code or instructions to publish package.

 

So the question is, how to publish packages by code or command it? In fact, Sifu just a tool, it does not affect the use of the package manager, how the original release, after the release of spend, PW is still the same way, just change the destination address it, the process of change.

Author: Zhang Jian Xin

 

Other high-quality articles

[Scrum] by means of a number of sprint, agile product development!

From our many years of project practice, we tell you how to do business IT operation and maintenance management transition?

Time properties file | Linux

How companies plan DevOps floor and evolution?

ZooKeeper | installation deployment scenarios, the development of docking API

Published 97 original articles · won praise 28 · views 50000 +

Guess you like

Origin blog.csdn.net/weixin_42556618/article/details/104896000