Artifactory on the ToolTwist server - tooltwist/documentation GitHub Wiki
Note:
This is a Twist Resources internal page about How to set up Artifactory on our own servers. For details on how to use artifactory in your ToolTwist builds, see the Using-Artifactory wiki page.
Artifactory is installed as user artifactory on the ToolTwist server, which runs on an AWS server in Singapore. Ask Arv for details on how to log in to this server.
Java
Artifactory requires Java 1.7+.
OpenJDK was already installed, but is 1.6, so I decided to install Oracle JDK8, which I installed following the instructions here using jdk-8u5-linux-x64.rpm
downloaded from here. I had to download from the Oracle site using my browser, in order to accept the license, then uploaded to the AWS server.
(on my desktop)
# scp -P 2023 jdk-8u5-linux-x64.rpm ec2-user@...:/tmp
(log on to server)
# ssh ec2-user@...
# yum update
# sudo rpm -i jdk-8u5-linux-x64.rpm
# java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
Installing Artifactory
Installation involves simply downloading a zip file from the Artifactory site and unzipping it.
Running
# ssh artifactory@... (ask Arv)
# cd ~/artifactory/bin
# ./artifactory.sh
When it starts correctly, a large logo is displayed.
/\ | | (_)/ _| | | / __ \ / ____/ ____|
/ \ _ __| |_ _| |_ __ _ ___| |_ ___ _ __ _ _ | | | | (___| (___
/ /\ \ | '__| __| | _/ _` |/ __| __/ _ \| '__| | | | | | | |\___ \\___ \
/ ____ \| | | |_| | || (_| | (__| || (_) | | | |_| | | |__| |____) |___) |
/_/ \_\_| \__|_|_| \__,_|\___|\__\___/|_| \__, | \____/|_____/_____/
Version: 3.2.0 __/ |
Revision: 30088 |___/
The Amazon ELB (Electronic Loab Balancer) will route all requests to repo.tooltwist.com port 80, to port 7777 on the server. Once the server comes up, it sometimes takes a short while for the ELB to recognize the server is running. It does this by pinging the web application at port 7777.
Using Artifactory
In your browser, go to http://repo.tooltwist.com/artifactory.
For a good tutorial, see https://www.youtube.com/watch?v=zhhCD5qtocg.
How our Repos are set up
We use the Open Source version of Artifactory. In the Pro (paid) version you can mix and match different types of repositories - Maven, Ivy, Gradle, and others - and it resolves the naming conventions automatically. Since we aren't using this version (yet) we need to use a consistent repository format. Most (or all?) of the 3rd party jars we use in our projects are in Maven format, so we've decided to use Maven throughout.
Project repositories within Artifactory
Artifactory has three types of repositories. Local where artifacts are stored on the artifactory server. Remote where the jars live on other servers (e.g. Maven Central). And virtual servers, that provide a single repository that transparently provides access to multiple local and remote repositories.
Here typical repository names for a Twist Resources project.
-
acme-snapshot-local - A repository for publishing snapshot jars that will be stored locally on the Artifactory server.
-
acme-release-local - A repository for publishing release jars.
-
acme-snapshot - A virtual repository to resolve dependencies on snapshot jars from ToolTwist, twistresources-snapshot-local and from common Java repositories.
-
acme-release - A virtual repository that provides jars from acme-release-local and also remote servers.
Talk to Phil for details on how to set these up. (We are still experimenting)
Access to Repositories
Project specific repositories must not be accessed from outside the company, as they contain information proprietary to our customers. Accordingly we need to restrict access to repositories.
Until such time as we upgrade to Artifactory Pro, it is important that we only create repositories for customers on the Artifactory server in the office.
--