mirror of
https://github.com/ZwareBear/JFrog-Cloud-Installers.git
synced 2026-01-20 22:06:55 -06:00
Added nginx roles.
This commit is contained in:
@@ -3,14 +3,14 @@ This repo contains the Ansible collection for JFrog Artifactory Pro 7 roles. The
|
||||
|
||||
## Roles Provided
|
||||
### artifactory
|
||||
The artifactory role installs the Artifactory Pro software onto the host. Per the Vars below, it will configure a node as primary or secondary.
|
||||
The artifactory role installs the Artifactory Pro software onto the host. Per the Vars below, it will configure a node as primary or secondary. This role uses secondary roles artifactory-nginx and artifactory-java to install nginx and java dependencies.
|
||||
|
||||
### artifactory-nginx-ssl
|
||||
The artifactory-nginx-ssl role installs and configures nginx for SSL.
|
||||
|
||||
### artifactory-postgres
|
||||
The artifactory-postgres role will install Postgresql software and configure an artifactory database and user.
|
||||
|
||||
### artifactory-java
|
||||
The artifactory-java role ensures that the correct version of Java is installed for Artifactory.
|
||||
|
||||
## Vars Required
|
||||
The following Vars must be configured.
|
||||
|
||||
@@ -19,9 +19,7 @@ The following Vars must be configured.
|
||||
* ansible_ssh_private_key_file: The SSH key to use. eg. "/Users/jefff/.ssh/jeff-ec2-us-east.pem"
|
||||
* db_user: The Artifactory database user to configure. eg. "artifactory"
|
||||
* db_password: The Artifactory database password to configure. "Art1fact0ry"
|
||||
* server_name: This is the LB DNS or IP. eg. "ansibleelb-623062857.us-east-1.elb.amazonaws.com"
|
||||
* certificate: This is the SSL cert.
|
||||
* certificate_key: This is the SSL private key.
|
||||
* server_name: This is the server name. eg. "artifactory.54.175.51.178.xip.io"
|
||||
|
||||
### artifactory
|
||||
* master_key: This is the Artifactory Master Key.
|
||||
@@ -38,6 +36,10 @@ The following Vars must be configured.
|
||||
### secondary
|
||||
* artifactory_is_primary: For the secondary node(s) this must be set to **false**.
|
||||
|
||||
### SSL Config (Used with artifactory-nginx-ssl role)
|
||||
* certificate: This is the SSL cert.
|
||||
* certificate_key: This is the SSL private key.
|
||||
|
||||
### Example Inventory YAML
|
||||
An example inventory YAM is [here](hosts.yml).
|
||||
|
||||
|
||||
@@ -2,47 +2,124 @@
|
||||
all:
|
||||
vars:
|
||||
ansible_user: "ubuntu"
|
||||
ansible_ssh_private_key_file: "ssh.pem"
|
||||
ansible_ssh_private_key_file: "/Users/jefff/.ssh/jeff-ansible-ec2.pem"
|
||||
db_user: "artifactory"
|
||||
db_password: "xxxxxx"
|
||||
db_password: "Art1fAct0ry"
|
||||
children:
|
||||
database:
|
||||
hosts:
|
||||
10.0.0.70:
|
||||
100.26.167.170:
|
||||
artifactory:
|
||||
vars:
|
||||
master_key: "xxxxxx788ac56159890975bcf"
|
||||
join_key: "xxxxxx4bbac87970282fdeb"
|
||||
master_key: "c97b862469de0d94fbb7d48130637a5a"
|
||||
join_key: "9bcca98f375c0728d907cc6ee39d4f02"
|
||||
db_download_url: "https://jdbc.postgresql.org/download/postgresql-42.2.12.jar"
|
||||
db_type: "postgresql"
|
||||
db_driver: "org.postgresql.Driver"
|
||||
db_url: "jdbc:postgresql://10.0.0.70:5432/artifactory"
|
||||
server_name: "some-server.com"
|
||||
db_url: "jdbc:postgresql://10.0.0.160:5432/artifactory"
|
||||
server_name: "ec2-100-25-104-198.compute-1.amazonaws.com"
|
||||
certificate: |
|
||||
-----BEGIN CERTIFICATE-----
|
||||
Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0X
|
||||
Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0Xx0X
|
||||
MIIF8zCCA9ugAwIBAgIJAK/iP1hhhVNKMA0GCSqGSIb3DQEBCwUAMHUxCzAJBgNV
|
||||
BAYTAlVTMQswCQYDVQQIDAJXQTEQMA4GA1UEBwwHU2VhdHRsZTESMBAGA1UECgwJ
|
||||
Q2xvdWRCZWVzMTMwMQYDVQQDDCplYzItMTAwLTI1LTEwNC0xOTguY29tcHV0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J8ZSJU7Wzczl4AgcLNs5n
|
||||
WgW2uxfW5ft1CRsyTkQytaYznBQlvnhKUZczHRp23qxYJNEhv31fRdqXaiYalUne
|
||||
PsECggEAOJZJwvvxi74HZI5rkdJBN3fXfo1zaZuTs+wDUXhcQreLy3sBSoX3eSVm
|
||||
grnrIBsxw3oDqp+Mg++aCrr4GM2Jiymbogg1aN11MT7oFLhKWLKW6JrUT9Av4KYp
|
||||
LFbXCuaEgMk60bKNbNcAI378gEHq8I352q/ezWnQys/PtVuUx3VwsPnuvUypEAuL
|
||||
90RgMx7g46Q3GC7TQmlqNyaEDaVGY2PYSQZjNje8TTf7pJopue/9KF1cTyN2pgpz
|
||||
i6ZGjYpEzFf484iIOxv1HWndfvcQg6y+rw1n08sR8bh759YFrv8fz/vxou7m9BUL
|
||||
wE0kp6bIPqO7luLz5sqjxGiSRTiWSQ==
|
||||
-----END PRIVATE KEY-----
|
||||
children:
|
||||
primary:
|
||||
hosts:
|
||||
10.0.0.71:
|
||||
100.25.104.198:
|
||||
vars:
|
||||
artifactory_is_primary: true
|
||||
artifactory_license1: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
artifactory_license2: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
artifactory_license3: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
artifactory_license4: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
artifactory_license5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
secondary:
|
||||
hosts:
|
||||
10.0.0.72:
|
||||
10.0.0.73:
|
||||
vars:
|
||||
artifactory_is_primary: false
|
||||
artifactory_license1: cHJvZHVjdHM6CiAgYXJ0aWZhY3Rvcnk6CiAgICBwcm9kdWN0OiBaWGh3YVhKbGN6b2dNakF5TUMwd055MHdNbFF3TURvd01Eb3dNRm9LYVdRNklHSTJaakk0TURsakxXVXhNakV0TkdOa01TMWlNRGczTFdV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KdmVyc2lvbjogMQo=
|
||||
# secondary:
|
||||
# hosts:
|
||||
# 54.160.107.157:
|
||||
# 35.153.79.44:
|
||||
# vars:
|
||||
# artifactory_is_primary: false
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# Ansible Collection - jfrog.rt7ansible
|
||||
|
||||
Documentation for the collection.
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
- name: Ensure Java is installed.
|
||||
apt:
|
||||
update_cache: yes
|
||||
name: "{{ java_packages }}"
|
||||
state: present
|
||||
become: true
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
---
|
||||
language: python
|
||||
python: "2.7"
|
||||
|
||||
# Use the new container infrastructure
|
||||
sudo: false
|
||||
|
||||
# Install ansible
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- python-pip
|
||||
|
||||
install:
|
||||
# Install ansible
|
||||
- pip install ansible
|
||||
|
||||
# Check ansible version
|
||||
- ansible --version
|
||||
|
||||
# Create ansible.cfg with correct roles_path
|
||||
- printf '[defaults]\nroles_path=../' >ansible.cfg
|
||||
|
||||
script:
|
||||
# Basic role syntax check
|
||||
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
|
||||
|
||||
notifications:
|
||||
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
||||
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# defaults file for artifactory-nginx
|
||||
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# handlers file for artifactory-nginx
|
||||
@@ -0,0 +1,53 @@
|
||||
galaxy_info:
|
||||
author: your name
|
||||
description: your role description
|
||||
company: your company (optional)
|
||||
|
||||
# If the issue tracker for your role is not on github, uncomment the
|
||||
# next line and provide a value
|
||||
# issue_tracker_url: http://example.com/issue/tracker
|
||||
|
||||
# Choose a valid license ID from https://spdx.org - some suggested licenses:
|
||||
# - BSD-3-Clause (default)
|
||||
# - MIT
|
||||
# - GPL-2.0-or-later
|
||||
# - GPL-3.0-only
|
||||
# - Apache-2.0
|
||||
# - CC-BY-4.0
|
||||
license: license (GPL-2.0-or-later, MIT, etc)
|
||||
|
||||
min_ansible_version: 2.9
|
||||
|
||||
# If this a Container Enabled role, provide the minimum Ansible Container version.
|
||||
# min_ansible_container_version:
|
||||
|
||||
#
|
||||
# Provide a list of supported platforms, and for each platform a list of versions.
|
||||
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
|
||||
# To view available platforms and versions (or releases), visit:
|
||||
# https://galaxy.ansible.com/api/v1/platforms/
|
||||
#
|
||||
# platforms:
|
||||
# - name: Fedora
|
||||
# versions:
|
||||
# - all
|
||||
# - 25
|
||||
# - name: SomePlatform
|
||||
# versions:
|
||||
# - all
|
||||
# - 1.0
|
||||
# - 7
|
||||
# - 99.99
|
||||
|
||||
galaxy_tags: []
|
||||
# List tags for your role here, one per line. A tag is a keyword that describes
|
||||
# and categorizes the role. Users find roles by searching for tags. Be sure to
|
||||
# remove the '[]' above, if you add tags to this list.
|
||||
#
|
||||
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
||||
# Maximum 20 tags per role.
|
||||
|
||||
dependencies: []
|
||||
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
||||
# if you add dependencies to this list.
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
---
|
||||
# tasks file for artifactory-nginx
|
||||
- name: configure the artifactory nginx conf
|
||||
template:
|
||||
src: artifactory.conf.j2
|
||||
dest: /etc/nginx/conf.d/artifactory.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0755'
|
||||
become: true
|
||||
|
||||
- name: ensure nginx dir exists
|
||||
file:
|
||||
path: "/var/opt/jfrog/nginx/ssl"
|
||||
state: directory
|
||||
become: true
|
||||
|
||||
- name: configure certificate
|
||||
template:
|
||||
src: certificate.pem.j2
|
||||
dest: "/var/opt/jfrog/nginx/ssl/cert.pem"
|
||||
become: true
|
||||
|
||||
- name: ensure pki exists
|
||||
file:
|
||||
path: "/etc/pki/tls"
|
||||
state: directory
|
||||
become: true
|
||||
|
||||
- name: configure key
|
||||
template:
|
||||
src: certificate.key.j2
|
||||
dest: "/etc/pki/tls/cert.key"
|
||||
become: true
|
||||
|
||||
- name: restart nginx
|
||||
service:
|
||||
name: nginx
|
||||
state: restarted
|
||||
enabled: yes
|
||||
become: true
|
||||
@@ -9,22 +9,21 @@
|
||||
upstream artifactory-direct {
|
||||
server 127.0.0.1:8081;
|
||||
}
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
|
||||
ssl_protocols TLSv1.1 TLSv1.2;
|
||||
ssl_certificate /var/opt/jfrog/nginx/ssl/cert.pem;
|
||||
ssl_certificate_key /etc/pki/tls/cert.key;
|
||||
ssl_session_cache shared:SSL:1m;
|
||||
ssl_prefer_server_ciphers on;
|
||||
## server configuration
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen 80 ;
|
||||
listen 443 ssl http2;
|
||||
server_name {{ server_name }};
|
||||
if ($http_x_forwarded_proto = '') {
|
||||
set $http_x_forwarded_proto $scheme;
|
||||
}
|
||||
## Application specific logs
|
||||
## access_log /var/log/nginx/artifactory-access.log timing;
|
||||
## error_log /var/log/nginx/artifactory-error.log;
|
||||
access_log /var/log/nginx/artifactory-access.log;
|
||||
error_log /var/log/nginx/artifactory-error.log;
|
||||
rewrite ^/$ /ui/ redirect;
|
||||
rewrite ^/ui$ /ui/ redirect;
|
||||
chunked_transfer_encoding on;
|
||||
@@ -33,7 +32,7 @@
|
||||
proxy_read_timeout 2400s;
|
||||
proxy_pass_header Server;
|
||||
proxy_cookie_path ~*^/.* /;
|
||||
proxy_pass http://artifactory;
|
||||
proxy_pass "http://artifactory";
|
||||
proxy_next_upstream error timeout non_idempotent;
|
||||
proxy_next_upstream_tries 1;
|
||||
proxy_set_header X-JFrog-Override-Base-Url $http_x_forwarded_proto://$host:$server_port;
|
||||
@@ -0,0 +1,2 @@
|
||||
localhost
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
remote_user: root
|
||||
roles:
|
||||
- artifactory-nginx
|
||||
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# vars file for artifactory-nginx
|
||||
@@ -1,38 +0,0 @@
|
||||
Role Name
|
||||
=========
|
||||
|
||||
A brief description of the role goes here.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
||||
|
||||
- hosts: servers
|
||||
roles:
|
||||
- { role: username.rolename, x: 42 }
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
BSD
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
|
||||
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
|
||||
@@ -1,2 +1,32 @@
|
||||
---
|
||||
# tasks file for artifactory-nginx
|
||||
# tasks file for artifactory-nginx
|
||||
- name: install nginx
|
||||
package:
|
||||
name: nginx
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: configure main nginx conf file.
|
||||
copy:
|
||||
src: nginx.conf
|
||||
dest: /etc/nginx/nginx.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0755'
|
||||
become: true
|
||||
|
||||
- name: configure the artifactory nginx conf
|
||||
template:
|
||||
src: artifactory.conf.j2
|
||||
dest: /etc/nginx/conf.d/artifactory.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0755'
|
||||
become: true
|
||||
|
||||
- name: restart nginx
|
||||
service:
|
||||
name: nginx
|
||||
state: restarted
|
||||
enabled: yes
|
||||
become: true
|
||||
@@ -0,0 +1,43 @@
|
||||
###########################################################
|
||||
## this configuration was generated by JFrog Artifactory ##
|
||||
###########################################################
|
||||
|
||||
## add HA entries when ha is configure
|
||||
upstream artifactory {
|
||||
server 127.0.0.1:8082;
|
||||
}
|
||||
upstream artifactory-direct {
|
||||
server 127.0.0.1:8081;
|
||||
}
|
||||
## server configuration
|
||||
server {
|
||||
listen 80 ;
|
||||
server_name {{ server_name }};
|
||||
if ($http_x_forwarded_proto = '') {
|
||||
set $http_x_forwarded_proto $scheme;
|
||||
}
|
||||
## Application specific logs
|
||||
access_log /var/log/nginx/artifactory-access.log;
|
||||
error_log /var/log/nginx/artifactory-error.log;
|
||||
rewrite ^/$ /ui/ redirect;
|
||||
rewrite ^/ui$ /ui/ redirect;
|
||||
chunked_transfer_encoding on;
|
||||
client_max_body_size 0;
|
||||
location / {
|
||||
proxy_read_timeout 2400s;
|
||||
proxy_pass_header Server;
|
||||
proxy_cookie_path ~*^/.* /;
|
||||
proxy_pass "http://artifactory";
|
||||
proxy_next_upstream error timeout non_idempotent;
|
||||
proxy_next_upstream_tries 1;
|
||||
proxy_set_header X-JFrog-Override-Base-Url $http_x_forwarded_proto://$host:$server_port;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
location ~ ^/artifactory/ {
|
||||
proxy_pass http://artifactory-direct;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,60 +4,9 @@
|
||||
include_role:
|
||||
name: artifactory-java
|
||||
|
||||
#- name: install nginx
|
||||
# package:
|
||||
# name: nginx
|
||||
# state: present
|
||||
# become: true
|
||||
#
|
||||
#- name: configure main nginx conf file.
|
||||
# copy:
|
||||
# src: nginx.conf
|
||||
# dest: /etc/nginx/nginx.conf
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: '0755'
|
||||
# become: true
|
||||
#
|
||||
#- name: configure the artifactory nginx conf
|
||||
# template:
|
||||
# src: artifactory.conf.j2
|
||||
# dest: /etc/nginx/conf.d/artifactory.conf
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: '0755'
|
||||
# become: true
|
||||
#
|
||||
#- name: ensure nginx dir exists
|
||||
# file:
|
||||
# path: "/var/opt/jfrog/nginx/ssl"
|
||||
# state: directory
|
||||
# become: true
|
||||
#
|
||||
#- name: configure certificate
|
||||
# template:
|
||||
# src: certificate.pem.j2
|
||||
# dest: "/var/opt/jfrog/nginx/ssl/cert.pem"
|
||||
# become: true
|
||||
#
|
||||
#- name: ensure pki exists
|
||||
# file:
|
||||
# path: "/etc/pki/tls"
|
||||
# state: directory
|
||||
# become: true
|
||||
#
|
||||
#- name: configure key
|
||||
# template:
|
||||
# src: certificate.key.j2
|
||||
# dest: "/etc/pki/tls/cert.key"
|
||||
# become: true
|
||||
#
|
||||
#- name: restart nginx
|
||||
# service:
|
||||
# name: nginx
|
||||
# state: started
|
||||
# enabled: yes
|
||||
# become: true
|
||||
- name: install nginx
|
||||
include_role:
|
||||
name: artifactory-nginx
|
||||
|
||||
- name: create group for artifactory
|
||||
group:
|
||||
|
||||
@@ -7,4 +7,5 @@
|
||||
- hosts: primary:secondary
|
||||
gather_facts: true
|
||||
roles:
|
||||
- jfrog/rt7ansible/roles/artifactory
|
||||
- jfrog/rt7ansible/roles/artifactory
|
||||
- jfrog/rt7ansible/roles/artifactory-nginx-ssl
|
||||
Reference in New Issue
Block a user