Skip to content

Commit

Permalink
Merge pull request #154 from zeitounator/fix/httpProxyConfigBeforeBlo…
Browse files Browse the repository at this point in the history
…bStores

http proxy must be configured before blob stores for S3

Also embarks 2 minor doc and bugfix

Fixes #152 
Fixes #149
  • Loading branch information
zeitounator authored Mar 1, 2019
2 parents 986403a + 44ce2c5 commit 4edec44
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 22 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ _(Created with [gh-md-toc](https://github.com/ekalinin/github-markdown-toc))_
* [Force groovy scripts registration](#force-groovy-scripts-registration)
* [Change admin password after first install](#change-admin-password-after-first-install)
* [Upgrade nexus to latest version](#upgrade-nexus-to-latest-version)
* [Skip provisionning tasks](#skip-provisionning-tasks)
* [Dependencies](#dependencies)
* [Example Playbook](#example-playbook)
* [Development, Contribution and Testing](#development-contribution-and-testing)
Expand All @@ -52,7 +53,7 @@ _(Created with [gh-md-toc](https://github.com/ekalinin/github-markdown-toc))_
* [License](#license)
* [Author Information](#author-information)

<!-- Added by: olcla, at: 2019-02-14T02:13+01:00 -->
<!-- Added by: olcla, at: 2019-03-01T15:18+01:00 -->

<!--te-->

Expand All @@ -72,8 +73,7 @@ We would like to thank the original authors for the work done.
- Rsync has to be installed on the target machine (it is not needed on the host running ansible if different)
- `jmespath` library needs to be installed on the host running the playbook (needed for the `json_query` filter). See `requirements.txt`
- Java 8 (mandatory)
- Oracle Java 8 is the official supported platform by Sonatype
- openjdk8 is know to work and is used for deployment test on travis on the corresponding platform docker images.
- **Oracle announced Java 8 EOL. Sonatype is now recommending openjdk8**
- For more information see [nexus3 system requirements](https://help.sonatype.com/display/NXRM3/System+Requirements)
- Apache HTTPD (optional)
- Used to setup a SSL reverse-proxy
Expand Down Expand Up @@ -769,7 +769,7 @@ ansible-playbook -i your/inventory.ini your_playbook.yml -e nexus_run_provisionn
## Dependencies

The java and httpd requirements /can/ be fulfilled with the following galaxy roles :
- [ansiblebit.oracle-java](https://galaxy.ansible.com/ansiblebit/oracle-java/)
- [geerlingguy.apache](https://galaxy.ansible.com/geerlingguy/java/)
- [geerlingguy.apache](https://galaxy.ansible.com/geerlingguy/apache/)

Feel free to use them or implement your own install scenario at your convenience.
Expand Down Expand Up @@ -873,13 +873,16 @@ Feel free to use them or implement your own install scenario at your convenience
- vaadin-addons
- jaspersoft
roles:
- { role: ansiblebit.oracle-java, oracle_java_set_as_default: yes, tags: ['ansiblebit.oracle-java'] }
- { role: geerlingguy.java, vars: See role doc for your distribution/version }
# Debian/Ubuntu only
# - { role: geerlingguy.apache, apache_create_vhosts: no, apache_mods_enabled: ["proxy_http.load", "headers.load"], apache_remove_default_vhost: true, tags: ["geerlingguy.apache"] }
# RedHat/CentOS only
- { role: geerlingguy.apache, apache_create_vhosts: no, apache_remove_default_vhost: true, tags: ["geerlingguy.apache"] }
- { role: ansible-ThoTeam.nexus3-oss, tags: ['savoirfairelinux.nexus3-oss'] }
- { role: ansible-ThoTeam.nexus3-oss, tags: ['ansible-ThoTeam.nexus3-oss'] }
```

## Development, Contribution and Testing
Expand Down
5 changes: 5 additions & 0 deletions files/groovy/create_repos_from_list.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ parsed_args.each { currentRepo ->
contentMaxAge : currentRepo.get('maximum_component_age', 1440.0),
metadataMaxAge: currentRepo.get('maximum_metadata_age', 1440.0)
]

configuration.attributes['negativeCache'] = [
enabled: currentRepo.get('negative_cache_enabled', true),
timeToLive: currentRepo.get('negative_cache_ttl', 1440.0)
]
}

// Configs for docker proxy repos
Expand Down
34 changes: 18 additions & 16 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,24 @@
- include_tasks: httpd_reverse_proxy_config.yml
when: httpd_setup_enable

- name: Configure nexus http proxy
include_tasks: call_script.yml
vars:
script_name: setup_http_proxy
args:
with_http_proxy: "{{ nexus_with_http_proxy }}"
http_proxy_host: "{{ nexus_http_proxy_host }}"
http_proxy_port: "{{ nexus_http_proxy_port }}"
http_proxy_username: "{{ nexus_http_proxy_username }}"
http_proxy_password: "{{ nexus_http_proxy_password }}"
with_https_proxy: "{{ nexus_with_https_proxy }}"
https_proxy_host: "{{ nexus_https_proxy_host }}"
https_proxy_port: "{{ nexus_https_proxy_port }}"
https_proxy_username: "{{ nexus_https_proxy_username }}"
https_proxy_password: "{{ nexus_https_proxy_password }}"
proxy_exclude_hosts: "{{ nexus_proxy_exclude_hosts }}"
when: nexus_with_http_proxy or nexus_with_https_proxy

- name: Deleting default repositories
include_tasks: delete_repo_each.yml
with_items:
Expand Down Expand Up @@ -150,22 +168,6 @@
args:
base_url: "{{ nexus_public_scheme }}://{{ nexus_public_hostname }}/"

- include_tasks: call_script.yml
vars:
script_name: setup_http_proxy
args:
with_http_proxy: "{{ nexus_with_http_proxy }}"
http_proxy_host: "{{ nexus_http_proxy_host }}"
http_proxy_port: "{{ nexus_http_proxy_port }}"
http_proxy_username: "{{ nexus_http_proxy_username }}"
http_proxy_password: "{{ nexus_http_proxy_password }}"
with_https_proxy: "{{ nexus_with_https_proxy }}"
https_proxy_host: "{{ nexus_https_proxy_host }}"
https_proxy_port: "{{ nexus_https_proxy_port }}"
https_proxy_username: "{{ nexus_https_proxy_username }}"
https_proxy_password: "{{ nexus_https_proxy_password }}"
proxy_exclude_hosts: "{{ nexus_proxy_exclude_hosts }}"

- include_tasks: call_script.yml
vars:
script_name: setup_realms
Expand Down

0 comments on commit 4edec44

Please sign in to comment.