mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-17 02:13:06 -06:00
AZURE-211 Renamed az_* files to azure_*
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
# Molecule managed
|
||||
|
||||
{% if item.registry is defined %}
|
||||
FROM {{ item.registry.url }}/{{ item.image }}
|
||||
{% else %}
|
||||
FROM {{ item.image }}
|
||||
{% endif %}
|
||||
|
||||
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
|
||||
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
|
||||
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
|
||||
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
|
||||
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \
|
||||
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates && xbps-remove -O; fi
|
||||
@@ -0,0 +1,28 @@
|
||||
---
|
||||
dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: ubuntu_lts
|
||||
image: ubuntu:bionic
|
||||
groups:
|
||||
- azure_node_local
|
||||
provisioner:
|
||||
name: ansible
|
||||
options:
|
||||
skip-tags: runtime_pkg
|
||||
lint:
|
||||
name: ansible-lint
|
||||
options:
|
||||
x: ["701"]
|
||||
inventory:
|
||||
links:
|
||||
group_vars: ../../../../group_vars/
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
enabled: false
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
vars:
|
||||
atl_product_family: "crowd"
|
||||
atl_product_edition: "crowd"
|
||||
atl_product_user: "crowd"
|
||||
atl_download_format: "tarball"
|
||||
roles:
|
||||
- role: linux_common
|
||||
- role: azure_common
|
||||
- role: product_common
|
||||
- role: product_install
|
||||
- role: azure_app_insights_install
|
||||
@@ -0,0 +1,38 @@
|
||||
import os
|
||||
import pytest
|
||||
|
||||
import testinfra.utils.ansible_runner
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
||||
def test_collectd_installed(host):
|
||||
package = host.package('collectd')
|
||||
assert package.is_installed
|
||||
|
||||
def test_collectd_file(host):
|
||||
f = host.file('/etc/collectd/collectd.conf')
|
||||
assert f.exists
|
||||
assert f.contains('InstrumentationKey "XXX"')
|
||||
assert f.mode == 0o0644
|
||||
|
||||
def test_jaxb_installed(host):
|
||||
f = host.file('/usr/share/collectd/java/jaxb-api-2.3.1.jar')
|
||||
assert f.exists
|
||||
|
||||
@pytest.mark.parametrize('filename', [
|
||||
'/opt/atlassian/crowd/current/crowd-webapp/WEB-INF/lib/applicationinsights-core-2.6.0.jar',
|
||||
'/opt/atlassian/crowd/current/crowd-webapp/WEB-INF/lib/applicationinsights-web-2.6.0.jar',
|
||||
'/opt/atlassian/crowd/current/crowd-webapp/WEB-INF/lib/applicationinsights-agent-2.6.0.jar'
|
||||
])
|
||||
def test_app_insight_jars_downloaded(host, filename):
|
||||
f = host.file(filename)
|
||||
assert f.exists
|
||||
|
||||
def test_app_insights_collectd_file(host):
|
||||
f = host.file('/usr/share/collectd/java/applicationinsights-collectd-2.6.0.jar')
|
||||
assert f.exists
|
||||
|
||||
def test_applicationinsights_xml_installed(host):
|
||||
f = host.file('/opt/atlassian/crowd/current/crowd-webapp/WEB-INF/classes/ApplicationInsights.xml')
|
||||
assert f.exists
|
||||
Reference in New Issue
Block a user