Commit Graph

45 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
OpenDev Sysadmins 01746e13cf OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:49:47 +00: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
David Moreau Simard ce2d8e5c78
use become: true when reloading systemctl daemon
Change-Id: I43b824730dafc783d45506c3e370a3397097b6f0
2018-07-06 12:35: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
David Moreau Simard ce12da282e
Listen on 127.0.0.1 by default
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
2018-06-19 10:19:03 -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 b21d77e489
The which package is in debianutils, not 'which'.
There's no such thing as a which package in Debian/Ubuntu land.

Change-Id: If692c50d40abdd2c106ed38b1629b9e907d6245c
2018-05-17 23:55:29 -04:00
David Moreau Simard c248ca3edc
Fix the log location by using the log directory
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
2018-05-01 17:05:59 -04:00
David Moreau Simard 98397ae004
Fix RST syntax typo
Change-Id: I9501ba6485af9584067f5ae4e28a867d32addd52
2018-04-25 20:59:24 -04:00
David Moreau Simard bda8d7b63a
Improve README with better examples
Change-Id: I86e203c70fca62004733ec1dd4c9107bb377a4f6
2018-04-25 20:57:08 -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
Luis Cacho 3e194e1690 Fix the apache_config_path on Debian.yml vars file
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
2018-03-14 18:37:03 -05: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 819057cb09 Alphabetically sort required packages, don't assume which is installed
Change-Id: I8b776dec1aeb343f455aef3a71516777c5c87685
2017-03-16 10:12:43 -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
David Moreau-Simard 34fa30e76c Add .gitreview file
Change-Id: If792255fa3808a679b213d91ad2916408c749b4d
2017-02-02 12:27:34 -05:00
Naga Ravi Chaitanya Elluri 508c9d4908 update license to Apache-2.0 2017-01-30 11:46:38 -05:00
Naga Ravi Chaitanya Elluri fa2db30b91 update readme 2016-12-05 14:42:21 -05:00
Naga Ravi Chaitanya Elluri 15745383d6 update readme 2016-12-05 14:39:27 -05:00
Naga Ravi Chaitanya Elluri 865ae7cc84 add License 2016-12-05 14:37:24 -05:00
Naga Ravi Chaitanya Elluri 4619c0346a update readme 2016-11-16 12:53:05 -05:00
Naga Ravi Chaitanya Elluri 2e514e8f92 change default port 2016-11-16 12:44:10 -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
NAGA RAVI CHAITANYA ELLURI c569f5a732 Initial commit 2016-11-15 12:51:24 -05:00