Commit Graph

19 Commits

Author SHA1 Message Date
Amber Elliot
aa07c1b451 docker: add setup script
Adding setup script for docker containers. The script will edit all
necessary configuration files, build and launch all containers, and
do the initial database setup - including populating the database
with data supplied by the user.

Changed docker/README to reflect new setup instructions.

Signed-off-by: Amber Elliot <amber.n.elliot@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-07-17 11:30:56 +12:00
Paul Eggleton
08c979ac58 docker: Add docker-compose file
This makes deployment (and updates) much easier. You still need to
follow some setup instructions in the docker/README file, but the number
of steps is reduced and most commands simplified.

Thanks to Konrad Scherer <Konrad.Scherer@windriver.com> for suggesting
this (although the docker-compose.yml here was written from scratch).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-07-17 11:30:56 +12:00
Paul Eggleton
5d308d943e Enable password strength validation by default
Use Django's built-in password validators with reasonable settings, and
add a basic complexity validator since there isn't one provided.

Additionally, fix the registration form so that it shows the help text
which includes a description of what the password requirements are.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-11-06 13:58:32 +13:00
Paul Eggleton
dff454815f Use django-axes to lockout after multiple failed logins
Repeated failed login attempts should trigger lockout to prevent
brute-forcing and user enumeration - django-axes does this using account
and IP-based lockout.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-11-06 13:58:03 +13:00
Paul Eggleton
0bfb98971c settings: add settings for CAPTCHA accessibility
To enable audio support for django-simple-captcha for accessibility
purposes, you need to provide the full paths to the flite and sox
binaries, so add these settings (commented out by default to avoid extra
dependencies for those that don't need it).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-11-06 10:37:31 +13:00
Paul Eggleton
631116a1c4 Replace nvd3 with Chart.js
nvd3 and its python/django wrappers appear to be no longer actively
maintained, and at least the wrappers were a bit clunky to use. Looking
around for a suitable replacement, Chart.js seems capable, has no
additional dependencies and is fairly simple to use. As a bonus we get
to drop a few Python dependencies from our list.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-11-06 10:33:39 +13:00
Paul Eggleton
24b6e13442 docker: add TASK_LOG_DIR to docker settings file
This was missed when the main settings.py got updated recently.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-10-04 11:15:39 +13:00
Paul Eggleton
517424dc81 Upgrade to Bootstrap 3
Use a more modern version of Bootstrap and take the opportunity to
upgrade jQuery to the latest version at the same time. This provides
better browser compatibility, moves to MIT license, allows us to make
the site more responsive for different devices in future, and provides
theming capabilities for custom installs among other improvements.

(I chose to upgrade to v3 for now rather than straight to v4 as it was
easier to do this gradually.)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-09-20 15:57:59 +12:00
Paul Eggleton
d99cbe3edf docker: correct comment in .gitconfig
We moved this when we switched to using a specific user account.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-08-29 21:42:02 +12:00
Paul Eggleton
725c7e054c docker/README: fix setup to allow bulk change to work
We weren't giving the layersapp container access to the layer
repositories, which meant that the "Bulk change" function (which lets
you generate patches on top of recipes to change certain variable
values) could not work. Enable the volume and rearrange the order so
that it does, and name the volume more appropriately.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-08-06 12:34:57 +02:00
Paul Eggleton
2cd132c05f docker/README: use -v option for volume mounts
Several distro-provided versions of Docker I have used are too old to
support the --mount option, so rather than making users find and replace
it in the instructions, just revert to the old-style -v option.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-08-06 12:34:57 +02:00
Paul Eggleton
a4409573bc README: tweak to make Docker setup more prominent
The Docker-based setup method is preferred for production, so rearrange
things a little to make it a bit easier to follow.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-08-06 12:34:57 +02:00
Paul Eggleton
b35591d882 docker: drop names/emails from settings.py
The user needs to set this appropriately, there should not be a default.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-08-06 12:34:57 +02:00
Paul Eggleton
272f0eded2 docker: enhance example setup
* Put NGINX, Celery, and RabbitMQ into their own separate containers
* Use a docker network instead of the deprecated --link
* Allow for collecting the static files properly
* Create a copy of settings.py specifically for the docker setup. This
  will need to be kept in sync with the main example settings.py, but
  it avoids the user having to edit it too much.
* Add optional SSL configuration using letsencrypt certificate
* Create some volumes for static files / fetched repos
* Add some more helpful setup instructions

Largely based upon work by Michael Halstead <michael@yoctoproject.org>.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-07-23 08:40:00 +02:00
Paul Eggleton
32df911836 docker: migrate all applications, not just layerindex
If we're starting a new database, or one of the other applications
(i.e. dependencies of the main layerindex application) has been
upgraded, we need to be migrate all of the applications rather than just
layerindex, so have migrate.sh do that.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-07-23 08:40:00 +02:00
Paul Eggleton
e82b9af3a3 docker: don't reload in updatelayers.sh
When updating, we should just update, we don't need to reload data every
time.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-07-23 08:40:00 +02:00
Paul Eggleton
163a84ff00 docker: enable UTF-8 locale
Python 3 is a lot more sensitive to locale, plus we will definitely be
dealing with non-ASCII names and email addresses, so we need to get this
right.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-07-23 08:40:00 +02:00
Paul Eggleton
bf94b2f7e9 update.py: allow updating all branches with one command
Allow updating multiple branches, and if no branches are specified,
update all branches that have a new "updates_enabled" flag field set to
True. This avoids the need to have a separate shell script which runs
update.py for each branch (and thus has hardcoded knowledge of each
active branch in the index, i.e. it needs to be kept up-to-date in
addition to the database.)

The migration will default updates_enabled to True for all branches so
if you wish to take advantage of this functionality, the flag will need
to be set to False for any branches that shouldn't be updated.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-10 06:55:26 +12:00
Alex Franco
4daaf718db Docker based environment setup
Replicate production setup in Docker containers

[YOCTO #7575]

Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-10-07 11:34:34 +01:00