Updates to support certification and RedHat Automation Hub.

This commit is contained in:
jefferyfry
2020-06-18 17:07:29 -07:00
parent 49cf1503de
commit 5ce8d505d1
168 changed files with 8183 additions and 71 deletions

View File

@@ -1,27 +1,18 @@
# 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. * [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.
* [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.
## Getting Started ## Getting Started
1. Download and nstall 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 ansible-galaxy collection install jfrog.installers
collections_paths = ~/.ansible/collections:/usr/share/ansible/collections:collection ```
# Installs roles into [current dir]/roles/namespace.rolename
roles_path = Ansible/collection/jfrog/ansible/roles
```
Or install this collection from Ansible Galaxy.
```
ansible-galaxy collection install jfrog.ansible
```
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. 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. 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.
@@ -72,7 +63,7 @@ ansible_ssh_common_args: '-o ProxyCommand="ssh -o StrictHostKeyChecking=no -A ub
``` ```
## Building the Collection Archive ## Building the Collection Archive
1. Go to the [collection/jfrog/ansible directory](collection/jfrog/ansible). 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. 2. Update the galaxy.yml meta file as needed. Update the version.
3. Build the archive. 3. Build the archive.
``` ```

View File

@@ -1,4 +1,4 @@
# Ansible # JFrog Ansible Installers Collection
This collection provides roles for installing Artifactory and Xray. Additionally, it provides optional SSL and Postgresql roles if these are needed for your deployment. This collection provides roles for installing Artifactory and Xray. Additionally, it provides optional SSL and Postgresql roles if these are needed for your deployment.
## Roles Provided ## Roles Provided

View File

@@ -6,10 +6,10 @@
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.4" version: "1.0.5"
# 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"
@@ -28,7 +28,7 @@ description: "This collection provides roles for installing Artifactory and Xray
# 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'
@@ -40,6 +40,7 @@ tags:
- artifactory - artifactory
- xray - xray
- jfrog - 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
@@ -51,7 +52,9 @@ dependencies: {}
repository: "https://github.com/jfrog/JFrog-Cloud-Installers/" repository: "https://github.com/jfrog/JFrog-Cloud-Installers/"
# The URL to any online docs # The URL to any online docs
documentation: "https://www.jfrog.com/confluence/display/JFROG/" documentation:
- "https://github.com/jfrog/JFrog-Cloud-Installers/blob/master/Ansible/README.md"
- "https://www.jfrog.com/confluence/display/JFROG/"
# The URL to the homepage of the collection/project # The URL to the homepage of the collection/project
homepage: "https://github.com/jfrog/JFrog-Cloud-Installers/" homepage: "https://github.com/jfrog/JFrog-Cloud-Installers/"

View File

@@ -5,7 +5,7 @@ galaxy_info:
issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues" issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues"
license: license (GPL-2.0-or-later) license: license (Apache-2.0)
min_ansible_version: 2.9 min_ansible_version: 2.9

View File

@@ -5,7 +5,7 @@ galaxy_info:
issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues" issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues"
license: license (GPL-2.0-or-later) license: license (Apache-2.0)
min_ansible_version: 2.9 min_ansible_version: 2.9

View File

@@ -3,5 +3,4 @@
yum: yum:
name: epel-release name: epel-release
state: present state: present
become: yes become: yes

View File

@@ -5,7 +5,7 @@ galaxy_info:
issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues" issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues"
license: license (GPL-2.0-or-later) license: license (Apache-2.0)
min_ansible_version: 2.9 min_ansible_version: 2.9

View File

@@ -5,7 +5,7 @@ galaxy_info:
issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues" issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues"
license: license (GPL-2.0-or-later) license: license (Apache-2.0)
min_ansible_version: 2.9 min_ansible_version: 2.9

View File

@@ -5,7 +5,7 @@ galaxy_info:
issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues" issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues"
license: license (GPL-2.0-or-later) license: license (Apache-2.0)
min_ansible_version: 2.9 min_ansible_version: 2.9

View File

@@ -33,5 +33,4 @@
- name: Install erlang - name: Install erlang
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

View File

@@ -15,5 +15,4 @@
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 become: yes

View File

@@ -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/

View File

@@ -49,6 +49,8 @@ pipelines:
- export AWS_ACCESS_KEY_ID="$int_ansibleEnvVars_AWS_ACCESS_KEY_ID" - export AWS_ACCESS_KEY_ID="$int_ansibleEnvVars_AWS_ACCESS_KEY_ID"
- export AWS_SECRET_KEY="$int_ansibleEnvVars_AWS_SECRET_KEY" - export AWS_SECRET_KEY="$int_ansibleEnvVars_AWS_SECRET_KEY"
- printenv - printenv
- pwd
- ls
- eval $(ssh-agent -s) - eval $(ssh-agent -s)
- ssh-add <(echo "$int_ansiblePrivateKey_key") - ssh-add <(echo "$int_ansiblePrivateKey_key")
- ansible-playbook Ansible/test/aws/playbook.yaml - ansible-playbook Ansible/test/aws/playbook.yaml
@@ -98,6 +100,8 @@ pipelines:
- export clientSecret="$int_ansibleAzureKeys_password" - export clientSecret="$int_ansibleAzureKeys_password"
- export tenantId="$int_ansibleAzureKeys_tenant" - export tenantId="$int_ansibleAzureKeys_tenant"
- printenv - printenv
- pwd
- ls
- eval $(ssh-agent -s) - eval $(ssh-agent -s)
- ssh-add <(echo "$int_ansiblePrivateKey_key") - ssh-add <(echo "$int_ansiblePrivateKey_key")
- az login --service-principal -u "$clientId" -p "$clientSecret" --tenant "$tenantId" - az login --service-principal -u "$clientId" -p "$clientSecret" --tenant "$tenantId"

View File

@@ -37,9 +37,7 @@
db_url: "jdbc:postgresql://{{ AWSDeployment.stack_outputs.DBInstancePrivate }}:5432/artifactory" db_url: "jdbc:postgresql://{{ AWSDeployment.stack_outputs.DBInstancePrivate }}:5432/artifactory"
server_name: "{{ AWSDeployment.stack_outputs.ALBHostName }}" server_name: "{{ AWSDeployment.stack_outputs.ALBHostName }}"
artifactory_is_primary: true artifactory_is_primary: true
artifactory_license1: "{{ lookup('env', 'artifactory_license1') }}" artifactory_license_file: "{{ lookup('env', 'artifactory_license_file') }}"
artifactory_license2: "{{ lookup('env', 'artifactory_license2') }}"
artifactory_license3: "{{ lookup('env', 'artifactory_license3') }}"
groups: groups:
- artifactory - artifactory

View File

@@ -0,0 +1,2 @@
#Thu Jun 18 12:50:09 PDT 2020
gradle.version=6.5

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More