Commit Graph

28 Commits

Author SHA1 Message Date
David Moreau Simard 6b581340f7
opendev: Remove content and leave an URL to the GitHub repository
Change-Id: Ibae7b876c890bd7fac8e020b159d241ae3cc5604
2021-02-25 15:29:52 -05:00
David Moreau Simard 5eaafe1030
Automatically install pymysql or psycopg2 if necessary
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
2018-10-17 00:11:16 -04:00
David Moreau Simard c51366f722
Always set up the ARA systemd unit file
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
2018-08-28 12:40:14 -04:00
David Moreau Simard a296583c1a
Dump the role configuration to /etc/ara
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
2018-07-06 12:36:34 -04:00
Zuul 0c9eed02a3 Merge "Don't nest installation variables under a params key" 2018-07-06 16:33:58 +00:00
David Moreau Simard 7292c14a3e
Don't nest installation variables under a params key
We're needlessly nesting "install" under "params".
Let's not do that.

Change-Id: Ia8ed491bd92d8989a8423a9fbe3a8deb705e7dd7
2018-06-19 18:37:24 -04:00
David Moreau Simard fa6ad4d279
Move systemd service setup to the embedded webserver installation
This is specific to the embedded webserver installation.
We don't need to set up the systemd service otherwise.

Change-Id: I9c92152b4f6173d03bf56c66603290201fe59b8a
2018-06-19 10:51:38 -04:00
David Moreau Simard 90df161d75
Only generate a versioned package string if we have a version
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
2018-06-19 10:20:20 -04:00
Zuul ea66e8132b Merge "Add support for installing from source" 2018-06-19 14:10:23 +00:00
Zuul af7be5275e Merge "Successfully spelling error" 2018-06-19 14:00:57 +00:00
chenjiao 1ca403eefe Successfully spelling error
the word succesfully should be successfully

Change-Id: I5e7b4e7acdbdb468e3cf5b19e76a0b72708d7051
2018-06-09 16:37:37 +08:00
David Moreau Simard 8857b3054c
Add support for installing from source
This provides the ability to install from source either on the
local filesystem or from pypi.

Change-Id: I883bf88638d6d4de1965f1863a4c401e58ea0126
2018-06-01 22:25:45 -04:00
David Moreau Simard 49bd5e1afa Make sure the ARA systemd service is not running with apache
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
2018-06-01 19:56:57 +00:00
David Moreau Simard b526ed4c9a
Default the ARA installation to a virtualenv
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
2018-06-01 15:56:40 -04:00
David Moreau Simard a9b8f25c01
Update license headers to match ARA
Change-Id: I788310bf0af3c0bb201f490264f8b1c67fac517f
2018-04-25 20:49:18 -04:00
David Moreau Simard a0961948c8
Provide a hook for overriding configuration
Change-Id: Id2e3370c359e530219927e8f89c0c80443031bd9
2018-04-25 20:39:00 -04:00
David Moreau Simard 6e16614875
Install packages as a list instead of per item
The 'package' module supports passing a list instead of iterating
through with_items.

Change-Id: I0c01733adc638691beff7a6af89baa297b1335ca
2018-04-25 20:39:00 -04:00
David Moreau Simard f107ec0aef
Add support for nginx with reverse proxy to embedded server
This deploys the existing embedded server service but adds a nginx
reverse proxy on top.

Change-Id: I06837e39c20ce9390a39fc1ef2ee046934e6f38a
2018-04-25 20:39:00 -04:00
David Moreau Simard 58d1ec51bb
We don't need to check if selinux is enforcing
Just configure the seboolean, it'll be useful regardless if selinux
is enforcing or not.

Change-Id: I5fcb5e91ef4d5812df30442cc5a9663a5cbd77ca
2018-04-25 20:39:00 -04:00
David Moreau Simard 9f7de54e15
Add logrotate configuration
Change-Id: Ied65cd2cb946023549b78e603d31d98a96d13288
2018-04-25 20:39:00 -04:00
David Moreau Simard 11fd3ad042
Refactor installation, configuration and web server implementation
- 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
2018-04-25 20:39:00 -04:00
David Moreau Simard 7b2d04f850
Reload systemctl and restart ara on service unit file
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
2018-04-25 08:50:42 -04:00
Nicolas Hicher 871f825406
Refactoring ara role
- split embedded and apache configuation in separate files
- use systemd to launch and enable httpd or embedded server
- remove unused handler

Change-Id: I25c92b2b38125826087957fb8ce9320641cf86f0
2018-03-30 08:10:49 -04:00
David Moreau-Simard 251ec0cd7f Remove weird non-ascii quote character
Change-Id: I598987c6d0cb967b5f6a2cadc1df14f0d69c2bbd
2017-03-22 11:35:29 -04:00
David Moreau-Simard 8863c8887c Clean up ansible-role-ara
- 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
2017-03-15 12:28:46 -04:00
Naga Ravi Chaitanya Elluri cea2a3eea8 add apache+mod_wsgi support to ara
Change-Id: Icb0ffa8b0a63ae33eda2c4fd76289b1c58858c39
2017-03-03 19:09:14 -05:00
Naga Ravi Chaitanya Elluri 518578eb7e add service template 2016-11-16 12:40:10 -05:00
Naga Ravi Chaitanya Elluri cbfac7ecd1 ansible-galaxy role for ara 2016-11-16 11:35:47 -05:00