If a user is supplying a pymysql or psycopg2 connection string, the
necessary driver needs to be installed before it can be used.
Change-Id: I4655c9a39fea6a43f7e579f099d61836577202f0
The idea is to make sure that the ARA systemd service is always
configured so that the service can be started/stopped/disabled without
needing to carry logic for configuring the unit file and reloading
systemctl all over the place.
Change-Id: Iadfeb0acadbb9803305abde8cface2e4104f0609
This will allow users to see how ara was deployed easily.
It also allows them to edit it and re-run the role with that if
need be.
Change-Id: I869aacf75c7aa0f45126593499f3eb711843765e
This is specific to the embedded webserver installation.
We don't need to set up the systemd service otherwise.
Change-Id: I9c92152b4f6173d03bf56c66603290201fe59b8a
When installing with pip from a remote source, we need to ensure
that we are passing a package name like "git+https://git/ara@version".
Change-Id: Id5b648137918f5e9a5498c10a954f5a5921cf89e
ansible_default_ipv4.address is sort of unreliable or sometimes
the ip address is actually not useful since floating IP addresses
(unknown to the host) are used.
Default to 127.0.0.1 instead which is a secure default.
Change-Id: Idd232b0ddc0ee8533715012e89918b4f76e59901
apache with mod_wsgi takes care of starting the app.
If the role is first ran with the defaults, the ara systemd service
will be running.
If we re-run the role and choose an apache deployment, we need to make
sure we're disabling it.
What this boils down to -- let's always set up the systemd service
but start it or disable it according to what we need to deploy.
Change-Id: I8fceed417d766a28564ad88a972de4f38c1b44ac
Installing ARA and Ansible system-wide by default is a bit invasive.
Let's default to a virtual environment instead. This means making
sure Apache's mod_wsgi deployment can use that virtualenv amongst
other things.
Depends-On: https://review.openstack.org/567280
Change-Id: I4d86e343b745e31e509dbc929d1fd2c2b10a3623
The log file is really just the name of the log file (ara.log).
By defaulting to /var/log/ara/ara.log, the name of the log file was
expected to be /var/lib/ara/var/log/ara/ara.log which is funny but
wrong. Fix that.
Change-Id: I334ba3ec6748eeacd6a89974d0e55afd02a71e13
- Nest configuration defaults under a single dictionary
- Split webserver configuration in different trees
- Set up a user for ARA (consistent with packaging)
- Embedded service now runs under the ara user
- We no longer need or expect /var/www/ara
- Configuration is now in /etc/ara
- Database is now in /var/lib/ara
- Logs are now in /var/log/ara
- Embedded service now relies on /etc/ara/ara.cfg for configuration
- Use ini_file instead of a template for ara.cfg
Change-Id: I64e13c5c35e31245f95c85aeeaf4e4b5acda0924
We were not reloading or restarting ara after changing
the parameters.
This means that running a second time with different
parameters will not be effective automatically.
Also, in order to be effective, the unit file we setup
needs to be in /etc/systemd, not /usr/lib/systemd.
Change-Id: I53716fc2bdb7cf8afc2c5ea39ab953a51c9c4585
- split embedded and apache configuation in separate files
- use systemd to launch and enable httpd or embedded server
- remove unused handler
Change-Id: I25c92b2b38125826087957fb8ce9320641cf86f0
By fixing this variable to the correct sites-available path should not
fail on Debian flavored distros.
The change is from this /etc/apache/sites-available to /etc/apache2/sites-available
Change-Id: I8252ee7a2338b679260e8dc4c0296539972d7d35
- Add copyright headers (sorry)
- Re-order tasks
- Add missing wsgi required packages
- Use template instead of file for default ansible.cfg
- Use handler to restart apache if need be
- Use command instead of shell unless necessary
- Fix mistakes in systemd service
- Fix mistakes in debian family required packages
- Add friendly instructions at the end of the setup
- Improve README
Change-Id: I84d59facfdc593bc82ac1d1436a49f85c2d1637b