mirror of
https://github.com/ZwareBear/JFrog-Cloud-Installers.git
synced 2026-01-21 16:06:57 -06:00
Merge pull request #32 from jefferyfry/master
Updates for Centos and publishing to Ansible Galaxy.
This commit is contained in:
@@ -1,35 +1,94 @@
|
|||||||
# JFrog Ansible Collection
|
# JFrog Ansible Installers Collection
|
||||||
|
|
||||||
This Ansible directory consists of the following directories that support the JFrog Ansible collection.
|
This Ansible directory consists of the following directories that support the JFrog Ansible collection.
|
||||||
|
|
||||||
* [collection directory](collection) - This directory contains the Ansible collection package that has the Ansible roles for Artifactory and Xray. See the collection [README](collection/README.md) for details on the available roles and variables.
|
* [ansible_collections directory](ansible_collections) - This directory contains the Ansible collection package that has the Ansible roles for Artifactory and Xray. See the collection [README](ansible_collections/README.md) for details on the available roles and variables.
|
||||||
|
* [examples directory](examples) - This directory contains example playbooks for various architectures from single Artifactory (RT) deployments to high-availability setups.
|
||||||
* [infra directory](infra) - This directory contains example infrastructure templates that can be used for testing and as example deployments.
|
* [infra directory](infra) - This directory contains example infrastructure templates that can be used for testing and as example deployments.
|
||||||
* [project directory](project) - This directory contains example playbooks for various architectures from single Artifactory (RT) deployments to high-availability setups.
|
|
||||||
* [test directory](test) - This directory contains Gradle tests that can be used to verify a deployment. It also has Ansible playbooks for creating infrastructure, provisioning software and testing with Gradle.
|
* [test directory](test) - This directory contains Gradle tests that can be used to verify a deployment. It also has Ansible playbooks for creating infrastructure, provisioning software and testing with Gradle.
|
||||||
|
|
||||||
|
## Tested Artifactory and Xray Versions
|
||||||
|
The following versions of Artifactory and Xray have been validated with this collection. Other versions and combinations may also work.
|
||||||
|
|
||||||
|
| collection_version | artifactory_version | xray_version |
|
||||||
|
|--------------------|---------------------|--------------|
|
||||||
|
| 1.0.7 | 7.6.1 | 3.5.2 |
|
||||||
|
| 1.0.6 | 7.5.0 | 3.3.0 |
|
||||||
|
| 1.0.6 | 7.4.3 | 3.3.0 |
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
1. Install this collection or the roles in your Ansible path using your ansible.cfg file. The following is an example:
|
1. Install this collection from Ansible Galaxy. This collection is also available in RedHat Automation Hub.
|
||||||
```
|
|
||||||
# Installs collections into [current dir]/ansible_collections/namespace/collection_name
|
|
||||||
collections_paths = ~/.ansible/collections:/usr/share/ansible/collections:collection
|
|
||||||
|
|
||||||
# Installs roles into [current dir]/roles/namespace.rolename
|
|
||||||
roles_path = Ansible/collection/jfrog/ansible/roles
|
|
||||||
```
|
|
||||||
2. Ansible uses SSH to connect to hosts. Ensure that your SSH private key is on your client and the public keys are installed on your Ansible hosts. If you are using a bastion host, you can add the following Ansible variable to allow proxying through the bastion host.
|
|
||||||
```
|
```
|
||||||
ansible_ssh_common_args: '-o ProxyCommand="ssh -o StrictHostKeyChecking=no -A user@host -W %h:%p"'
|
ansible-galaxy collection install jfrog.installers
|
||||||
|
|
||||||
eg.
|
|
||||||
ansible_ssh_common_args: '-o ProxyCommand="ssh -o StrictHostKeyChecking=no -A ubuntu@{{ azureDeployment.deployment.outputs.lbIp.value }} -W %h:%p"'
|
|
||||||
```
|
```
|
||||||
3. Create your inventory file. Use one of the examples from the [project directory](project) to construct an inventory file (hosts.yml) with the host addresses and variables.
|
|
||||||
|
|
||||||
4. Create your playbook. Use one of the examples from the [project directory](project) to construct a playbook using the JFrog Ansible roles. These roles will be applied to your inventory and provision software.
|
Ensure you reference the collection in your playbook when using these roles.
|
||||||
|
|
||||||
|
```
|
||||||
|
---
|
||||||
|
- hosts: xray
|
||||||
|
collections:
|
||||||
|
- jfrog.installers
|
||||||
|
roles:
|
||||||
|
- xray
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Ansible uses SSH to connect to hosts. Ensure that your SSH private key is on your client and the public keys are installed on your Ansible hosts.
|
||||||
|
|
||||||
|
3. Create your inventory file. Use one of the examples from the [examples directory](examples) to construct an inventory file (hosts.yml) with the host addresses and variables.
|
||||||
|
|
||||||
|
4. Create your playbook. Use one of the examples from the [examples directory](examples) to construct a playbook using the JFrog Ansible roles. These roles will be applied to your inventory and provision software.
|
||||||
|
|
||||||
5. Then execute with the following command to provision the JFrog software with Ansible. Variables can also be passed in at the command-line.
|
5. Then execute with the following command to provision the JFrog software with Ansible. Variables can also be passed in at the command-line.
|
||||||
|
|
||||||
```
|
```
|
||||||
ansible-playbook -i hosts.yml playbook.yml --extra-vars "master_key=$(openssl rand -hex 16) join_key=$(openssl rand -hex 16)"
|
ansible-playbook -i hosts.yml playbook.yml --extra-vars "master_key=$(openssl rand -hex 16) join_key=$(openssl rand -hex 16)"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Autogenerating Master and Join Keys
|
||||||
|
You may want to auto-generate your master amd join keys and apply it to all the nodes.
|
||||||
|
|
||||||
|
```
|
||||||
|
ansible-playbook -i hosts.yml playbook.yml --extra-vars "master_key=$(openssl rand -hex 16) join_key=$(openssl rand -hex 16)"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Using [Ansible Vault](https://docs.ansible.com/ansible/latest/user_guide/vault.html) to Encrypt Vars
|
||||||
|
Some vars you may want to keep secret. You may put these vars into a separate file and encrypt them using [Ansible Vault](https://docs.ansible.com/ansible/latest/user_guide/vault.html).
|
||||||
|
|
||||||
|
```
|
||||||
|
ansible-vault encrypt secret-vars.yml --vault-password-file ~/.vault_pass.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
then in your playbook include the secret vars file.
|
||||||
|
|
||||||
|
```
|
||||||
|
- hosts: primary
|
||||||
|
|
||||||
|
vars_files:
|
||||||
|
- ./vars/secret-vars.yml
|
||||||
|
- ./vars/vars.yml
|
||||||
|
|
||||||
|
roles:
|
||||||
|
- artifactory
|
||||||
|
```
|
||||||
|
|
||||||
|
## Bastion Hosts
|
||||||
|
In many cases, you may want to run this Ansible collection through a Bastion host to provision JFrog servers. You can include the following Var for a host or group of hosts:
|
||||||
|
|
||||||
|
```
|
||||||
|
ansible_ssh_common_args: '-o ProxyCommand="ssh -o StrictHostKeyChecking=no -A user@host -W %h:%p"'
|
||||||
|
|
||||||
|
eg.
|
||||||
|
ansible_ssh_common_args: '-o ProxyCommand="ssh -o StrictHostKeyChecking=no -A ubuntu@{{ azureDeployment.deployment.outputs.lbIp.value }} -W %h:%p"'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Building the Collection Archive
|
||||||
|
1. Go to the [ansible_collections/jfrog/installers directory](ansible_collections/jfrog/installers).
|
||||||
|
2. Update the galaxy.yml meta file as needed. Update the version.
|
||||||
|
3. Build the archive.
|
||||||
|
```
|
||||||
|
ansible-galaxy collection build
|
||||||
|
```
|
||||||
|
|||||||
77
Ansible/ansible_collections/jfrog/installers/README.md
Normal file
77
Ansible/ansible_collections/jfrog/installers/README.md
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
# JFrog Ansible Installers Collection
|
||||||
|
|
||||||
|
This Ansible directory consists of the following directories that support the JFrog Ansible collection.
|
||||||
|
|
||||||
|
* [ansible_collections directory](ansible_collections) - This directory contains the Ansible collection package that has the Ansible roles for Artifactory and Xray. See the collection [README](ansible_collections/README.md) for details on the available roles and variables.
|
||||||
|
* [examples directory](examples) - This directory contains example playbooks for various architectures from single Artifactory (RT) deployments to high-availability setups.
|
||||||
|
* [infra directory](infra) - This directory contains example infrastructure templates that can be used for testing and as example deployments.
|
||||||
|
* [test directory](test) - This directory contains Gradle tests that can be used to verify a deployment. It also has Ansible playbooks for creating infrastructure, provisioning software and testing with Gradle.
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
1. Install this collection from Ansible Galaxy. This collection is also available in RedHat Automation Hub.
|
||||||
|
|
||||||
|
```
|
||||||
|
ansible-galaxy collection install jfrog.installers
|
||||||
|
```
|
||||||
|
|
||||||
|
Ensure you reference the collection in your playbook when using these roles.
|
||||||
|
|
||||||
|
```
|
||||||
|
---
|
||||||
|
- hosts: xray
|
||||||
|
collections:
|
||||||
|
- jfrog.installers
|
||||||
|
roles:
|
||||||
|
- xray
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Ansible uses SSH to connect to hosts. Ensure that your SSH private key is on your client and the public keys are installed on your Ansible hosts.
|
||||||
|
|
||||||
|
3. Create your inventory file. Use one of the examples from the [examples directory](examples) to construct an inventory file (hosts.yml) with the host addresses and variables.
|
||||||
|
|
||||||
|
4. Create your playbook. Use one of the examples from the [examples directory](examples) to construct a playbook using the JFrog Ansible roles. These roles will be applied to your inventory and provision software.
|
||||||
|
|
||||||
|
5. Then execute with the following command to provision the JFrog software with Ansible. Variables can also be passed in at the command-line.
|
||||||
|
|
||||||
|
```
|
||||||
|
ansible-playbook -i hosts.yml playbook.yml --extra-vars "master_key=$(openssl rand -hex 16) join_key=$(openssl rand -hex 16)"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Autogenerating Master and Join Keys
|
||||||
|
You may want to auto-generate your master amd join keys and apply it to all the nodes.
|
||||||
|
|
||||||
|
```
|
||||||
|
ansible-playbook -i hosts.yml playbook.yml --extra-vars "master_key=$(openssl rand -hex 16) join_key=$(openssl rand -hex 16)"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Using [Ansible Vault](https://docs.ansible.com/ansible/latest/user_guide/vault.html) to Encrypt Vars
|
||||||
|
Some vars you may want to keep secret. You may put these vars into a separate file and encrypt them using [Ansible Vault](https://docs.ansible.com/ansible/latest/user_guide/vault.html).
|
||||||
|
|
||||||
|
```
|
||||||
|
ansible-vault encrypt secret-vars.yml --vault-password-file ~/.vault_pass.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
then in your playbook include the secret vars file.
|
||||||
|
|
||||||
|
```
|
||||||
|
- hosts: primary
|
||||||
|
|
||||||
|
vars_files:
|
||||||
|
- ./vars/secret-vars.yml
|
||||||
|
- ./vars/vars.yml
|
||||||
|
|
||||||
|
roles:
|
||||||
|
- artifactory
|
||||||
|
```
|
||||||
|
|
||||||
|
## Bastion Hosts
|
||||||
|
In many cases, you may want to run this Ansible collection through a Bastion host to provision JFrog servers. You can include the following Var for a host or group of hosts:
|
||||||
|
|
||||||
|
```
|
||||||
|
ansible_ssh_common_args: '-o ProxyCommand="ssh -o StrictHostKeyChecking=no -A user@host -W %h:%p"'
|
||||||
|
|
||||||
|
eg.
|
||||||
|
ansible_ssh_common_args: '-o ProxyCommand="ssh -o StrictHostKeyChecking=no -A ubuntu@{{ azureDeployment.deployment.outputs.lbIp.value }} -W %h:%p"'
|
||||||
|
```
|
||||||
@@ -3,40 +3,44 @@
|
|||||||
# The namespace of the collection. This can be a company/brand/organization or product namespace under which all
|
# The namespace of the collection. This can be a company/brand/organization or product namespace under which all
|
||||||
# content lives. May only contain alphanumeric lowercase characters and underscores. Namespaces cannot start with
|
# content lives. May only contain alphanumeric lowercase characters and underscores. Namespaces cannot start with
|
||||||
# underscores or numbers and cannot contain consecutive underscores
|
# underscores or numbers and cannot contain consecutive underscores
|
||||||
namespace: jfrog
|
namespace: "jfrog"
|
||||||
|
|
||||||
# The name of the collection. Has the same character restrictions as 'namespace'
|
# The name of the collection. Has the same character restrictions as 'namespace'
|
||||||
name: ansible
|
name: "installers"
|
||||||
|
|
||||||
# The version of the collection. Must be compatible with semantic versioning
|
# The version of the collection. Must be compatible with semantic versioning
|
||||||
version: 1.0.0
|
version: "1.0.7"
|
||||||
|
|
||||||
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
|
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
|
||||||
readme: README.md
|
readme: "README.md"
|
||||||
|
|
||||||
# A list of the collection's content authors. Can be just the name or in the format 'Full Name <email> (url)
|
# A list of the collection's content authors. Can be just the name or in the format 'Full Name <email> (url)
|
||||||
# @nicks:irc/im.site#channel'
|
# @nicks:irc/im.site#channel'
|
||||||
authors:
|
authors:
|
||||||
- your name <example@domain.com>
|
- "Jeff Fry <jefff@jfrog.com>"
|
||||||
|
|
||||||
|
|
||||||
### OPTIONAL but strongly recommended
|
### OPTIONAL but strongly recommended
|
||||||
|
|
||||||
# A short summary description of the collection
|
# A short summary description of the collection
|
||||||
description: your collection description
|
description: "This collection provides roles for installing Artifactory and Xray. Additionally, it provides optional SSL and Postgresql roles if these are needed for your deployment."
|
||||||
|
|
||||||
# Either a single license or a list of licenses for content inside of a collection. Ansible Galaxy currently only
|
# Either a single license or a list of licenses for content inside of a collection. Ansible Galaxy currently only
|
||||||
# accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file'
|
# accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file'
|
||||||
license:
|
license:
|
||||||
- GPL-2.0-or-later
|
- "Apache-2.0"
|
||||||
|
|
||||||
# The path to the license file for the collection. This path is relative to the root of the collection. This key is
|
# The path to the license file for the collection. This path is relative to the root of the collection. This key is
|
||||||
# mutually exclusive with 'license'
|
# mutually exclusive with 'license'
|
||||||
license_file: ''
|
license_file: ""
|
||||||
|
|
||||||
# A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character
|
# A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character
|
||||||
# requirements as 'namespace' and 'name'
|
# requirements as 'namespace' and 'name'
|
||||||
tags: []
|
tags:
|
||||||
|
- artifactory
|
||||||
|
- xray
|
||||||
|
- jfrog
|
||||||
|
- application
|
||||||
|
|
||||||
# Collections that this collection requires to be installed for it to be usable. The key of the dict is the
|
# Collections that this collection requires to be installed for it to be usable. The key of the dict is the
|
||||||
# collection label 'namespace.name'. The value is a version range
|
# collection label 'namespace.name'. The value is a version range
|
||||||
@@ -45,13 +49,13 @@ tags: []
|
|||||||
dependencies: {}
|
dependencies: {}
|
||||||
|
|
||||||
# The URL of the originating SCM repository
|
# The URL of the originating SCM repository
|
||||||
repository: http://example.com/repository
|
repository: "https://github.com/jfrog/JFrog-Cloud-Installers/"
|
||||||
|
|
||||||
# The URL to any online docs
|
# The URL to any online docs
|
||||||
documentation: http://docs.example.com
|
documentation: "https://github.com/jfrog/JFrog-Cloud-Installers/blob/master/Ansible/README.md"
|
||||||
|
|
||||||
# The URL to the homepage of the collection/project
|
# The URL to the homepage of the collection/project
|
||||||
homepage: http://example.com
|
homepage: "https://github.com/jfrog/JFrog-Cloud-Installers/"
|
||||||
|
|
||||||
# The URL to the collection issue tracker
|
# The URL to the collection issue tracker
|
||||||
issues: http://example.com/issue/tracker
|
issues: "https://github.com/jfrog/JFrog-Cloud-Installers/issues"
|
||||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
|||||||
|
# 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. This role uses secondary roles artifactory_nginx to install nginx.
|
||||||
|
|
||||||
|
## Role Variables
|
||||||
|
* _artifactory_version_: The version of Artifactory to install. eg. "7.4.1"
|
||||||
|
* _master_key_: This is the Artifactory [Master Key](https://www.jfrog.com/confluence/display/JFROG/Managing+Keys). See below to [autogenerate this key](#autogenerating-master-and-join-keys).
|
||||||
|
* _join_key_: This is the Artifactory [Join Key](https://www.jfrog.com/confluence/display/JFROG/Managing+Keys). See below to [autogenerate this key](#autogenerating-master-and-join-keys).
|
||||||
|
* _db_download_url_: This is the download URL for the JDBC driver for your database. eg. "https://jdbc.postgresql.org/download/postgresql-42.2.12.jar"
|
||||||
|
* _db_type_: This is the database type. eg. "postgresql"
|
||||||
|
* _db_driver_: This is the JDBC driver class. eg. "org.postgresql.Driver"
|
||||||
|
* _db_url_: This is the JDBC database url. eg. "jdbc:postgresql://10.0.0.120:5432/artifactory"
|
||||||
|
* _db_user_: The database user to configure. eg. "artifactory"
|
||||||
|
* _db_password_: The database password to configure. "Art1fact0ry"
|
||||||
|
* _server_name_: This is the server name. eg. "artifactory.54.175.51.178.xip.io"
|
||||||
|
* _system_file_: Your own [system YAML](https://www.jfrog.com/confluence/display/JFROG/System+YAML+Configuration+File) file can be specified and used. **If specified, this file will be used rather than constructing a file from the parameters above.**
|
||||||
|
* _binary_store_file_: Your own [binary store file](https://www.jfrog.com/confluence/display/JFROG/Configuring+the+Filestore) can be used. If specified, the default cluster-file-system will not be used.
|
||||||
|
|
||||||
|
### primary vars (vars used by the primary Artifactory server)
|
||||||
|
* _artifactory_is_primary_: For the primary node this must be set to **true**.
|
||||||
|
* _artifactory_license1 - 5_: These are the cluster licenses.
|
||||||
|
* _artifactory_license_file_: Your own license file can be used. **If specified, a license file constructed from the licenses above will not be used.**
|
||||||
|
|
||||||
|
### secondary vars (vars used by the secondary Artifactory server)
|
||||||
|
* _artifactory_is_primary_: For the secondary node(s) this must be set to **false**.
|
||||||
|
|
||||||
|
## Example Playbook
|
||||||
|
```
|
||||||
|
---
|
||||||
|
- hosts: primary
|
||||||
|
roles:
|
||||||
|
- artifactory
|
||||||
|
```
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
ansible_marketplace: standalone
|
ansible_marketplace: standalone
|
||||||
|
|
||||||
# The version of Artifactory to install
|
# The version of Artifactory to install
|
||||||
artifactory_version: 7.4.1
|
artifactory_version: 7.6.1
|
||||||
|
|
||||||
# licenses file - specify a licenses file or specify up to 5 licenses
|
# licenses file - specify a licenses file or specify up to 5 licenses
|
||||||
artifactory_license1:
|
artifactory_license1:
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
galaxy_info:
|
||||||
|
author: "Jeff Fry <jefff@jfrog.com>"
|
||||||
|
description: "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 to install nginx."
|
||||||
|
company: JFrog
|
||||||
|
|
||||||
|
issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues"
|
||||||
|
|
||||||
|
license: license (Apache-2.0)
|
||||||
|
|
||||||
|
min_ansible_version: 2.9
|
||||||
|
|
||||||
|
galaxy_tags:
|
||||||
|
- artifactory
|
||||||
|
- jfrog
|
||||||
|
|
||||||
|
dependencies: []
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
# tasks file for artifactory
|
# tasks file for artifactory
|
||||||
- name: install nginx
|
- name: install nginx
|
||||||
include_role:
|
include_role:
|
||||||
name: artifactory-nginx
|
name: artifactory_nginx
|
||||||
|
|
||||||
- name: create group for artifactory
|
- name: create group for artifactory
|
||||||
group:
|
group:
|
||||||
@@ -86,9 +86,9 @@
|
|||||||
dest: "{{ artifactory_home }}/var/etc/security/join.key"
|
dest: "{{ artifactory_home }}/var/etc/security/join.key"
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: ensure {{ artifactory_home }}/var/etc/info/ exists
|
- name: ensure {{ artifactory_home }}/var/etc/artifactory/info/ exists
|
||||||
file:
|
file:
|
||||||
path: "{{ artifactory_home }}/var/etc/info/"
|
path: "{{ artifactory_home }}/var/etc/artifactory/info/"
|
||||||
state: directory
|
state: directory
|
||||||
owner: "{{ artifactory_user }}"
|
owner: "{{ artifactory_user }}"
|
||||||
group: "{{ artifactory_group }}"
|
group: "{{ artifactory_group }}"
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
- name: configure installer info
|
- name: configure installer info
|
||||||
template:
|
template:
|
||||||
src: installer-info.json.j2
|
src: installer-info.json.j2
|
||||||
dest: "{{ artifactory_home }}/var/etc/info/installer-info.json"
|
dest: "{{ artifactory_home }}/var/etc/artifactory/info/installer-info.json"
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: use specified binary store
|
- name: use specified binary store
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# artifactory_nginx
|
||||||
|
This role installs NGINX for artifactory. This role is automatically called by the artifactory role and isn't intended to be used separately.
|
||||||
|
|
||||||
|
## Role Variables
|
||||||
|
* _server_name_: This is the server name. eg. "artifactory.54.175.51.178.xip.io"
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
# defaults file for artifactory_nginx
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
# handlers file for artifactory_nginx
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
galaxy_info:
|
||||||
|
author: "Jeff Fry <jefff@jfrog.com>"
|
||||||
|
description: "This role installs NGINX for artifactory. This role is automatically called by the artifactory role and isn't intended to be used separately."
|
||||||
|
company: JFrog
|
||||||
|
|
||||||
|
issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues"
|
||||||
|
|
||||||
|
license: license (Apache-2.0)
|
||||||
|
|
||||||
|
min_ansible_version: 2.9
|
||||||
|
|
||||||
|
galaxy_tags:
|
||||||
|
- artifactory
|
||||||
|
- jfrog
|
||||||
|
|
||||||
|
dependencies: []
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
- name: apt-get update
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
register: package_res
|
||||||
|
retries: 5
|
||||||
|
delay: 60
|
||||||
|
become: yes
|
||||||
|
until: package_res is success
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
- name: epel-release
|
||||||
|
yum:
|
||||||
|
name: epel-release
|
||||||
|
state: present
|
||||||
|
become: yes
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
---
|
---
|
||||||
|
- name: perform dependency installation
|
||||||
|
include_tasks: "{{ ansible_os_family }}.yml"
|
||||||
|
|
||||||
- name: install nginx
|
- name: install nginx
|
||||||
package:
|
package:
|
||||||
name: nginx
|
name: nginx
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
# vars file for artifactory_nginx
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# artifactory_nginx_ssl
|
||||||
|
The artifactory_nginx_ssl role installs and configures nginx for SSL.
|
||||||
|
|
||||||
|
## Role Variables
|
||||||
|
* _server_name_: This is the server name. eg. "artifactory.54.175.51.178.xip.io"
|
||||||
|
* _certificate_: This is the SSL cert.
|
||||||
|
* _certificate_key_: This is the SSL private key.
|
||||||
|
|
||||||
|
## Example Playbook
|
||||||
|
```
|
||||||
|
---
|
||||||
|
- hosts: primary
|
||||||
|
roles:
|
||||||
|
- artifactory
|
||||||
|
- artifactory_nginx_ssl
|
||||||
|
```
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
# defaults file for artifactory_nginx
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
# handlers file for artifactory_nginx
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
galaxy_info:
|
||||||
|
author: "Jeff Fry <jefff@jfrog.com>"
|
||||||
|
description: "The artifactory_nginx_ssl role installs and configures nginx for SSL."
|
||||||
|
company: JFrog
|
||||||
|
|
||||||
|
issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues"
|
||||||
|
|
||||||
|
license: license (Apache-2.0)
|
||||||
|
|
||||||
|
min_ansible_version: 2.9
|
||||||
|
|
||||||
|
galaxy_tags:
|
||||||
|
- artifactory
|
||||||
|
- jfrog
|
||||||
|
|
||||||
|
dependencies: []
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
# tasks file for artifactory-nginx
|
# tasks file for artifactory_nginx
|
||||||
- name: configure the artifactory nginx conf
|
- name: configure the artifactory nginx conf
|
||||||
template:
|
template:
|
||||||
src: artifactory.conf.j2
|
src: artifactory.conf.j2
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
# vars file for artifactory_nginx
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# postgres
|
||||||
|
The postgres role will install Postgresql software and configure a database and user to support an Artifactory or Xray server.
|
||||||
|
|
||||||
|
### Role Variables
|
||||||
|
* _db_users_: This is a list of database users to create. eg. db_users: - { db_user: "artifactory", db_password: "Art1fAct0ry" }
|
||||||
|
* _dbs_: This is the database to create. eg. dbs: - { db_name: "artifactory", db_owner: "artifactory" }
|
||||||
|
|
||||||
|
## Example Playbook
|
||||||
|
```
|
||||||
|
---
|
||||||
|
- hosts: database
|
||||||
|
roles:
|
||||||
|
- postgres
|
||||||
|
```
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
galaxy_info:
|
||||||
|
author: "Jeff Fry <jefff@jfrog.com>"
|
||||||
|
description: "The postgres role will install Postgresql software and configure a database and user to support an Artifactory or Xray server."
|
||||||
|
company: JFrog
|
||||||
|
|
||||||
|
issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues"
|
||||||
|
|
||||||
|
license: license (Apache-2.0)
|
||||||
|
|
||||||
|
min_ansible_version: 2.9
|
||||||
|
|
||||||
|
galaxy_tags:
|
||||||
|
- postgres
|
||||||
|
- jfrog
|
||||||
|
|
||||||
|
dependencies: []
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
# xray
|
||||||
|
The xray role will install Xray software onto the host. An Artifactory server and Postgress database is required.
|
||||||
|
|
||||||
|
### Role Variables
|
||||||
|
* _xray_version_: The version of Artifactory to install. eg. "3.3.0"
|
||||||
|
* _jfrog_url_: This is the URL to the Artifactory base URL. eg. "http://ec2-54-237-207-135.compute-1.amazonaws.com"
|
||||||
|
* _master_key_: This is the Artifactory [Master Key](https://www.jfrog.com/confluence/display/JFROG/Managing+Keys). See below to [autogenerate this key](#autogenerating-master-and-join-keys).
|
||||||
|
* _join_key_: This is the Artifactory [Join Key](https://www.jfrog.com/confluence/display/JFROG/Managing+Keys). See below to [autogenerate this key](#autogenerating-master-and-join-keys).
|
||||||
|
* _db_type_: This is the database type. eg. "postgresql"
|
||||||
|
* _db_driver_: This is the JDBC driver class. eg. "org.postgresql.Driver"
|
||||||
|
* _db_url_: This is the database url. eg. "postgres://10.0.0.59:5432/xraydb?sslmode=disable"
|
||||||
|
* _db_user_: The database user to configure. eg. "xray"
|
||||||
|
* _db_password_: The database password to configure. "xray"
|
||||||
|
* _system_file_: Your own [system YAML](https://www.jfrog.com/confluence/display/JFROG/System+YAML+Configuration+File) file can be specified and used. If specified, this file will be used rather than constructing a file from the parameters above.
|
||||||
|
|
||||||
|
## Example Playbook
|
||||||
|
```
|
||||||
|
---
|
||||||
|
- hosts: xray
|
||||||
|
roles:
|
||||||
|
- xray
|
||||||
|
```
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
ansible_marketplace: standalone
|
ansible_marketplace: standalone
|
||||||
|
|
||||||
# The version of xray to install
|
# The version of xray to install
|
||||||
xray_version: 3.3.0
|
xray_version: 3.5.2
|
||||||
|
|
||||||
# whether to enable HA
|
# whether to enable HA
|
||||||
xray_ha_enabled: true
|
xray_ha_enabled: true
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
galaxy_info:
|
||||||
|
author: "Jeff Fry <jefff@jfrog.com>"
|
||||||
|
description: "The xray role will install Xray software onto the host. An Artifactory server and Postgress database is required."
|
||||||
|
company: JFrog
|
||||||
|
|
||||||
|
issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues"
|
||||||
|
|
||||||
|
license: license (Apache-2.0)
|
||||||
|
|
||||||
|
min_ansible_version: 2.9
|
||||||
|
|
||||||
|
galaxy_tags:
|
||||||
|
- xray
|
||||||
|
- jfrog
|
||||||
|
|
||||||
|
dependencies: []
|
||||||
@@ -34,4 +34,3 @@
|
|||||||
apt:
|
apt:
|
||||||
deb: "{{ xray_home }}/app/third-party/rabbitmq/esl-erlang_21.2.1-1~ubuntu~xenial_amd64.deb"
|
deb: "{{ xray_home }}/app/third-party/rabbitmq/esl-erlang_21.2.1-1~ubuntu~xenial_amd64.deb"
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
@@ -1,16 +1,18 @@
|
|||||||
---
|
---
|
||||||
- name: Install db-utl
|
- name: Install db-utl
|
||||||
yum:
|
yum:
|
||||||
name: "{{ xray_home }}/app/third-party/misc/db4-utils-4.7.25-20.el6_7.x86_64.rpm"
|
name: "{{ xray_home }}/app/third-party/misc/libdb-utils-5.3.21-19.el7.x86_64.rpm"
|
||||||
state: present
|
state: present
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: Install socat
|
- name: Install socat
|
||||||
yum:
|
yum:
|
||||||
name: "{{ xray_home }}/app/third-party/rabbitmq/socat-1.7.3.2-2.el7.x86_64.rpm"
|
name: "{{ xray_home }}/app/third-party/rabbitmq/socat-1.7.3.2-2.el7.x86_64.rpm"
|
||||||
state: present
|
state: present
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: Install erlang
|
- name: Install erlang
|
||||||
yum:
|
yum:
|
||||||
name: "{{ xray_home }}/app/third-party/rabbitmq/erlang-21.1.4-1.el7.centos.x86_64.rpm"
|
name: "{{ xray_home }}/app/third-party/rabbitmq/erlang-21.1.4-1.el7.centos.x86_64.rpm"
|
||||||
state: present
|
state: present
|
||||||
|
become: yes
|
||||||
@@ -31,7 +31,10 @@
|
|||||||
until: downloadxray is succeeded
|
until: downloadxray is succeeded
|
||||||
retries: 3
|
retries: 3
|
||||||
|
|
||||||
- name: perform prerequisite installation
|
- debug:
|
||||||
|
msg: "Running dependency installation for {{ ansible_os_family }}"
|
||||||
|
|
||||||
|
- name: perform dependency installation
|
||||||
include_tasks: "{{ ansible_os_family }}.yml"
|
include_tasks: "{{ ansible_os_family }}.yml"
|
||||||
|
|
||||||
- name: ensure etc exists
|
- name: ensure etc exists
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
# Ansible
|
|
||||||
This repo contains the Ansible collection for JFrog roles. These roles allow you to provision Artifactory for High-Availability using a Primary node and multiple Secondary nodes. Additionally, a Postgresql role is provided for installing an Artifactory Postgresql database.
|
|
||||||
|
|
||||||
## 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. This role uses secondary roles artifactory-nginx to install nginx.
|
|
||||||
|
|
||||||
### artifactory-nginx-ssl
|
|
||||||
The artifactory-nginx-ssl role installs and configures nginx for SSL.
|
|
||||||
|
|
||||||
### postgres
|
|
||||||
The postgres role will install Postgresql software and configure a database and user to support an Artifactory or Xray server.
|
|
||||||
|
|
||||||
### xray
|
|
||||||
The xray role will install Xray software onto the host. An Artifactory server and Postgress database is required.
|
|
||||||
|
|
||||||
## Vars Required
|
|
||||||
The following Vars must be configured.
|
|
||||||
|
|
||||||
### databsase vars
|
|
||||||
* db_users: This is a list of database users to create. eg. db_users: - { db_user: "artifactory", db_password: "Art1fAct0ry" }
|
|
||||||
* dbs: This is the database to create. eg. dbs: - { db_name: "artifactory", db_owner: "artifactory" }
|
|
||||||
|
|
||||||
### artifactory vars
|
|
||||||
* artifactory_version: The version of Artifactory to install. eg. "7.4.1"
|
|
||||||
* master_key: This is the Artifactory Master Key.
|
|
||||||
* join_key: This is the Artifactory Join Key.
|
|
||||||
* db_download_url: This is the download URL for the JDBC driver for your database. eg. "https://jdbc.postgresql.org/download/postgresql-42.2.12.jar"
|
|
||||||
* db_type: This is the database type. eg. "postgresql"
|
|
||||||
* db_driver: This is the JDBC driver class. eg. "org.postgresql.Driver"
|
|
||||||
* db_url: This is the JDBC database url. eg. "jdbc:postgresql://10.0.0.120:5432/artifactory"
|
|
||||||
* db_user: The database user to configure. eg. "artifactory"
|
|
||||||
* db_password: The database password to configure. "Art1fact0ry"
|
|
||||||
* server_name: This is the server name. eg. "artifactory.54.175.51.178.xip.io"
|
|
||||||
* system_file: Your own system YAML file can be specified and used. If specified, this file will be used rather than constructing a file from the parameters above.
|
|
||||||
* binary_store_file: Your own binary store file can be used. If specified, the default cluster-file-system will not be used.
|
|
||||||
|
|
||||||
### primary vars
|
|
||||||
* artifactory_is_primary: For the primary node this must be set to **true**.
|
|
||||||
* artifactory_license1 - 5: These are the cluster licenses.
|
|
||||||
* artifactory_license_file: Your own license file can be used. If specified, a license file constructed from the licenses above will not be used.
|
|
||||||
|
|
||||||
### secondary vars
|
|
||||||
* artifactory_is_primary: For the secondary node(s) this must be set to **false**.
|
|
||||||
|
|
||||||
### ssl vars (Used with artifactory-nginx-ssl role)
|
|
||||||
* certificate: This is the SSL cert.
|
|
||||||
* certificate_key: This is the SSL private key.
|
|
||||||
|
|
||||||
### xray vars
|
|
||||||
* xray_version: The version of Artifactory to install. eg. "3.3.0"
|
|
||||||
* jfrog_url: This is the URL to the Artifactory base URL. eg. "http://ec2-54-237-207-135.compute-1.amazonaws.com"
|
|
||||||
* master_key: This is the Artifactory Master Key.
|
|
||||||
* join_key: This is the Artifactory Join Key.
|
|
||||||
* db_type: This is the database type. eg. "postgresql"
|
|
||||||
* db_driver: This is the JDBC driver class. eg. "org.postgresql.Driver"
|
|
||||||
* db_url: This is the database url. eg. "postgres://10.0.0.59:5432/xraydb?sslmode=disable"
|
|
||||||
* db_user: The database user to configure. eg. "xray"
|
|
||||||
* db_password: The database password to configure. "xray"
|
|
||||||
|
|
||||||
## Example Inventory and Playbooks
|
|
||||||
Example playbooks are located in the [project](../project) directory. This directory contains several example inventory and plaaybooks for different Artifactory, HA and Xray architectures.
|
|
||||||
|
|
||||||
## Executing a Playbook
|
|
||||||
```
|
|
||||||
ansible-playbook -i <hosts file> <playbook file>
|
|
||||||
|
|
||||||
eg.
|
|
||||||
ansible-playbook -i example-playbooks/rt-xray-ha/hosts.yml example-playbooks/rt-xray-ha/playbook.yml
|
|
||||||
```
|
|
||||||
|
|
||||||
## Autogenerating Master and Join Keys
|
|
||||||
You may want to auto-generate your master amd join keys and apply it to all the nodes.
|
|
||||||
|
|
||||||
```
|
|
||||||
ansible-playbook -i hosts.yml playbook.yml --extra-vars "master_key=$(openssl rand -hex 16) join_key=$(openssl rand -hex 16)"
|
|
||||||
```
|
|
||||||
|
|
||||||
## Bastion Hosts
|
|
||||||
In many cases, you may want to run this Ansible collection through a Bastion host to provision JFrog servers. You can include the following Var for a host or group of hosts:
|
|
||||||
|
|
||||||
```
|
|
||||||
ansible_ssh_common_args: '-o ProxyCommand="ssh -o StrictHostKeyChecking=no -A user@host -W %h:%p"'
|
|
||||||
|
|
||||||
eg.
|
|
||||||
ansible_ssh_common_args: '-o ProxyCommand="ssh -o StrictHostKeyChecking=no -A ubuntu@{{ azureDeployment.deployment.outputs.lbIp.value }} -W %h:%p"'
|
|
||||||
```
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
# defaults file for artifactory-nginx
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
# handlers file for artifactory-nginx
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
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.
|
|
||||||
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
localhost
|
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
- hosts: localhost
|
|
||||||
remote_user: root
|
|
||||||
roles:
|
|
||||||
- artifactory-nginx
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for artifactory-nginx
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
# defaults file for artifactory-nginx
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
# handlers file for artifactory-nginx
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
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.
|
|
||||||
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
localhost
|
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
- hosts: localhost
|
|
||||||
remote_user: root
|
|
||||||
roles:
|
|
||||||
- artifactory-nginx
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for artifactory-nginx
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
exceptions:
|
|
||||||
- variation: Alpine
|
|
||||||
reason: Artifactory start/stop scripts don't properly work.
|
|
||||||
- variation: amazonlinux:1
|
|
||||||
reason: "Shutting down artifactory: /usr/bin/java\nfinding\nUsing the default catalina management port (8015) to test shutdown\nArtifactory Tomcat already stopped"
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
---
|
|
||||||
galaxy_info:
|
|
||||||
author: Robert de Bock
|
|
||||||
role_name: artifactory
|
|
||||||
description: Install and configure artifactory on your system.
|
|
||||||
license: Apache-2.0
|
|
||||||
company: none
|
|
||||||
min_ansible_version: 2.8
|
|
||||||
|
|
||||||
platforms:
|
|
||||||
- name: Debian
|
|
||||||
versions:
|
|
||||||
- all
|
|
||||||
- name: EL
|
|
||||||
versions:
|
|
||||||
- 7
|
|
||||||
- 8
|
|
||||||
- name: Fedora
|
|
||||||
versions:
|
|
||||||
- all
|
|
||||||
- name: OpenSUSE
|
|
||||||
versions:
|
|
||||||
- all
|
|
||||||
- name: Ubuntu
|
|
||||||
versions:
|
|
||||||
- bionic
|
|
||||||
|
|
||||||
galaxy_tags:
|
|
||||||
- artifactory
|
|
||||||
- centos
|
|
||||||
- redhat
|
|
||||||
- server
|
|
||||||
- system
|
|
||||||
|
|
||||||
dependencies: []
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
tox_parallel: yes
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
project_name: JFrog
|
|
||||||
reference: "https://github.com/robertdebock/ansible-role-artifactory/blob/master/defaults/main.yml"
|
|
||||||
versions:
|
|
||||||
- name: Artifactory
|
|
||||||
url: "https://dl.bintray.com/jfrog/artifactory/"
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
galaxy_info:
|
|
||||||
role_name: postgres_server
|
|
||||||
author: Jeff Fry
|
|
||||||
description: Installation of Postgres for Artifactory HA
|
|
||||||
company: JFrog
|
|
||||||
min_ansible_version: 2.8
|
|
||||||
platforms:
|
|
||||||
- name: Fedora
|
|
||||||
versions:
|
|
||||||
- 27
|
|
||||||
- 29
|
|
||||||
- name: Ubuntu
|
|
||||||
versions:
|
|
||||||
- xenial
|
|
||||||
- bionic
|
|
||||||
- name: Debian
|
|
||||||
versions:
|
|
||||||
- stretch
|
|
||||||
galaxy_tags:
|
|
||||||
- postgres
|
|
||||||
- postgresql
|
|
||||||
|
|
||||||
dependencies: []
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
---
|
|
||||||
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/
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
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.
|
|
||||||
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
localhost
|
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
- hosts: localhost
|
|
||||||
remote_user: root
|
|
||||||
roles:
|
|
||||||
- xray
|
|
||||||
@@ -14,6 +14,7 @@ all:
|
|||||||
- { db_name: "artifactory", db_owner: "artifactory" }
|
- { db_name: "artifactory", db_owner: "artifactory" }
|
||||||
artifactory:
|
artifactory:
|
||||||
vars:
|
vars:
|
||||||
|
artifactory_version: 7.4.1
|
||||||
artifactory_ha_enabled: true
|
artifactory_ha_enabled: true
|
||||||
master_key: "c97b862469de0d94fbb7d48130637a5a"
|
master_key: "c97b862469de0d94fbb7d48130637a5a"
|
||||||
join_key: "9bcca98f375c0728d907cc6ee39d4f02"
|
join_key: "9bcca98f375c0728d907cc6ee39d4f02"
|
||||||
@@ -20,6 +20,7 @@ all:
|
|||||||
- { db_user: "xray", db_password: "xray" }
|
- { db_user: "xray", db_password: "xray" }
|
||||||
artifactory:
|
artifactory:
|
||||||
vars:
|
vars:
|
||||||
|
artifactory_version: 7.4.1
|
||||||
artifactory_ha_enabled: true
|
artifactory_ha_enabled: true
|
||||||
master_key: "c97b862469de0d94fbb7d48130637a5a"
|
master_key: "c97b862469de0d94fbb7d48130637a5a"
|
||||||
join_key: "9bcca98f375c0728d907cc6ee39d4f02"
|
join_key: "9bcca98f375c0728d907cc6ee39d4f02"
|
||||||
@@ -42,6 +43,7 @@ all:
|
|||||||
artifactory_license5: x
|
artifactory_license5: x
|
||||||
xray:
|
xray:
|
||||||
vars:
|
vars:
|
||||||
|
xray_version: 3.3.0
|
||||||
jfrog_url: http://ec2-18-210-33-94.compute-1.amazonaws.com
|
jfrog_url: http://ec2-18-210-33-94.compute-1.amazonaws.com
|
||||||
master_key: "c97b862469de0d94fbb7d48130637a5a"
|
master_key: "c97b862469de0d94fbb7d48130637a5a"
|
||||||
join_key: "9bcca98f375c0728d907cc6ee39d4f02"
|
join_key: "9bcca98f375c0728d907cc6ee39d4f02"
|
||||||
@@ -16,6 +16,7 @@ all:
|
|||||||
artifactory:
|
artifactory:
|
||||||
hosts:
|
hosts:
|
||||||
54.237.207.135:
|
54.237.207.135:
|
||||||
|
artifactory_version: 7.4.1
|
||||||
artifactory_license1: x
|
artifactory_license1: x
|
||||||
artifactory_license2: x
|
artifactory_license2: x
|
||||||
artifactory_license3: x
|
artifactory_license3: x
|
||||||
@@ -33,6 +34,7 @@ all:
|
|||||||
xray:
|
xray:
|
||||||
hosts:
|
hosts:
|
||||||
100.25.104.174:
|
100.25.104.174:
|
||||||
|
xray_version: 3.3.0
|
||||||
jfrog_url: "http://ec2-54-237-207-135.compute-1.amazonaws.com"
|
jfrog_url: "http://ec2-54-237-207-135.compute-1.amazonaws.com"
|
||||||
master_key: "c97b862469de0d94fbb7d48130637a5a"
|
master_key: "c97b862469de0d94fbb7d48130637a5a"
|
||||||
join_key: "9bcca98f375c0728d907cc6ee39d4f02"
|
join_key: "9bcca98f375c0728d907cc6ee39d4f02"
|
||||||
@@ -13,6 +13,7 @@ all:
|
|||||||
primary:
|
primary:
|
||||||
hosts:
|
hosts:
|
||||||
54.165.47.191:
|
54.165.47.191:
|
||||||
|
artifactory_version: 7.4.1
|
||||||
artifactory_is_primary: true
|
artifactory_is_primary: true
|
||||||
artifactory_license_file: "{{ lookup('env', 'artifactory_license_file') }}"
|
artifactory_license_file: "{{ lookup('env', 'artifactory_license_file') }}"
|
||||||
db_download_url: "https://jdbc.postgresql.org/download/postgresql-42.2.12.jar"
|
db_download_url: "https://jdbc.postgresql.org/download/postgresql-42.2.12.jar"
|
||||||
@@ -14,6 +14,7 @@ all:
|
|||||||
primary:
|
primary:
|
||||||
hosts:
|
hosts:
|
||||||
100.25.104.198:
|
100.25.104.198:
|
||||||
|
artifactory_version: 7.4.1
|
||||||
artifactory_is_primary: true
|
artifactory_is_primary: true
|
||||||
artifactory_license1: x
|
artifactory_license1: x
|
||||||
artifactory_license2: x
|
artifactory_license2: x
|
||||||
18
Ansible/examples/host_vars/xray/hosts.yml
Normal file
18
Ansible/examples/host_vars/xray/hosts.yml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
all:
|
||||||
|
vars:
|
||||||
|
ansible_user: "centos"
|
||||||
|
children:
|
||||||
|
xray:
|
||||||
|
vars:
|
||||||
|
xray_version: 3.3.0
|
||||||
|
jfrog_url: http://ec2-18-210-33-94.compute-1.amazonaws.com
|
||||||
|
master_key: "c97b862469de0d94fbb7d48130637a5a"
|
||||||
|
join_key: "9bcca98f375c0728d907cc6ee39d4f02"
|
||||||
|
db_type: "postgresql"
|
||||||
|
db_driver: "org.postgresql.Driver"
|
||||||
|
db_url: "postgres://10.0.0.5:5432/xraydb?sslmode=disable"
|
||||||
|
db_user: "xray"
|
||||||
|
db_password: "xray"
|
||||||
|
hosts:
|
||||||
|
3.17.132.222
|
||||||
13
Ansible/examples/playbook-rt-ha.yml
Normal file
13
Ansible/examples/playbook-rt-ha.yml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
- hosts: database
|
||||||
|
collections:
|
||||||
|
- jfrog.installers
|
||||||
|
roles:
|
||||||
|
- postgres
|
||||||
|
|
||||||
|
- hosts: primary:secondary
|
||||||
|
collections:
|
||||||
|
- jfrog.installers
|
||||||
|
roles:
|
||||||
|
- artifactory
|
||||||
|
- artifactory_nginx_ssl
|
||||||
@@ -1,12 +1,18 @@
|
|||||||
---
|
---
|
||||||
- hosts: database
|
- hosts: database
|
||||||
|
collections:
|
||||||
|
- jfrog.installers
|
||||||
roles:
|
roles:
|
||||||
- postgres
|
- postgres
|
||||||
|
|
||||||
- hosts: artifactory
|
- hosts: artifactory
|
||||||
|
collections:
|
||||||
|
- jfrog.installers
|
||||||
roles:
|
roles:
|
||||||
- artifactory
|
- artifactory
|
||||||
|
|
||||||
- hosts: xray
|
- hosts: xray
|
||||||
|
collections:
|
||||||
|
- jfrog.installers
|
||||||
roles:
|
roles:
|
||||||
- xray
|
- xray
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
---
|
---
|
||||||
- hosts: database
|
- hosts: database
|
||||||
|
collections:
|
||||||
|
- jfrog.installers
|
||||||
roles:
|
roles:
|
||||||
- postgres
|
- postgres
|
||||||
|
|
||||||
- hosts: primary
|
- hosts: primary
|
||||||
|
collections:
|
||||||
|
- jfrog.installers
|
||||||
roles:
|
roles:
|
||||||
- artifactory
|
- artifactory
|
||||||
- artifactory-nginx-ssl
|
|
||||||
13
Ansible/examples/playbook-ssl.yml
Normal file
13
Ansible/examples/playbook-ssl.yml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
- hosts: database
|
||||||
|
collections:
|
||||||
|
- jfrog.installers
|
||||||
|
roles:
|
||||||
|
- postgres
|
||||||
|
|
||||||
|
- hosts: primary
|
||||||
|
collections:
|
||||||
|
- jfrog.installers
|
||||||
|
roles:
|
||||||
|
- artifactory
|
||||||
|
- artifactory_nginx_ssl
|
||||||
6
Ansible/examples/playbook-xray.yml
Normal file
6
Ansible/examples/playbook-xray.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
- hosts: xray
|
||||||
|
collections:
|
||||||
|
- jfrog.installers
|
||||||
|
roles:
|
||||||
|
- xray
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user