ITOPSENG-647 put product service file in the default path to allow systemctl mask and other linking operations to work properly

This commit is contained in:
Brett Meehan
2020-05-21 10:17:22 +10:00
parent 0fbc7609a1
commit 7b9e9e2328
5 changed files with 9 additions and 9 deletions

View File

@@ -24,7 +24,7 @@ ways to do this; either directly if packaged, or via pip...
# Ubuntu 19.04+, Debian 10+ # Ubuntu 19.04+, Debian 10+
sudo apt-get install pipenv python-dev sudo apt-get install pipenv python-dev
# Older versions & RHEL/Amazon Linux, etc. # Older versions & RHEL/Amazon Linux, etc.
sudo apt-get install -y python-pip python-dev sudo apt-get install -y python-pip python-dev
# Or... # Or...
@@ -129,7 +129,7 @@ Some notable files and locations:
/var/log/ansible-bootstrap.log. /var/log/ansible-bootstrap.log.
* The Jira installation is under /opt/atlassian/jira/<version>and symlinked to * The Jira installation is under /opt/atlassian/jira/<version>and symlinked to
/opt/atlassian/jira/current. /opt/atlassian/jira/current.
* The systemd service is configured in /etc/systemd/system/jira.service. Its * The systemd service is configured in /usr/lib/systemd/system/jira.service. Its
stdout can be viewed with systemctl status jira.service and journalctl -u stdout can be viewed with systemctl status jira.service and journalctl -u
jira.service. jira.service.
* Other Tomcat logs can be located under /opt/atlassian/jira/current/logs/... * Other Tomcat logs can be located under /opt/atlassian/jira/current/logs/...
@@ -138,11 +138,11 @@ Some notable files and locations:
* This repository is configured to run tests on [bitbucket pipelines](https://bitbucket.org/atlassian/dc-deployments-automation/addon/pipelines/home). * This repository is configured to run tests on [bitbucket pipelines](https://bitbucket.org/atlassian/dc-deployments-automation/addon/pipelines/home).
* Pipeline definition is located in the [root of the repository](https://bitbucket.org/atlassian/dc-deployments-automation/src/master/bitbucket-pipelines.yml) * Pipeline definition is located in the [root of the repository](https://bitbucket.org/atlassian/dc-deployments-automation/src/master/bitbucket-pipelines.yml)
* Pipeline configuration is generated using Jinja2 and a simple python script. Pipeline generator is located [here](https://bitbucket.org/atlassian/dc-deployments-automation/src/master/pipeline_generator/) * Pipeline configuration is generated using Jinja2 and a simple python script. Pipeline generator is located [here](https://bitbucket.org/atlassian/dc-deployments-automation/src/master/pipeline_generator/)
* A pipeline configuration is generated by running the following make command * A pipeline configuration is generated by running the following make command
``` ```
make generate-pipeline > ../bitbucket-pipelines.yml make generate-pipeline > ../bitbucket-pipelines.yml
``` ```
* [Molecule](https://molecule.readthedocs.io/en/stable/) tests are run in batches. A single test is run per batch to optimize for a faster dev feedback loop * [Molecule](https://molecule.readthedocs.io/en/stable/) tests are run in batches. A single test is run per batch to optimize for a faster dev feedback loop
* If you create a new role or add a new molecule scenario, then please ensure that you generate a new pipeline configuration by running the make command described above. If a new pipeline configuration is not generated, then the CI may not run any tests as it would fail at a pre-test validate stage. * If you create a new role or add a new molecule scenario, then please ensure that you generate a new pipeline configuration by running the make command described above. If a new pipeline configuration is not generated, then the CI may not run any tests as it would fail at a pre-test validate stage.

View File

@@ -7,7 +7,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
def test_service_file(host): def test_service_file(host):
f = host.file('/etc/systemd/system/bitbucket.service') f = host.file('/usr/lib/systemd/system/bitbucket.service')
assert f.contains("^ExecStart=/opt/atlassian/bitbucket/current/bin/start-bitbucket.sh -fg --no-search$") assert f.contains("^ExecStart=/opt/atlassian/bitbucket/current/bin/start-bitbucket.sh -fg --no-search$")
assert f.contains("^UMask=0027$") assert f.contains("^UMask=0027$")
assert f.contains("^LimitNOFILE=4096$") assert f.contains("^LimitNOFILE=4096$")

View File

@@ -7,7 +7,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
def test_service_file(host): def test_service_file(host):
f = host.file('/etc/systemd/system/jira-software.service') f = host.file('/usr/lib/systemd/system/jira-software.service')
assert f.contains("^ExecStart=/opt/atlassian/jira-software/current/bin/start-jira.sh -fg$") assert f.contains("^ExecStart=/opt/atlassian/jira-software/current/bin/start-jira.sh -fg$")
assert f.user == 'root' assert f.user == 'root'
assert f.group == 'root' assert f.group == 'root'

View File

@@ -7,7 +7,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
def test_service_file(host): def test_service_file(host):
f = host.file('/etc/systemd/system/synchrony.service') f = host.file('/usr/lib/systemd/system/synchrony.service')
assert f.contains("^ExecStart=/opt/atlassian/bin/start-synchrony$") assert f.contains("^ExecStart=/opt/atlassian/bin/start-synchrony$")
assert f.contains("^EnvironmentFile=/etc/atl$") assert f.contains("^EnvironmentFile=/etc/atl$")
assert f.contains("^EnvironmentFile=/etc/atl.synchrony$") assert f.contains("^EnvironmentFile=/etc/atl.synchrony$")

View File

@@ -3,7 +3,7 @@
- name: "Install systemd service file" - name: "Install systemd service file"
template: template:
src: "product.service.j2" src: "product.service.j2"
dest: "/etc/systemd/system/{{ atl_systemd_service_name }}" dest: "/usr/lib/systemd/system/{{ atl_systemd_service_name }}"
owner: root owner: root
group: root group: root
mode: 0640 mode: 0640