diff --git a/CloudFormation/README.md b/CloudFormation/README.md index a66055e..b7717ce 100644 --- a/CloudFormation/README.md +++ b/CloudFormation/README.md @@ -1,71 +1,80 @@ -# CloudFormation Template For Artifactory Enterprise +# CloudFormation Template For JFrog Artifactory Enterprise -### Steps to Deploy Artifactory Enterprise using CloudFormation template +### Steps to Deploy Artifactory Enterprise using a CloudFormation template -1. Go to AWS Console and Select CloudFormation. Then click on Create Stack. - You will see following window. +1. Go to AWS Console and select **CloudFormation**. and click **Create Stack**. The following page is displayed. ![screenshot](images/1.png) -2. Upload Artifactory-enterprise.json (Artifactory Enterprise template) and click next. +2. Upload the _Artifactory-enterprise.json_ file which is the Artifactory Enterprise template and click **Next**. ![screenshot](images/2.png) -3. Provide required information like stack name, DBAllocatedStorage, DBInstanceClass, DBName, DBPassword, - DBUser, InstanceType, InstanceStorage, MasterKey, ArtifactoryVersion, KeyName, ArtifactoryLicense1-5, MultiAZDatabase, SSHLocation, Certificate, CertificateKey, SecondaryNodeCount, ExtraJavaOptions. Then click next. +3. Provide the following required information: Stack name, DBAllocatedStorage, DBInstanceClass, DBName, DBPassword, + DBUser, InstanceType, InstanceStorage, MasterKey, ArtifactoryVersion, KeyName, ArtifactoryLicense1-5, MultiAZDatabase, SSHLocation, Certificate, CertificateKey, SecondaryNodeCount, and ExtraJavaOptions. + +4. Click **Next**. ![screenshot](images/3.png) -4. Mark on checkbox to allow CloudFormation to create IAM user for Artifactory to access S3 bucket. +5. Select the check box to allow CloudFormation to create an IAM user for Artifactory to access S3 bucket. ![screenshot](images/4.png) -5. Once Stack in deployed you will see Artifactory Load Balancer URL in output as showed in screenshot. It takes 7-10 minutes for Artifactory to start and attach instance to ELB. + Once the stack in deployed, you will see the Artifactory Load Balancer URL in the output . + It takes between 7 to 10 minutes for Artifactory to start and attach the instance to ELB. ![screenshot](images/5.png) -6. Open Artifactory URL and you will be able to see Artifactory UI. +6. Open the Artifactory URL to see Artifactory UI. ![screenshot](images/6.png) + +7. Verify that Artifactory is running in High Availability mode. In the Artifactory UI, navigate to to **Admin> High Availability**. +![screenshot](images/7.png) -7. Let's make sure that Artifactory is running in High Availability mode. Go to Admin -> High Availability in Artifactory UI to see this table. -![screenshot](images/8.png) - -8. Now let's add 2 more nodes to Artifactory Enterprise cluster. Go to CloudFormation UI in AWS console and select newly deployed Artifactory Enterprise Stack. - Click on Action -> Update Stack. +8. Now let's add two more nodes to the Artifactory Enterprise cluster. + Go to CloudFormation UI in AWS console and select the newly deployed Artifactory Enterprise Stack. + + Click **Action > Update Stack**. ![screenshot](images/9.png) -9. Increase SecondaryNodeCount from 0 to 2. Then update the Stack. +9. Increase the SecondaryNodeCount from 0 to 2 and then update the stack. ![screenshot](images/10.png) -10. It will take few minutes to update stack. + It will take few minutes to update stack. ![screenshot](images/11.png) -11. Once Stack is updated. + The stack is updated. ![screenshot](images/12.png) -12. You will be able to see 3 nodes in High Availability table in Artifactory UI as part of Enterprise cluster. +10. View the three nodes in the High Availability table in the Artifactory UI as part of Enterprise cluster. ![screenshot](images/13.png) ### Note: 1. This template only supports Artifactory version 5.8.x and above. -2. Turn off daily backups. Read Documentation provided [here](https://www.jfrog.com/confluence/display/RTF/Managing+Backups) -3. Use SSL Certificate with valid wild card to you artifactory as docker registry with subdomain method. +2. Turn off daily backups. Read the [Documentation](https://www.jfrog.com/confluence/display/RTF/Managing+Backups). +3. Use an SSL Certificate with a valid wild card to you Artifactory as a Docker registry using the subdomain method. + +### Steps to setup Artifactory as a secure Docker Registry +Prerequisite: +* SSL certificate. -### Steps to setup Artifactory as secure docker registry considering you have SSL certificate for `*.jfrog.team` -1. Pass your SSL Certificate in parameter `Certificate` as string -2. Pass your SSL Certificate Key in parameter `CertificateKey` as string +1. Pass your SSL Certificate in the`Certificate` parameter as string +2. Pass your SSL Certificate Key in the `CertificateKey` parameter as string 3. Set `CertificateDomain` as `jfrog.team` -4. Set `ArtifactoryServerName` as `artifactory` if you want to access artifactory with `https://artifactory.jfrog.team` -5. Create DNS for example Rout53 with entry `artifactory.jfrog.team` pointing to ELB value provided as output in CloudFormation Stack. +4. If you want to access artifactory with `https://artifactory.jfrog.team`. Set `ArtifactoryServerName` as `artifactory` + Create DNS for example Route53 with entry `artifactory.jfrog.team` pointing to ELB value provided as output in CloudFormation Stack. 6. Create DNS for example Route53 with entry `*.jfrog.team` pointing to ELB value provided as output in CloudFormation Stack. 7. If you have virtual docker registry with name `docker-virtual` in artifactory. You can access it via `docker-virtual.jfrog.team` e.g ```docker pull docker-virtual.jfrog.team/nginx``` -### Steps to upgrade Artifactory Version +### Steps to upgrade the Artifactory Version -1. Go to AWS Console and Select CloudFormation Artifactory Stack you want to upgrade. Then click on Update Stack. +1. Go to the AWS Console and select the CloudFormation Artifactory Stack you want to upgrade. -2. Change Artifactory version in parameters from old version to version you want to deploy. - for e.g. 5.8.1 to 5.8.2 +2. Click **Update Stack**. + +3. Change the Artifactory version in the parameters from old version to version you want to deploy. + For example: From. 5.8.1 to 5.8.2 ![screenshot](images/14.png) -3. You will see instances will get upgraded one by one. Depending on your cluster size it will take 20-30 minutes to update stack. +3. You will see the instances upgraded one by one. Depending on your cluster size it can take between 20-30 minutes to update the stack. ![screenshot](images/15.png) \ No newline at end of file diff --git a/CloudFormation/artifactory-enterprise.json b/CloudFormation/artifactory-enterprise.json index f23260e..35412f5 100644 --- a/CloudFormation/artifactory-enterprise.json +++ b/CloudFormation/artifactory-enterprise.json @@ -751,7 +751,7 @@ "import java.util.concurrent.TimeUnit\n", "jobs {\n", - " clean(cron: \"0 * * * * ?\") {\n", + " clean(interval: 60000, delay: 600000) {\n", " def artifactoryServersCommonService = ctx.beanForType(ArtifactoryServersCommonService)\n", " def artifactoryInactiveServerCleaner = new ArtifactoryInactiveServersCleaner(artifactoryServersCommonService, log)\n", " artifactoryInactiveServerCleaner.cleanInactiveArtifactoryServers()\n", diff --git a/Terraform/inactiveServerCleaner.groovy b/Terraform/inactiveServerCleaner.groovy index 883f2bd..517a6e7 100644 --- a/Terraform/inactiveServerCleaner.groovy +++ b/Terraform/inactiveServerCleaner.groovy @@ -6,7 +6,7 @@ import org.slf4j.Logger import java.util.concurrent.TimeUnit jobs { - clean(cron: "0 * * * * ?") { + clean(interval: 60000, delay: 600000) { def artifactoryServersCommonService = ctx.beanForType(ArtifactoryServersCommonService) def artifactoryInactiveServerCleaner = new ArtifactoryInactiveServersCleaner(artifactoryServersCommonService, log) artifactoryInactiveServerCleaner.cleanInactiveArtifactoryServers()