mirror of
https://github.com/ZwareBear/JFrog-Cloud-Installers.git
synced 2026-01-21 10:06:55 -06:00
Structured files into more logical form
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
---
|
||||
|
||||
- name: Update Java
|
||||
package:
|
||||
name: "{{ java_version }}"
|
||||
state: present
|
||||
|
||||
- name: Configure Java
|
||||
alternatives:
|
||||
name: java
|
||||
path: /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java
|
||||
|
||||
- name: Download Java requirements such as jbdc for mysql Driver and the RDS CA certificate
|
||||
get_url:
|
||||
url: "{{ item.url }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ item.owner }}"
|
||||
group: "{{ item.group }}"
|
||||
loop:
|
||||
- "{{ java_mysql_driver }}"
|
||||
- "{{ rds_cert }}"
|
||||
|
||||
- name: Import the RDS certificate into Java KeyStore
|
||||
java_cert:
|
||||
cert_path: "{{ rds_cert.dest }}"
|
||||
cert_alias: "{{ rds_cert.cert_alias }}"
|
||||
keystore_pass: "{{ artifactory_keystore_default }}" # Default JKS as you get from the Internet.
|
||||
keystore_path: "{{ artifactory_keystore_path }}"
|
||||
when: import_rds == true
|
||||
register: r_java_cert
|
||||
failed_when: "'Not found' in r_java_cert"
|
||||
|
||||
- name: Change Keystore password
|
||||
command: keytool -storepasswd -keystore {{ artifactory_keystore_path }} -storepass {{ artifactory_keystore_default }} -new {{ artifactory_keystore_pass }}
|
||||
no_log: true
|
||||
when: r_java_cert.rc == 0
|
||||
|
||||
- name: Configure Java
|
||||
lineinfile:
|
||||
path: /var/opt/jfrog/artifactory/etc/default
|
||||
line: export JAVA_OPTIONS="$JAVA_OPTIONS {{ extra_java_opts }}"
|
||||
create: yes
|
||||
|
||||
- name: Configure Ping
|
||||
lineinfile:
|
||||
path: /var/opt/jfrog/artifactory/etc/artifactory.system.properties
|
||||
line: artifactory.ping.allowUnauthenticated=true
|
||||
create: yes
|
||||
|
||||
- name: All File/Folders required for Artifactory configuration
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: "{{ item.state }}"
|
||||
owner: artifactory
|
||||
group: artifactory
|
||||
loop:
|
||||
- path: /var/opt/jfrog/artifactory/etc/security/
|
||||
state: directory
|
||||
- path: /var/opt/jfrog/artifactory/etc/plugins
|
||||
state: directory
|
||||
- path: /var/opt/jfrog/artifactory/etc/info
|
||||
state: directory
|
||||
|
||||
- name: Template of the properties and certs as requires for Artifactory
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: artifactory
|
||||
group: artifactory
|
||||
mode: '0664'
|
||||
loop:
|
||||
- src: db.properties.j2
|
||||
dest: /var/opt/jfrog/artifactory/etc/db.properties
|
||||
- src: binarystore.xml.j2
|
||||
dest: /var/opt/jfrog/artifactory/etc/binarystore.xml
|
||||
- src: ha-node.properties.j2
|
||||
dest: /var/opt/jfrog/artifactory/etc/ha-node.properties
|
||||
- src: master.key.j2
|
||||
dest: /var/opt/jfrog/artifactory/etc/security/master.key
|
||||
- src: certificate.pem.j2
|
||||
dest: "{{ ssl_dir }}/cert.pem"
|
||||
- src: certificate.key.j2
|
||||
dest: "{{ key_dir }}/cert.key"
|
||||
- src: artifactory.cluster.license.j2
|
||||
dest: /var/opt/jfrog/artifactory/etc/artifactory.cluster.license
|
||||
|
||||
- name: Copy all static files required for Artifactory
|
||||
copy:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: artifactory
|
||||
group: artifactory
|
||||
mode: "{{ item.mode }}"
|
||||
loop:
|
||||
- src: inactiveServerCleaner.groovy
|
||||
dest: /var/opt/jfrog/artifactory/etc/plugins/inactiveServerCleaner.groovy
|
||||
mode: '0660'
|
||||
- src: installer-info.json
|
||||
dest: /var/opt/jfrog/artifactory/etc/info/installer-info.json
|
||||
mode: '0660'
|
||||
@@ -0,0 +1,83 @@
|
||||
---
|
||||
|
||||
- name: All File/Folders required for Artifactory configuration
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: "{{ item.state }}"
|
||||
owner: root
|
||||
group: root
|
||||
loop:
|
||||
- path: /data/jfrog/artifactory/etc/ # Needs mapped to /artifactory_extra_conf
|
||||
state: directory
|
||||
- path: /data/jfrog/artifactory/tmp/plugins # Needs mapped to /tmp/plugins
|
||||
state: directory
|
||||
- path: /data/jfrog/artifactory/java_certs # Needs mapped to /artifactory_extra_certs
|
||||
state: directory
|
||||
- path: /data/jfrog/artifactory/plugins # Needs mapped to /opt/jfrog/artifactory/tomcat/lib/
|
||||
state: directory
|
||||
|
||||
|
||||
- name: Download Java requirements such as jbdc for mysql Driver and the RDS CA certificate
|
||||
get_url:
|
||||
url: "{{ item.url }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ item.owner }}"
|
||||
group: "{{ item.group }}"
|
||||
loop:
|
||||
- "{{ java_mysql_driver }}"
|
||||
- "{{ rds_cert }}"
|
||||
|
||||
- name: Template of the properties as requires for Artifactory
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0664'
|
||||
loop:
|
||||
- src: binarystore.xml.j2
|
||||
dest: /data/jfrog/artifactory/etc/binarystore.xml
|
||||
- src: artifactory.cluster.license.j2
|
||||
dest: /data/jfrog/artifactory/etc/artifactory.cluster.license
|
||||
|
||||
- name: All File/Folders required for Artifactory configuration
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: "{{ item.state }}"
|
||||
owner: "{{ nginx_user_id }}"
|
||||
group: "{{ nginx_group_id }}"
|
||||
loop:
|
||||
- path: /data/jfrog/nginx/ssl # Mapped to /var/opt/jfrog/nginx
|
||||
state: directory
|
||||
- path: /data/jfrog/nginx/conf.d # Mapped to /var/opt/jfrog/nginx
|
||||
state: directory
|
||||
|
||||
- name: Template nginx files as requires for Artifactory
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ nginx_user_id }}"
|
||||
group: "{{ nginx_group_id }}"
|
||||
mode: '0664'
|
||||
loop:
|
||||
- src: certificate.pem.j2
|
||||
dest: "{{ ssl_dir }}cert.pem"
|
||||
- src: certificate.key.j2
|
||||
dest: "{{ key_dir }}cert.key"
|
||||
- src: artifactory.conf.j2
|
||||
dest: /data/jfrog/nginx/conf.d/artifactory.conf
|
||||
|
||||
- name: Copy all static files required for Artifactory
|
||||
copy:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "{{ item.mode }}"
|
||||
loop:
|
||||
- src: inactiveServerCleaner.groovy
|
||||
dest: /data/jfrog/artifactory/tmp/plugins/inactiveServerCleaner.groovy
|
||||
mode: '0777'
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
|
||||
- name: Add Artifactory Repo
|
||||
yum_repository:
|
||||
name: bintray--jfrog-artifactory-pro-rpms
|
||||
description: bintray--jfrog-artifactory-pro-rpms
|
||||
baseurl: https://jfrog.bintray.com/artifactory-pro-rpms
|
||||
gpgcheck: no
|
||||
enabled: yes
|
||||
|
||||
- name: Install Artifactory from RPM
|
||||
yum:
|
||||
name: "jfrog-artifactory-pro-{{ artifactory_version }}"
|
||||
state: installed
|
||||
releasever: "{{ artifactory_version }}"
|
||||
enablerepo: bintray--jfrog-artifactory-pro-rpms
|
||||
disablerepo: "epel,amzn-main,amzn-updates"
|
||||
notify: Enable Artifactory
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
# tasks file for quickstart-jfrog-artifactory/scripts/roles/artifactory
|
||||
|
||||
|
||||
- name: Configure an Instance to host Artifactory
|
||||
include: "{{ item.name }}"
|
||||
when: ecs_deployment == false
|
||||
loop:
|
||||
- name: install.yml
|
||||
- name: configure.yml
|
||||
- name: nginx-setup.yml
|
||||
|
||||
- name: Configure ECS EC2 Node to host an Artifactory Container
|
||||
include: configure_ecs.yml
|
||||
when: ecs_deployment == true
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
---
|
||||
|
||||
# Tasks for configuring NGINX for Artifactory
|
||||
- name: Ensure latest nginx is installed
|
||||
package:
|
||||
name: nginx
|
||||
state: latest
|
||||
|
||||
- name: Configure main NGINX conf file.
|
||||
copy:
|
||||
src: nginx.conf
|
||||
dest: /etc/nginx/nginx.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0755'
|
||||
notify: restart 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'
|
||||
notify: restart nginx
|
||||
Reference in New Issue
Block a user