Skip to content

Commit

Permalink
Merge pull request #3 from idealista/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jdvr authored Oct 17, 2017
2 parents 70be52e + 67ce78b commit c1c18e3
Show file tree
Hide file tree
Showing 14 changed files with 328 additions and 7 deletions.
74 changes: 74 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting


## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [[email protected]](mailto:[email protected]). All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org
100 changes: 100 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Contributing to Idealista

:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:

The following is a set of guidelines for contributing to Idealista's repositories, which are hosted in the [Idealista Organization](https://github.com/idealista) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

#### Table Of Contents

[Code of Conduct](#code-of-conduct)

[How Can I Contribute?](#how-can-i-contribute)
* [Reporting Bugs](#reporting-bugs)
* [Suggesting Enhancements](#suggesting-enhancements)
* [Pull Requests](#pull-requests)
* [Changelog](#changelog)

[Styleguides](#styleguides)
* [Git Commit Messages](#git-commit-messages)

## Code of Conduct

This project and everyone participating in it is governed by the [Idealista Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [[email protected]](mailto:[email protected]).


## How Can I Contribute?

### Reporting Bugs

This section guides you through submitting a bug report for Idealista. Following these guidelines helps maintainers and the community understand your report :pencil:, reproduce the behavior :computer: :computer:, and find related reports :mag_right:.

Before creating bug reports, please check [this list](#before-submitting-a-bug-report) as you might find out that you don't need to create one. When you are creating a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out [the required template](ISSUE_TEMPLATE.md), the information it asks for helps us resolve issues faster.

> **Note:** If you find a **Closed** issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.
#### Before Submitting A Bug Report

* **Check the last version.** Check if you can reproduce the problem in the latest version of the project.
* **Check the FAQ of the project** for a list of common questions and problems.
* **Perform a [cursory search](https://github.com/issues?q=+is%3Aissue+user%3Aidealista)** to see if the problem has already been reported. If it has **and the issue is still open**, add a comment to the existing issue instead of opening a new one.

#### How Do I Submit A (Good) Bug Report?

Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). Create an issue on the project repository and provide the following information by filling in [the template](ISSUE_TEMPLATE.md).

Explain the problem and include additional details to help maintainers reproduce the problem:

* **Use a clear and descriptive title** for the issue to identify the problem.
* **Describe the exact steps which reproduce the problem** in as many details as possible.
* **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
* **Explain which behavior you expected to see instead and why.**

### Suggesting Enhancements

This section guides you through submitting an enhancement suggestion for Idealista, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion :pencil: and find related suggestions :mag_right:.

Before creating enhancement suggestions, please check [this list](#before-submitting-an-enhancement-suggestion) as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion). Fill in [the template](ISSUE_TEMPLATE.md), including the steps that you imagine you would take if the feature you're requesting existed.

#### Before Submitting An Enhancement Suggestion

* **Check the last version.** Check if you can reproduce the problem in the latest version of the project.
* **Check the FAQ of the project** for a list of common questions and problems.
* **Perform a [cursory search](https://github.com/issues?q=+is%3Aissue+user%3Aidealista)** to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.

#### How Do I Submit A (Good) Enhancement Suggestion?

Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/). Create an issue on the project repository and provide the following information by filling in [the template](ISSUE_TEMPLATE.md):

* **Use a clear and descriptive title** for the issue to identify the suggestion.
* **Provide a step-by-step description of the suggested enhancement** in as many details as possible.
* **Provide specific examples to demonstrate the steps**.
* **Describe the current behavior** and **explain which behavior you expected to see instead** and why.
* **Explain why this enhancement would be useful**.
* **List some other text editors or applications where this enhancement exists.**
* **Specify which version are you're using.**

### Pull Requests

* Fill in [the required template](PULL_REQUEST_TEMPLATE.md)
* Any pull request should has **idealista:develop** as base branch.

### Changelog

Every project has a CHANGELOG.md file. Once your code is ready to be merged please fill the issue after the **Unreleased** section as explained:

* For an enhancement, fill the issue after the **Added** subsection (create it if doesn't exists)
* For a fixed bug, fill the issue after the **Fixed** subsection (create it if doesn't exists)
* For an improvement, fill the issue after the **Changed** subsection (create it if doesn't exists)

Then write the issue info this way:

- *[#29](https://github.com/idealista/nginx-role/issues/29) Support debian stretch* @jmonterrubio

## Styleguides

### Git Commit Messages

* Use the present tense ("Add feature" not "Added feature")
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
* Limit the first line to 72 characters or less
* Reference issues and pull requests liberally after the first line
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!--
Have you read Idealista's Code of Conduct? By filling an Issue, you are expected to comply with it,
including treating everyone with respect: https://github.com/idealista/idealista/blob/master/CODE_OF_CONDUCT.md
-->

### Prerequisites

* [ ] Put an X between the brackets on this line if you have done all of the following:
* Checked that your issue isn't already filled: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aidealista
* Checked that there is not already provided the described functionality

### Description

[Description of the issue]

### Steps to Reproduce

1. [First Step]
2. [Second Step]
3. [and so on...]

**Expected behavior:** [What you expect to happen]

**Actual behavior:** [What actually happens]

**Reproduces how often:** [What percentage of the time does it reproduce?]

### Versions

The version/s you notice the behavior.

### Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.
26 changes: 26 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
### Requirements

* Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
* All new code requires tests to ensure against regressions
* Remember to set **idealista:develop** as base branch;

### Description of the Change

<!--
We must be able to understand the design of your change from this description. If we can't get a good idea of what the code will be doing from the description here, the pull request may be closed at the maintainers' discretion. Keep in mind that the maintainer reviewing this PR may not be familiar with or have worked with the code here recently, so please walk us through the concepts.
-->


### Benefits

<!-- What benefits will be realized by the code change? -->

### Possible Drawbacks

<!-- What are the possible side-effects or negative impacts of the code change? -->

### Applicable Issues

<!-- Enter any applicable Issues here -->
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ tests/__pycache__
.cache
.vagrant
tests/roles
*.iml
.idea/
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
language: python
python: "2.7.13"
sudo: required

services:
- docker
install:
- pip install ansible==2.3.1.0
- pip install molecule==1.25.0
- pip install docker
script:
- molecule test --driver docker

notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a ch

## [Unreleased](https://github.com/idealista/tomcat-role/tree/develop)

## [1.1.0](https://github.com/idealista/tomcat-role/tree/1.1.0)

### Added
- *[#1](https://github.com/idealista/tomcat-role/issues/1) Add deploy task* @jdvr


## [1.0.0](https://github.com/idealista/tomcat-role/tree/1.0.0)

### Added
- *First release*
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
![Logo](https://raw.githubusercontent.com/idealista/tomcat-role/master/logo.gif)

[![Build Status](https://travis-ci.org/idealista/tomcat-role.svg?branch=master)](https://travis-ci.org/idealista/tomcat-role)
# Tomcat Ansible role

This ansible role installs a Tomcat server in a debian environment.
Expand Down Expand Up @@ -52,7 +52,6 @@ ansible-galaxy install -p roles -r requirements.yml -f
Use in a playbook:

```
---
- hosts: someserver
roles:
- { role: tomcat }
Expand Down Expand Up @@ -94,4 +93,4 @@ This project is licensed under the [Apache 2.0](https://www.apache.org/licenses/

## Contributing

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
Please read [CONTRIBUTING.md](.github/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
11 changes: 10 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
## General

tomcat_version: 8.0.44
tomcat_version: 8.5.23

## Service options

Expand All @@ -18,6 +18,7 @@ tomcat_service_state: started
tomcat_install_path: "/opt/tomcat"
tomcat_bin_path: "{{ tomcat_install_path }}/bin"
tomcat_conf_path: "{{ tomcat_install_path }}/conf"
tomcat_webapps_path: "{{ tomcat_install_path }}/webapps"

# Allowing playbooks to provide external config files&templates
tomcat_extra_conf_path: "{{ playbook_dir }}/files/tomcat/conf"
Expand Down Expand Up @@ -49,3 +50,11 @@ tomcat_users:
- name: admin
password: must-be-changed
roles: manager-gui

## Deploy
tomcat_download_wars: true
tomcat_war_to_deploy_urls:
- https://tomcat.apache.org/tomcat-8.5-doc/appdev/sample/sample.war
tomcat_local_wars: false
tomcat_war_to_deploy_path:
- "{{ playbook_dir }}/sample.war"
23 changes: 23 additions & 0 deletions molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,26 @@ vagrant:
- network_name: private_network
type: dhcp
auto_config: true

docker:
containers:
- name: tomcat.vm
ansible_groups:
- tomcat

dockerfile: tests/Dockerfile
image: debian9-testinfra
image_version: latest

privileged: True
cap_add:
- SYS_ADMIN
volume_mounts:
- '/sys/fs/cgroup:/sys/fs/cgroup:ro'
command: '/lib/systemd/systemd'

verifier:
name: testinfra
options:
connection: ansible
ansible-inventory: .molecule/ansible_inventory
19 changes: 19 additions & 0 deletions tasks/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---

- name: Tomcat | Download wars on webapps
get_url:
url: "{{ item }}"
dest: "{{ tomcat_webapps_path }}"
mode: 0755
validate_certs: no
with_items: "{{ tomcat_war_to_deploy_urls }}"
when: tomcat_download_wars


- name: Tomcat | Copy local wars to webapps
copy:
src: "{{ item }}"
dest: "{{ tomcat_webapps_path }}"
mode: 0755
with_items: "{{ tomcat_war_to_deploy_path }}"
when: tomcat_local_wars
7 changes: 6 additions & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,9 @@
- name: Tomcat | Config
include: config.yml
tags:
- config
- config

- name: Tomcat | Deploy
include: deploy.yml
tags:
- deploy
5 changes: 5 additions & 0 deletions tests/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM geerlingguy/docker-debian9-ansible:latest

# This is to override Testinfra issue with Debian 9 Docker image
RUN touch /tmp/systemd
RUN ln -s /tmp/systemd /sbin/init
Loading

0 comments on commit c1c18e3

Please sign in to comment.