diff --git a/Ansible/README.md b/Ansible/README.md index 7903b00..048d3e3 100644 --- a/Ansible/README.md +++ b/Ansible/README.md @@ -9,13 +9,18 @@ This Ansible directory consists of the following directories that support the JF ## Getting Started - 1. Install this collection or the roles in your Ansible path using your ansible.cfg file. The following is an example: + 1. Download and nstall this collection or the roles in your Ansible path using your ansible.cfg file. The following is an example: ``` # 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 +``` + +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. @@ -64,4 +69,12 @@ ansible_ssh_common_args: '-o ProxyCommand="ssh -o StrictHostKeyChecking=no -A us eg. ansible_ssh_common_args: '-o ProxyCommand="ssh -o StrictHostKeyChecking=no -A ubuntu@{{ azureDeployment.deployment.outputs.lbIp.value }} -W %h:%p"' -``` \ No newline at end of file +``` + +## Building the Collection Archive +1. Go to the [collection/jfrog/ansible directory](collection/jfrog/ansible). +2. Update the galaxy.yml meta file as needed. Update the version. +3. Build the archive. +``` +ansible-galaxy collection build +``` diff --git a/Ansible/collection/jfrog/ansible/README.md b/Ansible/collection/jfrog/ansible/README.md index 2dc13bd..22c888c 100644 --- a/Ansible/collection/jfrog/ansible/README.md +++ b/Ansible/collection/jfrog/ansible/README.md @@ -1,12 +1,12 @@ # 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. +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 ### 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. +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. +### 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. @@ -35,15 +35,15 @@ The following Vars must be configured. * _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 +### 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 +### secondary vars (vars used by the secondary Artifactory server) * _artifactory_is_primary_: For the secondary node(s) this must be set to **false**. -### ssl vars (Used with artifactory-nginx-ssl role) +### ssl vars (Used with artifactory_nginx_ssl role) * _certificate_: This is the SSL cert. * _certificate_key_: This is the SSL private key. diff --git a/Ansible/collection/jfrog/ansible/galaxy.yml b/Ansible/collection/jfrog/ansible/galaxy.yml index 2b44148..38e2cc5 100644 --- a/Ansible/collection/jfrog/ansible/galaxy.yml +++ b/Ansible/collection/jfrog/ansible/galaxy.yml @@ -3,40 +3,43 @@ # 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 # underscores or numbers and cannot contain consecutive underscores -namespace: jfrog +namespace: "jfrog" # The name of the collection. Has the same character restrictions as 'namespace' -name: ansible +name: "ansible" # The version of the collection. Must be compatible with semantic versioning -version: 1.0.0 +version: "1.0.4" # 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 (url) # @nicks:irc/im.site#channel' authors: -- your name + - "Jeff Fry " ### OPTIONAL but strongly recommended # 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 # accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file' license: -- GPL-2.0-or-later + - "GPL-2.0-or-later" # 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' -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 # requirements as 'namespace' and 'name' -tags: [] +tags: + - artifactory + - xray + - jfrog # 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 @@ -45,13 +48,13 @@ tags: [] dependencies: {} # 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 -documentation: http://docs.example.com +documentation: "https://www.jfrog.com/confluence/display/JFROG/" # 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 -issues: http://example.com/issue/tracker +issues: "https://github.com/jfrog/JFrog-Cloud-Installers/issues" diff --git a/Ansible/collection/jfrog/ansible/jfrog-ansible-1.0.4.tar.gz b/Ansible/collection/jfrog/ansible/jfrog-ansible-1.0.4.tar.gz new file mode 100644 index 0000000..36c6956 Binary files /dev/null and b/Ansible/collection/jfrog/ansible/jfrog-ansible-1.0.4.tar.gz differ diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/defaults/main.yml b/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/defaults/main.yml deleted file mode 100644 index 6b28347..0000000 --- a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for artifactory-nginx \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/handlers/main.yml b/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/handlers/main.yml deleted file mode 100644 index d212386..0000000 --- a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for artifactory-nginx \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/meta/main.yml b/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/meta/main.yml deleted file mode 100644 index 227ad9c..0000000 --- a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/meta/main.yml +++ /dev/null @@ -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. - \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/tests/inventory b/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/tests/inventory deleted file mode 100644 index 878877b..0000000 --- a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/tests/test.yml b/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/tests/test.yml deleted file mode 100644 index 7560bbb..0000000 --- a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - artifactory-nginx \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/vars/main.yml b/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/vars/main.yml deleted file mode 100644 index 7465197..0000000 --- a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for artifactory-nginx \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/defaults/main.yml b/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/defaults/main.yml deleted file mode 100644 index 6b28347..0000000 --- a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for artifactory-nginx \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/handlers/main.yml b/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/handlers/main.yml deleted file mode 100644 index d212386..0000000 --- a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for artifactory-nginx \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/meta/main.yml b/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/meta/main.yml deleted file mode 100644 index 227ad9c..0000000 --- a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/meta/main.yml +++ /dev/null @@ -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. - \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/tasks/Debian.yml b/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/tasks/Debian.yml deleted file mode 100644 index 83a3149..0000000 --- a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/tasks/Debian.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -# No dependencies for Debian - diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/tests/inventory b/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/tests/inventory deleted file mode 100644 index 878877b..0000000 --- a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/tests/test.yml b/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/tests/test.yml deleted file mode 100644 index 7560bbb..0000000 --- a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - artifactory-nginx \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/vars/main.yml b/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/vars/main.yml deleted file mode 100644 index 7465197..0000000 --- a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for artifactory-nginx \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory/README.md b/Ansible/collection/jfrog/ansible/roles/artifactory/README.md new file mode 100644 index 0000000..606a51c --- /dev/null +++ b/Ansible/collection/jfrog/ansible/roles/artifactory/README.md @@ -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 +``` \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory/meta/exception.yml b/Ansible/collection/jfrog/ansible/roles/artifactory/meta/exception.yml deleted file mode 100644 index 7de46df..0000000 --- a/Ansible/collection/jfrog/ansible/roles/artifactory/meta/exception.yml +++ /dev/null @@ -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" diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory/meta/main.yml b/Ansible/collection/jfrog/ansible/roles/artifactory/meta/main.yml index 0dc573a..d23a7df 100644 --- a/Ansible/collection/jfrog/ansible/roles/artifactory/meta/main.yml +++ b/Ansible/collection/jfrog/ansible/roles/artifactory/meta/main.yml @@ -1,35 +1,16 @@ ---- 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 + author: "Jeff Fry " + 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 - platforms: - - name: Debian - versions: - - all - - name: EL - versions: - - 7 - - 8 - - name: Fedora - versions: - - all - - name: OpenSUSE - versions: - - all - - name: Ubuntu - versions: - - bionic + issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues" + + license: license (GPL-2.0-or-later) + + min_ansible_version: 2.9 galaxy_tags: - artifactory - - centos - - redhat - - server - - system + - jfrog -dependencies: [] +dependencies: [] \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory/meta/preferences.yml b/Ansible/collection/jfrog/ansible/roles/artifactory/meta/preferences.yml deleted file mode 100644 index e7fdebf..0000000 --- a/Ansible/collection/jfrog/ansible/roles/artifactory/meta/preferences.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -tox_parallel: yes diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory/meta/version.yml b/Ansible/collection/jfrog/ansible/roles/artifactory/meta/version.yml deleted file mode 100644 index ea2ef8f..0000000 --- a/Ansible/collection/jfrog/ansible/roles/artifactory/meta/version.yml +++ /dev/null @@ -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/" diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory/tasks/main.yml b/Ansible/collection/jfrog/ansible/roles/artifactory/tasks/main.yml index 04b3a8e..6c59717 100644 --- a/Ansible/collection/jfrog/ansible/roles/artifactory/tasks/main.yml +++ b/Ansible/collection/jfrog/ansible/roles/artifactory/tasks/main.yml @@ -2,7 +2,7 @@ # tasks file for artifactory - name: install nginx include_role: - name: artifactory-nginx + name: artifactory_nginx - name: create group for artifactory group: diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/.travis.yml b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/.travis.yml similarity index 100% rename from Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/.travis.yml rename to Ansible/collection/jfrog/ansible/roles/artifactory_nginx/.travis.yml diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/README.md b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/README.md new file mode 100644 index 0000000..6a6cb60 --- /dev/null +++ b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/README.md @@ -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" \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/defaults/main.yml b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/defaults/main.yml new file mode 100644 index 0000000..5818d2b --- /dev/null +++ b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for artifactory_nginx \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/files/nginx.conf b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/files/nginx.conf similarity index 100% rename from Ansible/collection/jfrog/ansible/roles/artifactory-nginx/files/nginx.conf rename to Ansible/collection/jfrog/ansible/roles/artifactory_nginx/files/nginx.conf diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/handlers/main.yml b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/handlers/main.yml new file mode 100644 index 0000000..f07f4d4 --- /dev/null +++ b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for artifactory_nginx \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/meta/main.yml b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/meta/main.yml new file mode 100644 index 0000000..f8548e0 --- /dev/null +++ b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/meta/main.yml @@ -0,0 +1,16 @@ +galaxy_info: + author: "Jeff Fry " + 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 (GPL-2.0-or-later) + + min_ansible_version: 2.9 + + galaxy_tags: + - artifactory + - jfrog + +dependencies: [] \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/tasks/Debian.yml b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/tasks/Debian.yml new file mode 100644 index 0000000..cc41ad0 --- /dev/null +++ b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/tasks/Debian.yml @@ -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 diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/tasks/RedHat.yml b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/tasks/RedHat.yml similarity index 100% rename from Ansible/collection/jfrog/ansible/roles/artifactory-nginx/tasks/RedHat.yml rename to Ansible/collection/jfrog/ansible/roles/artifactory_nginx/tasks/RedHat.yml diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/tasks/main.yml b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/tasks/main.yml similarity index 100% rename from Ansible/collection/jfrog/ansible/roles/artifactory-nginx/tasks/main.yml rename to Ansible/collection/jfrog/ansible/roles/artifactory_nginx/tasks/main.yml diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/templates/artifactory.conf.j2 b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/templates/artifactory.conf.j2 similarity index 100% rename from Ansible/collection/jfrog/ansible/roles/artifactory-nginx/templates/artifactory.conf.j2 rename to Ansible/collection/jfrog/ansible/roles/artifactory_nginx/templates/artifactory.conf.j2 diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/vars/main.yml b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/vars/main.yml new file mode 100644 index 0000000..7d43ed5 --- /dev/null +++ b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for artifactory_nginx \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx/.travis.yml b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/.travis.yml similarity index 100% rename from Ansible/collection/jfrog/ansible/roles/artifactory-nginx/.travis.yml rename to Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/.travis.yml diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/README.md b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/README.md new file mode 100644 index 0000000..9a32719 --- /dev/null +++ b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/README.md @@ -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 +``` diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/defaults/main.yml b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/defaults/main.yml new file mode 100644 index 0000000..5818d2b --- /dev/null +++ b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for artifactory_nginx \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/handlers/main.yml b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/handlers/main.yml new file mode 100644 index 0000000..f07f4d4 --- /dev/null +++ b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for artifactory_nginx \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/meta/main.yml b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/meta/main.yml new file mode 100644 index 0000000..3ca0601 --- /dev/null +++ b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/meta/main.yml @@ -0,0 +1,16 @@ +galaxy_info: + author: "Jeff Fry " + 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 (GPL-2.0-or-later) + + min_ansible_version: 2.9 + + galaxy_tags: + - artifactory + - jfrog + +dependencies: [] \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/tasks/main.yml b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/tasks/main.yml similarity index 95% rename from Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/tasks/main.yml rename to Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/tasks/main.yml index ba37c53..ea18fe2 100644 --- a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/tasks/main.yml +++ b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/tasks/main.yml @@ -1,5 +1,5 @@ --- -# tasks file for artifactory-nginx +# tasks file for artifactory_nginx - name: configure the artifactory nginx conf template: src: artifactory.conf.j2 diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/templates/artifactory.conf.j2 b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/templates/artifactory.conf.j2 similarity index 100% rename from Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/templates/artifactory.conf.j2 rename to Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/templates/artifactory.conf.j2 diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/templates/certificate.key.j2 b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/templates/certificate.key.j2 similarity index 100% rename from Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/templates/certificate.key.j2 rename to Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/templates/certificate.key.j2 diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/templates/certificate.pem.j2 b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/templates/certificate.pem.j2 similarity index 100% rename from Ansible/collection/jfrog/ansible/roles/artifactory-nginx-ssl/templates/certificate.pem.j2 rename to Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/templates/certificate.pem.j2 diff --git a/Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/vars/main.yml b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/vars/main.yml new file mode 100644 index 0000000..7d43ed5 --- /dev/null +++ b/Ansible/collection/jfrog/ansible/roles/artifactory_nginx_ssl/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for artifactory_nginx \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/postgres/README.md b/Ansible/collection/jfrog/ansible/roles/postgres/README.md new file mode 100644 index 0000000..f8740f1 --- /dev/null +++ b/Ansible/collection/jfrog/ansible/roles/postgres/README.md @@ -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 +``` \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/postgres/meta/main.yml b/Ansible/collection/jfrog/ansible/roles/postgres/meta/main.yml index cc79dee..aa5edc7 100644 --- a/Ansible/collection/jfrog/ansible/roles/postgres/meta/main.yml +++ b/Ansible/collection/jfrog/ansible/roles/postgres/meta/main.yml @@ -1,25 +1,16 @@ ---- - galaxy_info: - role_name: postgres_server - author: Jeff Fry - description: Installation of Postgres for Artifactory HA + author: "Jeff Fry " + description: "The postgres role will install Postgresql software and configure a database and user to support an Artifactory or Xray server." company: JFrog - min_ansible_version: 2.8 - platforms: - - name: Fedora - versions: - - 27 - - 29 - - name: Ubuntu - versions: - - xenial - - bionic - - name: Debian - versions: - - stretch + + issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues" + + license: license (GPL-2.0-or-later) + + min_ansible_version: 2.9 + galaxy_tags: - postgres - - postgresql + - jfrog -dependencies: [] +dependencies: [] \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/xray/README.md b/Ansible/collection/jfrog/ansible/roles/xray/README.md new file mode 100644 index 0000000..ba758f9 --- /dev/null +++ b/Ansible/collection/jfrog/ansible/roles/xray/README.md @@ -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 +``` \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/xray/meta/main.yml b/Ansible/collection/jfrog/ansible/roles/xray/meta/main.yml index 227ad9c..a5b8978 100644 --- a/Ansible/collection/jfrog/ansible/roles/xray/meta/main.yml +++ b/Ansible/collection/jfrog/ansible/roles/xray/meta/main.yml @@ -1,53 +1,16 @@ galaxy_info: - author: your name - description: your role description - company: your company (optional) + author: "Jeff Fry " + description: "The xray role will install Xray software onto the host. An Artifactory server and Postgress database is required." + company: JFrog - # 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 + issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues" - # 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) + license: license (GPL-2.0-or-later) min_ansible_version: 2.9 - # If this a Container Enabled role, provide the minimum Ansible Container version. - # min_ansible_container_version: + galaxy_tags: + - xray + - jfrog - # - # 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. - \ No newline at end of file +dependencies: [] \ No newline at end of file diff --git a/Ansible/collection/jfrog/ansible/roles/xray/tasks/main.yml b/Ansible/collection/jfrog/ansible/roles/xray/tasks/main.yml index fd879fe..2361d9f 100644 --- a/Ansible/collection/jfrog/ansible/roles/xray/tasks/main.yml +++ b/Ansible/collection/jfrog/ansible/roles/xray/tasks/main.yml @@ -44,7 +44,7 @@ owner: "{{ xray_user }}" group: "{{ xray_group }}" become: yes - + - name: configure system yaml template: src: system.yaml.j2 diff --git a/Ansible/collection/jfrog/ansible/roles/xray/tests/inventory b/Ansible/collection/jfrog/ansible/roles/xray/tests/inventory deleted file mode 100644 index 878877b..0000000 --- a/Ansible/collection/jfrog/ansible/roles/xray/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/Ansible/collection/jfrog/ansible/roles/xray/tests/test.yml b/Ansible/collection/jfrog/ansible/roles/xray/tests/test.yml deleted file mode 100644 index f296da6..0000000 --- a/Ansible/collection/jfrog/ansible/roles/xray/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - xray \ No newline at end of file diff --git a/Ansible/examples/playbook-rt-ha.yml b/Ansible/examples/playbook-rt-ha.yml index 73c4791..151d2df 100644 --- a/Ansible/examples/playbook-rt-ha.yml +++ b/Ansible/examples/playbook-rt-ha.yml @@ -6,4 +6,4 @@ - hosts: primary:secondary roles: - artifactory - - artifactory-nginx-ssl \ No newline at end of file + - artifactory_nginx_ssl \ No newline at end of file diff --git a/Ansible/examples/playbook-ssl.yml b/Ansible/examples/playbook-ssl.yml index 359472b..33d84c2 100644 --- a/Ansible/examples/playbook-ssl.yml +++ b/Ansible/examples/playbook-ssl.yml @@ -6,4 +6,4 @@ - hosts: primary roles: - artifactory - - artifactory-nginx-ssl + - artifactory_nginx_ssl diff --git a/Ansible/test/tests/.gradle/5.2.1/fileChanges/last-build.bin b/Ansible/test/tests/.gradle/5.2.1/fileChanges/last-build.bin new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and b/Ansible/test/tests/.gradle/5.2.1/fileChanges/last-build.bin differ diff --git a/Ansible/test/tests/.gradle/5.2.1/fileHashes/fileHashes.lock b/Ansible/test/tests/.gradle/5.2.1/fileHashes/fileHashes.lock new file mode 100644 index 0000000..ceb38cc Binary files /dev/null and b/Ansible/test/tests/.gradle/5.2.1/fileHashes/fileHashes.lock differ diff --git a/Ansible/test/tests/.gradle/5.2.1/gc.properties b/Ansible/test/tests/.gradle/5.2.1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/Ansible/test/tests/src/test/resources/testenv.yaml b/Ansible/test/tests/src/test/resources/testenv.yaml index 55ff648..9cb1760 100644 --- a/Ansible/test/tests/src/test/resources/testenv.yaml +++ b/Ansible/test/tests/src/test/resources/testenv.yaml @@ -1,6 +1,6 @@ artifactory: - url: urlval - external_ip: ipval + url: http://Ansib-Appli-1RBHLINBKUHSU-1876699665.us-east-1.elb.amazonaws.com + external_ip: Ansib-Appli-1RBHLINBKUHSU-1876699665.us-east-1.elb.amazonaws.com distribution: artifactory_ha rt_username: admin - rt_password: passval \ No newline at end of file + rt_password: password \ No newline at end of file