Skip to content

Commit

Permalink
Merge branch 'release/2.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
hswong3i committed Dec 10, 2018
2 parents e2a6ae5 + b69e9b6 commit 536c443
Show file tree
Hide file tree
Showing 16 changed files with 396 additions and 185 deletions.
47 changes: 47 additions & 0 deletions .travis.lxd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
config:
images.auto_update_interval: 6

networks:
- name: lxdbr0
type: bridge
config:
ipv4.address: auto
ipv6.address: none

storage_pools:
- name: default
driver: dir
config:
source: /var/snap/lxd/common/lxd/storage-pools/default

profiles:
- name: default
config:
boot.autostart: "true"
security.nesting: "true"
security.privileged: "true"
linux.kernel_modules: ip_tables,ip6_tables,netlink_diag,nf_nat,overlay
raw.lxc: |
lxc.apparmor.profile = unconfined
lxc.cap.drop =
lxc.cgroup.devices.allow = a
lxc.mount.auto = proc:rw sys:rw cgroup:rw
devices:
aadisable:
path: /sys/module/nf_conntrack/parameters/hashsize
source: /dev/null
type: disk
aadisable1:
path: /sys/module/apparmor/parameters/enabled
source: /dev/null
type: disk
root:
path: /
pool: default
type: disk
eth0:
name: eth0
nictype: bridged
parent: lxdbr0
type: nic
44 changes: 14 additions & 30 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,30 @@
---

sudo: required

dist: trusty
dist: xenial

language: python

python:
- 2.7

services:
- docker

env:
global:
- ANSIBLE_FORCE_COLOR: true
- ANSIBLE_LOG_PATH: './ansible.log'
- ANSIBLE_ROLES_PATH: '../'
matrix:
- DOCKER_IMAGE: 'ubuntu:14.04'
- DOCKER_IMAGE: 'ubuntu:16.04'
- DOCKER_IMAGE: 'ubuntu:17.10'
- DOCKER_IMAGE: 'ubuntu:18.04'
- DOCKER_IMAGE: 'centos:6'
- DOCKER_IMAGE: 'centos/systemd:latest'
- LXC_IMAGE: 'images:ubuntu/16.04'
- LXC_IMAGE: 'images:ubuntu/18.04'
- LXC_IMAGE: 'images:centos/6'
- LXC_IMAGE: 'images:centos/7'

before_install:
- pip install --upgrade git+git://github.com/ansible/[email protected]
- pip install --upgrade docker docker-compose
- docker pull $DOCKER_IMAGE
- DOCKER_ID="$(docker run -itd --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /sys/fs/cgroup:/sys/fs/cgroup:ro --tmpfs /run --tmpfs /run/lock $DOCKER_IMAGE | head -c12)"
- sudo apt-get -y purge lxc-* lxd-* && sudo apt-get -y autoremove
- sudo snap install lxd && sudo lxd init --preseed < .travis.lxd.yml
- sudo apt-get -y purge python-openssl && sudo apt-get -y autoremove
- sudo -H pip install --upgrade --requirement requirements.txt

install:
- pip install -r ansible-requirements.txt
- ansible-galaxy install -r requirements.yml
- export ROLE=$(echo $TRAVIS_REPO_SLUG | sed 's/^.*\/ansible-role-/\//g')
- mkdir -p $HOME/.ansible/roles
- ln -s $TRAVIS_BUILD_DIR $HOME/.ansible/roles/$ROLE
- ansible-galaxy install --roles-path $HOME/.ansible/roles --role-file ansible-role-requirements.yml

script:
- yamllint -c .yamllint .
- ansible-playbook -i $DOCKER_ID, -c docker tests/test.yml --syntax-check
- ansible-playbook -i $DOCKER_ID, -c docker tests/test.yml --diff
- ansible-playbook -i $DOCKER_ID, -c docker tests/test.yml --diff
- tail -n 1 $ANSIBLE_LOG_PATH | grep -Eq 'changed=0 +unreachable=0 +failed=0'
- sudo ./scripts/run-tests.sh

notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
35 changes: 20 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
Ansible Role for Bamboo
=======================
# Ansible Role for Bamboo

1.2.0 - TBC
-----------
## 2.2.0 - TBC

### Major Changes

- Add Ubuntu 17.10 and 18.04 support

1.1.0 - 2017-11-23
------------------
## 2.1.0 - 2018-12-10

### Major Changes

- Install Bamboo on Ubuntu 16.04/14.04 and CentOS 7/6 from source
- Update /etc/init.d/bamboo with better support for running with dumb-init inside docker
- Update test cases
- Upgrade Ansible support to 2.6 or higher
- Support both Ubuntu 16.04/18.04 and RHEL/CentOS 6/7
- CI with yamllint, ansible-lint and ansible-playbook --syntax-check
- CI with LXD, improve systemd support
- Use shell only when shell functionality is required
- Upgrade both MySQL and PostgreSQL JDBC driver
- Simplify implementation for building Docker image

## 1.1.0 - 2017-11-23

### Major Changes

1.0.0 - 2017-09-25
------------------
- Install Bamboo on Ubuntu 16.04/14.04 and CentOS 7/6 from source
- Update /etc/init.d/bamboo with better support for running with dumb-init inside docker
- Update test cases

- Ininitial release for Ansible 2.4
- Support both Ubuntu 16.04/14.04 or RHEL/CentOS 7/6
## 1.0.0 - 2017-09-25

- Ininitial release for Ansible 2.4
- Support both Ubuntu 16.04/14.04 or RHEL/CentOS 7/6
36 changes: 14 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Ansible Role for Bamboo
=======================
# Ansible Role for Bamboo

