mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-13 08:23:06 -06:00
Merge branch 'master' into ITPLAT-387-dcd---update-systemd-servic
This commit is contained in:
15
Pipfile
15
Pipfile
@@ -4,16 +4,17 @@ verify_ssl = true
|
||||
name = "pypi"
|
||||
|
||||
[packages]
|
||||
ansible = "==2.8.5"
|
||||
boto3 = "==1.9.242"
|
||||
botocore = "==1.12.242"
|
||||
ansible = "==2.10.5"
|
||||
boto3 = "==1.16.56"
|
||||
botocore = "==1.19.57"
|
||||
|
||||
[dev-packages]
|
||||
molecule = "==2.20.2"
|
||||
docker = "==4.1.0"
|
||||
six = "*"
|
||||
molecule = "==3.2.2"
|
||||
molecule-docker = "==0.2.4"
|
||||
docker = "==4.4.1"
|
||||
taskcat = "*"
|
||||
Jinja2 = "*"
|
||||
pytest = "*"
|
||||
testinfra = "*"
|
||||
|
||||
[requires]
|
||||
python_version = "3.7"
|
||||
|
||||
1045
Pipfile.lock
generated
1045
Pipfile.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@
|
||||
atl_product_family: "jira"
|
||||
atl_product_user: "jira"
|
||||
atl_product_edition: "jira-{{ lookup('env', 'ATL_PRODUCT_EDITION') | lower }}"
|
||||
atl_install_jsd_as_obr: "{{ lookup('env', 'ATL_JSD_ASOBR') }}"
|
||||
atl_install_jsd_as_obr: "{{ lookup('env', 'ATL_JSD_ASOBR') | bool }}"
|
||||
atl_systemd_service_name: "jira.service"
|
||||
|
||||
atl_startup_systemd_params:
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
# Runs atlassian-slingshot to backup your product instance. Should be run when there is only 1 app node (i.e server or single node cluster)
|
||||
# Params
|
||||
# Required
|
||||
# atl_product_family - should be "jira", "confluence", or "stash"
|
||||
# atl_slingshot_backup_dir - working directory for the backup, should be large enough to fit database and shared home dumps
|
||||
# atl_s3_backup_bucket - s3 bucket to upload your backup to
|
||||
# atl_s3_backup_region - AWS region where the s3 bucket is deployed
|
||||
#
|
||||
# There are other variables which can be overriden. See the tasks for details. The will be defaulted by the role defaults or the inventory group_vars
|
||||
|
||||
- hosts: aws_node_local
|
||||
roles:
|
||||
- role: create_backups
|
||||
@@ -18,9 +18,10 @@ pipelines:
|
||||
- step:
|
||||
name: Pre Parallelization stage
|
||||
script:
|
||||
- echo "Running tests in 38 batches"
|
||||
- echo "Running tests in 37 batches"
|
||||
|
||||
- step:
|
||||
name: Check if number of batches match actual number of scenarios
|
||||
name: Check if the template is up-to-date
|
||||
script:
|
||||
- |
|
||||
actual_scenario_count=$(find ./roles -type f -name "molecule.yml" -exec dirname {} ';' | wc -l | sed -e 's/^[[:space:]]*//')
|
||||
@@ -30,309 +31,302 @@ pipelines:
|
||||
echo "Mismatch between expected and actual number [${actual_scenario_count}] of scenarios. Please look at https://bitbucket.org/atlassian/dc-deployments-automation/src/master/DEVELOPMENT.md for instructions on how to fix this error."
|
||||
exit $GREP_RETURN_CODE
|
||||
fi
|
||||
|
||||
- parallel:
|
||||
- step:
|
||||
name: Molecule Test Batch - 1
|
||||
name: bitbucket_config/default
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 1
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/bitbucket_config
|
||||
- pipenv run molecule test -s default
|
||||
- step:
|
||||
name: Molecule Test Batch - 2
|
||||
name: restore_backups/default
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 2
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/restore_backups
|
||||
- pipenv run molecule test -s default
|
||||
- step:
|
||||
name: Molecule Test Batch - 3
|
||||
name: restore_backups/restore_conf_server
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 3
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/restore_backups
|
||||
- pipenv run molecule test -s restore_conf_server
|
||||
- step:
|
||||
name: Molecule Test Batch - 4
|
||||
name: restore_backups/restore_jira_clustered
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 4
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/restore_backups
|
||||
- pipenv run molecule test -s restore_jira_clustered
|
||||
- step:
|
||||
name: Molecule Test Batch - 5
|
||||
name: diy_backup/default
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 5
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/diy_backup
|
||||
- pipenv run molecule test -s default
|
||||
- step:
|
||||
name: Molecule Test Batch - 6
|
||||
name: product_startup/synchrony
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 6
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/product_startup
|
||||
- pipenv run molecule test -s synchrony
|
||||
- step:
|
||||
name: Molecule Test Batch - 7
|
||||
name: product_startup/default
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 7
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/product_startup
|
||||
- pipenv run molecule test -s default
|
||||
- step:
|
||||
name: Molecule Test Batch - 8
|
||||
name: product_startup/bitbucket
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 8
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/product_startup
|
||||
- pipenv run molecule test -s bitbucket
|
||||
- step:
|
||||
name: Molecule Test Batch - 9
|
||||
name: product_common/default
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 9
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/product_common
|
||||
- pipenv run molecule test -s default
|
||||
- step:
|
||||
name: Molecule Test Batch - 10
|
||||
name: product_common/system_jdk
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 10
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/product_common
|
||||
- pipenv run molecule test -s system_jdk
|
||||
- step:
|
||||
name: Molecule Test Batch - 11
|
||||
name: confluence_config/default
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 11
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/confluence_config
|
||||
- pipenv run molecule test -s default
|
||||
- step:
|
||||
name: Molecule Test Batch - 12
|
||||
name: confluence_config/aurora
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 12
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/confluence_config
|
||||
- pipenv run molecule test -s aurora
|
||||
- step:
|
||||
name: Molecule Test Batch - 13
|
||||
name: confluence_config/system_jdk
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 13
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/confluence_config
|
||||
- pipenv run molecule test -s system_jdk
|
||||
- step:
|
||||
name: Molecule Test Batch - 14
|
||||
name: confluence_config/password_char_escaping
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 14
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/confluence_config
|
||||
- pipenv run molecule test -s password_char_escaping
|
||||
- step:
|
||||
name: Molecule Test Batch - 15
|
||||
name: jira_config/default
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 15
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/jira_config
|
||||
- pipenv run molecule test -s default
|
||||
- step:
|
||||
name: Molecule Test Batch - 16
|
||||
name: jira_config/aurora
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 16
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/jira_config
|
||||
- pipenv run molecule test -s aurora
|
||||
- step:
|
||||
name: Molecule Test Batch - 17
|
||||
name: jira_config/jira_config_props
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 17
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/jira_config
|
||||
- pipenv run molecule test -s jira_config_props
|
||||
- step:
|
||||
name: Molecule Test Batch - 18
|
||||
name: jira_config/password_char_escaping
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 18
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/jira_config
|
||||
- pipenv run molecule test -s password_char_escaping
|
||||
- step:
|
||||
name: Molecule Test Batch - 19
|
||||
name: product_install/jira_version_from_file
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 19
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/product_install
|
||||
- pipenv run molecule test -s jira_version_from_file
|
||||
- step:
|
||||
name: Molecule Test Batch - 20
|
||||
name: product_install/jira_cached_with_upgrade
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 20
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/product_install
|
||||
- pipenv run molecule test -s jira_cached_with_upgrade
|
||||
- step:
|
||||
name: Molecule Test Batch - 21
|
||||
name: product_install/servicedesk4
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 21
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/product_install
|
||||
- pipenv run molecule test -s servicedesk4
|
||||
- step:
|
||||
name: Molecule Test Batch - 22
|
||||
name: product_install/servicedesk3
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 22
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/product_install
|
||||
- pipenv run molecule test -s servicedesk3
|
||||
- step:
|
||||
name: Molecule Test Batch - 23
|
||||
name: product_install/jira_software_latest
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 23
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/product_install
|
||||
- pipenv run molecule test -s jira_software_latest
|
||||
- step:
|
||||
name: Molecule Test Batch - 24
|
||||
name: product_install/default
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 24
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/product_install
|
||||
- pipenv run molecule test -s default
|
||||
- step:
|
||||
name: Molecule Test Batch - 25
|
||||
name: product_install/bitbucket_latest
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 25
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/product_install
|
||||
- pipenv run molecule test -s bitbucket_latest
|
||||
- step:
|
||||
name: Molecule Test Batch - 26
|
||||
name: product_install/jira_version_override
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 26
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/product_install
|
||||
- pipenv run molecule test -s jira_version_override
|
||||
- step:
|
||||
name: Molecule Test Batch - 27
|
||||
name: product_install/crowd_latest
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 27
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/product_install
|
||||
- pipenv run molecule test -s crowd_latest
|
||||
- step:
|
||||
name: Molecule Test Batch - 28
|
||||
name: product_install/servicedesk_latest
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 28
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/product_install
|
||||
- pipenv run molecule test -s servicedesk_latest
|
||||
- step:
|
||||
name: Molecule Test Batch - 29
|
||||
name: product_install/jira_version_latest
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 29
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/product_install
|
||||
- pipenv run molecule test -s jira_version_latest
|
||||
- step:
|
||||
name: Molecule Test Batch - 30
|
||||
name: product_install/confluence_latest
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 30
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/product_install
|
||||
- pipenv run molecule test -s confluence_latest
|
||||
- step:
|
||||
name: Molecule Test Batch - 31
|
||||
name: product_install/jira_cached_with_downgrade
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 31
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/product_install
|
||||
- pipenv run molecule test -s jira_cached_with_downgrade
|
||||
- step:
|
||||
name: Molecule Test Batch - 32
|
||||
name: product_install/jira_tarball
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 32
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/product_install
|
||||
- pipenv run molecule test -s jira_tarball
|
||||
- step:
|
||||
name: Molecule Test Batch - 33
|
||||
name: product_install/jira_all
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 33
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/product_install
|
||||
- pipenv run molecule test -s jira_all
|
||||
- step:
|
||||
name: Molecule Test Batch - 34
|
||||
name: aws_common/logs-disabled
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 34
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/aws_common
|
||||
- pipenv run molecule test -s logs-disabled
|
||||
- step:
|
||||
name: Molecule Test Batch - 35
|
||||
name: aws_common/cw-disabled
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 35
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/aws_common
|
||||
- pipenv run molecule test -s cw-disabled
|
||||
- step:
|
||||
name: Molecule Test Batch - 36
|
||||
name: aws_common/default
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 36
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/aws_common
|
||||
- pipenv run molecule test -s default
|
||||
- step:
|
||||
name: Molecule Test Batch - 37
|
||||
name: linux_common/default
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 37
|
||||
|
||||
- step:
|
||||
name: Molecule Test Batch - 38
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- apt-get update && ./bin/install-ansible --dev
|
||||
- ./bin/run-tests-in-batches --batch 38
|
||||
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/linux_common
|
||||
- pipenv run molecule test -s default
|
||||
|
||||
|
||||
@@ -153,10 +153,3 @@ atl_rds_security_group: "{{ lookup('env', 'ATL_RDS_SECURITY_GROUP') }}"
|
||||
|
||||
atl_backup_manifest_url: "{{ lookup('env', 'ATL_BACKUP_MANIFEST_URL') }}"
|
||||
atl_restore_required: "{{ atl_backup_manifest_url is defined and atl_backup_manifest_url != '' }}"
|
||||
|
||||
|
||||
atl_bitbucket_license_key: "{{ lookup('env', 'ATL_BB_LICENSEKEY') }}"
|
||||
atl_bitbucket_admin_password: "{{ lookup('env', 'ATL_BB_ADMIN_PASSWORD') }}"
|
||||
|
||||
atl_bitbucket_dataset_url: "{{ lookup('env', 'ATL_DATASET_URL') }}"
|
||||
atl_bitbucket_baseurl: "{{ lookup('env', 'ATL_BB_BASEURL') }}"
|
||||
|
||||
@@ -6,57 +6,25 @@ PIPELINE_TEMPLATE_J2_FILE = 'templates/bitbucket-pipelines.yml.j2'
|
||||
ROLES_DIR = 'roles/'
|
||||
|
||||
|
||||
class Pipeline:
|
||||
def generate_pipeline(self):
|
||||
template_string = self._load_template_as_string()
|
||||
template = Template(template_string)
|
||||
steps = self._build_steps()
|
||||
generated_output = template.render(parallel_steps=steps)
|
||||
print(generated_output)
|
||||
|
||||
def _build_steps(self):
|
||||
return [Step(f"Molecule Test Batch - {index}",
|
||||
self._build_script_commands(index))
|
||||
for index, scenario_rel_path in
|
||||
enumerate(self._find_all_scenarios(), 1)]
|
||||
|
||||
@staticmethod
|
||||
def _build_script_commands(index):
|
||||
return ScriptCommand(f"./bin/run-tests-in-batches --batch {index}").all_commands()
|
||||
|
||||
@staticmethod
|
||||
def _find_all_scenarios():
|
||||
scenario_dirs = []
|
||||
for root, dirs, files in os.walk(Path(os.path.join(os.path.dirname(__file__), "..", ROLES_DIR))):
|
||||
[scenario_dirs.append(root) for f in files if f.endswith("molecule.yml")]
|
||||
return scenario_dirs
|
||||
|
||||
@staticmethod
|
||||
def _load_template_as_string():
|
||||
path = Path(os.path.join(os.path.dirname(__file__), PIPELINE_TEMPLATE_J2_FILE))
|
||||
return path.read_text()
|
||||
def find_all_scenarios():
|
||||
scenario_dirs = []
|
||||
for root, dirs, files in os.walk(Path(os.path.join(os.path.dirname(__file__), "..", ROLES_DIR))):
|
||||
[scenario_dirs.append(Path(root)) for f in files if f.endswith("molecule.yml")]
|
||||
return scenario_dirs
|
||||
|
||||
|
||||
class Step:
|
||||
def __init__(self, name, script_commands=None):
|
||||
if script_commands is None:
|
||||
script_commands = []
|
||||
self.name = name
|
||||
self.scriptCommands = script_commands
|
||||
|
||||
|
||||
class ScriptCommand:
|
||||
PACKAGE_INSTALL_COMMAND = "apt-get update && ./bin/install-ansible --dev"
|
||||
|
||||
def __init__(self, test_command):
|
||||
self.test_command = test_command
|
||||
|
||||
def all_commands(self):
|
||||
return [self.PACKAGE_INSTALL_COMMAND, self.test_command]
|
||||
def load_template():
|
||||
path = Path(os.path.join(os.path.dirname(__file__), PIPELINE_TEMPLATE_J2_FILE))
|
||||
return Template(path.read_text())
|
||||
|
||||
|
||||
def main():
|
||||
Pipeline().generate_pipeline()
|
||||
template = load_template()
|
||||
|
||||
scenario_paths = find_all_scenarios()
|
||||
generated_output = template.render(scenario_paths=scenario_paths)
|
||||
|
||||
print(generated_output)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@@ -18,9 +18,10 @@ pipelines:
|
||||
- step:
|
||||
name: Pre Parallelization stage
|
||||
script:
|
||||
- echo "Running tests in {{ parallel_steps|length }} batches"
|
||||
- echo "Running tests in {{ scenario_paths|length }} batches"
|
||||
|
||||
- step:
|
||||
name: Check if number of batches match actual number of scenarios
|
||||
name: Check if the template is up-to-date
|
||||
script:
|
||||
- |
|
||||
actual_scenario_count=$(find ./roles -type f -name "molecule.yml" -exec dirname {} ';' | wc -l | sed -e 's/^[[:space:]]*//')
|
||||
@@ -30,14 +31,15 @@ pipelines:
|
||||
echo "Mismatch between expected and actual number [${actual_scenario_count}] of scenarios. Please look at https://bitbucket.org/atlassian/dc-deployments-automation/src/master/DEVELOPMENT.md for instructions on how to fix this error."
|
||||
exit $GREP_RETURN_CODE
|
||||
fi
|
||||
|
||||
- parallel:
|
||||
{% for parallel_step in parallel_steps -%}
|
||||
{% for spath in scenario_paths -%}
|
||||
- step:
|
||||
name: {{ parallel_step.name }}
|
||||
name: {{ spath.parts[2] }}/{{ spath.parts[4] }}
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
{% for scriptCommand in parallel_step.scriptCommands -%}
|
||||
- {{ scriptCommand }}
|
||||
{% endfor %}
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/{{ spath.parts[2] }}
|
||||
- pipenv run molecule test -s {{ spath.parts[4] }}
|
||||
{% endfor %}
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -14,15 +12,8 @@ platforms:
|
||||
# image: ubuntu:bionic
|
||||
provisioner:
|
||||
name: ansible
|
||||
lint:
|
||||
name: ansible-lint
|
||||
options:
|
||||
x: ["303", "602"]
|
||||
inventory:
|
||||
links:
|
||||
group_vars: ../../../../group_vars/
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
enabled: false
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -14,15 +12,8 @@ platforms:
|
||||
# image: ubuntu:bionic
|
||||
provisioner:
|
||||
name: ansible
|
||||
lint:
|
||||
name: ansible-lint
|
||||
options:
|
||||
x: ["303", "602"]
|
||||
inventory:
|
||||
links:
|
||||
group_vars: ../../../../group_vars/
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
enabled: false
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -14,15 +12,8 @@ platforms:
|
||||
# image: ubuntu:bionic
|
||||
provisioner:
|
||||
name: ansible
|
||||
lint:
|
||||
name: ansible-lint
|
||||
options:
|
||||
x: ["303", "602"]
|
||||
inventory:
|
||||
links:
|
||||
group_vars: ../../../../group_vars/
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
enabled: false
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
---
|
||||
|
||||
atl_bitbucket_license_key: "{{ lookup('env', 'ATL_BB_LICENSEKEY') }}"
|
||||
atl_bitbucket_baseurl: "{{ lookup('env', 'ATL_BB_BASEURL') }}"
|
||||
atl_bitbucket_admin_password: "{{ lookup('env', 'ATL_BB_ADMIN_PASSWORD') }}"
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
---
|
||||
5
roles/bitbucket_config/defaults/main.yaml
Normal file
5
roles/bitbucket_config/defaults/main.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
|
||||
atl_bitbucket_license_key: "{{ lookup('env', 'ATL_BB_LICENSEKEY') }}"
|
||||
atl_bitbucket_properties_raw: "{{ lookup('env', 'ATL_BITBUCKET_PROPERTIES') }}"
|
||||
atl_bitbucket_properties: "{{ atl_bitbucket_properties_raw.split(' ') | reject('equalto', '') | list }}"
|
||||
4
roles/bitbucket_config/meta/main.yml
Normal file
4
roles/bitbucket_config/meta/main.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
|
||||
dependencies:
|
||||
- bitbucket_common
|
||||
@@ -12,6 +12,8 @@
|
||||
atl_jdbc_user: 'bb_db_user'
|
||||
atl_jdbc_password: 'molecule_password'
|
||||
|
||||
atl_bitbucket_properties_raw: "key1=val1 key2=val2 key3=val3"
|
||||
|
||||
roles:
|
||||
- role: linux_common
|
||||
- role: product_common
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -22,15 +20,8 @@ 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
|
||||
|
||||
@@ -14,3 +14,7 @@ def test_config_file(host):
|
||||
assert f.contains("jdbc.driver=org.postgresql.Driver")
|
||||
assert f.contains("jdbc.user=bb_db_user")
|
||||
assert f.contains("jdbc.password=molecule_password")
|
||||
|
||||
assert f.contains("^key1=val1$")
|
||||
assert f.contains("^key2=val2$")
|
||||
assert f.contains("^key3=val3$")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Created by Ansible
|
||||
# Created by Ansible role `bitbucket_config`
|
||||
jdbc.driver={{ atl_db_driver }}
|
||||
jdbc.url={{ atl_jdbc_url }}
|
||||
jdbc.user={{ atl_jdbc_user }}
|
||||
@@ -34,3 +34,6 @@ server.scheme=http
|
||||
server.proxy-port=80
|
||||
{% endif %}
|
||||
|
||||
{% for prop in atl_bitbucket_properties %}
|
||||
{{ prop }}
|
||||
{% endfor %}
|
||||
|
||||
3
roles/bitbucket_dataset_restore/defaults/main.yml
Normal file
3
roles/bitbucket_dataset_restore/defaults/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
|
||||
atl_bitbucket_dataset_url: "{{ lookup('env', 'ATL_DATASET_URL') }}"
|
||||
4
roles/bitbucket_dataset_restore/meta/main.yml
Normal file
4
roles/bitbucket_dataset_restore/meta/main.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
|
||||
dependencies:
|
||||
- bitbucket_common
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -18,15 +16,8 @@ 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
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -18,15 +16,8 @@ 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
|
||||
|
||||
@@ -3,8 +3,7 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -18,15 +17,8 @@ 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
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -18,15 +16,8 @@ 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
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
---
|
||||
# Based on ansible-lint config
|
||||
extends: default
|
||||
|
||||
rules:
|
||||
braces:
|
||||
max-spaces-inside: 1
|
||||
level: error
|
||||
brackets:
|
||||
max-spaces-inside: 1
|
||||
level: error
|
||||
colons:
|
||||
max-spaces-after: -1
|
||||
level: error
|
||||
commas:
|
||||
max-spaces-after: -1
|
||||
level: error
|
||||
comments: disable
|
||||
comments-indentation: disable
|
||||
document-start: disable
|
||||
empty-lines:
|
||||
max: 3
|
||||
level: error
|
||||
hyphens:
|
||||
level: error
|
||||
indentation: disable
|
||||
key-duplicates: enable
|
||||
line-length: disable
|
||||
new-line-at-end-of-file: disable
|
||||
new-lines:
|
||||
type: unix
|
||||
trailing-spaces: disable
|
||||
truthy: disable
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
|
||||
atl_db_port: 5432
|
||||
atl_systemd_service_name: "{{ atl_product_family }}.service"
|
||||
|
||||
atl_slingshot_yum_repo_url: 'https://packages.atlassian.com/atlassian-slingshot-rpm'
|
||||
atl_amazon_extras_postgresql_version: '9.6'
|
||||
|
||||
atl_slingshot_deb_pubkey_url: 'https://packages.atlassian.com/api/gpg/key/public'
|
||||
atl_slingshot_deb_repo_url: 'https://packages.atlassian.com/atlassian-slingshot-deb'
|
||||
atl_slingshot_deb_repo_components: 'stable main'
|
||||
@@ -1,22 +0,0 @@
|
||||
# Molecule managed
|
||||
|
||||
{% if item.registry is defined %}
|
||||
FROM {{ item.registry.url }}/{{ item.image }}
|
||||
{% else %}
|
||||
FROM {{ item.image }}
|
||||
{% endif %}
|
||||
|
||||
{% if item.env is defined %}
|
||||
{% for var, value in item.env.items() %}
|
||||
{% if value %}
|
||||
ENV {{ var }} {{ value }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates iproute2 && apt-get clean; \
|
||||
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash iproute && dnf clean all; \
|
||||
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash iproute && 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 iproute2 && 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 iproute2 && xbps-remove -O; fi
|
||||
@@ -1,22 +0,0 @@
|
||||
*******
|
||||
Docker driver installation guide
|
||||
*******
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
* Docker Engine
|
||||
|
||||
Install
|
||||
=======
|
||||
|
||||
Please refer to the `Virtual environment`_ documentation for installation best
|
||||
practices. If not using a virtual environment, please consider passing the
|
||||
widely recommended `'--user' flag`_ when invoking ``pip``.
|
||||
|
||||
.. _Virtual environment: https://virtualenv.pypa.io/en/latest/
|
||||
.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ pip install 'molecule[docker]'
|
||||
@@ -1,37 +0,0 @@
|
||||
---
|
||||
dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
#
|
||||
# Temporarily (1st April 2020) removing ubuntu as a test platform.
|
||||
# The atlassian-slingshot debian (Ubuntu) repository is at present
|
||||
# malformed and is currently missing its 'Release' file. As a result
|
||||
# when this test executes and tries to pull the `ubuntu_lts` archive
|
||||
# (see ubuntu.yml task) it fails with the following error:
|
||||
#
|
||||
# "The repository 'https://packages.atlassian.com/atlassian-slingshot-deb
|
||||
# stable Release' does not have a Release file."
|
||||
#
|
||||
# See: https://bulldog.internal.atlassian.com/browse/DCD-964 which has
|
||||
# been raised to resolve this issue and fix the Ubuntu Slingshot
|
||||
# distribution
|
||||
#
|
||||
# TODO: Activate the config below (un-comment) once the issue described above
|
||||
# has been resolved.
|
||||
#
|
||||
# - name: ubuntu_lts
|
||||
# image: ubuntu:bionic
|
||||
provisioner:
|
||||
name: ansible
|
||||
lint:
|
||||
name: ansible-lint
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
tasks:
|
||||
# Role default vars must be included because we aren't running the whole role, just a subset of tasks
|
||||
- name: Include role vars
|
||||
include_vars:
|
||||
file: ../../defaults/main.yml
|
||||
|
||||
- name: Install distro-specific backup support packages
|
||||
include_tasks: "../../tasks/{{ ansible_distribution|lower }}.yml"
|
||||
@@ -1,11 +0,0 @@
|
||||
import os
|
||||
|
||||
import testinfra.utils.ansible_runner
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
||||
|
||||
def test_slingshot_installed(host):
|
||||
assert host.file('/usr/bin/atlassian-slingshot').exists
|
||||
assert host.file('/usr/bin/psql').exists
|
||||
@@ -1,21 +0,0 @@
|
||||
---
|
||||
|
||||
- name: Add atlassian-slingshot yum repository
|
||||
yum_repository:
|
||||
name: AtlassianSlingshot
|
||||
file: atlassian-slingshot
|
||||
state: present
|
||||
description: Atlassian Slingshot
|
||||
baseurl: "{{ atl_slingshot_yum_repo_url }}"
|
||||
gpgcheck: no
|
||||
|
||||
- name: Install atlassian-slingshot
|
||||
yum:
|
||||
name: atlassian-slingshot
|
||||
|
||||
- name: Enable Postgresql from 'extras'
|
||||
command: amazon-linux-extras install -y "postgresql{{ atl_amazon_extras_postgresql_version }}"
|
||||
args:
|
||||
creates: /usr/bin/psql
|
||||
environment:
|
||||
PYTHON: /bin/python
|
||||
@@ -1,39 +0,0 @@
|
||||
---
|
||||
|
||||
- name: Install distro-specific backup support packages
|
||||
include_tasks: "{{ ansible_distribution|lower }}.yml"
|
||||
|
||||
- name: Stop the {{ atl_product_family }} service
|
||||
service:
|
||||
name: "{{ atl_systemd_service_name }}"
|
||||
state: stopped
|
||||
|
||||
- name: Run the slingshot backup
|
||||
command:
|
||||
argv:
|
||||
- "atlassian-slingshot"
|
||||
- "backup"
|
||||
- "--backupDir"
|
||||
- "{{ atl_slingshot_backup_dir }}"
|
||||
- "--dbHost"
|
||||
- "{{ atl_db_host }}"
|
||||
- "--dbPort"
|
||||
- "{{ atl_db_port }}"
|
||||
- "--dbUser"
|
||||
- "{{ atl_jdbc_user }}"
|
||||
- "--dbName"
|
||||
- "{{ atl_jdbc_db_name }}"
|
||||
- "--s3BucketName"
|
||||
- "{{ atl_s3_backup_bucket }}"
|
||||
- "--awsRegion"
|
||||
- "{{ atl_s3_backup_region }}"
|
||||
- "--sharedHomeLocation"
|
||||
- "{{ atl_product_home_shared }}"
|
||||
- "--isAutomation"
|
||||
environment:
|
||||
ATL_DB_PASSWORD: "{{ atl_jdbc_password }}"
|
||||
|
||||
- name: Restart the {{ atl_product_family }} service
|
||||
service:
|
||||
name: "{{ atl_systemd_service_name }}"
|
||||
state: restarted
|
||||
@@ -1,27 +0,0 @@
|
||||
---
|
||||
- name: Install gnupg
|
||||
apt:
|
||||
name: gnupg
|
||||
state: present
|
||||
|
||||
- name: Add atlassian-slingshot debian repo public key
|
||||
apt_key:
|
||||
url: "{{ atl_slingshot_deb_pubkey_url }}"
|
||||
state: present
|
||||
|
||||
- name: Add atlassian-slingshot debian repository
|
||||
apt_repository:
|
||||
repo: "deb {{ atl_slingshot_deb_repo_url }} {{ atl_slingshot_deb_repo_components }}"
|
||||
state: present
|
||||
filename: atlassian-slingshot
|
||||
|
||||
- name: Install atlassian-slingshot
|
||||
apt:
|
||||
name: atlassian-slingshot
|
||||
update_cache: yes
|
||||
state: present
|
||||
|
||||
- name: Install postgresql
|
||||
apt:
|
||||
name: postgresql
|
||||
state: present
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -22,15 +20,8 @@ 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
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -22,15 +20,8 @@ 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
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -22,15 +20,8 @@ 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
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -22,15 +20,8 @@ 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
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -22,15 +20,8 @@ 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
|
||||
|
||||
3
roles/linux_common/files/java.conf
Normal file
3
roles/linux_common/files/java.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
# Exclude java-hooks
|
||||
x /tmp/hsperfdata_*
|
||||
x /tmp/.java_pid*
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -16,12 +14,8 @@ platforms:
|
||||
- aws_node_local
|
||||
provisioner:
|
||||
name: ansible
|
||||
lint:
|
||||
name: ansible-lint
|
||||
inventory:
|
||||
links:
|
||||
group_vars: ../../../../group_vars/
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
|
||||
@@ -26,3 +26,19 @@
|
||||
uid: "{{ atl_product_user_uid }}"
|
||||
group: "{{ atl_product_user }}"
|
||||
comment: "Product runtime user"
|
||||
|
||||
- name: Stop systemd-cleanup deleting the jvm socket file
|
||||
copy:
|
||||
src: java.conf
|
||||
dest: "/usr/lib/tmpfiles.d/java.conf"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "644"
|
||||
register: systemd_config_changed
|
||||
|
||||
- name: Force systemd to reload daemon configuration
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
when:
|
||||
- systemd_config_changed is defined
|
||||
- molecule_yml is not defined # molecule cannot run systemctl commands and notest doesn't work for handlers
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -12,9 +10,5 @@ platforms:
|
||||
image: ubuntu:bionic
|
||||
provisioner:
|
||||
name: ansible
|
||||
lint:
|
||||
name: ansible-lint
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -12,9 +10,5 @@ platforms:
|
||||
image: ubuntu:bionic
|
||||
provisioner:
|
||||
name: ansible
|
||||
lint:
|
||||
name: ansible-lint
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
|
||||
@@ -36,6 +36,7 @@ atl_servicedesk_url_map:
|
||||
default: "{{ atl_servicedesk_versioned_url }}"
|
||||
atl_servicedesk_metadata_url: "{{ atl_servicedesk_url_map[atl_product_version] | default(atl_servicedesk_url_map['default']) }}"
|
||||
|
||||
atl_install_jsd_as_obr: false
|
||||
atl_servicedesk_download_file: "{{ atl_installer_temp }}/jira-servicedesk.{{ atl_product_version }}.obr"
|
||||
|
||||
force_version_update: false
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -18,13 +16,8 @@ provisioner:
|
||||
name: ansible
|
||||
options:
|
||||
skip-tags: runtime_pkg
|
||||
lint:
|
||||
name: ansible-lint
|
||||
inventory:
|
||||
links:
|
||||
group_vars: ../../../../group_vars/
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
enabled: false
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -18,13 +16,8 @@ provisioner:
|
||||
name: ansible
|
||||
options:
|
||||
skip-tags: runtime_pkg
|
||||
lint:
|
||||
name: ansible-lint
|
||||
inventory:
|
||||
links:
|
||||
group_vars: ../../../../group_vars/
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
enabled: false
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -18,13 +16,8 @@ provisioner:
|
||||
name: ansible
|
||||
options:
|
||||
skip-tags: runtime_pkg
|
||||
lint:
|
||||
name: ansible-lint
|
||||
inventory:
|
||||
links:
|
||||
group_vars: ../../../../group_vars/
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
enabled: false
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -18,8 +16,6 @@ provisioner:
|
||||
name: ansible
|
||||
options:
|
||||
skip-tags: runtime_pkg
|
||||
lint:
|
||||
name: ansible-lint
|
||||
inventory:
|
||||
links:
|
||||
group_vars: ../../../../group_vars/
|
||||
@@ -27,6 +23,3 @@ verifier:
|
||||
name: testinfra
|
||||
additional_files_or_dirs:
|
||||
- ../../resources/tests/test_*.py
|
||||
lint:
|
||||
name: flake8
|
||||
enabled: false
|
||||
|
||||
@@ -34,4 +34,8 @@ def test_completed_lockfile(host):
|
||||
|
||||
lockfile = host.file('/media/atl/downloads/jira-core.'+upstream+'-x64.bin_completed')
|
||||
assert lockfile.exists
|
||||
assert lockfile.user == 'root'
|
||||
assert lockfile.user == 'root'
|
||||
|
||||
def test_servicedesk_not_installed(host):
|
||||
plugins = host.file('/media/atl/jira/shared/plugins/installed-plugins')
|
||||
assert (not plugins.exists) or (len(list(filter(lambda p: 'servicedesk' in p, jars))) == 0)
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -18,13 +16,8 @@ provisioner:
|
||||
name: ansible
|
||||
options:
|
||||
skip-tags: runtime_pkg
|
||||
lint:
|
||||
name: ansible-lint
|
||||
inventory:
|
||||
links:
|
||||
group_vars: ../../../../group_vars/
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
enabled: false
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -19,8 +17,6 @@ provisioner:
|
||||
options:
|
||||
vvv: true
|
||||
skip-tags: runtime_pkg
|
||||
lint:
|
||||
name: ansible-lint
|
||||
inventory:
|
||||
links:
|
||||
group_vars: ../../../../group_vars/
|
||||
@@ -28,6 +24,3 @@ verifier:
|
||||
name: testinfra
|
||||
additional_files_or_dirs:
|
||||
- ../../resources/tests/test_*.py
|
||||
lint:
|
||||
name: flake8
|
||||
enabled: false
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -19,8 +17,6 @@ provisioner:
|
||||
options:
|
||||
vvv: true
|
||||
skip-tags: runtime_pkg
|
||||
lint:
|
||||
name: ansible-lint
|
||||
inventory:
|
||||
links:
|
||||
group_vars: ../../../../group_vars/
|
||||
@@ -28,6 +24,3 @@ verifier:
|
||||
name: testinfra
|
||||
additional_files_or_dirs:
|
||||
- ../../resources/tests/test_*.py
|
||||
lint:
|
||||
name: flake8
|
||||
enabled: false
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -18,13 +16,8 @@ provisioner:
|
||||
name: ansible
|
||||
options:
|
||||
skip-tags: runtime_pkg
|
||||
lint:
|
||||
name: ansible-lint
|
||||
inventory:
|
||||
links:
|
||||
group_vars: ../../../../group_vars/
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
enabled: false
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -18,8 +16,6 @@ provisioner:
|
||||
name: ansible
|
||||
options:
|
||||
skip-tags: runtime_pkg
|
||||
lint:
|
||||
name: ansible-lint
|
||||
inventory:
|
||||
links:
|
||||
group_vars: ../../../../group_vars/
|
||||
@@ -27,6 +23,3 @@ verifier:
|
||||
name: testinfra
|
||||
additional_files_or_dirs:
|
||||
- ../../resources/tests/test_*.py
|
||||
lint:
|
||||
name: flake8
|
||||
enabled: false
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -18,8 +16,6 @@ provisioner:
|
||||
name: ansible
|
||||
options:
|
||||
skip-tags: runtime_pkg
|
||||
lint:
|
||||
name: ansible-lint
|
||||
inventory:
|
||||
links:
|
||||
group_vars: ../../../../group_vars/
|
||||
@@ -27,6 +23,3 @@ verifier:
|
||||
name: testinfra
|
||||
additional_files_or_dirs:
|
||||
- ../../resources/tests/test_*.py
|
||||
lint:
|
||||
name: flake8
|
||||
enabled: false
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -18,8 +16,6 @@ provisioner:
|
||||
name: ansible
|
||||
options:
|
||||
skip-tags: runtime_pkg
|
||||
lint:
|
||||
name: ansible-lint
|
||||
inventory:
|
||||
links:
|
||||
group_vars: ../../../../group_vars/
|
||||
@@ -27,6 +23,3 @@ verifier:
|
||||
name: testinfra
|
||||
additional_files_or_dirs:
|
||||
- ../../resources/tests/test_*.py
|
||||
lint:
|
||||
name: flake8
|
||||
enabled: false
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -18,8 +16,6 @@ provisioner:
|
||||
name: ansible
|
||||
options:
|
||||
skip-tags: runtime_pkg
|
||||
lint:
|
||||
name: ansible-lint
|
||||
inventory:
|
||||
links:
|
||||
group_vars: ../../../../group_vars/
|
||||
@@ -27,6 +23,3 @@ verifier:
|
||||
name: testinfra
|
||||
additional_files_or_dirs:
|
||||
- ../../resources/tests/test_*.py
|
||||
lint:
|
||||
name: flake8
|
||||
enabled: false
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -19,13 +17,8 @@ provisioner:
|
||||
options:
|
||||
vv: true
|
||||
skip-tags: runtime_pkg
|
||||
lint:
|
||||
name: ansible-lint
|
||||
inventory:
|
||||
links:
|
||||
group_vars: ../../../../group_vars/
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
enabled: false
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -19,13 +17,8 @@ provisioner:
|
||||
options:
|
||||
vv: true
|
||||
skip-tags: runtime_pkg
|
||||
lint:
|
||||
name: ansible-lint
|
||||
inventory:
|
||||
links:
|
||||
group_vars: ../../../../group_vars/
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
enabled: false
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -19,13 +17,8 @@ provisioner:
|
||||
options:
|
||||
vv: true
|
||||
skip-tags: runtime_pkg
|
||||
lint:
|
||||
name: ansible-lint
|
||||
inventory:
|
||||
links:
|
||||
group_vars: ../../../../group_vars/
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
enabled: false
|
||||
|
||||
@@ -277,6 +277,4 @@
|
||||
|
||||
- name: Include if jsd is requested to be installed from OBR
|
||||
include_tasks: "jira-servicedesk_as_obr.yml"
|
||||
when:
|
||||
- atl_install_jsd_as_obr is defined
|
||||
- atl_install_jsd_as_obr
|
||||
when: atl_install_jsd_as_obr
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -22,15 +20,8 @@ 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
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -22,15 +20,8 @@ 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
|
||||
|
||||
@@ -3,8 +3,6 @@ dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: amazon_linux2
|
||||
image: amazonlinux:2
|
||||
@@ -22,15 +20,8 @@ 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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user