Table of Contents |
---|
About
The GÉANT Software Repository is based on Artifactory (http://www.jfrog.com/products.php) with Pro Power Pack ( http://www.jfrog.com/pro-features.php). Artifactory provide base Maven/Gradle repository functionality: you can download artefacts and deploy own snapshot and release artefacts like in any repository. It can be used as mirror for any external repository. Also it provide nice GUI to manage your artefacts, deploy files manually and integration with GN Active Direcotry and Bamboo. Integration with GN AD allow to use credentials (the same are used in Intranet and all SWDSD infrastructure eg. JIRA). Integration with Bamboo (https://ci.geant.org) allow eg. performing License Check process after artefacts deploy, deployment from Bamboo with global defined credentials etc.
Artifactory Pro Power Pack allow us to support different types of repository wider adopted in software development, see available predefined repositories types bellow:
- Build Techonologies
- Maven
- Gradle
- Ivy
- Infrastructure Package Managers
- Docker
- Yum
- Puppet
- Chef
- Debian
- Vagrant
- Development Language Package Managers
- Npm
- Nuget
- Conan
- Bower
- Opkg
- CocoaPods
- PHP
- P2
- Git
- gitLFS
- Ruby
- Python
- Go/vGo
- Helm Chart
- CRAN
How to access
URL: https://artifactory.software.geant.org
User Directory: GÉANT Active Directory (the same users like in JIRA, Bamboo, Bitbucket and SonarQube)
...
Artifactory uses fedrated authentication. During login process you must choose your Identity Provider. After successful authentication you will be redirect back to Artifactory home page.
Login with GÉANT AAI
- Go to https://artifactory.software.geant.org/
- Click the Log in link in the top right corner
- Click on the GÉANT AAI
You will be redirect to login.geant.org where you can choose your Identity Provider and use it to log in.
Warning title GÉANT AAI Registration If you are logging in for the first time using GÉANT AAI Service, you will see the message "You tried to access (a service via) GÉANT AAI Service, but we couldn't find a registration Let's fix that!" and you have to register first. To do so, please follow the instructions from Registration in GÉANT AAI Service
- After successful login you will be redirect to Artifactory main page
Get access to specyfic repository
To get access to specific repository:
- Log in to https://artifactory.software.geant.org
- Send access request - create issue on Help Desk Portal or send e-mail at help@software.geant.org You have to provide us:
- your user name in Artifactory (federated-user-XXX)
- repository name
For "non GUI" access to repository for automated deployment tools (Jenkins, Bitbucket), you can:
- generate API key for your account (federated-user-XXX) - see How to use API Key
- request for local account with password - this is the simplest way for CI purposes
Short guides
How to use Artifactory as Maven repository
GÉANT Artifactory Repositories
Artifactory allow to create three repository types: local, remote and virtual. In GÉANT we use all of them, to understood how it works read read http://wiki.jfrog.org/confluence/display/RTF/Understanding+Repositories page on Artifactory documentation page.Main repositories are:
- repo - _https://artifactory.geant.net/artifactory/repo_ This repository contains all local and remote repositories. This is global virtual repository created in Artifactory by default.
- geant-repo - _https://artifactory.geant.net/artifactory/geant-repo_ This virtual repository contains all GÉANT released artefacts.
- geant-snapshot-repo - _https://artifactory.geant.net/artifactory/geant-snapshot-repo_ This virtual repository contains all GÉANT snapshot artefacts.
Each GÉANT development projects have their own local repositories:
- project-release-local - This repository contains all project release artefacts.
- project-snapshot-local - This repository contains last 3* project snapshot artefacts.
- project-ext-libs (optional) This repository contains dependency unavailable in public Maven repositories)
Note: Only users attached to project-developers group in GÉANT Active Directory have permissions to deploy release/snapshot artefacts.
Working with Repository in Maven
1. Request for project internal repositories in SWDSD Help Desk Portal (https://issuesjira.software.geant.netorg/servicedesk/jiracustomer/browseportal/SWDSD2)
2. Setting Up a Maven Deployment Descriptor You can follow: http://wiki.jfrog.org/confluence/display/RTF/Configuring+Deployment or:
2.1. Provide configuration in main POM file eg.:
|
2.2. Provide your credentials in settings.xml file.
- Get into your profile page (click on your login name on the upper-right corner) and type-in your current password.
- Once you enter a correct password you will see your password in the Encrypted Password field.
- Copy this value (including the { ...\ } prefix) or use the sample server xml snippet in your settings.xml (you'd have to change the server name to match the id of your repository).
Eg.:<server>
<id>GEANT Artifactory</id>
<username>psnc.kupinski</username>
<password>\{DESede\}
000000000
</password>
</server>
3. Try to deploy snapshot artefacts.
Reference:
- Artifactory User Guide: https://www.jfrog.com/confluence/display/RTF/Welcome+to+Artifactory#WelcometoArtifactory-HowisthisGuideOrganized?
Using Artifactory as maven repositories mirror
Easiest way to use GN Artifactory as global maven repositories mirror is to define profile in your POM file. If you want always use GN Artifactory you can activate profile by default. See below example how to configure it.:...
<profile>
<activation>
<activeByDefault>
true
</activeByDefault>
</activation>
<id>artifactory</id>
<repositories>
<repository>
<id>central</id>
<name>libs-release</name>
<url>https:
//artifactory.software.geant.org/artifactory/repo</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<name>plugins-release</name>
<url>https:
//artifactory.software.geant.net/artifactory/repo</url>
</pluginRepository>
</pluginRepositories>
</profile>
...
How to use Artifactory as docker registry
Artifactory can be used to serve Docker images like Docker Registry. It is just another type of repository and could be browsed and managed in Artifactory web dashboard.
Address: artifactory.software.geant.netorg/<REPO_NAME>/<IMAGE_NAME>:<TAG>
How to use with Docker client
Login
Code Block title Docker login docker login artifactory.software.geant.netorg
And provide your Artifactory username and password
To manually set your credentials copy the following snippet to your ~/.docker/config.json file.Code Block title Credenitals { "auths": { "https://artifactory.software.geant.netorg: { "auth": "<USERNAME>:<PASSWORD>", "email": "youremail@email.com" } } }
Push image to registry
To push an image tag an image using the docker tag and then docker push command.Code Block title Docker push docker tag <MY_IMAGE_ID> artifactory.software.geant.netorg/<REPO_NAME>/<IMAGE_NAME>:<TAG> docker push artifactory.software.geant.netorg/<REPO_NAME>/<IMAGE_NAME>:<TAG>
Pull image
Code Block title Docker pull docker pull artifactory.software.geant.netorg/<REPO_NAME>/<IMAGE_NAME>:<TAG>
How to use Artifactory as a tool for Software IPR management
...
...
You can set the Run License Checks checkbox so that Artifactory will scan all dependencies used by the build to check for any license violations.
...
After build execution and deploy to https://artifactory.geant.org navigate to your build and select License tab
...
See example https://artifactory.geant.net/artifactory/webapp/#/builds/cNIS_nightbuild/340/1359382391871/licenses
Note: Currently all approved libraries are matched based on GÉANT IPR Policy.
Reference:
- GÉANT IPR Policy (GN3-10-325) https://geant3plus.archive.geant.net/About/Documents/GN3_10_325GEANTIPRPolicyv1.2_30SEP11.pdf
- Bamboo Artifactory Plugin - Running Licence Checks https://www.jfrog.com/confluence/display/RTF/Bamboo+Artifactory+Plug-in#BambooArtifactoryPlug-in-RunningLicenceChecks
Related articles
Note |
---|
The JFrog Academy provides free, unlimited access to On-Demand Online Training, some of them are dedicated to DevOps and could help you to get deep knowledge about useful Artifactory features and also build automation and DevOps best practices:
See more at: https://academy.jfrog.com/courses |
Content by Label | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...