* 'master' of https://github.com/JFrogDev/JFrog-Cloud-Installers: Updated default artifactory version to 5.10.0 for CloudFormation and Terraform installers Update azuredeploy.json Update azuredeploy.parameters.json Updates for ubuntu 16 installation support Update azuredeploy.json Update azuredeploy.json Updated Parameters.png image Update azuredeploy.parameters.json
Terraform Template For Artifactory Enterprise
Prerequisites:
- AWS account
- Basic knowledge to AWS
- Pre created Keys
- Basic knowledge of Artifactory
- Learn about system requirements for Artifactory
Steps to Deploy Artifactory Enterprise using Terraform template
-
Set your AWS account credentials. Easy way to do it is by setting environment variables.
export AWS_ACCESS_KEY_ID="your_access_key" export AWS_SECRET_ACCESS_KEY="your_secret_key" export AWS_DEFAULT_REGION="aws_region"To learn more about Terraform aws provider follow there documentation. https://www.terraform.io/docs/providers/aws/index.html
-
Make Changes in
variables.tffile to change default values to desired once. Also pass Artifactory Enterprise licenses as string in Variablesartifactory_license_1-5." e.g Change disk space to 500Gb:variable "volume_size" { description = "Disk size for each EC2 instances" default = 500 } -
Run command
terraform init -var 'key_name=myAwsKey'This is install required plugin for AWS provider. -
Run command
terraform plan -var 'key_name=myAwsKey'. -
Run command
terraform apply -var 'key_name=myAwsKey'to deploy Artifactory Enterprise cluster on AWS.It will take approximately 15 min to bring up cluster.
You will get ELB Url to access Artifactory.By default This template will start only 1 node in Artifactory cluster. It takes 7-10 minutes for Artifactory to start and attach instance to ELB.
Outputs: address = artifactory-elb-265664219.us-west-2.elb.amazonaws.com -
Access Artifactory UI using ELB Url provided in outputs.
-
Scale your cluster using following command:
terraform apply -var 'key_name=myAwsKey' -var 'secondary_node_count=2'In this example we are scaling artifactory cluster to 2 nodes.
Note: You can only scale nodes to number of artifactory licenses you have available for cluster.
-
SSH into Artifactory primary instance and write inactiveServerCleaner plugin in '/var/opt/jfrog/artifactory/etc/plugins' directory.
-
Command to destroy cluster:
terraform destroy -var 'key_name=myAwsKey'
Note:
- This template only supports Artifactory version 5.8.x and above.
- Turn off daily backups. Read Documentation provided here
- Use SSL Certificate with valid wild card to you artifactory as docker registry with subdomain method.
Steps to setup Artifactory as secure docker registry
considering you have SSL certificate for *.jfrog.team
- Pass your SSL Certificate in variable
ssl_certificateas string - Pass your SSL Certificate Key in variable
ssl_certificate_keyas string - Set
certificate_domainasjfrog.team - Set
artifactory_server_nameasartifactoryif you want to access artifactory withhttps://artifactory.jfrog.team - Create DNS for example Route53 with entry
artifactory.jfrog.teampointing to ELB value provided as output in CloudFormation Stack. - Create DNS for example Route53 with entry
*.jfrog.teampointing to ELB value provided as output in CloudFormation Stack. - If you have virtual docker registry with name
docker-virtualin artifactory. You can access it viadocker-virtual.jfrog.teame.gdocker pull docker-virtual.jfrog.team/nginx
Steps to upgrade Artifactory Version
-
Change value of
artifactory_versionfrom old version to new Artifactory version you want to deploy. for e.g. 5.8.1 to 5.8.2 Run commandterraform apply -var 'key_name=myAwsKey' -var 'secondary_node_count=2' -ver 'artifactory_version=5.8.2'. -
You will see instances will get upgraded one by one. Depending on your cluster size it will take 20-30 minutes to update stack.
Use Artifactory as backend
To to store state as an artifact in a given repository of Artifactory follow documentation provided at https://www.terraform.io/docs/backends/types/artifactory.html