diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..2a7285b6 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +vagrant/host_vars/*/secrets.yml diff=ansible-vault +vagrant/group_vars/*/secrets.yml diff=ansible-vault +vagrant/files/ssl_cert/* diff=ansible-vault diff --git a/.gitignore b/.gitignore index 1e8f5290..4d4f0ce9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.pyc *.log settings/me.* +settings/keys/* *.dot reports ENV diff --git a/README.md b/README.md index f2856842..3786b9f5 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,14 @@ regluit ======= -A 'monolithic' alternative to [unglu](http://github.com/gluejar/unglu) -for the unglue.it website. regluit is essentially a Django project that -contains three applications: `frontend`, `api` and `core` that can be deployed +The first version of the unglue.it codebase was a services-oriented project named "unglu". +We decided that "unglu" was too complicated, so we started over and named the new project "regluit". +regluit is a Django project that +contains four main applications: `core`, `frontend`, `api` and `payment` that can be deployed and configured on as many ec2 instances that are needed to support traffic. -The key difference with [unglu](http://github.com/gluejar/unglu) is that the -`frontend` app is able to access database models from `core` in the same -way that the `api` is able to...which hopefully should simplify some things. +The partitioning between these modules is not as clean as would be ideal. `payment` is particularly messy because we had to retool it twice because we had to switch from Paypal to Amazon Payments to Stripe. + +regluit was originally developed on Django 1.3 (python 2.7) and currently runs on Django 1.8. Develop ------- @@ -24,8 +25,10 @@ to install python-setuptools in step 1: 1. `pip install -r requirements_versioned.pip` 1. `add2virtualenv ..` 1. `cp settings/dev.py settings/me.py` -1. edit `settings/me.py` and set `EMAIL_HOST_USER` and `EMAIL_HOST_PASSWORD` to your gmail username and password, if you want to see that registration emails will work properly. -1. edit `settings/me.py` and look at the facebook, twitter and google auth settings to enable federated logins from those sites +1. `mkdir settings/keys/` +1. `cp settings/dummy/* settings/keys/` +1. edit `settings/me.py` with path info, etc. to make things work +1. edit the files in settings/keys filling in account and key information OR if you have the ansible vault password, install ansible, then from the vagrant directory run `ansible-playbook create_keys.yml` 1. `echo 'export DJANGO_SETTINGS_MODULE=regluit.settings.me' >> ~/.virtualenvs/regluit/bin/postactivate` 1. `deactivate ; workon regluit` 1. `django-admin.py syncdb --migrate --noinput` @@ -41,6 +44,7 @@ CSS development Production Deployment --------------------- +OBSOLETE Below are the steps for getting regluit running on EC2 with Apache and mod_wsgi, and talking to an Amazon Relational Data Store instance. Instructions for setting please are slightly different. @@ -194,3 +198,8 @@ MARC Records * use UNGLUE if it links to the unglue.it download page * if you have records with both DIRECT and UNGLUE links, you'll need two MARCRecord instances * if you have both kinds of link, put them in _separate_ records, as marc_format can only take one value + + +# vagrant / ansible + +[How to build machines using Vagrant/ansible](docs/vagrant_ansible.md) diff --git a/core/fixtures/initial_data.json b/core/fixtures/initial_data.json index 51df7b54..84efa3c8 100644 --- a/core/fixtures/initial_data.json +++ b/core/fixtures/initial_data.json @@ -12,7 +12,7 @@ "model": "sites.site", "fields": { "domain": "please.unglueit.com", - "name": "unglue.it development" + "name": "please.unglue.it" } }, { @@ -36,7 +36,7 @@ "model": "sites.site", "fields": { "domain": "just.unglue.it", - "name": "unglue.it staging" + "name": "just.unglue.it" } }, { diff --git a/deploy/prod.conf b/deploy/prod.conf index e76d39c1..7ea61704 100644 --- a/deploy/prod.conf +++ b/deploy/prod.conf @@ -33,7 +33,7 @@ RewriteCond %{SERVER_NAME} !^unglue.it$ [NC] RewriteRule (.*) https://unglue.it$1 [R=301,L] WSGIDaemonProcess regluit-ssl processes=4 threads=4 python-eggs=/tmp/regluit-python-eggs -WSGIScriptAlias / /opt/regluit/deploy/regluit.wsgi +WSGIScriptAlias / /opt/regluit/deploy/prod.wsgi Options Indexes FollowSymLinks @@ -55,4 +55,4 @@ ErrorLog "|/usr/bin/cronolog /var/log/apache2/%Y%m%d_error.log" LogLevel warn CustomLog "|/usr/bin/cronolog /var/log/apache2/%Y%m%d_access.log" combined - \ No newline at end of file + diff --git a/docs/vagrant_ansible.md b/docs/vagrant_ansible.md new file mode 100644 index 00000000..b49223b4 --- /dev/null +++ b/docs/vagrant_ansible.md @@ -0,0 +1,98 @@ +**Instructions on how to run open_source branch** + +To use vagrant/ansible to build the `{please|just|}.unglue.it`, you +need to have the following installed: + +* [Vagrant](https://www.vagrantup.com/docs/installation/) (e.g., to download: https://www.vagrantup.com/downloads.html) (at least version 1.8.1) +* [Installation — Ansible Documentation](http://docs.ansible.com/ansible/intro_installation.html#latest-releases-via-pip) (version 2+) -- use `pip install ansible` + +We also need the `vagrant-aws vagrant plugin: + + +``` +vagrant plugin install vagrant-aws --plugin-version 0.5.0 +``` + +Optionally you can [VirtualBox – Oracle VM VirtualBox](https://www.virtualbox.org/wiki/VirtualBox) to enable the build of machines locally. + + +Layout of important files: + +* [Vagrantfile](https://github.com/Gluejar/regluit/blob/1ac55c4f0a6b6a3dfc97652aa5ce33638a6140a1/vagrant/Vagrantfile), which is what `vagrant` looks for and defines various hosts: `please`, `just`, `just2`, `prod`, and `prod2`. +* [dev.yml](https://github.com/Gluejar/regluit/blob/1ac55c4f0a6b6a3dfc97652aa5ce33638a6140a1/vagrant/dev.yml) -- the main ansible playbook that builds the various machines + +* `please` is for buiding `please.unglue.it` -- it is a transient machine +* the reason I have a `just` *group* with `just` and `just2` hosts is while one is in production, I build the new one. Once the new one is working, I can `vagrant stop` and then ultimately `vagrant destroy` the old one. +* similar logic for the production *group*. (Note that before I retire a production server, I copy over the logs to S3: [backing up production logs to S3](https://www.evernote.com/shard/s1/sh/f12406a7-de95-4d54-809d-9f3abe8eaabd/f935e813d8f16f25)) + + +You also need AWS keys in the environment. I have my key/secret pair configured with a shell script that I can run -- I've stored this file in `/Volumes/ryvault1/gluejar/other_keys/aws.sh`, stored in an encrypted volume on my laptop. For convenience I link to the file from `~/bin/gj_aws.sh`: + +``` +#!/bin/bash +export BOTO_CONFIG=/Volumes/ryvault1/gluejar/other_keys/boto.cfg + +# rdhyee key: https://console.aws.amazon.com/iam/home?region=us-east-1#/users/rdhyee +# eric: you can use the credentials from https://console.aws.amazon.com/iam/home?region=us-east-1#/users/eric +# note: these credentials are tied to the Gluejar account + +export AWS_ACCESS_KEY=[FILL IN] +export AWS_SECRET_KEY=[FILL IN] + +# simple_public_vpc +export AWS_VPC_ID=vpc-6f7db10b + +# EC2 API tools +export EC2_ACCESS_KEY=$AWS_ACCESS_KEY +export EC2_SECRET_KEY=$AWS_SECRET_KEY + +# s3cmd +ln -fs /Volumes/ryvault1/gluejar/s3/s3cfg ~/.s3cfg + +export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY +export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_KEY + +# AWS CLI http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html +export AWS_DEFAULT_REGION=us-east-1 +export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY +export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_KEY +# http://docs.aws.amazon.com/cli/latest/userguide/controlling-output.html +export AWS_DEFAULT_OUTPUT="json" + +``` + +e.g., + +``` +hyptyposis-2014:vagrant raymondyee$ ls -lt ~/bin/gj_aws.sh +lrwxr-xr-x 1 raymondyee 501 43 Aug 18 2014 /Users/raymondyee/bin/gj_aws.sh -> /Volumes/ryvault1/gluejar/other_keys/aws.sh +``` + +In the `regluit/vagrant` directory, after I run `~/bin/gj_aws.sh` and `vagrant status`, I get something like (the actual status of various machines can vary): + +``` +please not created (virtualbox) +just running (aws) +just2 not created (virtualbox) +prod not created (virtualbox) +prod2 running (aws) +localvm not created (virtualbox) +``` + +Once you have `vagrant status` works, a good place to start is how to build `please` with + +``` +vagrant up please --provider=aws +``` + +**For the moment, please leave building just and production to me.** + +## running regluit on localhost + +In the `vagrant` directory, you can run + +``` +ansible-playbook create_commonpy.yml +``` + +to generate `settings/common.py`. You should then be able to proceed as normal. \ No newline at end of file diff --git a/experimental/bookdata.py b/experimental/bookdata.py index 35929cb7..bf9bf7b4 100644 --- a/experimental/bookdata.py +++ b/experimental/bookdata.py @@ -36,7 +36,12 @@ import freebase import logging logger = logging.getLogger(__name__) -GOOGLE_BOOKS_KEY = "AIzaSyDsrHCUsUFNAf65cFPSF8MZTKj8C9oMuj8" +try: + from django.conf import settings + GOOGLE_BOOKS_KEY = settings.GOOGLE_BOOKS_API_KEY +except: + GOOGLE_BOOKS_KEY = os.environ.get('GOOGLE_BOOKS_API_KEY', '') + MASHUPBOOK_ISBN_13 = '9781590598580' MASHUPBOOK_ISBN_10 = '159059858X' diff --git a/experimental/matcher.py b/experimental/matcher.py index 779acefb..fe7dcb41 100755 --- a/experimental/matcher.py +++ b/experimental/matcher.py @@ -6,6 +6,12 @@ import fileinput import requests +try: + from django.conf import settings + GOOGLE_BOOKS_API_KEY = settings.GOOGLE_BOOKS_API_KEY +except: + GOOGLE_BOOKS_API_KEY = os.environ.get('GOOGLE_BOOKS_API_KEY', '') + def match(): for line in fileinput.input(): j = json.loads(line) @@ -18,7 +24,7 @@ def google_search(title, authors, no_matches): # the title and author are intentionally not fielded params = { 'q': title, - 'key': 'AIzaSyBE36z7o6NUafIWcLEB8yk2I47-8_5y1_0' + 'key': GOOGLE_BOOKS_API_KEY } for author in authors: params['q'] += ' ' + norm_author(author) diff --git a/frontend/views.py b/frontend/views.py index 068f308a..0edc51c9 100755 --- a/frontend/views.py +++ b/frontend/views.py @@ -2689,12 +2689,6 @@ class LibraryThingView(FormView): else: context.update({'books':None}) - # try picking up the LibraryThing api key -- and set to None if not available. Not being used for - # anything crucial at this moment, so a None is ok here - try: - context.update({'lt_api_key':settings.LIBRARYTHING_API_KEY}) - except: - pass return context diff --git a/settings/common.py b/settings/common.py index 967891be..3ad5884d 100644 --- a/settings/common.py +++ b/settings/common.py @@ -1,11 +1,18 @@ import datetime import mimetypes import sys +import os from os.path import dirname, realpath, join import regluit from regluit.payment.parameters import PAYMENT_HOST_PAYPAL, PAYMENT_HOST_AMAZON +try: + from .keys.common import * +except ImportError: + print 'no real key file found, using dummy' + from .dummy.common import * + PROJECT_DIR = dirname(dirname(realpath(__file__))) LANGUAGE_CODE = 'en-us' @@ -399,8 +406,6 @@ NOTIFICATION_QUEUE_ALL = True # amazon or paypal for now. PAYMENT_PROCESSOR = 'stripelib' -# a SECRET_KEY to be used for encrypting values in core.models.Key -- you should store in settings/local.py -SECRET_KEY = '' # by default, we are not in maintenance mode -- set True in overriding settings files for maintenance mode # http://pypi.python.org/pypi/django-maintenancemode/ @@ -420,8 +425,6 @@ AWS_SECRET_ACCESS_KEY = '' AWS_STORAGE_BUCKET_NAME = '' AWS_QUERYSTRING_AUTH = False -MAILCHIMP_API_KEY = '5f8e846a2bbc847807ed89086de4b4bf-us2' -MAILCHIMP_NEWS_ID = u'c5cce92fe1' FORMATS = ( ('pdf','PDF'), @@ -453,26 +456,20 @@ MARC_PREF_OPTIONS =( ('UNGLUE', 'Unglue.it link'), ) -BOOXTREAM_API_KEY = '7ynRCsx4q21zEY67it7yk8u5rc6EXY' -BOOXTREAM_API_USER = 'ungluetest' + BOOXTREAM_TEST_EPUB_URL = 'https://github.com/Gluejar/open_access_ebooks_ebook/raw/master/download/open_access_ebooks.epub' TEST_PDF_URL = "https://github.com/Gluejar/flatland/raw/master/downloads/Flatland.pdf" FILE_UPLOAD_MAX_MEMORY_SIZE = 20971520 #20MB -DROPBOX_KEY = '4efhwty5aph52bd' #for unglue.it, just.unglue.it -#DROPBOX_KEY = '6uefhocpvp0s1ep' #for localhost - -# for reading GITenberg releases -# generated from rdhyee account -GITHUB_PUBLIC_TOKEN = 'f702409f913d7f9046f93c677710f829e2b599c9' - -MOBIGEN_URL = "https://docker.gluejar.com:5001/mobigen" -MOBIGEN_USER_ID = "admin" -MOBIGEN_PASSWORD = "CXq5FSEQFgXtP_s" - QUESTIONNAIRE_USE_SESSION = False QUESTIONNAIRE_DEBUG = True # Selenium related -- set if Se tests run FIREFOX_PATH = '' CHROMEDRIVER_PATH = '' + +try: + from .keys.host import * +except ImportError: + from .dummy.host import * + diff --git a/settings/dev.py b/settings/dev.py index 906ea7e5..d8f53c74 100644 --- a/settings/dev.py +++ b/settings/dev.py @@ -1,6 +1,10 @@ -from regluit.settings.common import * +# coding=utf-8 +from .common import * +try: + from .keys.host import * +except ImportError: + from .dummy.host import * -ALLOWED_HOSTS = ['.unglue.it'] DEBUG = True TEMPLATES[0]['OPTIONS']['debug'] = DEBUG @@ -29,70 +33,34 @@ DATABASES = { } } +STATIC_ROOT = '/var/www/static' +CKEDITOR_UPLOAD_PATH = '/var/www/static/media/' + + TIME_ZONE = 'America/New_York' -SECRET_KEY = b'_^_off!8zsj4+)%qq623m&$7_m-q$iau5le0w!mw&n5tgt#x=t' # settings for outbout email # if you have a gmail account you can use your email address and password EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' -EMAIL_HOST_USER = 'me@gmail.com' -EMAIL_HOST_PASSWORD = 'my-password' +# EMAIL_HOST_USER is in keys/host +# EMAIL_HOST_PASSWORD is in keys/host EMAIL_PORT = 587 DEFAULT_FROM_EMAIL = 'info@gluejar.com' -# twitter auth -# you'll need to create a new Twitter application to fill in these blanks -# https://dev.twitter.com/apps/new - -SOCIAL_AUTH_TWITTER_KEY = '' -SOCIAL_AUTH_TWITTER_SECRET = '' - -# facebook auth -# you'll need to create a new Facebook application to fill in these blanks -# https://developers.facebook.com/apps/ - -SOCIAL_AUTH_FACEBOOK_KEY = '' -SOCIAL_AUTH_FACEBOOK_SECRET = '' - -# get these (as oauth2 client ID and Secret from -# https://console.developers.google.com/project/569579163337/apiui/credential?authuser=1 -SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = '' -SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = '' - - -# you'll need to register a GoogleBooks API key -# https://code.google.com/apis/console -GOOGLE_BOOKS_API_KEY = '' - -# Payment processor switch -PAYMENT_PROCESSOR = 'stripelib' - -# set -- sandbox or production Amazon FPS? -AMAZON_FPS_HOST = "fps.sandbox.amazonaws.com" -#AMAZON_FPS_HOST = "fps.amazonaws.com" +# for use with test google account only +GOOGLE_DISPLAY_NAME = 'Unglue.It' +REDIRECT_IS_HTTPS = False #BASE_URL = 'http://0.0.0.0' BASE_URL_SECURE = 'https://0.0.0.0' -IPN_SECURE_URL = True # use database as queuing service in development BROKER_TRANSPORT = "djkombu.transport.DatabaseTransport" INSTALLED_APPS += ("djkombu",) -# Goodreads API -GOODREADS_API_KEY = '' -GOODREADS_API_SECRET = '' - -# LibraryThing API -LIBRARYTHING_API_KEY = '' - -# Freebase credentials -FREEBASE_USERNAME = '' -FREEBASE_PASSWORD = '' - # send celery log to Python logging CELERYD_HIJACK_ROOT_LOGGER = False @@ -101,15 +69,12 @@ INTERNAL_IPS = ('127.0.0.1',) CELERYD_LOG_LEVEL = "INFO" -# an optional setting to change regluit.utils.localdatetime._now -- setting it to None will cause -# a default _now() to be computed in regluit.utils.localdatetime +# decide which of the period tasks to add to the schedule +#CELERYBEAT_SCHEDULE['send_test_email'] = SEND_TEST_EMAIL_JOB +#CELERYBEAT_SCHEDULE['refresh_acqs'] = REFRESH_ACQS_JOB -LOCALDATETIME_NOW = None - -# selenium-related testing parameters -# in Django 1.4, we'll get a URL for LiveServerTestCase https://docs.djangoproject.com/en/dev/topics/testing/#django.test.LiveServerTestCase -# but for now, we would have to manually configure our own test server. -LIVE_SERVER_TEST_URL = "http://127.0.0.1:8000" +# if you're doing development work, you'll want this to be zero +IS_PREVIEW = False # username, password to pass to LIVE_SERVER_TEST_URL @@ -119,11 +84,3 @@ UNGLUEIT_TEST_PASSWORD = None # local settings for maintenance mode MAINTENANCE_MODE = False -# decide which of the period tasks to add to the schedule -#CELERYBEAT_SCHEDULE['send_test_email'] = SEND_TEST_EMAIL_JOB -CELERYBEAT_SCHEDULE['report_new_ebooks'] = EBOOK_NOTIFICATIONS_JOB - -try: - from regluit.settings.local import * -except ImportError: - pass diff --git a/settings/dummy/__init__.py b/settings/dummy/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/settings/dummy/common.py b/settings/dummy/common.py new file mode 100644 index 00000000..dc1e8716 --- /dev/null +++ b/settings/dummy/common.py @@ -0,0 +1,13 @@ +import os + +# all the COMMON_KEYS +# copy this file to settings/keys/ and replace the dummy values with real ones +BOOXTREAM_API_KEY = os.environ.get('BOOXTREAM_API_KEY', '012345678901234567890123456789') +BOOXTREAM_API_USER = os.environ.get('BOOXTREAM_API_USER', 'user') +DROPBOX_KEY = os.environ.get('DROPBOX_KEY', '012345678901234') +GITHUB_PUBLIC_TOKEN = os.environ.get('GITHUB_PUBLIC_TOKEN', '0123456789012345678901234567890123456789') +MAILCHIMP_API_KEY = os.environ.get('MAILCHIMP_API_KEY', '01234567890123456789012345678901-us2') +MAILCHIMP_NEWS_ID = os.environ.get('MAILCHIMP_NEWS_ID', '0123456789') +MOBIGEN_PASSWORD = os.environ.get('MOBIGEN_PASSWORD', '012345678901234') +MOBIGEN_URL = os.environ.get('MOBIGEN_URL', '/mobigen') +MOBIGEN_USER_ID = os.environ.get('MOBIGEN_USER_ID', 'user') diff --git a/settings/dummy/host.py b/settings/dummy/host.py new file mode 100644 index 00000000..f00ef89e --- /dev/null +++ b/settings/dummy/host.py @@ -0,0 +1,47 @@ +# host.py +# copy this file to settings/keys/ and replace the dummy values with real ones +# or generate it from the ansible vault +import os + +# you can use this to generate a key: http://www.miniwebtool.com/django-secret-key-generator/ +SECRET_KEY = os.environ.get("SECRET_KEY", '01234567890123456789012345678901234567890123456789') + +# you'll need to register a GoogleBooks API key +# https://code.google.com/apis/console +GOOGLE_BOOKS_API_KEY = os.environ.get("GOOGLE_BOOKS_API_KEY", "012345678901234567890123456789012345678") + +# +GOODREADS_API_KEY = os.environ.get("GOODREADS_API_KEY", "01234567890123456789") +GOODREADS_API_SECRET = os.environ.get("GOODREADS_API_SECRET", "0123456789012345678901234567890123456789012") + +# Amazon SES +# create with https://console.aws.amazon.com/ses/home?region=us-east-1#smtp-settings: +EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER", '01234567890123456789') +EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD", '01234567890123456789012345678901234567890123') + +# twitter auth +# you'll need to create a new Twitter application to fill in these blanks +# https://dev.twitter.com/apps/new +SOCIAL_AUTH_TWITTER_KEY = os.environ.get("SOCIAL_AUTH_TWITTER_KEY", '0123456789012345678901234') +SOCIAL_AUTH_TWITTER_SECRET = os.environ.get("SOCIAL_AUTH_TWITTER_SECRET", '01234567890123456789012345678901234567890123456789') + +# support@icontact.nl +BOOXTREAM_API_KEY = os.environ.get("BOOXTREAM_API_KEY", '012345678901234567890123456789') +BOOXTREAM_API_USER = os.environ.get("BOOXTREAM_API_USER", 'user') + +# you'll need to create a new Facebook application to fill in these blanks +# https://developers.facebook.com/apps/ +SOCIAL_AUTH_FACEBOOK_KEY = os.environ.get("SOCIAL_AUTH_FACEBOOK_KEY", '012345678901234') +SOCIAL_AUTH_FACEBOOK_SECRET = os.environ.get("SOCIAL_AUTH_FACEBOOK_SECRET", '01234567890123456789012345678901') + +# https://console.developers.google.com/apis/credentials/oauthclient/ +# unglue.it (prod) SOCIAL_AUTH_GOOGLE_OAUTH2_KEY #2 +SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = os.environ.get("_KEY", '012345678901-01234567890123456789012345678901.apps.googleusercontent.com') +SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = os.environ.get("_SECRET", '012345678901234567890123') + +AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", '01234567890123456789') +AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", '0123456789012345678901234567890123456789') + +DATABASE_USER = os.environ.get("DATABASE_USER", 'root') +DATABASE_PASSWORD = os.environ.get("DATABASE_PASSWORD", '') +DATABASE_HOST = os.environ.get("DATABASE_HOST", '') diff --git a/settings/jenkins.py b/settings/jenkins.py index af01ef15..6abf3b39 100644 --- a/settings/jenkins.py +++ b/settings/jenkins.py @@ -1,4 +1,9 @@ -from regluit.settings.common import * +# coding=utf-8 +from .common import * +try: + from .keys.host import * +except ImportError: + from .dummy.host import * DEBUG = True TEMPLATES[0]['OPTIONS']['debug'] = DEBUG @@ -36,6 +41,29 @@ EMAIL_HOST_PASSWORD = 'my-password' EMAIL_PORT = 587 DEFAULT_FROM_EMAIL = 'info@gluejar.com' + +# formerly of settings/common.py to surface old vars +# TO DO: invalidate before we open source + +MAILCHIMP_API_KEY = '5f8e846a2bbc847807ed89086de4b4bf-us2' +MAILCHIMP_NEWS_ID = u'c5cce92fe1' + +BOOXTREAM_API_KEY = '7ynRCsx4q21zEY67it7yk8u5rc6EXY' +BOOXTREAM_API_USER = 'ungluetest' + +DROPBOX_KEY = '4efhwty5aph52bd' #for unglue.it, just.unglue.it +#DROPBOX_KEY = '6uefhocpvp0s1ep' #for localhost + +# for reading GITenberg releases +# generated from rdhyee account +GITHUB_PUBLIC_TOKEN = 'f702409f913d7f9046f93c677710f829e2b599c9' + +MOBIGEN_URL = "https://docker.gluejar.com:5001/mobigen" +MOBIGEN_USER_ID = "admin" +MOBIGEN_PASSWORD = "CXq5FSEQFgXtP_s" + +#------------------------------------- + # twitter auth SOCIAL_AUTH_TWITTER_KEY = '' SOCIAL_AUTH_TWITTER_SECRET = '' @@ -44,8 +72,6 @@ SOCIAL_AUTH_TWITTER_SECRET = '' SOCIAL_AUTH_FACEBOOK_KEY = '' SOCIAL_AUTH_FACEBOOK_SECRET = '' - - # get these (as oauth2 client ID and Secret from # https://console.developers.google.com/project/569579163337/apiui/credential?authuser=1 SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = '569579163337-rjija9842834nqa1vi639nac17j1n6cl@developer.gserviceaccount.com' @@ -57,14 +83,15 @@ GOOGLE_BOOKS_API_KEY = 'AIzaSyC-nBaK90PIsovMRbswPYEKgA6cJfYSDmY' #BASE_URL = 'http://0.0.0.0/' BASE_URL_SECURE = 'http://0.0.0.0/' -IPN_SECURE_URL = False # Goodreads API +# owned by rdhyee@gluejar.com GOODREADS_API_KEY = 'w8nsFplG3HFOeOLQ7rqfQ' GOODREADS_API_SECRET = '8Dfl7nQ28VgzJctlVwf8m7zkPaWns4j79t0G9iFxbk' # Amazon keys to permit S3 access # s3_jenkins +# https://console.aws.amazon.com/iam/home?region=us-east-1#/users/s3_jenkins DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' AWS_ACCESS_KEY_ID = 'AKIAJQGL74HQPHPFYJ5Q' AWS_SECRET_ACCESS_KEY = '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' diff --git a/settings/just.py b/settings/just.py index d3c2e325..50807b5c 100644 --- a/settings/just.py +++ b/settings/just.py @@ -1,4 +1,5 @@ -from regluit.settings.common import * +# coding=utf-8 +from .common import * ALLOWED_HOSTS = ['.unglue.it'] DEBUG = False @@ -17,64 +18,27 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'unglueit', - 'USER': 'root', - 'PASSWORD': 'forgetn0t', - 'HOST': 'justdb1.cboagmr25pjs.us-east-1.rds.amazonaws.com', + 'USER': DATABASE_USER, + 'PASSWORD': DATABASE_PASSWORD, + 'HOST': DATABASE_HOST, 'PORT': '', 'TEST_CHARSET': 'utf8' } } TIME_ZONE = 'America/New_York' -SECRET_KEY = u'_^_off!8zsj4+)%qq623m&$7_m-q$iau5le0w!mw&n5tgt#x=t' # settings for outbout email # if you have a gmail account you can use your email address and password -#EMAIL_USE_TLS = True -#EMAIL_HOST = 'smtp.gmail.com' -#EMAIL_HOST_USER = 'accounts@gluejar.com' -#EMAIL_HOST_PASSWORD = '7k3sWyzHpI' -#EMAIL_PORT = 587 -#DEFAULT_FROM_EMAIL = 'accounts@gluejar.com' - -# testing out using Amazon SES +# Amazon SES EMAIL_BACKEND = 'django_smtp_ssl.SSLEmailBackend' MAIL_USE_TLS = True EMAIL_HOST = 'email-smtp.us-east-1.amazonaws.com' -EMAIL_HOST_USER = 'AKIAJXM4QX324HXCH54Q' -EMAIL_HOST_PASSWORD = 'AgR9hVmSSOhetuLOnbFEFo9PTnL9iAM/52NOPGkS3Rwh' EMAIL_PORT = 465 DEFAULT_FROM_EMAIL = 'notices@gluejar.com' -# googlebooks -# key created by rdhyee@gluejar.com 2013/07/02 -GOOGLE_BOOKS_API_KEY = 'AIzaSyBPZS7D3QvypGN_Tqc3blAXV1iJJJuu4mk' - -# twitter auth -SOCIAL_AUTH_TWITTER_KEY = 'sd9StEg1N1qB8gGb2GRX4A' -SOCIAL_AUTH_TWITTER_SECRET = 'YSKHn8Du6EWqpcWZ6sp5tqDPvcOBXK0WJWVGWyB0' - -# facebook auth (for just) -# created by Raymond Yee -# https://developers.facebook.com/apps/236518556394209/settings/ -SOCIAL_AUTH_FACEBOOK_KEY = '236518556394209' -SOCIAL_AUTH_FACEBOOK_SECRET = '88fec4d1dfc1ef4438cb87efa171db28' - -# get these (as oauth2 client ID and Secret from -# https://console.developers.google.com/project/569579163337/apiui/credential?authuser=1 -SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = '569579163337-kq3vm5imdap4hapj1r8lvmcg05kfi6ii.apps.googleusercontent.com' -SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = 'IYmgelotf77H8OPWX8oXf4Cq' - -# Goodreads API -GOODREADS_API_KEY = "vfqIO6QAhBVvlxt6hAzZJg" -GOODREADS_API_SECRET = "57tq4MpyJ15Hgm2ToZQQFWJ7vraZzOAqHLckWRXQ" - -# Freebase credentials -FREEBASE_USERNAME = '' -FREEBASE_PASSWORD = '' - # send celery log to Python logging CELERYD_HIJACK_ROOT_LOGGER = False @@ -159,9 +123,11 @@ MAINTENANCE_MODE = False # Amazon keys to permit S3 access DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' -AWS_ACCESS_KEY_ID = 'AKIAIYP6XRVAUWKQFT5Q' -AWS_SECRET_ACCESS_KEY = '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' -AWS_STORAGE_BUCKET_NAME = 'just-unglueit' +# https://console.aws.amazon.com/iam/home?region=us-east-1#/users/s3_just +# TO DO: invalidate +# AWS_ACCESS_KEY_ID = 'AKIAIYP6XRVAUWKQFT5Q' +# AWS_SECRET_ACCESS_KEY = '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' +# AWS_STORAGE_BUCKET_NAME = 'just-unglueit' # if settings/local.py exists, import those settings -- allows for dynamic generation of parameters such as DATABASES try: diff --git a/settings/localvm.py b/settings/localvm.py index 558e2df0..3b01de9b 100644 --- a/settings/localvm.py +++ b/settings/localvm.py @@ -48,7 +48,8 @@ SOCIAL_AUTH_TWITTER_SECRET = 'YSKHn8Du6EWqpcWZ6sp5tqDPvcOBXK0WJWVGWyB0' # facebook auth (for localvm) # https://developers.facebook.com/apps/401501793375379/settings/ SOCIAL_AUTH_FACEBOOK_KEY = '401501793375379' -SOCIAL_AUTH_FACEBOOK_SECRET = '7b63412aa28f408e6349eb0eceb1fcc3' +# reset 2016.11.30 +# SOCIAL_AUTH_FACEBOOK_SECRET = '7b63412aa28f408e6349eb0eceb1fcc3' # get these (as oauth2 client ID and Secret from # https://console.developers.google.com/project/grand-analyzer-95823/apiui/credential?clientType&authuser=0# diff --git a/settings/please.py b/settings/please.py index 14af0157..79c1e0e4 100644 --- a/settings/please.py +++ b/settings/please.py @@ -17,9 +17,9 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'regluit', - 'USER': 'regluit', - 'PASSWORD': 'regluit', - 'HOST': '', + 'USER': DATABASE_USER, + 'PASSWORD': DATABASE_PASSWORD, + 'HOST': DATABASE_HOST, 'PORT': '', 'TEST_CHARSET': 'utf8', } @@ -27,41 +27,16 @@ DATABASES = { TIME_ZONE = 'America/New_York' -SECRET_KEY = u'_^_off!8zsj4+)%qq623m&$7_m-q$iau5le0w!mw&n5tgt#x=t' # settings for outbout email # if you have a gmail account you can use your email address and password -EMAIL_USE_TLS = True -EMAIL_HOST = 'smtp.gmail.com' -EMAIL_HOST_USER = 'accounts@gluejar.com' -EMAIL_HOST_PASSWORD = '7k3sWyzHpI' -EMAIL_PORT = 587 -DEFAULT_FROM_EMAIL = 'accounts@gluejar.com' - -# googlebooks -GOOGLE_BOOKS_API_KEY = 'AIzaSyBE36z7o6NUafIWcLEB8yk2I47-8_5y1_0' - -# twitter auth -SOCIAL_AUTH_TWITTER_KEY = 'sd9StEg1N1qB8gGb2GRX4A' -SOCIAL_AUTH_TWITTER_SECRET = 'YSKHn8Du6EWqpcWZ6sp5tqDPvcOBXK0WJWVGWyB0' - -# facebook auth -SOCIAL_AUTH_FACEBOOK_KEY = '242881179080779' -SOCIAL_AUTH_FACEBOOK_SECRET = '5eae483a0e92113d884c427b578ef23a' - -# get these (as oauth2 client ID and Secret from -# https://console.developers.google.com/project/569579163337/apiui/credential?authuser=1 -SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = '569579163337-8rnhtn7pvbragmcj0l3slsmgfs86t69i.apps.googleusercontent.com' -SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = 'zueklvlUNGgkxuAWTl-93q1z' - -# Goodreads API -GOODREADS_API_KEY = "vfqIO6QAhBVvlxt6hAzZJg" -GOODREADS_API_SECRET = "57tq4MpyJ15Hgm2ToZQQFWJ7vraZzOAqHLckWRXQ" - -# Freebase credentials -FREEBASE_USERNAME = '' -FREEBASE_PASSWORD = '' +# Amazon SES +EMAIL_BACKEND = 'django_smtp_ssl.SSLEmailBackend' +MAIL_USE_TLS = True +EMAIL_HOST = 'email-smtp.us-east-1.amazonaws.com' +EMAIL_PORT = 465 +DEFAULT_FROM_EMAIL = 'notices@gluejar.com' # send celery log to Python logging CELERYD_HIJACK_ROOT_LOGGER = False @@ -69,7 +44,6 @@ CELERYD_HIJACK_ROOT_LOGGER = False # Next step to try https #BASE_URL = 'http://please.unglueit.com' BASE_URL_SECURE = 'https://please.unglueit.com' -IPN_SECURE_URL = False # use redis for production queue BROKER_TRANSPORT = "redis" @@ -131,19 +105,9 @@ IS_PREVIEW = False CELERYBEAT_SCHEDULE['report_new_ebooks'] = EBOOK_NOTIFICATIONS_JOB - # local settings for maintenance mode MAINTENANCE_MODE = False -# Amazon keys to permit S3 access -# reusing just cedentials here - -DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' -AWS_ACCESS_KEY_ID = 'AKIAIYP6XRVAUWKQFT5Q' -AWS_SECRET_ACCESS_KEY = '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' -AWS_STORAGE_BUCKET_NAME = 'just-unglueit' - - # if settings/local.py exists, import those settings -- allows for dynamic generation of parameters such as DATABASES try: diff --git a/settings/prod.py b/settings/prod.py index 7f9bbddb..0b02ae44 100644 --- a/settings/prod.py +++ b/settings/prod.py @@ -1,4 +1,4 @@ -from regluit.settings.common import * +from .common import * ALLOWED_HOSTS = ['.unglue.it'] DEBUG = False @@ -19,62 +19,28 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'unglueit', - 'USER': 'root', - 'PASSWORD': 'unglue1t', - 'HOST': 'production.cboagmr25pjs.us-east-1.rds.amazonaws.com', + 'USER': DATABASE_USER, + 'PASSWORD': DATABASE_PASSWORD, + 'HOST': DATABASE_HOST, 'PORT': '', 'TEST_CHARSET': 'utf8', } } TIME_ZONE = 'America/New_York' -SECRET_KEY = u'_^_off!8zsj4+)%qq623m&$7_m-q$iau5le0w!mw&n5tgt#x=t' # settings for outbout email # if you have a gmail account you can use your email address and password -#EMAIL_USE_TLS = True -#EMAIL_HOST = 'smtp.gmail.com' -#EMAIL_HOST_USER = 'accounts@gluejar.com' -#EMAIL_HOST_PASSWORD = '7k3sWyzHpI' -#EMAIL_PORT = 587 -#DEFAULT_FROM_EMAIL = 'accounts@gluejar.com' -# testing out using Amazon SES +# Amazon SES EMAIL_BACKEND = 'django_smtp_ssl.SSLEmailBackend' MAIL_USE_TLS = True EMAIL_HOST = 'email-smtp.us-east-1.amazonaws.com' -EMAIL_HOST_USER = 'AKIAJXM4QX324HXCH54Q' -EMAIL_HOST_PASSWORD = 'AgR9hVmSSOhetuLOnbFEFo9PTnL9iAM/52NOPGkS3Rwh' EMAIL_PORT = 465 DEFAULT_FROM_EMAIL = 'notices@gluejar.com' -# googlebooks -# key generated by rdhyee@gluejar.com 2013/07/02 -GOOGLE_BOOKS_API_KEY = 'AIzaSyAGUEeGJXXLj9Tau4fpIFUCdOSKfDmJDVw' - -# twitter auth -SOCIAL_AUTH_TWITTER_KEY = 'sd9StEg1N1qB8gGb2GRX4A' -SOCIAL_AUTH_TWITTER_SECRET = 'YSKHn8Du6EWqpcWZ6sp5tqDPvcOBXK0WJWVGWyB0' - -# facebook auth -SOCIAL_AUTH_FACEBOOK_KEY = '211951285561911' -SOCIAL_AUTH_FACEBOOK_SECRET = '42efef7e540b80479dbbb69490cd902a' - -# get these (as oauth2 client ID and Secret from -# https://console.developers.google.com/project/569579163337/apiui/credential?authuser=1 -SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = '569579163337-k83htoc5h00mqs4rr6tv22tdcc23jh4r.apps.googleusercontent.com' -SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = 'ZyV5Q-E2MkJhRGm42XQAPeZi' - -# Goodreads API -GOODREADS_API_KEY = "vfqIO6QAhBVvlxt6hAzZJg" -GOODREADS_API_SECRET = "57tq4MpyJ15Hgm2ToZQQFWJ7vraZzOAqHLckWRXQ" - -# Freebase credentials -FREEBASE_USERNAME = '' -FREEBASE_PASSWORD = '' - # send celery log to Python logging CELERYD_HIJACK_ROOT_LOGGER = False @@ -156,17 +122,12 @@ AMAZON_FPS_HOST = "fps.amazonaws.com" MAINTENANCE_MODE = False # Amazon keys to permit S3 access +# https://console.aws.amazon.com/iam/home?region=us-east-1#/users/s3user?section=security_credentials DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' -AWS_ACCESS_KEY_ID = 'AKIAIRLBDIET3DFCNU4A' -AWS_SECRET_ACCESS_KEY = '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' -AWS_STORAGE_BUCKET_NAME = 'unglueit-files' # we should suppress Google Analytics outside of production SHOW_GOOGLE_ANALYTICS = True -BOOXTREAM_API_KEY = '987n76Zsc4hj9jUvfctxezZQZ2vnhm' -BOOXTREAM_API_USER = 'unglueprod' - # if settings/local.py exists, import those settings -- allows for dynamic generation of parameters such as DATABASES try: from regluit.settings.local import * diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile index 965ea19e..b34c49da 100644 --- a/vagrant/Vagrantfile +++ b/vagrant/Vagrantfile @@ -21,6 +21,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| node.vm.provision 'ansible' do |ansible| ansible.playbook = 'dev.yml' + ansible.verbose = "vv" # ansible.inventory_path = '.vagrant/provisioners/ansible/inventory/' ansible.raw_arguments = [ @@ -30,7 +31,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| "-e class=please", "-e hostname=please.unglue.it", "-e setdns=true", - "-e branch=dj18postdj18" + "-e branch=master", + # "--start-at-task=restart_here" ] end @@ -46,13 +48,14 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| aws.access_key_id = ENV['AWS_ACCESS_KEY_ID'] aws.secret_access_key = ENV['AWS_SECRET_ACCESS_KEY'] - aws.keypair_name = "ry-laptop" + aws.keypair_name = ENV['AWS_KEYPAIR_NAME'] # Ubuntu 12.04 LTS Precise / PV EBS-SSD boot # alestic 2015.05.05 #aws.instance_type="t1.micro" - aws.instance_type="m3.medium" + aws.instance_type="m1.small" + # aws.instance_type="m3.medium" aws.region = "us-east-1" aws.availability_zone = "us-east-1c" @@ -69,7 +72,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| override.vm.box = "dummy" override.ssh.username = "ubuntu" - override.ssh.private_key_path = "/Users/raymondyee/.ssh/id_rsa" + override.ssh.private_key_path = ENV['SSH_PRIVATE_KEY_PATH'] || "~/.ssh/id_rsa" end end @@ -109,7 +112,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| aws.access_key_id = ENV['AWS_ACCESS_KEY_ID'] aws.secret_access_key = ENV['AWS_SECRET_ACCESS_KEY'] - aws.keypair_name = "ry-laptop" + aws.keypair_name = ENV['AWS_KEYPAIR_NAME'] # Ubuntu 12.04 LTS Precise / PV EBS-SSD boot # alestic 2015.05.05 @@ -127,7 +130,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| override.vm.box = "dummy" override.ssh.username = "ubuntu" - override.ssh.private_key_path = "/Users/raymondyee/.ssh/id_rsa" + override.ssh.private_key_path = ENV['SSH_PRIVATE_KEY_PATH'] || "~/.ssh/id_rsa" end end @@ -167,7 +170,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| aws.access_key_id = ENV['AWS_ACCESS_KEY_ID'] aws.secret_access_key = ENV['AWS_SECRET_ACCESS_KEY'] - aws.keypair_name = "ry-laptop" + aws.keypair_name = ENV['AWS_KEYPAIR_NAME'] # Ubuntu 12.04 LTS Precise / PV EBS-SSD boot # alestic 2015.05.05 @@ -185,7 +188,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| override.vm.box = "dummy" override.ssh.username = "ubuntu" - override.ssh.private_key_path = "/Users/raymondyee/.ssh/id_rsa" + override.ssh.private_key_path = ENV['SSH_PRIVATE_KEY_PATH'] || "~/.ssh/id_rsa" end end @@ -225,7 +228,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| aws.access_key_id = ENV['AWS_ACCESS_KEY_ID'] aws.secret_access_key = ENV['AWS_SECRET_ACCESS_KEY'] - aws.keypair_name = "ry-laptop" + aws.keypair_name = ENV['AWS_KEYPAIR_NAME'] # Ubuntu 12.04 LTS Precise / PV EBS-SSD boot # alestic 2015.05.05 @@ -243,7 +246,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| override.vm.box = "dummy" override.ssh.username = "ubuntu" - override.ssh.private_key_path = "/Users/raymondyee/.ssh/id_rsa" + override.ssh.private_key_path = ENV['SSH_PRIVATE_KEY_PATH'] || "~/.ssh/id_rsa" end end @@ -283,7 +286,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| aws.access_key_id = ENV['AWS_ACCESS_KEY_ID'] aws.secret_access_key = ENV['AWS_SECRET_ACCESS_KEY'] - aws.keypair_name = "ry-laptop" + aws.keypair_name = ENV['AWS_KEYPAIR_NAME'] # Ubuntu 12.04 LTS Precise / PV EBS-SSD boot # alestic 2015.05.05 @@ -301,7 +304,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| override.vm.box = "dummy" override.ssh.username = "ubuntu" - override.ssh.private_key_path = "/Users/raymondyee/.ssh/id_rsa" + override.ssh.private_key_path = ENV['SSH_PRIVATE_KEY_PATH'] || "~/.ssh/id_rsa" end end diff --git a/vagrant/create_keys.yml b/vagrant/create_keys.yml new file mode 100644 index 00000000..c4fc4362 --- /dev/null +++ b/vagrant/create_keys.yml @@ -0,0 +1,9 @@ +- name: test + hosts: localhost + tasks: + + # to run: ansible-playbook create_commonpy.yml + # create settings/common.py (locally) + - name: create settings/keys/common.py locally + template: src=templates/common.py.j2 dest=../settings/keys/common.py + delegate_to: localhost diff --git a/vagrant/dev.yml b/vagrant/dev.yml index a9aa5a99..17bc97ff 100644 --- a/vagrant/dev.yml +++ b/vagrant/dev.yml @@ -201,7 +201,6 @@ - name: upgrade pip pip: > - executable=/opt/regluit/ENV/bin/pip name={{item}} virtualenv=/opt/regluit/ENV virtualenv_command=virtualenv @@ -212,7 +211,6 @@ - name: pip requirements pip: > - executable=/opt/regluit/ENV/bin/pip requirements=/opt/regluit/requirements_versioned.pip virtualenv=/opt/regluit/ENV virtualenv_command=virtualenv @@ -244,6 +242,36 @@ - name: make /var/log/regluit file: path=/var/log/regluit state=directory owner={{user}} group=www-data mode=2775 + + # create the wsgi script from the appropriate template + - name: create the wsgi script from the appropriate template + template: src=templates/{{class}}.wsgi.j2 dest=/opt/regluit/deploy/{{class}}.wsgi owner={{user}} group={{user}} mode=0664 + when: class in ['please', 'just', 'prod'] + + - name: restart_here + debug: msg="provision restart here" + + - name: Create /settings/keys/ + file: path=/opt/regluit/settings/keys/ state=directory mode=0755 + + # create settings/keys/common.py + - name: create settings/keys/common.py + template: src=templates/common.py.j2 dest=/opt/regluit/settings/keys/common.py owner={{user}} group={{user}} mode=0755 + + # create settings/keys/host.py + - name: create settings/keys/host.py + template: src=templates/host.py.j2 dest=/opt/regluit/settings/keys/host.py owner={{user}} group={{user}} mode=0755 + when: class in ['please', 'just', 'prod'] + + - name: create empty settings/keys/__init__.py + copy: + content: "" + dest: /opt/regluit/settings/keys/__init__.py + force: no + group: "{{user}}" + owner: "{{user}}" + mode: 0755 + #Run syncdb on the application # TO DO: syncdb might be deprecated # http://stackoverflow.com/a/29683785 @@ -284,30 +312,30 @@ - name: copy STAR_unglue_it.crt copy: > - src=/Volumes/ryvault1/gluejar/other_keys/unglue_it/STAR_unglue_it.crt - dest=/etc/ssl/certs/server.crt - owner={{user}} - group={{user}} + src=files/ssl_cert/STAR_unglue_it.crt + dest=/etc/ssl/certs/server.crt + owner={{user}} + group={{user}} mode=0644 notify: - restart apache2 - name: copy server.key copy: > - src=/Volumes/ryvault1/gluejar/other_keys/unglue_it/server.key + src=files/ssl_cert/server.key dest=/etc/ssl/private/server.key - owner={{user}} - group={{user}} + owner={{user}} + group={{user}} mode=0600 notify: - restart apache2 - name: copy STAR_unglue_it.ca-bundle copy: > - src=/Volumes/ryvault1/gluejar/other_keys/unglue_it/STAR_unglue_it.ca-bundle + src=files/ssl_cert/STAR_unglue_it.ca-bundle dest=/etc/ssl/certs/STAR_unglue_it.ca-bundle - owner={{user}} - group={{user}} + owner={{user}} + group={{user}} mode=0600 notify: - restart apache2 @@ -335,11 +363,12 @@ # - name: show django_secret_key # debug: msg="{{django_secret_key}}" - - name: insert SECRET_KEY into /opt/regluit/settings/local.py - lineinfile: create=yes dest=/opt/regluit/settings/local.py line="SECRET_KEY=u'{{django_secret_key}}'" - notify: - - restart apache2 - sudo: no + # out-dated: no more injecting secret key into local.py + #- name: insert SECRET_KEY into /opt/regluit/settings/local.py + # lineinfile: create=yes dest=/opt/regluit/settings/local.py line="SECRET_KEY=u'{{django_secret_key}}'" + # notify: + # - restart apache2 + # sudo: no # #sudo ("/etc/init.d/apache2 restart") diff --git a/vagrant/files/ssl_cert/STAR_unglue_it.ca-bundle b/vagrant/files/ssl_cert/STAR_unglue_it.ca-bundle new file mode 100644 index 00000000..b82a0f82 --- /dev/null +++ b/vagrant/files/ssl_cert/STAR_unglue_it.ca-bundle @@ -0,0 +1,210 @@ +$ANSIBLE_VAULT;1.1;AES256 +34313361333335643861373639393438353761616135626534353235313965613432326662376330 +3564313861633438656231343066346437653839616265310a306132303337636637323237613834 +39656638353064613337333435316538626366303939336162313363326261616330373931343166 +3830363761343234320a663863333761636662643534653035643535633766383034653661656436 +35656231633761383631323138613461326464316337373732633930353833356333613733323035 +37333962373665623361323564613930653361323230336266623830333235626630353939386332 +31343031636363373236386636653134336135303136383638636637626166326530376464656339 +35326237633466386663646431613265326239336363623736623936363639666339313237643432 +62623730393633386333633037313934326331313632306537363937623234636230346462646637 +32666633346338356632356233323437643435326161363637343833326434323237653239656264 +64646563303665306163356531643766386239363635363537636533303166663631346462356361 +32656538373637623566346139373739623232333862383036336365393437666261353435323466 +32653136363933383237323433313166653835633934313936666336326234343130396636636364 +37336534633763633432656238633166363539613364333938643039353365316439393163636162 +34333036646637373837393066653038393536313534623765353338343430343930343331343161 +30613165326633633439623632663566336566373163653634353463373065656561376237336165 +35613066656365626131396537636362373434646232613432333865316136336233346336666233 +33623233653438613032636234666165306338306236323132623266373639363466333362303835 +39313839363561343130383130326139656164373264353061656362363231323432376639323566 +66333939623734353264343830373131393763646133616230326335636661313738666664623033 +30396239626135653564316561653935313031316564633864383835636461633766376331633839 +38303564613739353538653963353565343663336232366266346362356636363139613933643533 +37333161313331316239376334393333626239316261366338373535343962633739373838336638 +64643335306231396339643763396535626138313031356437623338383031373933326235653838 +61376636303962663832306539393536626436373931393031643632303462363565616139626636 +61653964633165643932373930633132633434623438373635396364663437343661623438326631 +64333135333430363265666432663237306632633436313963366332383538363162643866363039 +61356666666636306566643032356465666437373661616534323134646236646237303763356238 +61663366616434386134313265306165306638613136333063393139643965313533316661666235 +63313432666262383361663138666332373934636135336464346362316237613863656464356334 +32656462313163386538383633343661393466663932633730306530343061306338346461386164 +64666433643835653836653562393137653633363035393763643163323763363431623533366437 +36363665386630323036613161323965656537653064303761303132666435333862313337386665 +30313565616133353337653934393934366466643532626261343639373362653862343364663462 +65303064376132306434306639353732376331613831326232313061333330646565383832623261 +37663430653866646265613031346231333261303463336238643763313534613836646538313832 +37343065346335646537383762373561326439656263373061386533373838616139393663613966 +66393962623032663633393966656133306131636633396438386430346262333832333161613437 +38666630353964313363313561653662653764303233386363643638306263623632386534636135 +35343630393630343330646164666366316564306361663534386131663136333332653631323630 +62363065356638353364663563316163316635313436323339376230613730376461396332353336 +38306561633561386639303965396431376237313636643030613063613635616332306331323362 +37616666323631633031333739653166306263363066353366613130663035376538363964323364 +34366438663839383839663364623336653465636462313833623063663062633439303734636430 +37396138643633346533373833336331643533333739303265623037653161383965656431303331 +64383462323935353431663331646432363731366663333838643961393835346435363336613032 +39656265633533633537633331396336323765353032333834636237303037376563653536313632 +30306332626231653862346461306161373036646437633735396466643561633066643239336639 +61613633613130363134303763613137356336663137613036363937653064316530663661346237 +37323531646464623166656137326438663962666464366332396630643134393432356330633164 +62333365626639393938396439383136343133396361666234363036663765363233616361346662 +39313630653662343836626566626466396465343639393738333866363330343436326438663036 +34336538653133376362363230303235663737343862366139316236666263343233626666313763 +35623535313332386163643635643631346663373033393964626430373964313734313766663662 +62656238396238633061313862336565633463313762386264373836313632326336393966356137 +37306461383831336665643732346263353165666135336661373236386531376237306638353430 +33643261356330306134393763373431393034666136666235393933343935373831393031396132 +63336262333863383233323864653330353463353731396661306465623761646364333235323434 +61306631323962326334616535363765306433663738656161333837383831383536613537643630 +39313662363337323038343736323135323861663830656563383837353763343435376264336163 +38343139313264373666636461643361333463663763336236656538306463316163643866646139 +31396135353630346437623264323836346161663932386634363036666238353739343532353339 +33653533633637616537366237313335376231303237346531623633393436623730366565343837 +35663064336465323836306365346134353866383262326363646663316431363962313633316338 +39623733306662663462313264323631306635303333326635383465623430623930303630646435 +64363737636638363330363764393265303838323939636566666438316332376632653563393364 +65383433383564326162306563396464363561383137323536643239663233613363316230636462 +31356330653038633531666234633237376538653638373637633065633565623062336631346662 +65633731323538353464306530386637323638613466613862326137396461626236383036363030 +37373434636163383830663134393335613166623961336361646230646563363734363734306162 +32356338363831643763393133626165633661623039333663393838653034373866653536373231 +30366531616162666634333862356462366234613236623763316231316635643065346165373766 +66373630636663643138663361303466633663653534616534383361376261653066396564663639 +38373265616236313163303538623065333264653035396261663437313765646438303436353732 +38383361313634313465653564636263383639643366323263656439323630633337656339613431 +66386639393365333764613734333737636361366364323032313633333738383333303339666461 +39323739663631376339613663396562336138346534326431373062663134363035633632373739 +32316237346564623133346666366463346637343161346433366666623634336666356263383634 +31383436663437656534373931393333323833666164353538653831393730393830393534333530 +64323238366330343665333836326131613031343062666261346137623139613637393039383030 +61303231626330656635363435633761326637653566326131353535343037643833373930316330 +32383130666535323639313766623933373434393631643338323538646137346638633263663963 +31643930343662386461346435306232666166646465643831336662323433613763636534363836 +65633435643134383830383438346336383639373734666639323733393962353361333164613161 +62316439653634313032323933303734303961353331636339313838343035633764333566616533 +32656662373863393332613066303563653436343534353738373737336633363535363037363030 +34383263393032616265313735643465613037626238326562663734373661316639376562306231 +66343635316332643036356535653566326337653663396230323362346531326435633139383864 +33303161333938336366646139326632653837633861353933656562333162363766306663326135 +30613637316538383762653361353034303537383265646333636432633539326538386638353532 +34326536346531656263383734326338343062663335643634306231306438366230356233383536 +66316437613735623236376131363936333763616162326365653465326635386435333065663530 +66333766613361393435343632613538323836663932306164303961343433306430613539613034 +30306463386139373437656664396662643334373530616464323363346335376239643139366438 +33306633313136323736323564303439376361376538623463323133303661613932383334623565 +38393332623237323038306662326434316265323138346432653532373930396239663233616237 +33663065663063326536343363623836303237343733373733353166363635393865623661336464 +37663762323533346333666337333431336335373637396666643963373634613635626565333839 +65363365636337316663663961306361383535333966633166386563306433623565653838383166 +65363132356334343962363435363661643539656235366633356663343732373934623266353063 +31643463323530663139616437346566623035333461633735653037396563636137653562653361 +30643232303263613566396161303830316630393530353139336133393430656638333539373434 +66386563363862656432373933656263646536303062633138303330373839356531633937396337 +38613266653464323634633461376438316630343934636264316133653631393534363161663165 +62336330343236373937343664356161616562643439643038343862636135343437336136303838 +65316665646264326332643935636535626461323939393462653262316361633562316630663930 +35326235623033353333373632376437643237346637653365386635303635396561356331633037 +33623938323666353531316539366339303966653934633633373936613130393333643561653638 +32363562653430313665613464653266383339393535353237626339303935653235363763663634 +36366633626662303662333162306562366538373231303036633061383439313832666366623431 +37346165663333316533326631646162356430356465373535636564643635383636383339323565 +31373332663930316339666132376533343531376233303933353164643866613963333966343532 +30626139316266613561363537303362616562356534643966323635303033313232343636386665 +39326266313836633933333639376130323637383237306335343936393363643333343834356530 +36623935373762346663396465366562626434623562643930623561386262303865353831666433 +63653031396666653538623936363339636463346538376464356636393666366364306636653338 +61663866613637323261386330393736373666666630656362623337376363343033396330643162 +38633066656530373766613738323933646333613539306632356166643436623565616131623932 +39343734343537383865393031666362316533363764623163623939656464306237303338336538 +65323166636336376334326131326237336561326632333235396462636532653038323465616235 +38386436613831323661353063343263326263663431663765326239623666626433326536653432 +38393532613638383965313661326531313330303364383066626632613033323633656331376163 +37666333326561343866393031613730376263646531376462656132616664343966616662626463 +31336139643763393265353733353135373735646437333039383830303738363734386266306238 +64383161643163623735343666343264393238656139633932613865303933653230363531386662 +62306138313061323831383131356332643530386139623534343461666639363764626330393632 +32626333343961663534373964326364346138663537623839623466346566633464373664626632 +62616461646665623230343463393864323066356266633764353162633930633935333733363533 +61636437306264393266623839323263383462396663616538346461653963613437363963363430 +36303734626634663731393832376237346437653534393439643962353331323336343634383264 +66323634633063656264633665613136663735373137633864666464633565373935313833633635 +33346430393562643436646563353266343666363130663830656363323632336534616331383165 +38373563363936396535383235643333353264313832346630323436666534623765313230353137 +65613034613565346334636566306135393031386232396166396132303761353232313963333664 +35376263376230383035366666386162316364636433633630323365303564633164316637353436 +30386164633765323365306435336464613335393535663166616331343066323463383263663731 +65656437636237656566613562383439653161353038643762373061376635336137613535376333 +32353237373638363164653738666437393233343235626631623765313962376665373433353236 +39646133646432616563313333346437306438336130343331303639643134343766633132366136 +36333462666134343265316338663861643362306139626433626366393965633630643263383364 +61306436363339633437613738316631666462376638376337323631333035343733313233666461 +38626135616435393737303362386366613631623634356636643236386534623636666664623738 +38396563646661376163653535333237313866333966343732666263343266393938666164316435 +36393335343935363237353138643738383330326366363538623032633961323162393766653062 +65306436336664656231623362313237613830643665656639636533333262623562633961663762 +39663737636536353030656439343232623464393536313934623231393863316266366363383263 +64623030383738323636336161633433303439333233646434363761323735373533663137346235 +34353262633838323134626134623662356431326366613031613965333362623830346265363134 +64383264383730363030313663373336626264663237653032663464333339356436373636306239 +65306630636137336634623338386562323362303433656163616461323333353936303066383562 +35656237613137376634353039303036356463376636613630653963393563643334356466616462 +65643330623465383231656537646631323665613430373064363931363231376330333565353435 +36316165663836636561616166643530626630376563353638303931623166396435616135323263 +30373162616337393738653465386563656366613061633332393965333734333430663739343265 +32323334626263623534643933616461646138333938666631626137313361373030343435663566 +62613139663236373130653365613461306435383739353038376439363066306662376663306161 +64333233346139393430323530336439613738383764646262383039303064303061643062663031 +62333234326433373536656435306665613030353262343434653230323930303131376630353537 +64316636386538356362326636613461373239373666343564643137653834336461653236633136 +39633739346439646631663539666530336531343730336236326532393732326534616535333237 +63656431326235373966396165313937303136393437323563316133663366313133336533383964 +64626430333464326634646532303931663838343462653834313764346333396166656665653339 +37613932366633366266356233333934366465326665363063323865303338396632653235313639 +32623562633165376465356164313861336137316539636665306434653962653661623536613132 +36303666363432396664363232373138336265383438346261323333666434333066646330376239 +32353630653137636235313735306230383632643866366630393235623465383933363364613266 +35626366643963353037626433653232633530336237313261336335666439303663666165336132 +31353962633063623364393538393236646166363831636132666633356231326361613930346431 +31393166393465313862336331643862383431306161666261616133326139333931343331356136 +66343536653333343961333836366432616231386365353536646332623534653431396364646433 +33666461626564626165653864633062313031363531333662336364323736353036333435386236 +63643161356164333737613766383235373634653635303166633361373062333432343639613432 +31393335373237616231656564346434616137383232343839646261666562613534336164326639 +31386534386132333631626236336664323163616536636564616436666536356639636338396662 +65373832363061643934303962623632663262313431626561363965663337363933616461326138 +66646634643438313934633463333333613731303637383436373161396634306330636365383138 +30663534313536666130366639333162613437353132386636333233653539393162386233643065 +64323638653964663162366530373532633865316239396339326239386464316665316366656139 +39373738633063333032613333656463346137353634663736643637333433353265646265323233 +36656366353261633065646236613534393638626163386535356161313230383361303033613238 +66636339623338353735663233316235363861353562663835636630383235383632313637646236 +64366430616564313733303162376336636533323635386338396534376664353935666161396662 +33623437623238623961623938336537656632336264303764326131366466313331343233316436 +37313332386530663162373735303063383063306566326435616664636464323932316635663437 +66623138626634656139613261333064383761653330303135316564333665633533323535616531 +33323634323835633030626662656630383033646632313835393532326238616132346431663930 +33613731303065666164303561363635323532396635336563666664663063333236333462616164 +63333666353731313163343937643830353466303266653939376466336661373939343138316335 +36373566646537366530383334336637633135303961303537313461653865646162616438333339 +33393062363930376465313466663465363463656366373130323535346263353835666162633762 +39343338303161613439323536663131623937323161383938646466373430623363333335366266 +64323635356534346534643362396662313266353263363666333333363335643435643138336631 +34643131373164313635376563323762326131323733306262646261323131393866363162656339 +39336365623232316137333436373766613661326235333263313232653232656337636666343566 +64613062323239343065646263333366626631633965303733366433336663376265323234343662 +35316232323237343936356666643462373232623935623133333137613533383733643338623932 +63616663626634313864613164346333383365663539303038633937313530393831633231613066 +62356230353037623732373364666265633465373036626333396435386335383831353236366339 +39393835633038323733383266303236353761633030646439373762666332303233393765373639 +64326138353532643831653232626236303337393862396634373033376233613033396632316238 +61343033616636396161316364626238383537363364663230303935383236333835643465373363 +30623162376166393832353965336464646337393631643939333664313030613435366364316639 +65643062623534636361343531643230396433333535336138306331653564323434376264373337 +35353336346132393733343936353865353233356434376638313462666530386132373039316538 +30643332356432613430306566616331303466663865346437366363363364666433363030343133 +31646135363137373864643734323338666364393465643639663561326235653565633133623332 +34623861306630643035353737623531343834633335326566373238656266343133326231393337 +62623133656532386361666438366531396536656563666136653331636630373832346461306236 +64393330336361616561613035343865643639353131303661373063653038653739 diff --git a/vagrant/files/ssl_cert/STAR_unglue_it.crt b/vagrant/files/ssl_cert/STAR_unglue_it.crt new file mode 100644 index 00000000..fe9aeab2 --- /dev/null +++ b/vagrant/files/ssl_cert/STAR_unglue_it.crt @@ -0,0 +1,100 @@ +$ANSIBLE_VAULT;1.1;AES256 +38396263366632623665373531663136373864656339333365336264353335363730356366383563 +3337656131616134643031666237303534633236616264380a656261313036663131613766383164 +33346462633366303765313165323230326330643165343232636631363234663063373339343837 +6231396464326433660a373734613161346434616237333361333637613366333461353039316430 +30303661656232393066343964656230613661323035343835396530353139646430393536343338 +65336536346465323138376135396561316164616330333933636530633762656266336132376265 +35653435383564383464316666383365343235616336326166393335363534643938623933313565 +64623161343064303032373166323738356531383336353564393935373864386164653461396465 +38333839323637646337386537646532633335326432333530326563343732663837633139633461 +39653232346662326562343933343564653432373761366335316162653766396439653830343835 +32633830303435656661326163376635343438356537353965373061643566356430343266336332 +66373032626535383537353938613233386664326230376134373761653036653431616531353461 +39326661626537313039386365616530396665363436633937653365363634373833323931663466 +33326462393565356630623334343133306133366231333638353566366266376162396235376233 +61323738393038393434386335643937386434663633313836376563396631663765306163626235 +62373065393730306537616561633166323734636539313237393134656633353737323231646636 +34356563626666336661386334636436663931623762613638333430316439316235373637613735 +62613931386234353763323736313830363936333533386634313661626562306366323133323032 +61383033643363376138346533373463656533643835636136306462343430663231656564356265 +34666433313539343163383462633130333830363061353063373932376238633731613638353761 +39363736383866343131656639633866626132636538363763383962663739376161343266653165 +61306661383639613661343261313965636433393032653438366137386338663862623664373264 +63626361346165303561626630626365663339386564386638653130323835396531303439303730 +62306539383232383964303665396638353732326139343433656131373039653035646132346461 +65323236303462656238303636306365333539613334653735373838626266333861666663616161 +30313031373062323533616134613361343136343332323266383066626365663137666535663838 +37323065383764353734643334666663626534336466323239303937653064336264326137663032 +65373538323636656236663630383833316439366163336266343565393966303230303463383764 +32323736306466626461646532613832333333316535653564373434613966323162386632616565 +39653165613438663430363863663038353535376538323231353662343936656465393436663065 +35636664336633396435613961613662363466643663643536623537653964393834626566346238 +33396664663461343332616634646633376564623163313230396338376663323534383762343564 +63306539623036663034346632666635656137616162306235373161663063373539373766343431 +65386330663336356362636438333832633238653432333736623334336339656530373965376632 +39386636316634393265313131386334613533613666396332323731666261316636666139383263 +36626539336263663733393262346463656661323132663930636362366264376136373862656364 +39373664393164313932323763356431326430663131306434336236363261366534303133356336 +39616135366461343131636230643733663937333535653265643434323235393632303665653234 +31656136623165653665616437653963623066653036336431383661393837633961643239626262 +63343066393662363261323232393862633034303636633665356134373330373233303633313337 +65393362646235643533656132373666643837646235643665326264303139383165653564366431 +36616261663765323033346164626133663038396433336666386233326536313332363866333938 +35653432313632383039316164616664373164643039363335656133383937363434633630623037 +38313931303537366561323235643534663062633436653861383565323366626533373033313938 +64326466663737376238396330363261333966626233653838383831343033653031376239303232 +33666531396462383938313237323636646138333330633138643338336437666438336338653966 +35623333653365353731306330396662396233363437376362343931333736636238356437353430 +62656263373462303466306663623366303537386231383738316266333535333364333931306266 +38326436613436346462663863356564383466663037333664383939646164373661393734396335 +38343864373266343633316230393239333630636530633066653634366464303135666632653639 +39663536333230623262646636633164613934623230393734363530613331383533313037316534 +38663036653761386262326333653361383833383933356165626663613835616134383932653334 +30363465323261613064633165386563623237616433326166393330353531323433313831633439 +62316435353635656331386366636239333633313031666335383366306465653837396239613065 +30303238323836336432343636303862623332393364343632306331633139666535373466313237 +38653833316162396435383164353930383062306364633061313334316462633731326339383765 +65323839336262373764303137623534316465393933373433386639363534656132356666363130 +66303664643236653261373063646337376334396331333062323930666635373534333765653136 +63623465626339636337643965343961373364353462396431366436653666373331366238393936 +39666139323666613930643934353661623137353866636562313630626664633866663539313639 +35373033346630613661613564373938626138623333663536323464636639306464383062656237 +31353065653364306661396132363932656665326166316238363938653762663536633563303063 +39353965313062363133343961623832336463626331303532383965613434346633333833666364 +65386564383732626633653464616631636338386430613935303964666662366337326135373530 +63316632316461626637663937313163666137303137633963326662313461326362626536656337 +31613734613466636634306335626432356233623562373731623138643965383938336632626537 +65316337333564363364376530626532663135656330343965306334303363303431383763333461 +61363036376163643632653830656437303264316634313264646464366134323538666332623966 +38346566663135663233633039343065623864613061393035623034323832316661356561616563 +64386131393137653639376331653536336661373062373037393562346365623133636436316336 +36613833363433336538343561396634633434643764306462643861306336663130663837353761 +61363839656435376135306433303639396565653134306430316237616531653030366535343435 +32303464383363323633633461613139336266626432643832366636633162643739623131353439 +33303630656334373432633437323339353834616166613066613538363337623163616137346132 +65636430386431353538613635396362393366363161643033623264313762366564383730323066 +65353934326633643933653064323035373433323361303533383865623966646431663238613437 +65363933316330623835316461313339393865663436373862323535633439313437393538626666 +30633865393231383631363865396630316632663136626165616565356634343936343430396161 +37623038383333383365633130383036333633323966386335633034303131316532646363376561 +34316435633662643534363964353035323164613834353136306435396264633438636234626464 +66313033633130376534306461643430363233306261306666376536353735623861663238633839 +62646137623932363165633462633331313261663038373239313738373063616161623534613438 +32393638323162316432623937386239653164323935613335623538363837333831393732393838 +66323832333466623036303333323436633331393635663864376161666331346366613663373434 +39356330333065666637626661366135396239373930393730626262353239363834323835346361 +36653462393566353064306563363835326663363365343562313663386632333465393634336532 +31366139626633373533623030346430393931323138363636363132376535626239633035633066 +65343631353434663063653632343364313437656139396536336631326564303162343663366565 +37333461356133333065623631366130383336656137333336383236396262666637383135343737 +36316637393231326365663538326463303438343835646636626630363266623937323439393235 +32656434643664623835656537396565366636356266316138636637303631316235613637626361 +38323939376665633531306266333036303732313337646332393161333037326234386163666237 +37393662326361333734383566653331643265363033633063373832643465303432353362636432 +32643136386562373761613434303933393730316137653733653332313265343062313834653236 +33383762623064613739386437653436323231386433376535613437313030383833363634393131 +34353435346336323336363738343131613230346234363565613537636330303137306139663736 +31363835333135623436303434636335646431323064346263376435643133626239373134303765 +61363963643138326665393236303962333137386264333131313966383062346234303564373236 +313461313334353839333436366630316331 diff --git a/vagrant/files/ssl_cert/server.key b/vagrant/files/ssl_cert/server.key new file mode 100644 index 00000000..4008937a --- /dev/null +++ b/vagrant/files/ssl_cert/server.key @@ -0,0 +1,89 @@ +$ANSIBLE_VAULT;1.1;AES256 +61393061376663373762346466653733666236343535376162653634316464626361313731366232 +3931303237613939393563663633313161336238396230650a643835386262336436383038353266 +30376135396461633632663063346634353236363431303133313733633565366339363139376464 +6535643830643937370a363332393438303366386438653938343062363239363833646138636431 +63343139336636393962636163613566616230633962363635623636363330636239393664303263 +38353639636265353933373136626134366339363538626637643465653234343233633463363962 +61633063613862363439336335666633303762383563353465646438353866396661313966376566 +36646363336465666631363734376333383836313938616362623834636432323336336334363161 +35323861663130626531316638643164646535316638623331313962303431326262353764303763 +66613961333838326631303266383837656436336531636463353737666631646537353438653933 +30393436393062306566303461346630346134636633633666666330323132393662623931633235 +39646533376162373261363837336362626537623734666631383335366561303236646462346231 +32646131653662623834386633643035373437623534666336666438643332373566323161653564 +35386562636565626462376237373333393061326363313630313133623833613035393934623734 +37373737653534376330323962643065353632343664333030333063613237333336383238313162 +33363532393735323533323962343262353966313435386464363338366435373863663961353131 +31393164653362383838313931613836323831666231356433353431656535633665663236363930 +62353934396138363865326563636666663432643437353064353763393736626134376464313138 +61633133323964656163346533613737343637633632396532636233396437363434333731633332 +62363164623731396430366232303564613261346665656331643839626161353432636362346532 +31353738636636313066373439666363353036656637313830636638303235363937623164343530 +38316162623436343938323061336662393438333466393739333462363864626539393366643163 +61643436383138353865323362313833306663383737393861646366343830313036653362666265 +39373333303932623736383664356663373638656635333062313839356430623032663739613131 +39366339356236363838633137386662656530666334343738343237616534343737346334373365 +63386336653663646439313239323763643664313935303530666332623664653465393962333733 +62303232626565323765353933613330653831376536336363313965366630396531343433626531 +34613235343833316164393964326237616433353266323861323566333430653634663535343539 +30636537353162326434386562316366393536633162383964613531373039653435313239623562 +65306366653065666262633937623563643461333966633161636436613830323330363664303933 +34306333373861316535323265353264363361323030323662613534626432333835626662653330 +65363832376462666331373362333831326366613433666164633363353336616236656566653665 +31616366353737363338373837346235356465326239396366323839393932386436313031363333 +35393133396162643835613438393864333836646237636236393735346666646539313830656362 +34666233363937383233663639393464333037376562343032313034613066666139396561316236 +38336462313232636261383132373531343731646532643237346134386134646563366633663862 +37353065356432633662393765373030663631386339343337633638663336316463306264343039 +64376565643463353762623731643432373439396665336666643930656231336162326236353830 +63386333373861323039656539623330656234313333653830626566653434303061363964386438 +31613733643237613835643366316630646135393533663835666665663731303461373461363464 +31623461353265646431343638373835663439643638383761316236326130653139306566616261 +36623335646434326634356662336463326237613465383234366262623338643335326263656637 +37663039326362313132623933313034663966373231336339323432303833336537623366336364 +63343136613036633839313465346231633166346430643738353038616566356335343666386130 +38623339623865303865623730633263626238616534346538303264663262346464346130643966 +33306162373132333866386364643934633735396461313332343232373636346266333563643966 +37646464383633633735646432316133363638666536363064633938316333626163386362373863 +35623262313330396362373130366662613531616264393261623262383232333266383632383663 +65336131393337323236623733633136353966326236643865386230366566383566666565396364 +66633137636137336634343863316136656433663063346234383133633239383166393937376563 +38336133353837373261656464666631373566616139396531383432636238353933366665373662 +32393134363962393934386665353037313235626137363865656230636165353936306332646437 +63303833623933643338613239663866636564323038323065303033633336333639313963653234 +36333565653963393631646261356163303035376361663538663734643238623839323138313431 +32633536646334303563386536663163633334643438386531313834323663383035376466343833 +65323063323433666462336661363430663134386135373935316666383362363639303430333562 +62383865373430316464616237323764363931376366613534303633383265616131356465353062 +66613466383138396334646564323064346336316161353238343734336266613833646262636136 +64376631636434333930373461343162643035623666663234666439376337383637656566303061 +63313736396633653037383264623638613338326465333533396532313837353265323236633234 +39316630636261326530326633346162656333656237333766356437346333303932303935633932 +30633832353266666335383962366463346538313539346636303064313139343330353366616432 +39656332336535613262623934336661663036313562346464626636346131343263653965656662 +35313334373134313266363063383533653931343133303466616161333938326534396232343761 +61626130613938336236623036356638623962636566646238333038343030353839373965303661 +34346631393964343264303766363962393166663866633236643165636338643964363336613437 +35343463343335333633363931383237666564626632313432336564663534306165353835383439 +35333535336430356331353835396430613136633862663430623162373564626432663336663166 +37363630363164373232666634623763656132633861366136356436653764656238366439623165 +63653332663038623963316165333265373830636362323337616331373737666161313466363135 +63396337313866633438306131313866633861643764633563343638313330646465386664366635 +31303166373238613930396565303937383134303061393766353266666138323831313135633235 +38343765666532396536613630353233306363313934306265666165313330306632356565636431 +39313062643737336538613463363035383661656434313630356362363337393133316532656336 +30643930376665333833623639613732383737343930643139326461376337336162666339363037 +31626463636239323431626532636134386431316332326437386435306365616530343331643330 +35376166356133376463343033646663363365613961393839636136393437346332323432333432 +62663663343737333539663435343266326636353636663633613733333664306231353832633538 +33386230366630303636373164306262636263393231306636613338646465313234616164613465 +36323832303436396132313266636266623830646364643532383330366135623463616265363132 +31333736383830343565626131383731633937386562656363323435373237636462373663653433 +37393562393037626131623562666463666164383532356637393131396431353539646233656331 +63333163666437303462633365366566613964326561626633646431376337303030356435326661 +65333738333134376266393864653531613935376666393537653135323338616638376365376565 +65623132356436316361323231666234376335353264643831643464333462396132336133383862 +39613933666664333232646636383430633235386531343931616135373734333239653339373334 +30343837316137623566336132613663373331316535303132356131663437373839343164666631 +61656364656235623238 diff --git a/vagrant/files/ssl_cert/unglue.it.wildcard.csr b/vagrant/files/ssl_cert/unglue.it.wildcard.csr new file mode 100644 index 00000000..3dfd5487 --- /dev/null +++ b/vagrant/files/ssl_cert/unglue.it.wildcard.csr @@ -0,0 +1,58 @@ +$ANSIBLE_VAULT;1.1;AES256 +33653039656536383238336430313833663333653764336230666662623435363365653366373937 +3435373866363531373335336162333164316564343433380a333636393031353733636465346637 +65306337306434396537393566663463623234386262356234646636643664363966366339303164 +3930646564373062320a313739316636353730303236383932383033653932313638363335633230 +31383661613931666631326333373663613931613565663330353261323230353131386338626266 +64386666336463623034623537323138623236393866666435623066313363303366633763303365 +37613036643165373863616230633132636337303661663236613064393664316235303166646563 +62306435363238626135333862653136643766626535333263313066333666633434366439633936 +34666163373237306431353535636633343833666438373735626637323163396663373966643135 +36363464326539383737626665333033373334653264643865323935653530303862643637663036 +30353132323634656239613962616261333831323533373562656235333437376239323139393763 +37383836396466623432393639633963623364323033636333623936383461316135303033363934 +32396265303336373737663030383139303537396363313633343263643763336339626664366264 +65643861663337616163373762316139313665356235623037663962623634643133363937643439 +37646639643461666233393032326538366437363336656633653533386164346462383835333334 +38393532396134633132636535663332663535326439626632306330663331643033653535653736 +66336431353862626562643263613338383362313531613838356263373465663962653933626336 +36303164323365313236323533303064663062653239316564343561316265666535316663336133 +38303934326237336230613334623866626364643536313131306565626134623063373233666461 +36646238383531343432663266323266343033393933303835643636363437313936343561313366 +34336463313237383836653661616133323637383438663437656464653130336436366631316237 +62323365393534616366613830616339336163623662363435646432323830343666376131656163 +34396332623833653564306338373432613266313737326634316363383739616230633239613839 +31353264333736646331303466343962306338356661363732323333366330356165646461653762 +35326138386564393636303936373664636664663765623937376434323430653266333432353331 +35666135323236343230656339623535333435653437303365306338646436373139323430306661 +37303039613666363735373639353536373937633334633961333266623834623535373837366365 +30663839383137313739663235343233663235663135626637363565383439653132353736333932 +32353861646163353230653038356535353863643434316434353336303939346531393432353436 +64633864393737366138376637313465336435343166613461653233633330383065346462383464 +37636533646633386236653231666664633463373665643264353634366363313539313863653264 +30383263373464336162663632373734616331356533303430323964633236393931303539346532 +37616665653639666165303962303563616336363064336337353334306239353664653235666337 +37396466646138316566373931623533306132653134336432666136393439396637316364363764 +39376266633463323165343563383031623665663465303135323964356638346537396362663163 +62643261376232663766323838623065333233636561333439663765303932316264646631353234 +32616366613838383566393536613431303633313163333263343262636431386633396233643166 +32343938323464393135646466633964623265653662306337306136396533633630323638663966 +39396465366533386638346164323436623838393235373861623132373363383435333463393635 +38393061333662663365666339396332396463353533316134353638306666663733353430316132 +36656663633062343432343966353862366433613165643764643262643438366564343734646561 +31373331346262613630323030303362313062376363363133343465353266336534393463353932 +39366234303661636662656463393261333462323138653136336261646630633439363665666165 +64356566336664633033666664313533343364633063633561653138373163363239316639636666 +36373131373435343934343866373361313136373234616336333263373036353030393639633265 +36323034336131363734383365653561616164666230613239386535656331323630643564643231 +64316564353733616134326439336665316633383266646264643563323133353361373031323531 +64623638376336343565343261363536366334373464306565373361656237656636333066386431 +61613433666335383335643233366366626531396534646166643865616539346634626234653531 +63353564346538356262303432306339663566633732363131623637376461646133343930343935 +37626465333635616632636437653038663937636463653833643163343964663864653137396163 +37373163346366623834613435653530386362326538316136336536616663383337333436303462 +35666136656162613736653733316634613239373563306463383264616235356463333839373035 +39333664613438386132633761363064383865643064363566653830656338613230313562383162 +38363363323430333937373163666462346133306363646665363035373233303133333733393364 +30303933646261663866656433303161363737613361616432386666376434386538643633663862 +3039 diff --git a/vagrant/group_vars/all/misc.yml b/vagrant/group_vars/all/misc.yml new file mode 100644 index 00000000..8997a2a8 --- /dev/null +++ b/vagrant/group_vars/all/misc.yml @@ -0,0 +1,11 @@ +$ANSIBLE_VAULT;1.1;AES256 +36326230326463333364346361633861373137363863633162643936363336316232393866343362 +6463653562626433393436343539373565366233616134610a336435633736336531643161326235 +33363563333566636331376262636339393531633964613564303332366561316638363935643434 +6465333237646336350a373731653430326139316435636164353162306663643464383038313561 +61343962376635656166306431306265346333303566633663373461383464326633613631666265 +31323166613232366363653130393664363865396635646562373439373466353865663762383130 +32663532613964353934383939383235383433366463616231313330316463333539336361656263 +38633038626263356538323864333035656534383365316263303463306534306662393764323437 +37313734623261363265653365363162336639333235333738303835666632303637323732336131 +3533386132613930306339336463396435623930313632663434 diff --git a/vagrant/group_vars/all/secrets.yml b/vagrant/group_vars/all/secrets.yml new file mode 100644 index 00000000..d4a96e78 --- /dev/null +++ b/vagrant/group_vars/all/secrets.yml @@ -0,0 +1,51 @@ +$ANSIBLE_VAULT;1.1;AES256 +63376563643062623466613335633730323031653736643437643030303533383931666434323939 +3266633436313635643463333266356238316638326131610a653336303661326334323561623239 +65623834633736663861343464333764303865663934303533333031343934333635616333643631 +3933383131353062630a633133353430386437626130656632393230636664376438613862303466 +66343337303961303361353030313936626363383465316166316663643830313164646661363366 +66656630323437643031363237633439366434666537396464336364373134383061623364636635 +31393435326337373162333365386465633730323135383364383433366664353938303962313461 +61633835393963646666376562633731626639313438326235306335653639666635386566343033 +36383064653634613065303538346638363666326336643631616636623632376662323037633165 +32633662636531643366343963663439313439636335336435616666633863323433643930666536 +30623234313838616461383534663230616364336131383763316235356265363964636539316637 +61376433306366346362303439303665333961393239373263373365306363336334623536353031 +61636339353561303532383833336164346538396139373835633162323339333732373431613035 +62333739373832623762356364383035343937656337666439323830663235666637326134346531 +66386135323064333732663136396431616563653731343134363262373639333836623033656536 +38653931346337666566336331363631666238666638353237663065653164343936636239343631 +62636339396332663637643239376335343731643764343666356361623239383462313936366363 +32616638653666666638316563656366666361353538303133656433376637663532313666343631 +63633436336137653339653364616532333434623036396439343433613361626231613331373931 +64343232313839383332353036633633383762316531383936393539316531316336636537666439 +33613166613733346336643932363263663833366533623965623039313036373230396135343663 +66653336313437336561333630393365653133636263333031356562623332623733616464333262 +35333535396337616461353361616337613138363239656162323232346436336233633335376666 +63626661373639306665613431393735343937616539336233666235343936653932366337326663 +33353930653965623661383265643837306637363231656435663030393562623438623361353666 +36626635323837363733353365373738646230303436343834636666373165653937333130343637 +31666566643434653663626531383730666238306438656133303862626538613339626437633432 +64393432333834623339393631363932353862646332313062636565326135636138333931333431 +64633937356630326666373939343635323263373934306330393032316630646333363239313137 +65383666663063356430663965336463393537363266636431633362343263666234323463653532 +30376262656335653662656366636336336135626130303835326432366438393962616266373435 +39613234326136623263356131376239313136653131326632343739313137653833316434656265 +30323863383639363462613034353062393964333130656161306633306566646233356537313162 +65376237303961333239303630313831303232643831383036643166343164363934323138353234 +33623130383339343162636239343234393731626530326164643438633239343738306236623433 +37636662353263373866656564316334303736336566336636653937663566343261333335333437 +62313833353235393131326430323263383861366230663639363661383362363438373432346663 +62643166363633633134303836383239386236386361376533353330333930633530333139666462 +63623361356134333337643634393461343635363232313435656137303731326461653330613831 +66613536666635313539643130373132623965333863343930363761613031306664333732393564 +34333937326234383833306233386638323263323430613863346436643030353732356261643834 +62343230633034363839373965646133353238346261373538313833323264616531313965376537 +32646166326135306134356262353461626337663137323335613339646532636663326462393936 +30316265636335336138383930313138306366383766653866613532626366373463613436303638 +31333738306164613031626435373966323361626564666537396539313832613038363865366534 +62656565316466393366303137646431303231626534613031316561336233353137353265623032 +32616134366439363630376666343937633462613731613961343862303639373135373466363663 +34663235333431323764613330303539323164313332313331613761306439623232396436323138 +35623265613335636430323335313230373865633331303633613632306431323339396165626135 +3662393265643861393433333230353233366330646435343361 diff --git a/vagrant/host_vars/just/django_secret_key.yml b/vagrant/host_vars/just/django_secret_key.yml deleted file mode 100644 index 0a4b5c4e..00000000 --- a/vagrant/host_vars/just/django_secret_key.yml +++ /dev/null @@ -1,9 +0,0 @@ -$ANSIBLE_VAULT;1.1;AES256 -61653161643565623130623362623837643135393031616438356461383031366137373735343565 -6630333965373762633966303933366134303535656430320a363137636463656336616533373239 -62653630633035323431326362313164363162343464663438653830653030646466623961353966 -3462626265316636380a623865303732303563346263666166306132393339376164353531323731 -32643232373033363031303761343437633363656463616461663134336436646238646630613735 -63383033363438353132663465393637396338393837626230663063343831343232343234336566 -35663534323638376436666635643734313432633034306264356564323263353832393062363133 -33616561383866333931 diff --git a/vagrant/host_vars/just/secrets.yml b/vagrant/host_vars/just/secrets.yml new file mode 100644 index 00000000..27e44572 --- /dev/null +++ b/vagrant/host_vars/just/secrets.yml @@ -0,0 +1,123 @@ +$ANSIBLE_VAULT;1.1;AES256 +62393136623965306636316461333063353766613330636230333237663861313966653333323939 +3434363137643732376530356464346561663231333431330a313864323234616362333062373966 +36616161323165356461663738313063343130373037666365336530336233323331346631353034 +6566633634333766650a393933343462646639316536646262303839353864653165366161363732 +31656366346364313232326662333339303635326530373836393166663034393966653661353837 +33333531643532653732316530626430623432373430613531383263633964326533383036363962 +38316333303131376561396430656366396234323935623132373065376237663235386261336431 +37353630646634393930393030663739666266313866326433663238313636333363373636623538 +32623936386463653137323934313064663332633232373631373039653534376561666230356231 +31653862666361613434613730366261303032383465316534623538323733613964393761373761 +66333437623561376131353235343239393737343037386535636565663363613330653264356331 +66626635313664626234633631633164616532623132376334383164383365613539373436616166 +35306231353037663933363033353165323363343865636330663830626238343833373433356261 +32303435353366363366363132303730353862366264333736353535663137343635636331333736 +30643062383564363566323339346134346561353130613432633738633065663532343238303161 +38313230633435323862386162313337663766316435633833653731666165326262366132326634 +30326266343562376137663739306561626339626461316662623465376633306434386638323465 +31356265376539626433386631633662616639616562386664323936366565633335383631343739 +36343161376237666430643966366132663333663738313535333663653862656664373962356135 +64383963363332313038613539313930393637333866343161376338376363626434373336623237 +34373966313161366134383939343535663835626130643630623631383166623533653564303363 +34333134653634383465366231313439653463373265336237653533313334663836633838363638 +65363564333234386633316666353039333764376233313636386661353165343665386361346531 +36396162656232363938636130613763386335633234313165386435323437366332333261626438 +39363861353431376530643663366135333939396262323034363761626664333566636266643234 +62613839613336646637336563353337376534313361363233333064353030613063616562666231 +65613430353262623834393030626432386530626462383134343965646437306666306363616536 +65306265373561333335383436626631616130623436623966316436333265666561323665663565 +61386438636137616134316534653736373561646361363566313163306536343339363264393862 +63326361353563313738653762373833623039653439313838653839353535306636303131396466 +39373236653933303163653033346565343632626138353339316136633233636632663734386435 +33343862366635313936653463323136616166373464623131333637633136653163353631303763 +64633265666661346539323631333131646237303565396335383061633963336530363466343439 +65343732323565323732633631643031336137646563663035306361626362623637383261613230 +35663039383665633639366536376364336339356637613138613630313935616362643361623535 +62363930376164366630373565313438633735643636633063663733356265653335326434386663 +66393532643461646430346438366538613139373236373639323566356263646436363435323137 +61363563666532343966323834623366313136333337366461663462373164636161363730313734 +64306630353464336135633134633061653932386234636564303230636162623431616662393337 +37333861306365663034383363656361363038303232353566346234316331383138623862326263 +62366262626236636537323134636462306566306162356536366635323963383630373030333562 +39613037383032643430323961666163323936646632666335373138383565306332656564616335 +38313330333362616265643836663239643538623230623239373562613364613765333838316231 +62343031663762363130353036613436356232336563636531393030656135306132643837623036 +61353431656134623738363238333766336433393535336466393764643437636230386565373330 +35396133343433663438306165356137613035303165393938333636316666393532653236303131 +38336466646261353838626138366161346533626437356232336364646538356334316261643861 +62383236613864343362373936396564373633323633646431386635363039633961636163643736 +61653462663637306333336530373332313338343238626237393938643565303632363466643539 +66666233653461373933313964623332333439383263333663396266363065633165343735313939 +63633930346637616438656132396434613663343265353465383261376565646631626563643136 +65396434333665386331313762633933653635303635393531316463386531383238656436323736 +39376639623733663639313933326637653766313032666533633431616462363865373665643166 +39653838393939643161343438623331613237303333653064336264383063323162376531366132 +30306364376433383062383133616534633061316434343134376266346538656634333464393966 +32646236393365623761666535306361333333303638343433316661643032363262333339383866 +61396337613833336330306663336437616535383762336238383235613232643834633666336234 +39633064393332626238653732633730393730636333613563376331303231306434306132366437 +64303638303166313735616664383837366630623164653930643334336263616430396536303164 +33383132373432353464336666613035646266626535623134363564396432653164646134653063 +66383561313533373436333566343937613438646633656130343863633165323063313063343566 +32323833306638333134623366386564616165613062393965386538376261366630393335313138 +66643636386131316632646334663730333533363966626664366233323862666266393035323966 +61383461336239643338326662343838346165333532636637643131313863376230326164353031 +63303735326635313666366231313832643562373235323630623035636435623032386432346439 +38373739653138303263393632646365363932656662313765386262326566633638623537613362 +38663163656563356665353963653661326663383036366536343135323736393636333136343364 +39373434613763393362363366323234346264663461353863346434303637373734333764363033 +65386363333261666162363131366361363361643737383932393130343632353664656435653961 +33306333333836663033333937323735366634623033303234623530346531376361653038323832 +33303035363164613833373134623265313938363232336435343236616135393837336138366266 +37616263363265636165373162666238353334306438396630633862323933653634626362303636 +30336162376464633237663539643238373839373033653331353836383731616639353036613061 +32393032373861333664383638333937303966643439306166666133323364353231643038656533 +63346364323935333034366163386536373537316664376139366333636534613736393030636631 +65656530663632346532363930333361336363396361306635666635366435386262316134346233 +64656532366334323036626464616235303961346136656630623732633537323662313434653866 +33313164613431303365633534633863313539336661663563646432356438616465383636346163 +35373063326630313030663565633766623634613063653930343037383762333830646265313039 +64653738353139303938306436643037323632333535623839343138663231393539393838333664 +38623934623337353236386638396337386134303832363762316362623133386334323037373930 +63366365306265336536663864613466626538316366663131383066373432616562346632353939 +63323066393666333436656434653330386433613230306634323636336661313165383638303762 +39636132633335303666346238616537343230373032326632613063316532313062323933303364 +35323037343430623361633265393339343961643934363934666439323830643261323361613736 +65346139336632616262383930646335383431396138333337646239663762333264656563613339 +32306237643263326562306464626539633963393130386337656533346139343066376465356432 +66393864636235663365626238396539373564306362633933353732646664336164643235616661 +35393966383366373036613838643433613030636437313263643731633237373335303534393465 +36353332313236383264393261623237333435653731393737306130316134363866666231336264 +63613466303732613037356362333761643835623466623133343366386238646362613835376437 +39396133313731313735303933356235326135613232363863656164623234323535626633353165 +63396638643038643233623337316363623161666130333730363431346537623331326531303336 +33333161643736656463343432353561363939343532373636383330613264373564393765633262 +63336131366464373834393932646631343366383931326364333264386431373835303737643737 +65343936363833366138633335333461373638373861633233653631623833653263653631666637 +32636565353430333031333034623133343263306264373735313962343566663561663564656564 +36643931363534303064373337366338336637393066643236633137353166306563316363623733 +61623661613935656339373336313435643938656238666564393061326533333533663963646563 +37636665333663303262633432333838343237636438356162313032353764393130626435633663 +36663532613432653931353466643730313265373462623932616662343737646161323661393062 +31313939363661663738663635326239633135353130623131633666643936323963386638613136 +37353433333961376430393935313962646534323236363633306330656365336633313836343764 +62663336356439333933396136306638303836633063663266366463383064316333653236653733 +62333833393230353133376232373066313732393134313435343531616238666137653534613130 +34383334323636636638396631356561373665326637313835326465383961653234653132643638 +31333231303831356561386266323761663066376162626633376162376366613364383635323366 +63376131363066393063623830376464333030336338373534353062386462363061386664326662 +34643738396438306663613761633838633036356235306363636630643263306563666337663437 +33323735643232613039666334653534306131666564346232303235646136663665353836353737 +30643238613962333262643334376162613739643832356363373764383833353362633137386335 +34343536383764316436323965323361613664306237363662623464646439353736613063313534 +30373663653530636335353461326630303332646164393635666630653635663265336166646361 +35646132366566626261633563376631313535636334386339303930663538653839616266383237 +64653666353163616232636533633038393432393735313663376534353239623434366539633230 +62313661636532643162303838636636376465376134366235353861333939646533363238363865 +62393766643339303936653030336339363063396564353761633738363362636134386639303862 +35666337353066656536373962326464623763633563396334313431313039383337613661643866 +37666138373335393136333734333463316338323930626364346265323666393931313536306237 +31383637343362333536353932353033653661643962613263333131623434353366666636663639 +36373230616462396331643763613931303434346462353163376130333265383937656633393439 +6634323537646437353866346263613665336133353363633430 diff --git a/vagrant/host_vars/just2/django_secret_key.yml b/vagrant/host_vars/just2/django_secret_key.yml deleted file mode 100644 index 0a4b5c4e..00000000 --- a/vagrant/host_vars/just2/django_secret_key.yml +++ /dev/null @@ -1,9 +0,0 @@ -$ANSIBLE_VAULT;1.1;AES256 -61653161643565623130623362623837643135393031616438356461383031366137373735343565 -6630333965373762633966303933366134303535656430320a363137636463656336616533373239 -62653630633035323431326362313164363162343464663438653830653030646466623961353966 -3462626265316636380a623865303732303563346263666166306132393339376164353531323731 -32643232373033363031303761343437633363656463616461663134336436646238646630613735 -63383033363438353132663465393637396338393837626230663063343831343232343234336566 -35663534323638376436666635643734313432633034306264356564323263353832393062363133 -33616561383866333931 diff --git a/vagrant/host_vars/just2/secrets.yml b/vagrant/host_vars/just2/secrets.yml new file mode 120000 index 00000000..a71bea0b --- /dev/null +++ b/vagrant/host_vars/just2/secrets.yml @@ -0,0 +1 @@ +../just/secrets.yml \ No newline at end of file diff --git a/vagrant/host_vars/please/django_secret_key.yml b/vagrant/host_vars/please/django_secret_key.yml deleted file mode 100644 index 219d72ed..00000000 --- a/vagrant/host_vars/please/django_secret_key.yml +++ /dev/null @@ -1,6 +0,0 @@ -$ANSIBLE_VAULT;1.1;AES256 -64613033336164663433303535346536373163623165336634616534336664373233323831613830 -6331663835636433666363653932626535323331383564650a653737633233313763646333636131 -36633761656561616530666530353766376366306632373734623665646136353333303839343034 -3839326330376161650a356430623334643066633239366466646462333762653631333665616131 -64383464323932653266393536626565616630383262646263663465666265396465 diff --git a/vagrant/host_vars/please/secrets.yml b/vagrant/host_vars/please/secrets.yml new file mode 100644 index 00000000..946900e5 --- /dev/null +++ b/vagrant/host_vars/please/secrets.yml @@ -0,0 +1,93 @@ +$ANSIBLE_VAULT;1.1;AES256 +61663030326361383433343863303330323565343736323234663662353937306430366335623538 +6136383665386465306461316465643262343166643132360a333839303031656535373337376364 +64613464663261326634333437373836623764383965313063636136613734346632623466626165 +3338663633366235380a633933393730373832363462316363366132653833663233616463613033 +62613833623839333062343761393337383765326538323138643733373461363332353030333736 +66643537633130356530363564386439383435646232356335396135626565353665623136343162 +65643764643033613539616532383764316136636233623335653932643437316566613139626562 +65393133356162326263353238326130643637323633333733623939316165333564366336666165 +38313230666135326430353934303164626430396262663939623337333965356633363963353864 +37323638613736383232303861663766373264656433343234633232326436613264353230336637 +61613933643834373964313964366261346434396230643838373364316664373237633438313034 +62303539646436663036303330653063316361343164336239663030616234326637623835653731 +34666430353062396365313466393562336665616264376636383032373163363137363730613037 +39386565613962343331383335356134313637376538303165613834393666663963636439343134 +35373562306537643735623562623435353034626539323662303731393366663830333563393265 +35646135646661326163376133643631353764336538663538306139313664366238303637333432 +39633037646334643661656666333830363838306361383366303739373936373263316161616638 +33323464616664346437393430663466333063396663386232366139343138323662353139396235 +64333462396662336134333635393534333136396463393762633066396637656538333032363237 +34396435646231336439346537383836616135616437373466336365353038363232363939653063 +65333162326137356337313534363439326237663933383536363465386666663937326132366464 +65656432643561626435323665636466666161336236316134376264346234386231313334626631 +30316239663431633234666435353437373262343535653963643433616565353435323262366565 +39666134396530333765633130626162356563633236383137613861306262633534346436383132 +35383866373137356466383666623134666531323534303265313264613837303239386664373764 +63303765323533643038323839393232613134626232303364313630353433393731306636616534 +35633461643637646338356165366365383633303163613734333262636134393839643235636635 +30326663366536313332633862346434656138343532353137616433383333386665643262333530 +36623266383034623734366335396233623464376631323731626532353832313762633334346463 +65656533366230333736663537303537663335333839376233666666366364323461373235333737 +35666265663064663636623034646239663566333238393566366539633265396437366434363866 +65363339336564383930303738373762383130633630396438626635656638316661316465616331 +33623435623962313665366364373534393161663665386263333332306635623765333666363962 +65636634613165613030653730323939636331393235376364303634383436613035633935323636 +30333139653264666637663236383761396462386237626232633933306333613462366430373164 +61303433366535383661323234653961346361643432386430383839633638303730346335396366 +30393630656135623438363339393165383436633638353566623332336331613963306232323366 +32383634633435383439653938643037333161653933633061636137303363653136623862316466 +66393539346461373264363234303964643863323764376431663731316465303765313235353662 +35366436636232326139663939663331616130363361323834663338643065383839356135343961 +33333030393236336535306333316336393663353731383061396263376638386536653837363030 +35643663353039346563396430363765323463323964666236376661383066326532323766626635 +38393137363435316364633863646632626161393932316239633031623161376331343138633237 +32643835623135616234316361363965656239353734353336373734636434333364323730626661 +31313138313263613731636134323631646339363366366662363632396363643238353066656235 +33616464316230636362366461303963383863623237313865356631376337356363653464343439 +63306233376264383037396435396234653837656635373434636164626534326464316430306664 +65386365386466653838376536313336333230653130393066666163383930326639613331333034 +63323166386366613864373861663836343430623133363736356335383834373631343561646665 +31633365356163346535653535303263623739666637383433626138616536396639353666643230 +32373530393261623464666264333637333962386466623536353338373933633864323266353038 +65343838656164373333383438313335656534393739366564613237636361663637373664383864 +34376135386635623761666363363466313131613164643163623338666665386265353461656639 +39346135373239666630656666333931656462356234653039333933623262303464313931363838 +32363737656463656230313239306238613837353562323231636534393939336232623938373066 +32626437366130326666653161366335363765653962366332616364646237343366396331373639 +64376661353333633130613232373030636638623530343666363730336463666666383762366533 +37383136376236633136653837373564636334633934633937633464623533393563373037356536 +33623039306631313438383033346464363335656466333433313839643766363033366266306464 +34636161313561636533656539326130653339366161323438643464316162383164353564303331 +65643464323661366366376633633563303634306330306536666463333033306539353237313035 +63313038653166343166356135663635393239616333393136323634373264613262313863613561 +66623464613461353832363230346263646233666130376534306366313339653438613333386664 +35383835336633316336373132626137313564303965383164356536393035613836303034333230 +34373634313633643630343238633037363639303565393365653561393230316236303934316237 +31343431663833363037663434313131633262383434363339663838323166616134323535623331 +34373039633339666634393830333133663464613430386432666462633936663765313663663730 +65353734616231396636393733393136643139636132373030633531356233343961363838396263 +35626363356137623933333963343061363639623962333635393263666139393831646133626536 +63313837663134306466623066383234373063386336316630613232653035313739623163626265 +64336462643264336134646631343236626431626364663335326438636433323138373863346631 +32626463323331656338633464353261393036666430353862663537373532643839613930363439 +63633032343263323131656339643564346336353735613836653839306537313064393262393937 +30663430393330343961323437346165643066636331326635383863643266666132393136363833 +37356437316636386235666138333734366135343338643238616334366266653237633961383132 +32626166376238626639653137323166383164366463393830623234636461333233316435303836 +38373163613131373337313564636334373233633765373137626264303939633066373963373966 +36666639623031626635633735323936373961393631643139326536666338643563326632666331 +31666233636633613036346234333531353633393364363330333366626335353836323638646561 +66363438613036646563666161633634303431653938663632396363613463363663396336376438 +38313462353539633763306162303339306330343764616637613537636631366135643835303761 +39623535613538313161393436343437323261313862636534383233666362616634623935326363 +30656330646263323538306233376162616231663638363265323235393433643035636162626161 +62323035663563366464393038636265323830366236333765346430636230393435623130636161 +36626466393338333865656633313034393732633363383065383530313535623666383266663763 +37346637316336383930646539386234633030376131613433316337313835336332663939636462 +34393236653464386634643938353135666632303731633763323961613033323565643066626263 +61376130313333353961336432303562626662363162643634303739646134343064346435396338 +66663336353339313738346665616433656230623936383233313663313662363462363933306131 +39396635336633303136376462333735666432626338623738336330373538323165313634653563 +30623163363163376464323739313931643137623962313664643964373262396434356263366437 +62663733393131376636 diff --git a/vagrant/host_vars/prod/django_secret_key.yml b/vagrant/host_vars/prod/django_secret_key.yml deleted file mode 100644 index a956b51f..00000000 --- a/vagrant/host_vars/prod/django_secret_key.yml +++ /dev/null @@ -1,9 +0,0 @@ -$ANSIBLE_VAULT;1.1;AES256 -38393338313562616165323038613332656239636462663936303562663739636232346439386265 -3336376535633438386138626133623066613565333265390a316664626336616631666266336438 -32656432343566663230663333656232636439356162643635663631353837393134626632353936 -6235373564663133330a623737313138323131383531323530326166303237363764383537383263 -63316662363765383539353336633236623563333062653132303263383562343064333833376266 -39376463363763636235353031373166393832393761353737353437366664333634373261313235 -30633633396235633266363236303263393732636636393132623832396331353232393663656566 -38653831616665306633 diff --git a/vagrant/host_vars/prod/secrets.yml b/vagrant/host_vars/prod/secrets.yml new file mode 100644 index 00000000..63885601 --- /dev/null +++ b/vagrant/host_vars/prod/secrets.yml @@ -0,0 +1,151 @@ +$ANSIBLE_VAULT;1.1;AES256 +64626138643139313263313864323066356664363962623734323365626630353537383535353134 +3439653734373462656664633438653334316561633237640a366161323630326564353836663136 +61396630633139396463386565323630346263353666393461616136386239333837303733326433 +6134643533323037390a626533323033626533646630656636363565653565313330646430346635 +63373137643965653439646234626631356262663234356461333137333365653036316630303362 +61303635663961663332643663303863386166623239616636386639666139663931386665663133 +61326466363835316264613532366533326236386338363761323330366163326238363661623138 +64303937353230623134373965303663353133643065633433393365326464636533366136303433 +62363866333462383031663237636262393262386466353161373130656565336335633937323435 +35356665666231303430616261326365623934343636663935613937326236656264353832306334 +31353737396662363533386365336331313664633837633432343261386536633064663831336231 +37383139316465313936303662633062313936336362643961613032626233366639376132356362 +37393264333133393032386334303461373666643061393132366135386462313133346136623130 +65633265396333373534313237316537626539356438633133636633363466666261366338333266 +63363132326663646334353937616364343236663935636663366234373734313132386466333862 +64653134396462346633643831643031306363393738343561326661373436646162383465333530 +30316163366462363133303165353162346535336162343537326637383764323761626465373639 +39356665373065333732663637396465373334363831653337633032336231393466613033353938 +32393038336435303065646239623630643939326235313232343661306430643562633266386539 +36613261363064336636393137373030393764373538383638366535656564626663663061376637 +33666636353132366365356337656132333165626535306433333532376336303434306336366638 +32636634653662616432626434323264353331333632666663393265363230663161653764623334 +65386564386239613832623134653166343862353336306535626363386132646432333737663439 +33653332343364663966633434383361313861393464363139613734653336643133323738663134 +35376236656361366266356463336463373664383931613233383735653231656564363736636134 +38373263363531353236353865363934353531386234653634613739333139336435343331333930 +64663066343631663162633264363666366236633433313436353462633536643464633532653663 +63663036633332363036313963353039363737633939666534393466333938636638366439646637 +63393166316535386632353934383436386536356437663134386261323261623537393430333264 +38323739386265363138666161393534343766643539313038343335626466336539356330643531 +32633066376536353137616532353363633833313132623236616235653961356636316231616465 +66393662623939346530336532313466613431323132663130323032656138616465316532373933 +31623537326263336263376361656233623461393534353263333236326138383661303363383439 +64646332623931646536336262633866366235333433393961313037623630346538646366313261 +64363030613164326661376561346261323364363136343238653631373839316635376663383963 +33633633373565623437356366383630353065363465363565343066323761643932643336366237 +37663833323262646536343538323063343565303234663731363332636639656436353665626262 +61656536396366636239326662396438306464386531623334316231636166376332613563316361 +34613232636361636638623731643234343665383331633364346132376635616633616432333135 +36326133323563636539623539333664666336353434326266313637316630383864313530356438 +66323036663635393363346563623564323734333565396433313062396433343139396233656361 +36616438373537623734623061346665343832313032623738366663646335333239653533393334 +62626431303939366234383739636262306637333835343765653532616234323562306239633039 +61346338616137373138613138333338356536366561313739313530343065633634313632646239 +61363235363136323531393063393634613866653832306436646335396633396363623266653838 +63353331376131303132633936333333356632353761356639666562343033666165363734633330 +36303138323036323136303636653461366531333763623365653535633061303864306638383737 +31633734313936376530306232386463386366333937623935666438313438353831386666336565 +31646236343162646531636337633265333038303963653862396264333563633831663862666639 +61383631363133306337373230653438373838356164663330373932663866373765356336366363 +66363364616561653066656335363230386238383761613737353364366134306461343738363038 +61396434383438623039336666636564643135363138316436326435346430643932396635323665 +35366163346161396635383838323137376139343262346634366330313135303865656461613862 +33616138633634396366313862336434333338383336373431386636663438396163333062343133 +39353632356435363466373766376464373035646234633537353538306538623835636230313565 +62663263646166666437363833353533353666396665623434333338643337386339363431643131 +66626435356632333362363861623863626462306136353664306131663538393964323934633139 +34363763653630623866633939343932326232643130643138316662373530646638336235316565 +64353262343830333365376237643562376536623331343630393136363966363662333765303338 +62343065313437356361303232643166313162386234333732316339396364373839363732656438 +37356236306665336261663930643165643233393931313531613166323031653933336536633038 +36313133336536306263633464303034346439356439613633633964633939643463643462303834 +63313566643934353938373133366538653264646530323039383162396561383437636161616539 +65363432613031313439363537303039333262363736613364643062363366386462366235653938 +63343834333932656534636331316430383532636437316134333837366430633231643634376639 +36306336333032613161633463363164326439653039643263393331336435313135633266363263 +34396639333331383861663735366562366138313363353134353439343062346639643130363266 +33376632336537363836316134363561313435363830353661663237366331666239366363613439 +64396239626236306439333130636330613365663334366437313361313464316337666465336666 +36613632613338396233613864613736353766613264303264616361356538326466643938346164 +31373132653861303830333834323833366238613666313230346264663631303138393762353965 +32333031646163613362393466313134323135363235333236646666653265373765653332336330 +65616236633166373465666437373661393665326535366631666132376238353664663034313636 +30346533333736346133633964386339643437303233323034363164393732306262393962613663 +64643863366465623139336431346561333863643535343233383036613362386531613936366366 +65613164336233393136633161373264356464393665613633363739363261363837666134353866 +62623666656634643537323263326534383233306635323062343337353732303530393735633366 +35626536373732363430633865613335323763613236666362656135396234643765363935323533 +33383264363334636235343334666333383263373561303162633739616362303534376237663635 +32303766303765613737303166666437336464356337623562616266616265626636396564643238 +39383532303864333133623532326236393861613563373262636464663731323661643936373732 +64623563366135653964616132346461623561653564363434643739663531613239613534656465 +30343438663332346664616435343737613162396636323832393462636662653730626462643866 +36396461383335386230386138343132323365363939353436356264386164316536363662353963 +62636134313832656365323465396364613634303566396537353866643066613561326165393961 +35393439613637313636396331613964306632376465333237316566306634366638633136383630 +35616336643165643635323930363631356235316365353634363332653435653466636364376231 +31653133663265646661623363383637346665636634666261636639626164383134313535336132 +39626534633730663935343439333635656139306538376166663865323330303639666433646231 +39666332313338623232373038383237653465386638333866303235306262323036386633623034 +32646430353033306163613866323761373563326134313763373462386133313665303630316531 +65343261313238666561363632613339326234343435336631373134393439653565653639396538 +63653438613032323732346236326632616264343963663936383962323064373162366362656331 +33386165643834633065303563343164366437646465383766633561326661613333306338333464 +32306631356634616635386339623731623763383661316134633237663634626537306534653635 +32363932353666376231616533363135623539656235383731326136353664396165373034323033 +33646237643863353430666335373434323836393435376138313162326162636466626533343461 +35366436386637656430316630333635303161393632353064393636646266386437616232363638 +34663365663461633162383966376263363163363261653634386161393433613261646130373165 +62386132336439323533626332633931636635363563353961363035393038623862326636393665 +61316139333635346637313137616135666137386133646531356631643435656637373435316166 +64636464333664623138336133393065396261626163653131646364313761313065346433643962 +63396130343764393062623032616361343966663435386564353531336136653037643337653863 +39653063373264333437636561633834323330343930333137366538613932643731643462313532 +38383337356535303265396635333763343631323166653830323564373135356565333466376230 +61346537303238343161616138623538356232646333633964316263623736303432653236346239 +65313335343839353461353537666236313035613734646639343435363564363461386539363664 +34393734326566656366376562643936623434353636303766633538366238643938336137343464 +35343865633534653036643363366363653337383863383039333838653161313831653363366363 +63633962623033353531643533383964363962656136376638323136663662306136326662666331 +30363836363237613039656562653065343237623731363430633465636366333536323062353839 +39383162313739396566653634323632303133633562373437656530346138346531666366393261 +62396138376431643662323366663937343438316133346639363666326231316564376330383833 +62626533643439393264383761303765386165633266643463316230306531313736323837356261 +34323263393664613438393638326437376136663839633265306637323936663863663262616332 +35333330313564323565323064346162646437393332643630383862343366666538353265646264 +32326132386534383436633061643836363964323638303961633063663733656365326131656634 +65623837343465636438363038643433643537306165316366353565326233346238373566373863 +33323534633261393036353031303134336333326436356233386230653339613034336231613934 +31646231666437623333646663626534303363346461643066333433303436336238653730363837 +61396233313830326238363935623836366138633536616531323563313065313534313139376165 +33376630373564643136626561646364343162616666613932323362646233323366373930346638 +37613664666461636463356466623364373030623135636433306563326466323563363738636432 +34313139383963653630663364666136373232393335626134376337313862623636346465646433 +32393630373663393135333534616335326435613463383666383130623662396165376638333730 +37373730313134623831313164666338326363653233633832303234313730616638396136656164 +30653334396635393065656638323432303531626239316431616331363638363638306132313565 +34393361643466343837316233396162326535626162326130383461343665646665386634363134 +32303666373663323135643364323832636561316637343861376232613831383332366135373436 +66366134383664323638303330653634356364633234326463646132306330376434363966643539 +31326530656466303366663231363439303666653937616439386536376333626234323730343939 +62343635633136623061643636643862643462356631636337366663383439616139633666303066 +34396332396533366461376265633465356336306461623263663239623937626163643465633537 +33666138316463326336353563366562643337323265653436323963303264613863303339336133 +32343266363236666431306362363838313364663038363939366233306431613239626632316538 +34353833353338383830326636366231353363353963636564643936663835396266386536623335 +34626661386338636234666364303635306430636465353065316536323931666235636637653161 +66656230633738633363643239666165396662316664343338346565396135363131336139636163 +61343935383466633431653539303164643035613863383362323938646137366232623431306336 +31336536626430623863333436643933633432326335613737653634366162343762653436303364 +35636635313433313662343538393165323134323334616233613764613566316438356135326631 +33663333326365336236393738643335303031646631636464353436656131373139343731386238 +38303165613331376135323933623332313562323066326261313535626662633035646436396136 +35646334653033346364323238623765353664343630666132343533623931656565646565383938 +35303466633639663839656134386331613563353764383332376636363863323037386335396232 +63383438633363326138633334353466613936396339333565366262366536633838313763666666 +39343935393064386361356336393135326435376335313039343662626161393431623365336138 +33323031363135623338323733346537663236323266333938353236633434333863643133643735 +35343062313433643866386230663865363034643435333638646632326563393032383339623962 +3830383963313933636430313561643235613266336638643364 diff --git a/vagrant/host_vars/prod2/django_secret_key.yml b/vagrant/host_vars/prod2/django_secret_key.yml deleted file mode 100644 index a956b51f..00000000 --- a/vagrant/host_vars/prod2/django_secret_key.yml +++ /dev/null @@ -1,9 +0,0 @@ -$ANSIBLE_VAULT;1.1;AES256 -38393338313562616165323038613332656239636462663936303562663739636232346439386265 -3336376535633438386138626133623066613565333265390a316664626336616631666266336438 -32656432343566663230663333656232636439356162643635663631353837393134626632353936 -6235373564663133330a623737313138323131383531323530326166303237363764383537383263 -63316662363765383539353336633236623563333062653132303263383562343064333833376266 -39376463363763636235353031373166393832393761353737353437366664333634373261313235 -30633633396235633266363236303263393732636636393132623832396331353232393663656566 -38653831616665306633 diff --git a/vagrant/host_vars/prod2/secrets.yml b/vagrant/host_vars/prod2/secrets.yml new file mode 120000 index 00000000..3d81269d --- /dev/null +++ b/vagrant/host_vars/prod2/secrets.yml @@ -0,0 +1 @@ +../prod/secrets.yml \ No newline at end of file diff --git a/vagrant/load_data_please.sh b/vagrant/load_data_please.sh index 72ff4987..7913d267 100644 --- a/vagrant/load_data_please.sh +++ b/vagrant/load_data_please.sh @@ -4,8 +4,10 @@ cd /opt/regluit source ENV/bin/activate export DJANGO_SETTINGS_MODULE=regluit.settings.please -sysadmin/drop_tables.sh | django-admin.py dbshell -cat test/campaign_starter.sql | django-admin.py dbshell +# sysadmin/drop_tables.sh | django-admin.py dbshell +# cat test/campaign_starter.sql | django-admin.py dbshell -django-admin.py makemigrations -django-admin.py migrate --fake-initial --noinput \ No newline at end of file +# django-admin.py makemigrations +# django-admin.py migrate --fake-initial --noinput +# load Pride and Prejudice +echo -e "django-admin.py shell_plus << EOF\nfrom regluit.core import bookloader; w = bookloader.add_by_isbn('9781909621657')\nEOF\n" | sh diff --git a/vagrant/templates/common.py.j2 b/vagrant/templates/common.py.j2 new file mode 100644 index 00000000..015baff2 --- /dev/null +++ b/vagrant/templates/common.py.j2 @@ -0,0 +1,6 @@ +import os + +# all the COMMON_KEYS +{% for key in COMMON_KEYS %} +{{key}} = os.environ.get('{{key}}', '{{COMMON_KEYS[key]}}') +{% endfor %} diff --git a/vagrant/templates/host.py.j2 b/vagrant/templates/host.py.j2 new file mode 100644 index 00000000..8a43ee0f --- /dev/null +++ b/vagrant/templates/host.py.j2 @@ -0,0 +1,5 @@ +import os +# all the SECRET_KEYS +{% for key in SECRET_KEYS %} +{{key}} = os.environ.get('{{key}}', '{{SECRET_KEYS[key]}}') +{% endfor %} diff --git a/deploy/just.wsgi b/vagrant/templates/just.wsgi.j2 similarity index 71% rename from deploy/just.wsgi rename to vagrant/templates/just.wsgi.j2 index e12da4d1..c1341a18 100644 --- a/deploy/just.wsgi +++ b/vagrant/templates/just.wsgi.j2 @@ -5,5 +5,11 @@ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "regluit.settings.just") os.environ['CELERY_LOADER'] = 'django' + +{% for key in SECRET_KEYS %} +os.environ['{{key}}'] = '{{SECRET_KEYS[key]}}' +{% endfor %} + + from django.core.wsgi import get_wsgi_application application = get_wsgi_application() diff --git a/deploy/please.wsgi b/vagrant/templates/please.wsgi.j2 similarity index 61% rename from deploy/please.wsgi rename to vagrant/templates/please.wsgi.j2 index 3fe5a14c..a5d405a4 100644 --- a/deploy/please.wsgi +++ b/vagrant/templates/please.wsgi.j2 @@ -5,5 +5,10 @@ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "regluit.settings.please") os.environ['CELERY_LOADER'] = 'django' + +{% for key in SECRET_KEYS %} +os.environ['{{key}}'] = '{{SECRET_KEYS[key]}}' +{% endfor %} + from django.core.wsgi import get_wsgi_application application = get_wsgi_application() \ No newline at end of file diff --git a/deploy/regluit.wsgi b/vagrant/templates/prod.wsgi.j2 similarity index 60% rename from deploy/regluit.wsgi rename to vagrant/templates/prod.wsgi.j2 index 28f29c1f..30daa000 100644 --- a/deploy/regluit.wsgi +++ b/vagrant/templates/prod.wsgi.j2 @@ -5,5 +5,9 @@ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "regluit.settings.prod") os.environ['CELERY_LOADER'] = 'django' +{% for key in SECRET_KEYS %} +os.environ['{{key}}'] = '{{SECRET_KEYS[key]}}' +{% endfor %} + from django.core.wsgi import get_wsgi_application application = get_wsgi_application() \ No newline at end of file