[jfrog-platform] 7.21.7 release (#141)

This commit is contained in:
Ram Mohan Rao Chukka
2021-07-16 19:25:12 +05:30
committed by GitHub
parent bbb0912ac8
commit fd92133d95
33 changed files with 230 additions and 81 deletions

View File

@@ -1,7 +1,12 @@
# JFrog Platform Ansible Collection Changelog
All changes to this collection will be documented in this file.
## [7.19.8] - June 10, 2021
## [7.21.7] - July 16, 2021
* Added variable to enable/disable each product in `groups_vars/all/vars.yml`
* Added variable download Timeout in seconds for URL request
* Updated artifactory postgresql driver to `42.2.23`
## [7.19.8] - June 9, 2021
* Fix Missioncontrol ES start issue
## [7.19.4] - May 31, 2021

View File

@@ -9,7 +9,7 @@ namespace: "jfrog"
name: "platform"
# The version of the collection. Must be compatible with semantic versioning
version: "7.19.8"
version: "7.21.7"
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: "README.md"

View File

@@ -10,6 +10,12 @@ jfrog_url: >-
"http://{{ hostvars[host]['ansible_host'] }}:8082"
{%- endfor -%}
## Products enabled
artifactory_enabled: true
xray_enabled: true
distribution_enabled: true
mc_enabled: true
# Artifactory DB details
artifactory_db_type: postgresql
artifactory_db_driver: org.postgresql.Driver

View File

@@ -0,0 +1 @@
requires_ansible: ">=2.9"

View File

@@ -2,7 +2,7 @@
# defaults file for artifactory
# The version of artifactory to install
artifactory_version: 7.19.8
artifactory_version: 7.21.7
# Set this to true when SSL is enabled (to use artifactory_nginx_ssl role), default to false (implies artifactory uses artifactory_nginx role )
artifactory_nginx_ssl_enabled: false
@@ -36,11 +36,15 @@ artifactory_flavour: pro
artifactory_extra_java_opts: -server -Xms512m -Xmx2g -Xss256k -XX:+UseG1GC
artifactory_system_yaml_template: system.yaml.j2
artifactory_tar: https://releases.jfrog.io/artifactory/artifactory-pro/org/artifactory/pro/jfrog-artifactory-pro/{{ artifactory_version }}/jfrog-artifactory-pro-{{ artifactory_version }}-linux.tar.gz
artifactory_tar_file_name: jfrog-artifactory-pro-{{ artifactory_version }}-linux.tar.gz
artifactory_home: "{{ jfrog_home_directory }}/artifactory"
artifactory_tar: https://releases.jfrog.io/artifactory/artifactory-pro/org/artifactory/pro/jfrog-artifactory-pro/{{ artifactory_version }}/{{ artifactory_tar_file_name }}
artifactory_untar_home: "{{ jfrog_home_directory }}/artifactory-{{ artifactory_flavour }}-{{ artifactory_version }}"
postgres_driver_version: 42.2.20
# Timeout in seconds for URL request
artifactory_download_timeout: 10
postgres_driver_version: 42.2.23
postgres_driver_download_url: https://repo1.maven.org/maven2/org/postgresql/postgresql/{{ postgres_driver_version }}/postgresql-{{ postgres_driver_version }}.jar
artifactory_user: artifactory

View File

@@ -34,19 +34,33 @@
shell: /bin/bash
state: present
- name: Check if artifactory tar already exists
become: yes
stat:
path: "{{ jfrog_home_directory }}/{{ artifactory_tar_file_name }}"
register: artifactory_tar_check
- name: Download artifactory
become: yes
unarchive:
src: "{{ artifactory_tar }}"
get_url:
url: "{{ artifactory_tar }}"
timeout: "{{ artifactory_download_timeout }}"
dest: "{{ jfrog_home_directory }}"
remote_src: yes
owner: "{{ artifactory_user }}"
group: "{{ artifactory_group }}"
creates: "{{ artifactory_untar_home }}"
when: artifactory_tar is defined
register: downloadartifactory
until: downloadartifactory is succeeded
retries: 3
when: not artifactory_tar_check.stat.exists
- name: Extract artifactory tar
become: yes
unarchive:
src: "{{ jfrog_home_directory }}/{{ artifactory_tar_file_name }}"
dest: "{{ jfrog_home_directory }}"
remote_src: true
owner: "{{ artifactory_user }}"
group: "{{ artifactory_group }}"
creates: "{{ artifactory_untar_home }}"
when: downloadartifactory is succeeded
- name: Check if app directory exists
become: yes

View File

@@ -1,6 +1,10 @@
- name: perform installation
include_tasks: "install.yml"
when: not artifactory_upgrade_only
when:
- artifactory_enabled
- not artifactory_upgrade_only
- name: perform upgrade
include_tasks: "upgrade.yml"
when: artifactory_upgrade_only
when:
- artifactory_enabled
- artifactory_upgrade_only

View File

@@ -2,19 +2,33 @@
- debug:
msg: "Performing upgrade of Artifactory version to : {{ artifactory_version }} "
- name: Check if artifactory tar already exists
become: yes
stat:
path: "{{ jfrog_home_directory }}/{{ artifactory_tar_file_name }}"
register: artifactory_tar_check
- name: Download artifactory for upgrade
become: yes
unarchive:
src: "{{ artifactory_tar }}"
get_url:
url: "{{ artifactory_tar }}"
timeout: "{{ artifactory_download_timeout }}"
dest: "{{ jfrog_home_directory }}"
remote_src: yes
owner: "{{ artifactory_user }}"
group: "{{ artifactory_group }}"
creates: "{{ artifactory_untar_home }}"
when: artifactory_tar is defined
register: downloadartifactory
until: downloadartifactory is succeeded
retries: 3
when: not artifactory_tar_check.stat.exists
- name: Extract artifactory tar
become: yes
unarchive:
src: "{{ jfrog_home_directory }}/{{ artifactory_tar_file_name }}"
dest: "{{ jfrog_home_directory }}"
remote_src: true
owner: "{{ artifactory_user }}"
group: "{{ artifactory_group }}"
creates: "{{ artifactory_untar_home }}"
when: downloadartifactory is succeeded
- name: Stop artifactory
become: yes

View File

@@ -1,6 +1,6 @@
---
# platform collection version
platform_collection_version: 7.19.8
platform_collection_version: 7.21.7
# indicates where this collection was downloaded from (galaxy, automation_hub, standalone)
ansible_marketplace: galaxy

View File

@@ -2,7 +2,7 @@
# defaults file for distribution
# The version of distribution to install
distribution_version: 2.7.1
distribution_version: 2.8.2
# whether to enable HA
distribution_ha_enabled: false
@@ -13,7 +13,11 @@ distribution_ha_node_type : master
jfrog_home_directory: /opt/jfrog
# The remote distribution download file
distribution_tar: https://releases.jfrog.io/artifactory/jfrog-distribution/distribution-linux/{{ distribution_version }}/jfrog-distribution-{{ distribution_version }}-linux.tar.gz
distribution_tar_file_name: jfrog-distribution-{{ distribution_version }}-linux.tar.gz
distribution_tar: https://releases.jfrog.io/artifactory/jfrog-distribution/distribution-linux/{{ distribution_version }}/{{ distribution_tar_file_name }}
# Timeout in seconds for URL request
distribution_download_timeout: 10
#The distribution install directory
distribution_untar_home: "{{ jfrog_home_directory }}/jfrog-distribution-{{ distribution_version }}-linux"

View File

@@ -35,18 +35,33 @@
shell: /bin/bash
state: present
- name: Check if distribution tar already exists
become: yes
stat:
path: "{{ jfrog_home_directory }}/{{ distribution_tar_file_name }}"
register: distribution_tar_check
- name: Download distribution
become: yes
unarchive:
src: "{{ distribution_tar }}"
get_url:
url: "{{ distribution_tar }}"
timeout: "{{ distribution_download_timeout }}"
dest: "{{ jfrog_home_directory }}"
remote_src: yes
owner: "{{ distribution_user }}"
group: "{{ distribution_group }}"
creates: "{{ distribution_untar_home }}"
register: downloaddistribution
until: downloaddistribution is succeeded
retries: 3
when: not distribution_tar_check.stat.exists
- name: Extract distribution tar
become: yes
unarchive:
src: "{{ jfrog_home_directory }}/{{ distribution_tar_file_name }}"
dest: "{{ jfrog_home_directory }}"
remote_src: true
owner: "{{ distribution_user }}"
group: "{{ distribution_group }}"
creates: "{{ distribution_untar_home }}"
when: downloaddistribution is succeeded
- name: Check if app directory exists
become: yes

View File

@@ -1,6 +1,10 @@
- name: perform installation
include_tasks: "install.yml"
when: not distribution_upgrade_only
when:
- distribution_enabled
- not distribution_upgrade_only
- name: perform upgrade
include_tasks: "upgrade.yml"
when: distribution_upgrade_only
when:
- distribution_enabled
- distribution_upgrade_only

View File

@@ -2,18 +2,33 @@
- debug:
msg: "Performing upgrade of Distribution version to {{ distribution_version }} "
- name: Check if distribution tar already exists
become: yes
stat:
path: "{{ jfrog_home_directory }}/{{ distribution_tar_file_name }}"
register: distribution_tar_check
- name: Download distribution for upgrade
become: yes
unarchive:
src: "{{ distribution_tar }}"
get_url:
url: "{{ distribution_tar }}"
timeout: "{{ distribution_download_timeout }}"
dest: "{{ jfrog_home_directory }}"
remote_src: yes
owner: "{{ distribution_user }}"
group: "{{ distribution_group }}"
creates: "{{ distribution_untar_home }}"
register: downloaddistribution
until: downloaddistribution is succeeded
retries: 3
when: not distribution_tar_check.stat.exists
- name: Extract distribution tar
become: yes
unarchive:
src: "{{ jfrog_home_directory }}/{{ distribution_tar_file_name }}"
dest: "{{ jfrog_home_directory }}"
remote_src: true
owner: "{{ distribution_user }}"
group: "{{ distribution_group }}"
creates: "{{ distribution_untar_home }}"
when: downloaddistribution is succeeded
- name: Stop distribution
become: yes

View File

@@ -1,6 +1,6 @@
---
# platform collection version
platform_collection_version: 7.19.8
platform_collection_version: 7.21.7
# indicates were this collection was downlaoded from (galaxy, automation_hub, standalone)
ansible_marketplace: galaxy

View File

@@ -2,7 +2,7 @@
# defaults file for mc
# The version of missioncontrol to install
missioncontrol_version: 4.7.5
missioncontrol_version: 4.7.8
# whether to enable HA
mc_ha_enabled: false
@@ -13,7 +13,11 @@ mc_ha_node_type : master
jfrog_home_directory: /opt/jfrog
# The remote mc download file
mc_tar: https://releases.jfrog.io/artifactory/jfrog-mc/linux/{{ missioncontrol_version }}/jfrog-mc-{{ missioncontrol_version }}-linux.tar.gz
mc_tar_file_name: jfrog-mc-{{ missioncontrol_version }}-linux.tar.gz
mc_tar: https://releases.jfrog.io/artifactory/jfrog-mc/linux/{{ missioncontrol_version }}/{{ mc_tar_file_name }}
# Timeout in seconds for URL request
mc_download_timeout: 10
#The mc install directory
mc_untar_home: "{{ jfrog_home_directory }}/jfrog-mc-{{ missioncontrol_version }}-linux"
@@ -75,6 +79,7 @@ mc_systemyaml: |-
password: {{ mc_es_password }}
url: {{ mc_es_url }}
username: {{ mc_es_user }}
external: true
security:
joinKey: {{ join_key }}
mc:

View File

@@ -58,7 +58,7 @@
become: yes
find:
paths: "{{ mc_home }}/app/third-party/elasticsearch"
patterns: "^elasticsearch-oss-.+\\.tar.gz$"
patterns: "^elasticsearch-.+\\.tar.gz$"
use_regex: yes
file_type: file
register: check_elasticsearch_package_result
@@ -157,7 +157,7 @@
become: yes
shell: "su -c '{{ mc_es_script_path }}/elasticsearch -d' elasticsearch"
environment:
JAVA_HOME: "{{ mc_es_java_home }}"
ES_JAVA_HOME: "{{ mc_es_java_home }}"
ES_PATH_CONF: "{{ mc_es_conf_base }}/"
register: start_elasticsearch_result
when: unarchive_result.extract_results.rc | default(128) == 0

View File

@@ -28,7 +28,7 @@
{{ mc_es_script_path }}/elasticsearch-plugin install \
-b file://{{ check_searchguard_bundle_result.files[0].path }}
environment:
JAVA_HOME: "{{ mc_es_java_home }}"
ES_JAVA_HOME: "{{ mc_es_java_home }}"
ES_PATH_CONF: "{{ mc_es_conf_base }}/"
register: install_searchguard_result
when: check_searchguard_bundle_result.matched == 1

View File

@@ -53,7 +53,7 @@
become: yes
find:
paths: "{{ mc_home }}/app/third-party/elasticsearch"
patterns: "^elasticsearch-oss-.+\\.tar.gz$"
patterns: "^elasticsearch-.+\\.tar.gz$"
use_regex: yes
file_type: file
register: check_elasticsearch_package_result
@@ -104,7 +104,7 @@
become: yes
shell: "su -c '{{ mc_es_script_path }}/elasticsearch -d' elasticsearch"
environment:
JAVA_HOME: "{{ mc_es_java_home }}"
ES_JAVA_HOME: "{{ mc_es_java_home }}"
ES_PATH_CONF: "{{ mc_es_conf_base }}/"
when: unarchive_result.extract_results.rc | default(128) == 0
register: start_elastcsearch_upgraded

View File

@@ -37,7 +37,7 @@
{{ mc_es_script_path }}/elasticsearch-plugin install \
-b file://{{ check_searchguard_bundle_result.files[0].path }}
environment:
JAVA_HOME: "{{ mc_es_java_home }}"
ES_JAVA_HOME: "{{ mc_es_java_home }}"
ES_PATH_CONF: "{{ mc_es_conf_base }}/"
register: install_searchguard_result
when: check_searchguard_bundle_result.matched == 1

View File

@@ -2,18 +2,33 @@
- debug:
msg: "Performing Upgrade of missionControl version - {{ missioncontrol_version }}"
- name: Download mc for upgrade
unarchive:
src: "{{ mc_tar }}"
dest: "{{ jfrog_home_directory }}"
remote_src: yes
owner: "{{ mc_user }}"
group: "{{ mc_group }}"
creates: "{{ mc_untar_home }}"
- name: Check if mc tar exists
become: yes
stat:
path: "{{ jfrog_home_directory }}/{{ mc_tar_file_name }}"
register: mc_tar_check
- name: Download mc for upgrade
become: yes
get_url:
url: "{{ mc_tar }}"
timeout: "{{ mc_download_timeout }}"
dest: "{{ jfrog_home_directory }}"
register: downloadmc
until: downloadmc is succeeded
retries: 3
when: not mc_tar_check.stat.exists
- name: Extract mc tar
become: yes
unarchive:
src: "{{ jfrog_home_directory }}/{{ mc_tar_file_name }}"
dest: "{{ jfrog_home_directory }}"
remote_src: true
owner: "{{ mc_user }}"
group: "{{ mc_group }}"
creates: "{{ mc_untar_home }}"
when: downloadmc is succeeded
- name: Stop mc service
become: yes

View File

@@ -9,6 +9,7 @@ bootstrap.memory_lock: false
path.data: {{ mc_es_data_dir }}
path.logs: {{ mc_es_log_dir }}
xpack.security.enabled: false
searchguard.ssl.transport.pemcert_filepath: localhost.pem
searchguard.ssl.transport.pemkey_filepath: localhost.key
searchguard.ssl.transport.pemtrustedcas_filepath: root-ca.pem

View File

@@ -1,9 +1,10 @@
discovery.seed_providers: file
{% if mc_elasticsearch_package | regex_search(".*oss-7.*") %}
{% if mc_elasticsearch_package | regex_search(".*-7.*") %}
cluster.initial_master_nodes: {{ ansible_host }}
{% endif %}
xpack.security.enabled: false
path.data: {{ mc_es_home }}/data
path.logs: {{ mc_es_home }}/logs

View File

@@ -14,6 +14,7 @@ shared:
password: {{ mc_es_password }}
url: {{ mc_es_url }}
username: {{ mc_es_user }}
external: true
security:
joinKey: {{ join_key }}
router:

View File

@@ -1,6 +1,7 @@
#bootstrap.memory_lock: true
discovery.seed_providers: file
xpack.security.enabled: false
path.data: {{ mc_es_home }}/data
path.logs: {{ mc_es_home }}/logs

View File

@@ -15,6 +15,7 @@ shared:
password: {{ mc_es_password }}
url: {{ mc_es_url }}
username: {{ mc_es_user }}
external: true
security:
joinKey: {{ join_key }}
router:

View File

@@ -1,6 +1,6 @@
---
# platform collection version
platform_collection_version: 7.19.8
platform_collection_version: 7.21.7
# indicates were this collection was downlaoded from (galaxy, automation_hub, standalone)
ansible_marketplace: galaxy

View File

@@ -84,13 +84,16 @@
become_user: postgres
command: psql -d {{ mc_db_name }} -t -c "\dn"
register: mc_schemas_loaded
when: mc_enabled
- name: Create schemas for mission-control
become: yes
become_user: postgres
command: psql -d {{ mc_db_name }} -c 'CREATE SCHEMA {{ item }} authorization {{ mc_db_user }}'
loop: "{{ mc_schemas|default([]) }}"
when: "mc_schemas_loaded.stdout is defined and '{{ item }}' not in mc_schemas_loaded.stdout"
when:
- mc_enabled
- "mc_schemas_loaded.stdout is defined and '{{ item }}' not in mc_schemas_loaded.stdout"
- name: Grant all privileges to mc user on its schema
become: yes
@@ -102,6 +105,7 @@
roles: "{{ mc_db_user }}"
objs: "{{ item }}"
loop: "{{ mc_schemas|default([]) }}"
when: mc_enabled
- name: Grant privs on db
become: yes

View File

@@ -2,7 +2,7 @@
# defaults file for xray
# The version of xray to install
xray_version: 3.26.1
xray_version: 3.27.4
# whether to enable HA
xray_ha_enabled: false
@@ -13,7 +13,11 @@ xray_ha_node_type : master
jfrog_home_directory: /opt/jfrog
# The remote xray download file
xray_tar: https://releases.jfrog.io/artifactory/jfrog-xray/xray-linux/{{ xray_version }}/jfrog-xray-{{ xray_version }}-linux.tar.gz
xray_tar_file_name: jfrog-xray-{{ xray_version }}-linux.tar.gz
xray_tar: https://releases.jfrog.io/artifactory/jfrog-xray/xray-linux/{{ xray_version }}/{{ xray_tar_file_name }}
# Timeout in seconds for URL request
xray_download_timeout: 10
#The xray install directory
xray_untar_home: "{{ jfrog_home_directory }}/jfrog-xray-{{ xray_version }}-linux"

View File

@@ -38,18 +38,33 @@
shell: /bin/bash
state: present
- name: Check if xray tar exists
become: yes
stat:
path: "{{ jfrog_home_directory }}/{{ xray_tar_file_name }}"
register: xray_tar_check
- name: Download xray
become: yes
unarchive:
src: "{{ xray_tar }}"
get_url:
url: "{{ xray_tar }}"
timeout: "{{ xray_download_timeout }}"
dest: "{{ jfrog_home_directory }}"
remote_src: yes
owner: "{{ xray_user }}"
group: "{{ xray_group }}"
creates: "{{ xray_untar_home }}"
register: downloadxray
until: downloadxray is succeeded
retries: 3
when: not xray_tar_check.stat.exists
- name: Extract xray tar
become: yes
unarchive:
src: "{{ jfrog_home_directory }}/{{ xray_tar_file_name }}"
dest: "{{ jfrog_home_directory }}"
remote_src: true
owner: "{{ xray_user }}"
group: "{{ xray_group }}"
creates: "{{ xray_untar_home }}"
when: downloadxray is succeeded
- name: Check if app directory exists
become: yes

View File

@@ -1,6 +1,10 @@
- name: perform installation
include_tasks: "install.yml"
when: not xray_upgrade_only
when:
- xray_enabled
- not xray_upgrade_only
- name: perform upgrade
include_tasks: "upgrade.yml"
when: xray_upgrade_only
when:
- xray_enabled
- xray_upgrade_only

View File

@@ -2,18 +2,33 @@
- debug:
msg: "Performing upgrade of Xray version to {{ xray_version }}..."
- name: download xray for upgrade
- name: Check if xray tar exists
become: yes
unarchive:
src: "{{ xray_tar }}"
stat:
path: "{{ jfrog_home_directory }}/{{ xray_tar_file_name }}"
register: xray_tar_check
- name: Download xray for upgrade
become: yes
get_url:
url: "{{ xray_tar }}"
timeout: "{{ xray_download_timeout }}"
dest: "{{ jfrog_home_directory }}"
remote_src: yes
owner: "{{ xray_user }}"
group: "{{ xray_group }}"
creates: "{{ xray_untar_home }}"
register: downloadxray
until: downloadxray is succeeded
retries: 3
when: not xray_tar_check.stat.exists
- name: Extract xray tar
become: yes
unarchive:
src: "{{ jfrog_home_directory }}/{{ xray_tar_file_name }}"
dest: "{{ jfrog_home_directory }}"
remote_src: true
owner: "{{ xray_user }}"
group: "{{ xray_group }}"
creates: "{{ xray_untar_home }}"
when: downloadxray is succeeded
- name: stop xray
become: yes

View File

@@ -1,6 +1,6 @@
---
# platform collection version
platform_collection_version: 7.19.8
platform_collection_version: 7.21.7
# indicates were this collection was downlaoded from (galaxy, automation_hub, standalone)
ansible_marketplace: galaxy

View File

@@ -1,9 +1,5 @@
xray_installer_scenario:
main:
- {
"expecting": "have you disconnected artifactory xray pairings",
"sending": "y"
}
- {
"expecting": "(data|installation) directory \\(",
"sending": "{{ xray_home }}"