[![Travis](https://img.shields.io/travis/alvistack/ansible-role-bamboo.svg)](https://travis-ci.org/alvistack/ansible-role-bamboo)
[![GitHub release](https://img.shields.io/github/release/alvistack/ansible-role-bamboo.svg)](https://github.com/alvistack/ansible-role-bamboo)
Expand All @@ -8,38 +7,31 @@ Ansible Role for Bamboo

Ansible Role for Atlassian Bamboo Installation.

Requirements
------------
## Requirements

This role require Ansible 2.4 or higher.
This role require Ansible 2.6 or higher.

This role was designed for Ubuntu 14.04/16.04/17.10/18.04 or RHEL/CentOS 6/7.
This role was designed for Ubuntu 16.04/18.04 or RHEL/CentOS 6/7.

Role Variables
--------------
## Role Variables

[defaults/main.yml](defaults/main.yml)

Dependencies
------------
## Dependencies

[meta/main.yml](meta/main.yml)

Example Playbook
----------------
## Example Playbook

[tests/test.yml](tests/test.yml)

License
-------
## License

- Code released under [Apache License 2.0](LICENSE)
- Docs released under [CC BY 4.0](http://creativecommons.org/licenses/by/4.0/)
- Code released under [Apache License 2.0](LICENSE)
- Docs released under [CC BY 4.0](http://creativecommons.org/licenses/by/4.0/)

Author Information
------------------

- Wong Hoi Sing Edison
- <https://twitter.com/hswong3i>
- <https://github.com/hswong3i>
## Author Information

- Wong Hoi Sing Edison
- <https://twitter.com/hswong3i>
- <https://github.com/hswong3i>
1 change: 0 additions & 1 deletion ansible-requirements.txt

This file was deleted.

31 changes: 31 additions & 0 deletions ansible-role-requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---

# (c) Wong Hoi Sing Edison <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

- name: python
src: https://github.com/alvistack/ansible-role-python
version: develop

- name: apt
src: https://github.com/alvistack/ansible-role-apt
version: develop

- name: yum
src: https://github.com/alvistack/ansible-role-yum
version: develop

- name: java
src: https://github.com/alvistack/ansible-role-java
version: develop
38 changes: 14 additions & 24 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Owner and group for Bamdoo.
bamboo_owner: "daemon"
bamboo_group: "daemon"

# Location for the $BAMBOO_HOME directory.
bamboo_home: "/var/atlassian/application-data/bamboo"

# Location for the $BAMBOO_CATALINA directory.
bamboo_catalina: "/opt/atlassian/bamboo"

# Bamboo JVM minimal and maximum memory usage.
# JVM minimal and maximum memory usage.
bamboo_jvm_minimum_memory: "512m"
bamboo_jvm_maximum_memory: "1024m"

# Bamboo Apache Tomcat connector and server port.
bamboo_connector_port: "8085"
bamboo_server_port: "8007"

# Context path for Bamboo installation.
bamboo_context_path: ~

# If Bamboo running behide reverse proxy, setup `bamboo_scheme` with whatever
# `http` or `https`, and supply `bamboo_proxy_name` with its domain name.
bamboo_proxy_name: ~
bamboo_scheme: ~
# Proxy and context path setup.
bamboo_catalina_connector_proxyname: ~
bamboo_catalina_connector_proxyport: ~
bamboo_catalina_connector_scheme: "http"
bamboo_catalina_connector_secure: "false"
bamboo_catalina_context_path: ~

# Atlassian Support recommended JVM arguments.
bamboo_jvm_support_recommended_args: "-Datlassian.plugins.enable.wait=300"

# URL for download Bamboo archive.
bamboo_url: "https://downloads.atlassian.com/software/bamboo/downloads/atlassian-bamboo-6.3.1.tar.gz"
# Session timeout.
bamboo_session_timeout: "300"

# URL for download archives.
bamboo_download_url: "https://downloads.atlassian.com/software/bamboo/downloads/atlassian-bamboo-6.7.1.tar.gz"
mysql_jdbc_download_url: "https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.13.tar.gz"
postgresql_jdbc_download_url: "https://jdbc.postgresql.org/download/postgresql-42.2.5.jar"
5 changes: 2 additions & 3 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,16 @@
# limitations under the License.

galaxy_info:
role_name: bamboo
author: Wong Hoi Sing Edison <[email protected]>
description: Ansible Role for Atlassian Bamboo Installation
company: PantaRei Design
license: Apache License 2.0
min_ansible_version: 2.4
min_ansible_version: 2.6
platforms:
- name: Ubuntu
versions:
- trusty
- xenial
- artful
- bionic
- name: EL
versions:
Expand Down
17 changes: 17 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# (c) Wong Hoi Sing Edison <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

ansible
git+https://github.com/ansible/ansible-lint.git@master#egg=ansible-lint
yamllint
16 changes: 0 additions & 16 deletions requirements.yml

This file was deleted.

34 changes: 34 additions & 0 deletions scripts/run-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

# (c) Wong Hoi Sing Edison <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -o xtrace

cd "$(cd "$(dirname "$0")"; pwd -P)/../"

export ANSIBLE_FORCE_COLOR=true
export ANSIBLE_LOG_PATH="./ansible.log"
export ANSIBLE_ROLES_PATH="$HOME/.ansible/roles"

LXC_IMAGE=${LXC_IMAGE:-"ubuntu:16.04"}
LXC_ID=${LXC_ID:-"$(cat /dev/urandom | tr -dc a-z | head -c1)$(cat /dev/urandom | tr -dc a-z0-9 | head -c11)"}
lxc restart $LXC_ID || lxc launch $LXC_IMAGE $LXC_ID

yamllint -c .yamllint .
ansible-lint .
ansible-playbook -i $LXC_ID, -c lxd tests/test.yml --syntax-check
ansible-playbook -i $LXC_ID, -c lxd tests/test.yml --diff
ansible-playbook -i $LXC_ID, -c lxd tests/test.yml --diff
tail -n 1 $ANSIBLE_LOG_PATH | grep -Eq 'changed=0 +unreachable=0 +failed=0'
Loading

0 comments on commit 536c443

Please sign in to comment.