Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ansible_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
uses: ansible/ansible-lint@v25.9.2
with:
working_directory: ansible/
args: "-x 204,role-name --skip-list role-name[path],yaml[line-length]"
args: "-x no-free-form,role-name,fqcn[action-core],role-name[path],yaml[line-length]"
env:
ANSIBLE_LIBRARY: ${{ github.workspace }}/ansible/library
4 changes: 2 additions & 2 deletions .github/workflows/docker_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
env:
# Doesn't matter too much, we just want to verify the build passes
CURRENT_LTS: '0.24'
KB_VERSION: '0.24.15'
KAUI_VERSION: '3.0.20'
KB_VERSION: '0.24.16'
KAUI_VERSION: '4.0.6'

jobs:
docker_ci:
Expand Down
2 changes: 1 addition & 1 deletion ansible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ To build upon these roles, you can create your own play, e.g.:
include_role:
name: killbill-cloud/ansible/roles/killbill
- name: customize Kill Bill
ansible.builtin.import_tasks: roles/acme/tasks/main.yml
import_tasks: roles/acme/tasks/main.yml
```

Note that you need to have your own templates directory, containing your own templates.
Expand Down
4 changes: 2 additions & 2 deletions ansible/diagnostic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
hosts: all
tasks:
- name: Setup Ruby
ansible.builtin.import_tasks: roles/common/tasks/main.yml
import_tasks: roles/common/tasks/main.yml
- name: Setup KPM
ansible.builtin.import_tasks: roles/kpm/tasks/main.yml
import_tasks: roles/kpm/tasks/main.yml
- name: Gather diagnostics
killbill_diagnostics:
kpm_path: "{{ kpm_path }}"
Expand Down
4 changes: 2 additions & 2 deletions ansible/flyway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
hosts: all
tasks:
- name: Setup Ruby
ansible.builtin.import_tasks: roles/common/tasks/main.yml
import_tasks: roles/common/tasks/main.yml
- name: Install Flyway
ansible.builtin.import_tasks: roles/migrations/tasks/flyway.yml
import_tasks: roles/migrations/tasks/flyway.yml
2 changes: 1 addition & 1 deletion ansible/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
java_home: /usr/lib/jvm/default-java
tasks:
- name: Install Java
ansible.builtin.import_tasks: roles/tomcat/tasks/java.yml
import_tasks: roles/tomcat/tasks/java.yml
6 changes: 3 additions & 3 deletions ansible/kaui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
kaui_kpm_yml: /var/lib/kaui/kpm.yml
tasks:
- name: Setup Ruby
ansible.builtin.import_tasks: roles/common/tasks/main.yml
import_tasks: roles/common/tasks/main.yml
- name: Setup Tomcat
ansible.builtin.import_tasks: roles/tomcat/tasks/main.yml
import_tasks: roles/tomcat/tasks/main.yml
- name: Install Kaui
ansible.builtin.import_tasks: roles/kaui/tasks/main.yml
import_tasks: roles/kaui/tasks/main.yml
4 changes: 2 additions & 2 deletions ansible/kaui_json_logging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
hosts: all
tasks:
- name: Download third-party dependencies
ansible.builtin.import_tasks: roles/kaui/tasks/json_logging.yml
import_tasks: roles/kaui/tasks/json_logging.yml
- name: Enable Tomcat JSON logging
ansible.builtin.import_tasks: roles/tomcat/tasks/json_logging.yml
import_tasks: roles/tomcat/tasks/json_logging.yml
6 changes: 3 additions & 3 deletions ansible/killbill.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
hosts: all
tasks:
- name: Setup Ruby
ansible.builtin.import_tasks: roles/common/tasks/main.yml
import_tasks: roles/common/tasks/main.yml
- name: Setup Tomcat
ansible.builtin.import_tasks: roles/tomcat/tasks/main.yml
import_tasks: roles/tomcat/tasks/main.yml
- name: Install Kill Bill
ansible.builtin.import_tasks: roles/killbill/tasks/main.yml
import_tasks: roles/killbill/tasks/main.yml
2 changes: 1 addition & 1 deletion ansible/killbill_json_logging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
hosts: all
tasks:
- name: Enable Tomcat JSON logging
ansible.builtin.import_tasks: roles/tomcat/tasks/json_logging.yml
import_tasks: roles/tomcat/tasks/json_logging.yml
2 changes: 1 addition & 1 deletion ansible/kpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
hosts: all
tasks:
- name: Install KPM
ansible.builtin.import_tasks: roles/kpm/tasks/main.yml
import_tasks: roles/kpm/tasks/main.yml
7 changes: 3 additions & 4 deletions ansible/roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
- name: Setup Ansible ruby interpreter
ansible.builtin.set_fact:
ansible_ruby_interpreter: "{{ kpm_path }}/lib/ruby/bin/ruby"
set_fact: ansible_ruby_interpreter="{{ kpm_path }}/lib/ruby/bin/ruby"
tags: common
# noqa: var-naming[no-role-prefix]
# Required for ansible-lint: variable must stay named 'ansible_ruby_interpreter' for Ansible to pick it up
# noqa: var-naming[no-role-prefix]
# Required for ansible-lint: variable must stay named 'ansible_ruby_interpreter' for Ansible to pick it up
2 changes: 1 addition & 1 deletion ansible/roles/kaui/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
# Expand the WAR to speed up startup
- name: Expand WAR file if not already done
become: true
ansible.builtin.command: |
command: |
"{{ java_home }}/bin/jar" -xf ../ROOT.war
args:
chdir: "{{ catalina_base }}/{{ kaui_webapps }}/ROOT"
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/killbill/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
# Expand the WAR to speed up startup
- name: Expand WAR file if not already done
become: true
ansible.builtin.command: |
command: |
"{{ java_home }}/bin/jar" -xf ../ROOT.war
args:
chdir: "{{ catalina_base }}/{{ kb_webapps }}/ROOT"
Expand Down
9 changes: 3 additions & 6 deletions ansible/roles/kpm/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,9 @@
# To make things easier
- name: Rename noarch KPM directory
become: true
ansible.builtin.command:
cmd: >
mv {{ kpm_install_dir }}/kpm-{{ kpm_version }}-noarch
{{ kpm_install_dir }}/kpm-{{ kpm_version }}-linux-{{ ansible_architecture }}
creates: "{{ kpm_install_dir }}/kpm-{{ kpm_version }}-linux-{{ ansible_architecture }}"
command: "mv {{ kpm_install_dir }}/kpm-{{ kpm_version }}-noarch {{ kpm_install_dir }}/kpm-{{ kpm_version }}-linux-{{ ansible_architecture }}"
when: not kpm_bin.stat.exists and kpm_arch_test.status >= 400
changed_when: false
tags: kpm

- name: Download pre-built KPM
Expand Down Expand Up @@ -106,7 +103,7 @@
# The first time KPM is run, a Gemfile.lock needs to written out
- name: Initialize KPM
become: true
ansible.builtin.command: |
command: |
"{{ kpm_path }}/kpm" version
args:
creates: "{{ kpm_path }}/lib/vendor/Gemfile.lock"
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/migrations/tasks/flyway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
register: migrations_flyway_bin
tags: migrations

- name: Download Kill Bill Flyway metadata
- name: Install Flyway if not present
when: not migrations_flyway_bin.stat.exists
tags: migrations
block:
Expand Down
35 changes: 23 additions & 12 deletions ansible/roles/tomcat/tasks/native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
tags: native

- name: Find apr-1-config path
ansible.builtin.command: which apr-1-config
ansible.builtin.command:
argv:
- which
- apr-1-config
register: tomcat_apr_config_path_output
changed_when: false
tags: native
Expand All @@ -49,7 +52,11 @@
tags: native
block:
- name: Find tomcat_gnu_arch path
ansible.builtin.command: dpkg-architecture --query DEB_BUILD_GNU_TYPE
ansible.builtin.command:
argv:
- dpkg-architecture
- --query
- DEB_BUILD_GNU_TYPE
register: tomcat_gnu_arch_output
changed_when: false
tags: native
Expand Down Expand Up @@ -79,29 +86,33 @@

- name: Configure native libraries
ansible.builtin.command:
cmd: >
./configure
--build="{{ tomcat_gnu_arch }}"
--libdir="{{ tomcat_native_libdir }}"
--prefix="{{ catalina_home }}"
--with-apr="{{ tomcat_apr_config_path }}"
--with-java-home="{{ java_home }}"
--with-ssl=yes
argv:
- ./configure
- --build={{ tomcat_gnu_arch }}
- --libdir={{ tomcat_native_libdir }}
- --prefix={{ catalina_home }}
- --with-apr={{ tomcat_apr_config_path }}
- --with-java-home={{ java_home }}
- --with-ssl=yes
chdir: "{{ tomcat_workspace.path }}/native"
changed_when: false
tags: native

- name: Build native libraries
ansible.builtin.command:
cmd: make all
argv:
- make
- all
chdir: "{{ tomcat_workspace.path }}/native"
changed_when: false
tags: native

- name: Install native libraries
become: true
ansible.builtin.command:
cmd: make install
argv:
- make
- install
chdir: "{{ tomcat_workspace.path }}/native"
changed_when: false
tags: native
Expand Down
6 changes: 3 additions & 3 deletions ansible/tomcat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
hosts: all
tasks:
- name: Install Tomcat
ansible.builtin.import_tasks: roles/tomcat/tasks/install.yml
import_tasks: roles/tomcat/tasks/install.yml
- name: Install Tomcat native libraries
ansible.builtin.import_tasks: roles/tomcat/tasks/native.yml
import_tasks: roles/tomcat/tasks/native.yml
when: java_home is defined
- name: Setup Tomcat
ansible.builtin.import_tasks: roles/tomcat/tasks/main.yml
import_tasks: roles/tomcat/tasks/main.yml
2 changes: 1 addition & 1 deletion ansible/tomcat_restart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
become: yes
tasks:
- name: Restart Tomcat
ansible.builtin.import_tasks: roles/tomcat/tasks/restart.yml
import_tasks: roles/tomcat/tasks/restart.yml
2 changes: 1 addition & 1 deletion ansible/tomcat_stop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
become: yes
tasks:
- name: Stop Tomcat
ansible.builtin.import_tasks: roles/tomcat/tasks/stop.yml
import_tasks: roles/tomcat/tasks/stop.yml
1 change: 1 addition & 0 deletions docker/templates/base/latest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ ENV NEXUS_REPOSITORY=${NEXUS_REPOSITORY:-maven2}
ENV KPM_INSTALL_DIR=/opt
RUN ansible-playbook $ANSIBLE_OPTS \
-e kpm_install_dir=$KPM_INSTALL_DIR \
-e kpm_path=$KPM_INSTALL_DIR/kpm-latest \
-e kpm_owner=$TOMCAT_OWNER \
-e kpm_group=$TOMCAT_GROUP \
-e nexus_url=$NEXUS_URL \
Expand Down
2 changes: 2 additions & 0 deletions docker/templates/kaui/latest/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ COPY ./kaui.sh $KAUI_INSTALL_DIR

ENV KPM_INSTALL_CMD="ansible-playbook $ANSIBLE_OPTS \
-e kpm_install_dir=$KPM_INSTALL_DIR \
-e kpm_path=$KPM_INSTALL_DIR/kpm-latest \
-e kpm_yml=$KAUI_INSTALL_DIR/kpm.yml \
-e kaui_kpm_yml=$KAUI_INSTALL_DIR/kpm.yml \
-e tomcat_owner=$TOMCAT_OWNER \
-e tomcat_group=$TOMCAT_GROUP \
-e catalina_base=$CATALINA_BASE \
Expand Down
5 changes: 5 additions & 0 deletions docker/templates/killbill/latest/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ COPY ./shiro.ini.template $KILLBILL_INSTALL_DIR/config

ENV KPM_INSTALL_CMD="ansible-playbook $ANSIBLE_OPTS \
-e kpm_install_dir=$KPM_INSTALL_DIR \
-e kpm_path=$KPM_INSTALL_DIR/kpm-latest \
-e kpm_yml=$KILLBILL_INSTALL_DIR/kpm.yml \
-e killbill_kpm_yml=$KILLBILL_INSTALL_DIR/kpm.yml \
-e kb_config_dir=$KILLBILL_INSTALL_DIR \
-e kb_plugins_dir=$KILLBILL_INSTALL_DIR/bundles \
-e tomcat_owner=$TOMCAT_OWNER \
Expand All @@ -36,7 +38,9 @@ ENV KPM_INSTALL_CMD="ansible-playbook $ANSIBLE_OPTS \

ENV KPM_DIAGNOSTIC_CMD="ansible-playbook $ANSIBLE_OPTS \
-e kpm_install_dir=$KPM_INSTALL_DIR \
-e kpm_path=$KPM_INSTALL_DIR/kpm-latest \
-e kpm_yml=$KILLBILL_INSTALL_DIR/kpm.yml \
-e killbill_kpm_yml=$KILLBILL_INSTALL_DIR/kpm.yml \
-e kb_config_dir=$KILLBILL_INSTALL_DIR \
-e kb_plugins_dir=$KILLBILL_INSTALL_DIR/bundles \
-e tomcat_owner=$TOMCAT_OWNER \
Expand All @@ -47,6 +51,7 @@ ENV KPM_DIAGNOSTIC_CMD="ansible-playbook $ANSIBLE_OPTS \
ENV MIGRATIONS_CMD="ansible-playbook $ANSIBLE_OPTS \
-e kpm_install_dir=$KPM_INSTALL_DIR \
-e kpm_yml=$KILLBILL_INSTALL_DIR/kpm.yml \
-e killbill_kpm_yml=$KILLBILL_INSTALL_DIR/kpm.yml \
-e kb_config_dir=$KILLBILL_INSTALL_DIR \
-e kb_plugins_dir=$KILLBILL_INSTALL_DIR/bundles \
-e flyway_owner=$TOMCAT_OWNER \
Expand Down
4 changes: 2 additions & 2 deletions kpm/spec/kpm/remote/maven_central_api_calls_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
logger.level = Logger::DEBUG
logger
end
let(:test_version) { '0.24.15' }
let(:test_version) { '0.24.16' }
let(:coordinates_map) do
{ version: test_version,
group_id: 'org.kill-bill.billing',
Expand Down Expand Up @@ -38,7 +38,7 @@
parsed_pom = REXML::Document.new(File.read(destination))
expect(parsed_pom.elements['//groupId'].text).to eq('org.kill-bill.billing')
expect(parsed_pom.elements['//artifactId'].text).to eq('killbill-oss-parent')
expect(parsed_pom.elements['//version'].text).to eq('0.146.63')
expect(parsed_pom.elements['//version'].text).to eq('0.146.67')
}
end

Expand Down
Loading