[Ansible] JFrog Platform 7.24.3 (#153)

This commit is contained in:
Ram Mohan Rao Chukka
2021-08-17 09:43:00 +05:30
committed by GitHub
parent 16ce388773
commit 55a3842fac
58 changed files with 493 additions and 353 deletions

View File

@@ -1,4 +1,3 @@
---
# defaults file for distribution
# The version of distribution to install
@@ -7,9 +6,9 @@ distribution_version: 2.9.0
# whether to enable HA
distribution_ha_enabled: false
distribution_ha_node_type : master
distribution_ha_node_type: master
# The location where distribution should install.
# The location where distribution should install
jfrog_home_directory: /opt/jfrog
# The remote distribution download file
@@ -37,8 +36,6 @@ distribution_gid: 1040
distribution_daemon: distribution
flow_type: archive
# Redis details
distribution_redis_url: "redis://localhost:6379"
distribution_redis_password: password

View File

@@ -0,0 +1,13 @@
- name: Install prerequisite packages
become: yes
apt:
name: ["expect", "locales"]
state: present
update_cache: yes
cache_valid_time: 3600
- name: Ensure UTF-8 locale exists
become: yes
locale_gen:
name: en_US.UTF-8
state: present

View File

@@ -0,0 +1,5 @@
- name: Install prerequisite packages
become: yes
yum:
name: expect
state: present

View File

@@ -1,33 +1,18 @@
---
- debug:
msg: "Performing installation of Distribution version - {{ distribution_version }}"
- name: Install expect dependency
yum:
name: expect
state: present
become: yes
when: ansible_os_family == 'RedHat'
- name: Install expect dependency
apt:
name: expect
state: present
update_cache: yes
become: yes
when: ansible_os_family == 'Debian'
- name: Install prerequisite packages
include_tasks: "{{ ansible_os_family }}.yml"
- name: Ensure group distribution exist
become: yes
group:
name: "{{ distribution_group }}"
gid: "{{ distribution_gid }}"
state: present
- name: Ensure user distribution exist
become: yes
user:
uid: "{{ distribution_uid }}"
name: "{{ distribution_user }}"
group: "{{ distribution_group }}"
create_home: yes
@@ -136,10 +121,10 @@
template:
src: "{{ distribution_system_yaml_template }}"
dest: "{{ distribution_home }}/var/etc/system.yaml"
when:
- distribution_systemyaml is defined
when:
- distribution_systemyaml is defined
- distribution_systemyaml|length > 0
- distribution_systemyaml_override or (not systemyaml.stat.exists)
- distribution_systemyaml_override or (not systemyaml.stat.exists)
notify: restart distribution
- name: Configure installer info
@@ -160,8 +145,7 @@
- name: Install Distribution as a service
become: yes
shell: |
{{ distribution_archive_service_cmd }}
shell: "{{ distribution_archive_service_cmd }}"
args:
chdir: "{{ distribution_install_script_path }}"
creates: "{{ distribution_service_file }}"
@@ -179,10 +163,13 @@
- name: Restart distribution
meta: flush_handlers
- name : Wait for distribution to be fully deployed
uri: url=http://127.0.0.1:8082/router/api/v1/system/health timeout=130
- name: Make sure distribution is up and running
uri:
url: http://127.0.0.1:8082/router/api/v1/system/health
timeout: 130
status_code: 200
register: result
until: result.status == 200
until: result is succeeded
retries: 25
delay: 5
when: not ansible_check_mode

View File

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

View File

@@ -1,4 +1,3 @@
---
- debug:
msg: "Performing upgrade of Distribution version to {{ distribution_version }} "
@@ -60,8 +59,8 @@
template:
src: "{{ distribution_system_yaml_template }}"
dest: "{{ distribution_home }}/var/etc/system.yaml"
when:
- distribution_systemyaml is defined
when:
- distribution_systemyaml is defined
- distribution_systemyaml|length > 0
- distribution_systemyaml_override or (not systemyaml.stat.exists)
notify: restart distribution
@@ -124,10 +123,13 @@
- name: Restart distribution
meta: flush_handlers
- name : Wait for distribution to be fully deployed
uri: url=http://127.0.0.1:8082/router/api/v1/system/health timeout=130
- name: Make sure distribution is up and running
uri:
url: http://127.0.0.1:8082/router/api/v1/system/health
timeout: 130
status_code: 200
register: result
until: result.status == 200
until: result is succeeded
retries: 25
delay: 5
when: not ansible_check_mode

View File

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

View File

@@ -1,40 +1,40 @@
distribution_installer_scenario:
main:
- {
- {
"expecting": "(data|installation) directory \\(",
"sending": "{{ distribution_home }}"
"sending": "{{ distribution_home }}"
}
- {
- {
"expecting": "join key.*:",
"sending": "{{ join_key }}"
"sending": "{{ join_key }}"
}
- {
- {
"expecting": "jfrog url:",
"sending": "{{ jfrog_url }}"
"sending": "{{ jfrog_url }}"
}
- {
- {
"expecting": "do you want to continue",
"sending": "y"
"sending": "y"
}
- {
- {
"expecting": "please specify the ip address of this machine",
"sending": "{% if distribution_ha_node_type is defined and distribution_ha_node_type == 'master' %}{{ ansible_host }}{% else %}{{ ansible_host }}{% endif %}"
}
- {
- {
"expecting": "are you adding an additional node",
"sending": "{% if distribution_ha_node_type is defined and distribution_ha_node_type == 'master' %}n{% else %}y{% endif %}"
}
- {
- {
"expecting": "do you want to install postgresql",
"sending": "n"
}
- {
- {
"expecting": "postgresql url.*example",
"sending": "{{ distribution_db_url }}"
"sending": "{{ distribution_db_url }}"
}
- {
- {
"expecting": "(postgresql|database)?\\s?username.*",
"sending": "{{ distribution_db_user }}"
"sending": "{{ distribution_db_user }}"
}
- {
"expecting": "(confirm\\s?)?(postgresql|database)?\\s?password.*:",