From 4b808ce1a991a6786b2893df9a70b46a7267cfe9 Mon Sep 17 00:00:00 2001 From: eric Date: Mon, 2 Mar 2020 17:05:56 -0500 Subject: [PATCH] major update to py3! --- .python-version | 1 + Pipfile | 13 + Pipfile.lock | 161 +++++++ group_vars/batterup/vars.yml | 8 +- group_vars/dev/vars.yml | 12 +- group_vars/dev/vault.yml | 191 ++++---- group_vars/ondeck/vars.yml | 13 +- group_vars/ondeck/vault.yml | 191 ++++---- group_vars/production/vars.yml | 9 +- hosts | 6 +- private/m.unglue.it.csr | 170 ++++--- private/ondeck.unglue.it.csr | 168 +++---- private/ondeck.unglue.it.key | 332 ++++++------- roles/regluit_common/defaults/main.yml | 5 +- roles/regluit_common/files/celerybeat | 154 ------ roles/regluit_common/files/celeryd | 217 --------- roles/regluit_common/tasks/main.yml | 14 +- .../templates/celery/celerybeat.j2 | 28 +- .../templates/celery/celeryd.j2 | 6 +- roles/regluit_common/templates/me.py.j2 | 10 +- roles/regluit_dev/tasks/main.yml | 142 ++++-- roles/regluit_prod/files/celerybeat | 280 ++++++++--- roles/regluit_prod/files/celeryd | 442 +++++++++++++----- roles/regluit_prod/tasks/apache.yml | 2 +- roles/regluit_prod/tasks/celery.yml | 10 +- roles/regluit_prod/tasks/certs.yml | 28 +- roles/regluit_prod/tasks/main.yml | 12 +- roles/regluit_prod/templates/apache.conf.j2 | 2 - .../templates/celery/celerybeat.j2 | 22 +- .../regluit_prod/templates/celery/celeryd.j2 | 9 +- roles/regluit_prod/templates/prod.py.j2 | 25 +- roles/regluit_prod/templates/prod.wsgi.j2 | 2 +- setup-batterup.yml | 6 +- setup-dev.yml | 11 +- setup-ondeck.yml | 9 +- 35 files changed, 1454 insertions(+), 1257 deletions(-) create mode 100644 .python-version create mode 100644 Pipfile create mode 100644 Pipfile.lock delete mode 100644 roles/regluit_common/files/celerybeat delete mode 100644 roles/regluit_common/files/celeryd diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..5b34131 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.6.7 diff --git a/Pipfile b/Pipfile new file mode 100644 index 0000000..131bfa6 --- /dev/null +++ b/Pipfile @@ -0,0 +1,13 @@ +[[source]] +name = "pypi" +url = "https://pypi.org/simple" +verify_ssl = true + +[dev-packages] + +[packages] +ansible = "*" +python3-apt = "*" + +[requires] +python_version = "3.6" diff --git a/Pipfile.lock b/Pipfile.lock new file mode 100644 index 0000000..284bac8 --- /dev/null +++ b/Pipfile.lock @@ -0,0 +1,161 @@ +{ + "_meta": { + "hash": { + "sha256": "d584600ed7df079f205b1672c0f69c7966f98218c7267da740dd38955e9d6a71" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3.6" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "ansible": { + "hashes": [ + "sha256:51ae50d33264eb644ecb79a0208a20569a1127ec3440e8de60eda3a2b3d9caa5" + ], + "index": "pypi", + "version": "==2.9.5" + }, + "cffi": { + "hashes": [ + "sha256:001bf3242a1bb04d985d63e138230802c6c8d4db3668fb545fb5005ddf5bb5ff", + "sha256:00789914be39dffba161cfc5be31b55775de5ba2235fe49aa28c148236c4e06b", + "sha256:028a579fc9aed3af38f4892bdcc7390508adabc30c6af4a6e4f611b0c680e6ac", + "sha256:14491a910663bf9f13ddf2bc8f60562d6bc5315c1f09c704937ef17293fb85b0", + "sha256:1cae98a7054b5c9391eb3249b86e0e99ab1e02bb0cc0575da191aedadbdf4384", + "sha256:2089ed025da3919d2e75a4d963d008330c96751127dd6f73c8dc0c65041b4c26", + "sha256:2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6", + "sha256:337d448e5a725bba2d8293c48d9353fc68d0e9e4088d62a9571def317797522b", + "sha256:399aed636c7d3749bbed55bc907c3288cb43c65c4389964ad5ff849b6370603e", + "sha256:3b911c2dbd4f423b4c4fcca138cadde747abdb20d196c4a48708b8a2d32b16dd", + "sha256:3d311bcc4a41408cf5854f06ef2c5cab88f9fded37a3b95936c9879c1640d4c2", + "sha256:62ae9af2d069ea2698bf536dcfe1e4eed9090211dbaafeeedf5cb6c41b352f66", + "sha256:66e41db66b47d0d8672d8ed2708ba91b2f2524ece3dee48b5dfb36be8c2f21dc", + "sha256:675686925a9fb403edba0114db74e741d8181683dcf216be697d208857e04ca8", + "sha256:7e63cbcf2429a8dbfe48dcc2322d5f2220b77b2e17b7ba023d6166d84655da55", + "sha256:8a6c688fefb4e1cd56feb6c511984a6c4f7ec7d2a1ff31a10254f3c817054ae4", + "sha256:8c0ffc886aea5df6a1762d0019e9cb05f825d0eec1f520c51be9d198701daee5", + "sha256:95cd16d3dee553f882540c1ffe331d085c9e629499ceadfbda4d4fde635f4b7d", + "sha256:99f748a7e71ff382613b4e1acc0ac83bf7ad167fb3802e35e90d9763daba4d78", + "sha256:b8c78301cefcf5fd914aad35d3c04c2b21ce8629b5e4f4e45ae6812e461910fa", + "sha256:c420917b188a5582a56d8b93bdd8e0f6eca08c84ff623a4c16e809152cd35793", + "sha256:c43866529f2f06fe0edc6246eb4faa34f03fe88b64a0a9a942561c8e22f4b71f", + "sha256:cab50b8c2250b46fe738c77dbd25ce017d5e6fb35d3407606e7a4180656a5a6a", + "sha256:cef128cb4d5e0b3493f058f10ce32365972c554572ff821e175dbc6f8ff6924f", + "sha256:cf16e3cf6c0a5fdd9bc10c21687e19d29ad1fe863372b5543deaec1039581a30", + "sha256:e56c744aa6ff427a607763346e4170629caf7e48ead6921745986db3692f987f", + "sha256:e577934fc5f8779c554639376beeaa5657d54349096ef24abe8c74c5d9c117c3", + "sha256:f2b0fa0c01d8a0c7483afd9f31d7ecf2d71760ca24499c8697aeb5ca37dc090c" + ], + "version": "==1.14.0" + }, + "cryptography": { + "hashes": [ + "sha256:02079a6addc7b5140ba0825f542c0869ff4df9a69c360e339ecead5baefa843c", + "sha256:1df22371fbf2004c6f64e927668734070a8953362cd8370ddd336774d6743595", + "sha256:369d2346db5934345787451504853ad9d342d7f721ae82d098083e1f49a582ad", + "sha256:3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651", + "sha256:44ff04138935882fef7c686878e1c8fd80a723161ad6a98da31e14b7553170c2", + "sha256:4b1030728872c59687badcca1e225a9103440e467c17d6d1730ab3d2d64bfeff", + "sha256:58363dbd966afb4f89b3b11dfb8ff200058fbc3b947507675c19ceb46104b48d", + "sha256:6ec280fb24d27e3d97aa731e16207d58bd8ae94ef6eab97249a2afe4ba643d42", + "sha256:7270a6c29199adc1297776937a05b59720e8a782531f1f122f2eb8467f9aab4d", + "sha256:73fd30c57fa2d0a1d7a49c561c40c2f79c7d6c374cc7750e9ac7c99176f6428e", + "sha256:7f09806ed4fbea8f51585231ba742b58cbcfbfe823ea197d8c89a5e433c7e912", + "sha256:90df0cc93e1f8d2fba8365fb59a858f51a11a394d64dbf3ef844f783844cc793", + "sha256:971221ed40f058f5662a604bd1ae6e4521d84e6cad0b7b170564cc34169c8f13", + "sha256:a518c153a2b5ed6b8cc03f7ae79d5ffad7315ad4569b2d5333a13c38d64bd8d7", + "sha256:b0de590a8b0979649ebeef8bb9f54394d3a41f66c5584fff4220901739b6b2f0", + "sha256:b43f53f29816ba1db8525f006fa6f49292e9b029554b3eb56a189a70f2a40879", + "sha256:d31402aad60ed889c7e57934a03477b572a03af7794fa8fb1780f21ea8f6551f", + "sha256:de96157ec73458a7f14e3d26f17f8128c959084931e8997b9e655a39c8fde9f9", + "sha256:df6b4dca2e11865e6cfbfb708e800efb18370f5a46fd601d3755bc7f85b3a8a2", + "sha256:ecadccc7ba52193963c0475ac9f6fa28ac01e01349a2ca48509667ef41ffd2cf", + "sha256:fb81c17e0ebe3358486cd8cc3ad78adbae58af12fc2bf2bc0bb84e8090fa5ce8" + ], + "version": "==2.8" + }, + "jinja2": { + "hashes": [ + "sha256:93187ffbc7808079673ef52771baa950426fd664d3aad1d0fa3e95644360e250", + "sha256:b0eaf100007721b5c16c1fc1eecb87409464edc10469ddc9a22a27a99123be49" + ], + "version": "==2.11.1" + }, + "markupsafe": { + "hashes": [ + "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473", + "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161", + "sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235", + "sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5", + "sha256:13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42", + "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff", + "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b", + "sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1", + "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e", + "sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183", + "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66", + "sha256:596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b", + "sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1", + "sha256:6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15", + "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1", + "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e", + "sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b", + "sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905", + "sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735", + "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d", + "sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e", + "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d", + "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c", + "sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21", + "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2", + "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5", + "sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b", + "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6", + "sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f", + "sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f", + "sha256:cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2", + "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7", + "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be" + ], + "version": "==1.1.1" + }, + "pycparser": { + "hashes": [ + "sha256:a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" + ], + "version": "==2.19" + }, + "pyyaml": { + "hashes": [ + "sha256:059b2ee3194d718896c0ad077dd8c043e5e909d9180f387ce42012662a4946d6", + "sha256:1cf708e2ac57f3aabc87405f04b86354f66799c8e62c28c5fc5f88b5521b2dbf", + "sha256:24521fa2890642614558b492b473bee0ac1f8057a7263156b02e8b14c88ce6f5", + "sha256:4fee71aa5bc6ed9d5f116327c04273e25ae31a3020386916905767ec4fc5317e", + "sha256:70024e02197337533eef7b85b068212420f950319cc8c580261963aefc75f811", + "sha256:74782fbd4d4f87ff04159e986886931456a1894c61229be9eaf4de6f6e44b99e", + "sha256:940532b111b1952befd7db542c370887a8611660d2b9becff75d39355303d82d", + "sha256:cb1f2f5e426dc9f07a7681419fe39cee823bb74f723f36f70399123f439e9b20", + "sha256:dbbb2379c19ed6042e8f11f2a2c66d39cceb8aeace421bfc29d085d93eda3689", + "sha256:e3a057b7a64f1222b56e47bcff5e4b94c4f61faac04c7c4ecb1985e18caa3994", + "sha256:e9f45bd5b92c7974e59bcd2dcc8631a6b6cc380a904725fce7bc08872e691615" + ], + "version": "==5.3" + }, + "six": { + "hashes": [ + "sha256:236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a", + "sha256:8f3cd2e254d8f793e7f3d6d9df77b92252b52637291d0f0da013c76ea2724b6c" + ], + "version": "==1.14.0" + } + }, + "develop": {} +} diff --git a/group_vars/batterup/vars.yml b/group_vars/batterup/vars.yml index fdd27ef..b19d727 100644 --- a/group_vars/batterup/vars.yml +++ b/group_vars/batterup/vars.yml @@ -9,11 +9,11 @@ virtualenv_name: "venv" user_name: "ubuntu" server_name: "unglue.it" wsgi_home: "/opt/regluit/venv" -wsgi_python_path: "/opt/regluit/venv/bin/python" +wsgi_python_path: "/opt/regluit/venv/bin/python3" git_repo: "https://github.com/Gluejar/regluit.git" git_branch: "production" le_endpoint: https://acme-staging-v02.api.letsencrypt.org/directory -alt_server_name: +alt_server_name: '' ### Variables in settings.prod.py ### mysql_db_name: "{{ vault_mysql_db_name }}" @@ -24,10 +24,6 @@ mysql_db_port: "" email_host: "{{ vault_email_host }}" email_port: 465 default_from_email: "notices@gluejar.com" -broker_transport: "redis" -broker_host: "127.0.0.1" -broker_port: 6379 -broker_vhost: "0" ### Variables in common.py ### common_keys: diff --git a/group_vars/dev/vars.yml b/group_vars/dev/vars.yml index 0328c3a..71e789d 100644 --- a/group_vars/dev/vars.yml +++ b/group_vars/dev/vars.yml @@ -9,12 +9,12 @@ virtualenv_name: "venv" user_name: "ubuntu" server_name: "m.unglue.it" wsgi_home: "/opt/regluit/venv" -wsgi_python_path: "/opt/regluit/venv/bin/python" +wsgi_python_path: "/opt/regluit/venv/bin/python3" git_repo: "https://github.com/Gluejar/regluit.git" -git_branch: "lencrypt" +git_branch: "py3" le_endpoint: https://acme-v02.api.letsencrypt.org/directory #le_endpoint: https://acme-staging-v02.api.letsencrypt.org/directory -alt_server_name: "ondeck.unglue.it" +alt_server_name: "" ### Variables in settings.prod.py ### @@ -24,12 +24,8 @@ mysql_db_pass: "{{ vault_mysql_db_pass }}" mysql_db_host: "{{ vault_mysql_db_host }}" mysql_db_port: "" email_host: "{{ vault_email_host }}" -email_port: 465 +email_port: 587 default_from_email: "notices@gluejar.com" -broker_transport: "redis" -broker_host: "127.0.0.1" -broker_port: 6379 -broker_vhost: "0" ### Variables in common.py ### common_keys: diff --git a/group_vars/dev/vault.yml b/group_vars/dev/vault.yml index d7be2a2..bb01a3a 100644 --- a/group_vars/dev/vault.yml +++ b/group_vars/dev/vault.yml @@ -1,94 +1,99 @@ $ANSIBLE_VAULT;1.1;AES256 -30633865666264376663633963323833313466633536613666613765616262333462393165656466 -6133643438663932356165613566363839373438366361300a633739323430643736356364383837 -64323731386363373832386363326333303130646230306233663233383362396132396135333762 -3837666339376139340a623738343434376365393137326439313435333832623130616462656531 -37616330366138666666653731613237336638333537633765663465353337383134613138363730 -38656265636262623463343064373330363465353632616532616336626132353832633564393732 -61643032343564323766303366373335653333633663643436336461326438386236656562356134 -61376133373738393530333765373432376662363361666437303130396136363432356632326135 -38373065656432316235366332666265383962373934363136623937623364383863303163336437 -61626235343236363563616236396238643063303731616635313661343561373338313864343736 -31653465653232333730356539616136313938353462326134636235653036376464313534306464 -61633531663032653035633734373639333963633631333338333463313165336565303439393063 -37663761393662316531303332316330313761306137333437643262303632396237386365303935 -34323037353766396465333463346138623532396436343033643737653766613533303536383532 -66333561306637343935323865376334616331646237653463613337633234346361303666303439 -64626466313061646565303331376330396638643137303963666165663463323864626465363937 -65313664303538616662363865616336333635643066663533616333633263333439623231613430 -61393337396365356163623262646461383732396534626663306163613731646664356136353764 -31333564356332643861383238663237383938643164396564323862643634333363353234323839 -65613066656537366266633961633962353532666230376434373063643263313966643234333539 -31346335373363383439393362313439313037346338656161643632326661356661386530363464 -39303834646130636562383562363539356462623039656631643661343137623964623730363365 -62323030316534326562303031386233393739356531653134323638306263323163616237323933 -62326233383963326430623461636139303962316662373065353735316138316231353534346333 -62323236626239666234343831346366616639373237326139636230623535656263396366366631 -35373132313432393435333534626539393435336632386630323566373532353631356132313363 -61373434643161383338313331393363626133323662623637333836613864643362396166656133 -64303238346232633339343334626464393165396532306332323766356161623834623535333038 -32633561383537663433646531346264313231656237383832303036313734383434316164333532 -62633135653034663433383731616462666431663236346631393165633031323432323531373630 -31393636626630623639633235386335663138393664356635666563393666393261353436393435 -33353338623266396436353961663265383962633662666362383136326666656331326165383063 -38613361633735616533663961363538613130663861383666326332353334383734353737393763 -64313766336430383436616438386636616334393538636438386561376166326234323735343939 -30633739363565636265643932616163363730373236303831353164373430623335316264306164 -35363336373539336464623666383261656636663463636437643032343838353938356564386162 -34656239636162353935353538323761343332353936373464356665306432356561653536623539 -38303935323238343134653338373865356435633066303230653066356230326330383863383834 -33623630346566396139646165653135626338363561646637353065626262356439616632326533 -33656538376565313636616531343863663430383734343264623862306366636136653338616166 -66616330643331613466363637663234663866616534313934343631616361383135303864303939 -62303633366532666465643139613762623763623162666535663737383834373539623832663834 -31373366363136316230656637373265666563373034313764383465326530666139393439393430 -34626133353662626461333838666635353631616461383730663033633738376461393264323964 -66343633623130616337333336343430613665336162613836353034313631613334653738383233 -64343362663164306164616466313139636563623062333361326530313033323430313734336463 -34326239623638323036393831363431653330373035303561376466383965613336356632303830 -64373536633463396534326661383364643935303765623038626462313130626337626265353562 -32353835373338636461353830373334633634373838386538393965343162626532366131306164 -38363865633533316334633737333032623638666131626339613539363638386637623534653833 -61363664666362636461373138366236336636663865666434386262613665616334303462666464 -36306661326662363631316161336539636635333232663235346530303637386362373462346365 -37653562363431386534633563653164636336396466393536303333663135633261343136313966 -31623531336265376632653632306331333962393261643339313666626164356463393839323637 -64383631643963663635383136366430386661633237653963346538663565396635643232313334 -31313563656234613266643331316163633735393639353062356431663962393731303765623263 -30666535383330313638376361333262313139626363373237663161306236363162386233616333 -31633865633161333362346635396238376632366566366565306661356137653934356633663064 -37396163343835363566376265376638653866386365386339656162653634356133653862616161 -37356364663235323532393235636562363435336562633662626438626537363336313639646534 -38373062656230633936393930343766323030643639623130663165633239663931333838343066 -35653430623038363033633033376265666632306562343530363438373962396663653034633935 -30383763333634393132383364323632353230323762653938386638326238663030333037616130 -34366537383037336366366239663231303363383430393031316539326563366132616663666630 -35313537396135353633643865336531666364326264313761333462386233303136333438643565 -65633832376633663232343032333530643638356361333863623964393337323732326133376532 -62343061616564356238643037303164623435396331643634396239613036623562613264663132 -30373137653565386561636662396363383462643233303337636438343161396361373338383439 -33376631376339666364636361303565303164326661666634623735313038666533393032306536 -63373063313639373063653537666462663261653439663830353661316331376636353631613130 -33663064613231323131656132643561383131336130373634323536633432626638323835636161 -30646432336430396138363939643335393864656132343265336466343961653839316238623364 -38323565393338333134386631633835663231653539396533333133343133373339346466353735 -39363834646532306535393861333738653039313336653337363435346438633231353030346130 -37323538633661623035633365386437346339393234613136373233623532326333346437646237 -35633933616635343737343437653534636634323038396338363263666265633735376435643364 -33346335366430343565343863363363303339656365663362653939323339613865343031323131 -39326463366536633439353432306264306563663330356136373235656537343430653061333031 -61366230353862356165633737313536326164323631663432623662343231646533343138366334 -38313338353033323535303431313338366534356336613138376233323937616363623835643765 -63626131666234326664313936316237633334633432316236333066623432623465653730383766 -33393036613335396130666662613263636666383135623162393862393030646366643535363664 -32396137636236656666636336356537663935663433313035343034326235663235383665333864 -62366132656462396135303131386236613932383164306635623839386331393837346661373433 -65366362313138373165353739376237363838356235326337323831383764636565636334396637 -34373064666663633361666532626462323431663234313562626530396262636265346330663564 -62633131623438623165653935303336663734373539656266373833343830303633623735323063 -38393739316431336562353465393935653932356164656366336639616432646162633863346436 -39383465393333313862666133393661616131383433643436623262636562303538303136333966 -63616134616131306665396430633965333832623437326366393239393539343236363936626135 -61366539613132333030326432333837333566666263373862646163633532666231663439313266 -36656361393830613733626132326132613663666235306338346338646364303139616363396139 -33316135323863623737646638623239386465646135393733626632363834343137 +39336162346264313236313138623663366536393965376631323536376165363836313563333231 +3831393463393462343165343765353231393933663663310a326261323533393366653634383630 +39666365346531613737653964376231383832396366366135386233393639343861633536623435 +3362393263613834660a356564396135643736336238313265393130366161616636336462333531 +39623366393661373032356136343536313062373637373632653263376537323165346161336633 +64303638663864613134643164396661626535626138663366343063633134306633303734353931 +66613661643336646135323864323164613965323631323330666164303931383430663063653331 +33333133383462333163313132386365633564323161333235616136613639613863313933343561 +36313563613761363330663264363337353264343663343734373235383262643165623630646337 +64363530383361333937323861306663383566343463353831366161663933363362343662643731 +31326632656465623332356538346561306533386431646163306630343538356635646166336663 +36626566376437363261646335626338366534376136366664336361393534313337323164626434 +36373364656663653330633663356238306433303638326331373338376631376536333866343630 +39363836353764373161666235333631336661383166323232336630663139386232633137663139 +62383665663335633563633836333934616235326366386266393237656564633230653732353366 +31346132656237326562656539643237656633326565376635373531363836636532343834336562 +30656533633835633639623562313464623937313461386630303636626430666139303663303534 +32316433666263636135663863303431643236343966306234316538636637376530323630613666 +37336463303331656335363539303161663435333431386337653930633162383733303032393439 +63363232616534626563336338366463653666383737616536396261346461643661646430383262 +31623435346239306332323166306262343466303636663663303532306161313137393137396537 +34303232613337643765623238366565373039353662306131633938386133303336323738623263 +31626432303735663032633362376437633430363338396232376235346531336637613030623466 +62393931666630623732363932616362663932653132323564623761643234636664383232363263 +31356331336430363632363337306264336264396366653739323965336165623132366638666262 +38323365366163633033303534643836666361613063333530353536393334336437656137353662 +37316536343739643834326534366632343662343633333261323861376330616531306234343562 +37393233353762636463346333643938633930346162653163393832373330633933633433313333 +39323833336131666539386638383834323765396637613538653335616133633561393731666233 +65656664306139383237366566623866386531333533663063646566616435643666633938663937 +61353437626432323233636532633661656464663362663665353532656465313335326238653333 +62643437373934326466333736656665336661656462343635626139373165393232306530656561 +35376466633630393662623165666164316339613032336161386138303538616637383665623966 +39663338326530643833383834386164626337326236316331383664353465643465656665323963 +33643134626134626139343138363232666464623732303435613833666638613065323635336565 +35313531393630363038363961656364306335633937393338626363376637663833306132343238 +30306264396164313263643932306432313364353964663361663964613161643834353538653430 +37383035643463613662336364663531396635353861666635303538396561333331646666346662 +66653630326362653562383565306231353261363265636361633464633536376538646566626461 +62626163383166656531633337613637323163663533343935393735366532373764386139383734 +63316237386331383230613964313234383934343764303866336631396133386231663338333863 +61326566376665386462343432643236356530643633666534666163663238323137363164663733 +39376639326634656361313636626533353562363165313730623937343461333836316532396165 +37366437626362643832653435373834366365343537316530333236376130333465653631613566 +36613637343737613663313865386165303832633535613161316237383338383236383465366237 +33623636363534313433376331313730373430633962653035363164623531306364616266653965 +61393939313133333539626639643266633231356563383932623066663530333732336461306431 +35333862373566663663306663656262653134633033383336663163316131316233323932643865 +32656132363931613966336330643335643833626139346335313164383532393435633766303263 +32386338383730653732316162313662313562643038343533383761323463393831386236373434 +38336239636639363463386364646564363032653535376339393130353861666336653433333537 +66666364343935333534613438356336653637366161633163356130666132616464663861613839 +31616166353761623739663031396263353066396661343937636439386133623837386530633132 +37303065363936343634653331633133616333623632653738633232343637323766643430653833 +31666538633536313731366638633838333534353063613430623833383234313666356463343436 +65626635643431363363363136396133656166326335303537313266343831363230326464633632 +33316432656662353764626362323935393065643230303966323531613266386533636363643163 +36366239613430616239303434643132336639393634333931323137393066303262636539643662 +66643461323837306265313738636337343231336238643936336334666665306363663861356236 +32376365313434643162636661643737663838326535333833363833313930396135396664383265 +34333332343231386632313464626634613963623330663838656263633162623333646262346439 +30306136306330623063323734333137386139336432336361353836363566343632323637373130 +32623234393064316165663139396530323435663039396331366364303932663166393234393664 +31356262396333306463656237333462343535373836316430636238336466346162623639366466 +36356437323234613336336163396635363037656531353735633435326261383634396330333761 +34333662653833356263386135303964386361393838633239633033346537663766333538336335 +35633535613466626565393561623731353336613431373933613330353332656464323761336438 +64316138633338376537393962623532363766336639343861383930633138653564333934343064 +64386138326237306165333666626661313634663363643733346431323732386230303630373164 +65393332326434336231353062333065386331376233346130633532383431333937666364636163 +36656536636631626166356164303631313731613031643634643736366432626438383431663638 +65643161323437643134363531643033393734636533303931656563386330363164393061393339 +65323432343662353038633835366535323535363137393533333365653434316362636163633736 +30366238313962633334663065333935346261663838323232663238356635633235383536393532 +64613134326161396565626335336664663731643633653737326231656535393730393439323132 +31663736633330343564353664306661373962353863386530656134656534613835333339613334 +37656463393165643066333866386134383362653362393238346230336237353039656438343666 +32393563373962643233666238633763636265393033353465303934613962613539333536623432 +37336133313933353938323739386136643566343266633730613066383763346363633738346163 +32336133343035323537613936326463313439353331346565656164636332303038383638363936 +63663961363761333766303063616130373634333134663962316132633534633433326538386165 +33353236383366343933633631313235316264656634663031646166663066303232323566656237 +39643932333432373832393432316361663934353435363730303463333739646635323265343434 +32343731623436626131636430656134633137623830373937393165626165663436326663613764 +61343439633934303861353561653966313364653436666631366533356162616164663563353837 +64656562653033633165343131613730313637373837623964653439653666333938376230303939 +36393435373636643633386234346334346166326538303465363232646339626430313439306638 +38336532383664666635376438366466643864326438373265663266353438303839313163323332 +33663665633738633838326364356434353030386164653064343839376135616137336239336535 +63306563313137633436653861376561306433663938363330393265383762333439393634353861 +32633363323564333539353137323332356132666662613635393061373033643664643536326437 +35373937633136343461306132633463623230373936353033306366306234636131373437616365 +31613539623766306339356531313463353034666237616565346664626666646563343635663139 +38626464303139373465623265383864353538333430396635313937346131336564356664346463 +33663131616631383266623064616264643565316562346139643364353539363335333963656564 +39326666646665666235303037373563366461386632303437373130626435643666636165313131 +36356363623730326538613630353236383063316165373533336235646563646437636535343762 +3435303031373461356261313439623831313066613539653963 diff --git a/group_vars/ondeck/vars.yml b/group_vars/ondeck/vars.yml index 8c099d4..40f4967 100644 --- a/group_vars/ondeck/vars.yml +++ b/group_vars/ondeck/vars.yml @@ -9,12 +9,13 @@ virtualenv_name: "venv" user_name: "ubuntu" server_name: "ondeck.unglue.it" wsgi_home: "/opt/regluit/venv" -wsgi_python_path: "/opt/regluit/venv/bin/python" +wsgi_python_path: "/opt/regluit/venv/bin/python3" git_repo: "https://github.com/Gluejar/regluit.git" -git_branch: "master" +git_branch: "py3" le_endpoint: https://acme-v02.api.letsencrypt.org/directory #le_endpoint: https://acme-staging-v02.api.letsencrypt.org/directory -alt_server_name: +alt_server_name: "" + ### Variables in settings.prod.py ### mysql_db_name: "{{ vault_mysql_db_name }}" @@ -23,12 +24,8 @@ mysql_db_pass: "{{ vault_mysql_db_pass }}" mysql_db_host: "{{ vault_mysql_db_host }}" mysql_db_port: "" email_host: "{{ vault_email_host }}" -email_port: 465 +email_port: 587 default_from_email: "notices@gluejar.com" -broker_transport: "redis" -broker_host: "127.0.0.1" -broker_port: 6379 -broker_vhost: "0" ### Variables in common.py ### common_keys: diff --git a/group_vars/ondeck/vault.yml b/group_vars/ondeck/vault.yml index d7be2a2..e7ee42a 100644 --- a/group_vars/ondeck/vault.yml +++ b/group_vars/ondeck/vault.yml @@ -1,94 +1,99 @@ $ANSIBLE_VAULT;1.1;AES256 -30633865666264376663633963323833313466633536613666613765616262333462393165656466 -6133643438663932356165613566363839373438366361300a633739323430643736356364383837 -64323731386363373832386363326333303130646230306233663233383362396132396135333762 -3837666339376139340a623738343434376365393137326439313435333832623130616462656531 -37616330366138666666653731613237336638333537633765663465353337383134613138363730 -38656265636262623463343064373330363465353632616532616336626132353832633564393732 -61643032343564323766303366373335653333633663643436336461326438386236656562356134 -61376133373738393530333765373432376662363361666437303130396136363432356632326135 -38373065656432316235366332666265383962373934363136623937623364383863303163336437 -61626235343236363563616236396238643063303731616635313661343561373338313864343736 -31653465653232333730356539616136313938353462326134636235653036376464313534306464 -61633531663032653035633734373639333963633631333338333463313165336565303439393063 -37663761393662316531303332316330313761306137333437643262303632396237386365303935 -34323037353766396465333463346138623532396436343033643737653766613533303536383532 -66333561306637343935323865376334616331646237653463613337633234346361303666303439 -64626466313061646565303331376330396638643137303963666165663463323864626465363937 -65313664303538616662363865616336333635643066663533616333633263333439623231613430 -61393337396365356163623262646461383732396534626663306163613731646664356136353764 -31333564356332643861383238663237383938643164396564323862643634333363353234323839 -65613066656537366266633961633962353532666230376434373063643263313966643234333539 -31346335373363383439393362313439313037346338656161643632326661356661386530363464 -39303834646130636562383562363539356462623039656631643661343137623964623730363365 -62323030316534326562303031386233393739356531653134323638306263323163616237323933 -62326233383963326430623461636139303962316662373065353735316138316231353534346333 -62323236626239666234343831346366616639373237326139636230623535656263396366366631 -35373132313432393435333534626539393435336632386630323566373532353631356132313363 -61373434643161383338313331393363626133323662623637333836613864643362396166656133 -64303238346232633339343334626464393165396532306332323766356161623834623535333038 -32633561383537663433646531346264313231656237383832303036313734383434316164333532 -62633135653034663433383731616462666431663236346631393165633031323432323531373630 -31393636626630623639633235386335663138393664356635666563393666393261353436393435 -33353338623266396436353961663265383962633662666362383136326666656331326165383063 -38613361633735616533663961363538613130663861383666326332353334383734353737393763 -64313766336430383436616438386636616334393538636438386561376166326234323735343939 -30633739363565636265643932616163363730373236303831353164373430623335316264306164 -35363336373539336464623666383261656636663463636437643032343838353938356564386162 -34656239636162353935353538323761343332353936373464356665306432356561653536623539 -38303935323238343134653338373865356435633066303230653066356230326330383863383834 -33623630346566396139646165653135626338363561646637353065626262356439616632326533 -33656538376565313636616531343863663430383734343264623862306366636136653338616166 -66616330643331613466363637663234663866616534313934343631616361383135303864303939 -62303633366532666465643139613762623763623162666535663737383834373539623832663834 -31373366363136316230656637373265666563373034313764383465326530666139393439393430 -34626133353662626461333838666635353631616461383730663033633738376461393264323964 -66343633623130616337333336343430613665336162613836353034313631613334653738383233 -64343362663164306164616466313139636563623062333361326530313033323430313734336463 -34326239623638323036393831363431653330373035303561376466383965613336356632303830 -64373536633463396534326661383364643935303765623038626462313130626337626265353562 -32353835373338636461353830373334633634373838386538393965343162626532366131306164 -38363865633533316334633737333032623638666131626339613539363638386637623534653833 -61363664666362636461373138366236336636663865666434386262613665616334303462666464 -36306661326662363631316161336539636635333232663235346530303637386362373462346365 -37653562363431386534633563653164636336396466393536303333663135633261343136313966 -31623531336265376632653632306331333962393261643339313666626164356463393839323637 -64383631643963663635383136366430386661633237653963346538663565396635643232313334 -31313563656234613266643331316163633735393639353062356431663962393731303765623263 -30666535383330313638376361333262313139626363373237663161306236363162386233616333 -31633865633161333362346635396238376632366566366565306661356137653934356633663064 -37396163343835363566376265376638653866386365386339656162653634356133653862616161 -37356364663235323532393235636562363435336562633662626438626537363336313639646534 -38373062656230633936393930343766323030643639623130663165633239663931333838343066 -35653430623038363033633033376265666632306562343530363438373962396663653034633935 -30383763333634393132383364323632353230323762653938386638326238663030333037616130 -34366537383037336366366239663231303363383430393031316539326563366132616663666630 -35313537396135353633643865336531666364326264313761333462386233303136333438643565 -65633832376633663232343032333530643638356361333863623964393337323732326133376532 -62343061616564356238643037303164623435396331643634396239613036623562613264663132 -30373137653565386561636662396363383462643233303337636438343161396361373338383439 -33376631376339666364636361303565303164326661666634623735313038666533393032306536 -63373063313639373063653537666462663261653439663830353661316331376636353631613130 -33663064613231323131656132643561383131336130373634323536633432626638323835636161 -30646432336430396138363939643335393864656132343265336466343961653839316238623364 -38323565393338333134386631633835663231653539396533333133343133373339346466353735 -39363834646532306535393861333738653039313336653337363435346438633231353030346130 -37323538633661623035633365386437346339393234613136373233623532326333346437646237 -35633933616635343737343437653534636634323038396338363263666265633735376435643364 -33346335366430343565343863363363303339656365663362653939323339613865343031323131 -39326463366536633439353432306264306563663330356136373235656537343430653061333031 -61366230353862356165633737313536326164323631663432623662343231646533343138366334 -38313338353033323535303431313338366534356336613138376233323937616363623835643765 -63626131666234326664313936316237633334633432316236333066623432623465653730383766 -33393036613335396130666662613263636666383135623162393862393030646366643535363664 -32396137636236656666636336356537663935663433313035343034326235663235383665333864 -62366132656462396135303131386236613932383164306635623839386331393837346661373433 -65366362313138373165353739376237363838356235326337323831383764636565636334396637 -34373064666663633361666532626462323431663234313562626530396262636265346330663564 -62633131623438623165653935303336663734373539656266373833343830303633623735323063 -38393739316431336562353465393935653932356164656366336639616432646162633863346436 -39383465393333313862666133393661616131383433643436623262636562303538303136333966 -63616134616131306665396430633965333832623437326366393239393539343236363936626135 -61366539613132333030326432333837333566666263373862646163633532666231663439313266 -36656361393830613733626132326132613663666235306338346338646364303139616363396139 -33316135323863623737646638623239386465646135393733626632363834343137 +36653934663338393335393632356261363930353165613838643536336230313534363065303830 +6561313937306238363062373565626262386137393537310a313938663837373063383332363036 +65326130306633363138313162623334656166613336363330656261306363343438313930343837 +3763383536383130660a393730313464376264333834326330633431613938333938626239326434 +36633936666232313930633332666636306165303265333738313432326339633833333665633338 +63373638383863336434326536373931643536626133393931393562663133346131343864623733 +38343235633566333031643932663365323664636339366138346662356236616639613034346661 +36363466666637646130613962343933366265633365316364623762643061663334393762396665 +66373466383335336538633431643661356163636461386566366134383332656434663436613234 +35356432613033376239376334356663346462653964313863326363323961346438333331376139 +33663639646164356461393066303839666630353539313161356439336530636461326137303564 +34633138326332636166333932623762373334353565646531666231623035653134643133386664 +33633938383939313761616639393964626531393831653064656237386561613734663534633234 +64393033333539333835356461363839326133356366363238353566626635656637323862383238 +66323139353639613734396437363865613837383961316431653335396466613834643966396366 +30313765613330393965333235373731613765343232316265626563343764316434646666363035 +33313064653534396563656365333064616332353639396639616666383636363430653231643439 +33333736346130626164306431346461343832623337363539383531323137353035333732323062 +37366330313336653130326137373032373333373235333063616664346232396265353236323563 +32333564353337613636356337386432393964306666646535616637653038316530396130623338 +36626532366361386434373664323230663766393362336564633639363064393863616266383133 +30336463356563323161346361336136383730663335303166613438343165623264623562663236 +39653262613036303739396631326262663235303934646438636534373732396130663338303134 +65643762343930346164326434356235633937336335666134323761643137363538376564383139 +30386238353637633564363438383533323034346661303866313761613038386265323663393361 +31346430363265636636623061653663303862633862613831396639346134393139633364636534 +62383136303938623132346266663631633766373033363661383736373338313339383234666338 +37363939333732646562663430633331326235633937613935363562383063336363393033663636 +63633934336164393335666334333036363266666636646335396534383262363135643438333935 +62376638356133346263633035303432636162326363666161613566626437363430393433303062 +65323730333131363134653733376166396432393339643436323465323039313766313134373738 +32653938396533346261613630393666613032363966363537633937313537613035656130623137 +37643763623462303566346538306562663036663031663437663732313963393862376437613562 +63326639303065303161323832316534303163626534666634653966313363353035356538376566 +37336635656136383930316266646262353037353333356237306536363564626665656431633261 +33616163316563346438343533353232633261323061323266363330336437653139306136666533 +36393033633730336537336233313834626266363333396265633164303939633536303534343533 +35643761323562633565376130383632346366636632353838306464623235306231376431613566 +39393832653165643666653765333134633365656233646236376439653232323030633962333162 +36383430633638303864373739616533656530633730326536653739376538616666316133306330 +37633465306539356263323138366463333133613436383263363936363262646362333839366536 +30376334346264313935656631643538313634333061663766323031313061633661376534333835 +65653535646438373535653866633664306163373263333536333665653762363037306431363263 +61633831316564666131356230336232633337373638316661393561616635386631346336386633 +35333331306236343139643437356363633931626437633632653930653164623266663565623061 +39326464653432333463653661653463356265303137373064393839623435663730306164646462 +38376266356335383565636434326231653565636534383439306130396338386639613536373464 +65383031626566353836613736646566323264666538613435636530643262633630356636373566 +30643539303761643366613437363230303333636538666337336538363032316336643862383164 +35613839326563386132653965343430343064313362363062386133316633336434356531653130 +62353061666235666638316265333939303234646631303662363238613063303766633135656130 +65316661336138666334383261333635306437656432333661623435353563343735313230376534 +33343961353036663334363164666366353538313364613837656461323262346565316265363936 +66326437363263323461646536663062376334613664343737333836353536666631653336626632 +38303565396338393463333039343031373935376665356137646539313263383961346235313662 +62396539616461393838383637326462326330356161633263363737333034636630306462376361 +37353034663331373730623239343763613665383861343933316635303436356533356530643831 +65623665326434653037383632316461373135383065323766396631396433313037366536373533 +39653630323734376565653764343735613537326166323533663639366466303764303332396566 +63633165353638316435376665386632326335666134303939636263626462316234623238363436 +63663061303133656538643930373030316230383265323763643330643332326265376331363837 +37623366336231646639623534313830663238303466316561353639353034636366306139646434 +34366238303733356639656332323363633135656330376336346239356465333565663137613631 +37646664643066616561303838393138393530363939366439386562303136326565343066303738 +36616264313664623062663732656134613238346461343835653862303861386334343265386561 +33633863383065396436373930333039626630333631636362383862653138333634323034353937 +36393637303031306137633931323832626462373838353461313263623639323034616163393236 +63613131353062316237376662326533373137333762623563396636386437616134313166663036 +61363263356266643465343938636638313763623965356137363836636666336439616238313130 +66643261353133666537666663613662643231366666613833316639313136303039633266663330 +33353130383437326632376537376338383230356532353862626133613031653762656536663937 +64326439313563376436656237316536336361306365363637313536353163363333313365653264 +30366233306536356661333939343033396365653539616632616135373761366237323832643039 +36633536373666363436633365313933306135323735633863616363623764626565653234646534 +61653734366265646338366166356138383964653162646361626362666435613564346532643934 +64396666363233336335373664343335323564343765346562663135616665363230633131616266 +32393938313563306538383664363138386435353731366636393431663163643039643236633462 +38643833306135353064646336383335373438643732623765663663663439336362623937616635 +36373537343663636637663066336165656666336136636661353539383139306438306535356264 +62613663663163653332383431336362613630613465346232613662633564613463373432383430 +64646636623462363039353863383231316539353163373565316338666363623262623237633464 +30386530383764646535316137646533306136373862353431636637313964663039626335353133 +34363934373039643763343235356462353233396365306165623535356162386463333339313030 +31356336333866633736326361373431373030373831626637613734383438336166326234396366 +31306234343961623464376337633564383533643534363766616633616564386533623766383332 +35373331626365306139666266303738343331386336373732323737343332663037613461393661 +65313663313531373764356531633962616538326631663138383162663733356530396630306165 +62303838626265643231316430346331323832343933643065616437666536333536313536626639 +30633266366137363639356534666638313038643431353861326162353032663834643438316235 +34613339323762303865663634336330303532613933393033656531656633316536663533353137 +65666531643230386336326533336233326134663636323734643266373030353030643631383863 +35353133303530363766353333663639643635373865653332323366633864366561323439613861 +65383039323564386334616665386565643766313363626561616165646433356138653064656665 +30303263626661356133653138623232373739656565353734343531336438383361666663396162 +39313230336235336561326465363362346131383932333832346435643932653566663839386162 +66646537616162666239373064343839353333643335666264326538396561663964643465646561 +66373436666336636638623166306537353239666366666434656330383532356466623566616239 +6562366635616339313163363965623337643164643032653635 diff --git a/group_vars/production/vars.yml b/group_vars/production/vars.yml index 2111fce..930be65 100644 --- a/group_vars/production/vars.yml +++ b/group_vars/production/vars.yml @@ -9,10 +9,11 @@ virtualenv_name: "venv" user_name: "ubuntu" server_name: "unglue.it" wsgi_home: "/opt/regluit/venv" -wsgi_python_path: "/opt/regluit/venv/bin/python" +wsgi_python_path: "/opt/regluit/venv/bin/python3" git_repo: "https://github.com/Gluejar/regluit.git" git_branch: "production" le_endpoint: https://acme-v02.api.letsencrypt.org/directory +#le_endpoint: https://acme-staging-v02.api.letsencrypt.org/directory alt_server_name: "www.unglue.it" ### Variables in settings.prod.py ### @@ -22,12 +23,8 @@ mysql_db_pass: "{{ vault_mysql_db_pass }}" mysql_db_host: "{{ vault_mysql_db_host }}" mysql_db_port: "" email_host: "{{ vault_email_host }}" -email_port: 465 +email_port: 587 default_from_email: "notices@gluejar.com" -broker_transport: "redis" -broker_host: "127.0.0.1" -broker_port: 6379 -broker_vhost: "0" ### Variables in common.py ### common_keys: diff --git a/hosts b/hosts index 0fb51d2..6fefdf0 100644 --- a/hosts +++ b/hosts @@ -1,6 +1,6 @@ [dev] -regluit-dev ansible_host=m.unglue.it ansible_user=ubuntu +regluit-dev ansible_host=m.unglue.it ansible_user=ubuntu ansible_python_interpreter=/usr/bin/python3 [ondeck] -regluit-ondeck ansible_host=ondeck.unglue.it ansible_user=ubuntu +regluit-ondeck ansible_host=ondeck.unglue.it ansible_user=ubuntu ansible_python_interpreter=/usr/bin/python3 [production] -regluit-prod ansible_host=unglue.it ansible_user=ubuntu +regluit-prod ansible_host=unglue.it ansible_user=ubuntu ansible_python_interpreter=/usr/bin/python3 diff --git a/private/m.unglue.it.csr b/private/m.unglue.it.csr index 42f8122..6220efe 100644 --- a/private/m.unglue.it.csr +++ b/private/m.unglue.it.csr @@ -1,87 +1,85 @@ $ANSIBLE_VAULT;1.1;AES256 -33383137646463656636313430396632623461646263303566333932653132313566396166616230 -6134366330653961323039316131653731663939303933390a393438323263316565346130653338 -39373533383161303737666438323761306265363236333664356463663831643133633933313134 -3464633533336162330a643566656362336261613233646638646237373139306363306133613762 -34343336373663373865353835383763356266633030643836363030643163653036636437303666 -34383764393264386238656335346634383530626266383631346637643737396333613766643061 -33613435376665633033393166343864626431336463656338653038373138626563613666633365 -64326266346433306335656165323538353334636432623062313536626364613530663862376561 -30633132376139613637646339653964626139646330303939653439613938666163363434323636 -62663430653434663633613564336533663039323937356431366338333039333435353239373633 -31346362353934393333396131663562323864633966386230396562326235333839393932633632 -32353337343637306265303462333861316432333436346131363263363632373430376263633030 -33323061653465613839613161323936626263313561333763353366646435316233303763373731 -39643664356663306636386465346436383037393835643865396635313935326238623130343931 -37373461363635313337326634373832363130653966663839353232366264646362323137666233 -62326431356264366531363765393166343733313131373038323436326232346566363736323264 -66616231363937323437653731303561613839666232326634306433313831376461333664356365 -39363462333061623639333161346638366166386338663830343331376235653838626131656661 -64316632623562303461636465346337313135633061346330623764613561666533663937616339 -38316139643532626661623330626636326639366230323662373931636136396465306436623839 -34643539316366646433323530326630333330383464323263636333653262313464636538636639 -66353335636266613736326231643164623538633066313838656366633762303366623233613733 -31636333643935343730313962343863613762303034363837343066623964636465303235643737 -32613562316533623562616564663639393864393964613762633363613731363833626165373638 -36633764303131613862393162373866313837623965333335393538616530653732313831303536 -62313462346137383334343031353064316634636532336363356662643964306562323436613330 -37363561383937353733336537336464363636363031346230643438623430646530643463333066 -65353531313737343730333763346162613337383666646661373130366530333965386139616432 -36663330646561336539616534393261323162633730323961626136353463326532333232363163 -38643766613461636435383138326234386632363038613732613261356437653035333163313161 -66656135383864663863323039353561383262363637616337303337356361336663333830623339 -62313139633662616636363834313165376530323161356138386261653439636238346237373762 -36323631616336393930643832626534656638396666323861633531376661306136613437366465 -30353537396264393262346439633036356632633539623162316364326131613561613536323836 -34663430383864383965386363613534633165633935636236316630356231333531336465636162 -30373236383365383936383966353763323565306435343265396536316465376633323864306663 -32653131336137623837363263313837383762626131643133643735393063386266393365613530 -35333561383838393265666263633961313564666239633135316562323964343033653030326366 -66326536653330656638396235306563383866613737316633336365623237616364376133336535 -64613762636361346566313064626531333866333364343562353630633236313136363937643330 -37326136326364626539313537313131633133366534633665323234326230366264393965353834 -33353963353030323065666165653439363433323330653061656636336663636233633732616231 -35613933646131383430323262643738346234363864366163323166363166656633653137636538 -63336230646463396337666339343637663237666262353438663537643162613839353964623530 -61613434393533343232366364373639663838353137346231396464646632633265306365323465 -30633635313830343933386334333638633230393632333466396566646630363136343830306637 -36313134303833636262643039326235626538363231636136666464383663316164633266316339 -36626538303965376562636365376162343961313537303938613837383738333731376461386138 -63373362616663326537313139653864316638343230323235333239306133316166366339316136 -38323366613834616238333731326232613733633665306538643739666461353930653433363666 -37663535356533356130636632326263323439626630373334336262306364616139623933376332 -64386366333763353935653661636266666232656263396535383038373762306433363862653463 -31303730316330393961643763623730376361303063613632323834343463373966623962363534 -35666463636332656633623434633338623263666433313163323831636636653162663361613564 -32333630346237363337666362616332663937316432323836336230303332376635373038633630 -62613730623266386537393139373666366565666531663361353139386562643265393036653262 -65613931613138303733326161646435303931663039323931323634383135326331336265316662 -61656333353464353433623861313238633330636134353666633035353865663761353035633930 -32343533383366366332383734616433343333356336343637633631386430626335323063346361 -37393137643737356432363563386664313336653164646332343666396134613531356530323831 -37343836316466306531643661343962663134393134326166343265306332356231363461663234 -37366234653737333461626137336539373034346539323965636231323235376232666435336230 -32613139303461646333396534343736303365346261393765366338626538373836353861643561 -39333233393561303630623831356362393430366636323065343839373431353730353262626631 -35313135636565343838353266653532323936333437383135363433393536303234353633633532 -61353539343132343039633964333936666633623035656439636235343034306466316535343036 -31656137653861623063666132626634313663626436376362396161626634343933383936356665 -36616263613062363733383466663962623838643532353165633132323764623165613038613566 -30313434383436383063623566613863653533366365396539343237356638623766616236303833 -33636135653134653533353435616330386231323266346430646364656631303632643332643463 -35613762336434333835353438363335313039666664303930626638616562356562656335353465 -65303562333462633335663365343461653532383962663335613534353466363563633063356533 -35343732616438373637616431303264373837346533316139346633353261653734366565353563 -38646165643831323461393161303763653737666232336639343334383935326464633134326162 -33386338653135636538626466323165666237343738333430376637386334383965383061303339 -61646431313537656536396238643930363161326331626131346461633136373239356539306633 -33373439333863303935333830636333383233323565326266376532303765613938636139633437 -31313361366334633463626661316164363939623336643839653138323361623062656435346238 -61383961663033356137393162643235643839656565323832353364376532386332623163356161 -32626665323535393537323466383931353562396437613332313831353466613638663366646233 -66383734656533336133636362623261613733616531306537326463663730316562383565326232 -63646363306666323162333930663862653739393732663630336633396234353437353835393765 -30313238336164653333326365336364393832616330633534336134316132663330373132316262 -37636534613936623563373062643831653464333433623037633232396165613766356336623662 -33346432306432623539396534313661653938636436383766383634343563336563306461383864 -6638303531376437643961623934636239383730623832663561 +31656664343139373537613362396432366663313235663364313135366164303562303836316365 +3435613537616531346630623330613235343038336338660a333431653736346362353063383961 +38623236393639383636316439346261383261333365343264353831663531346362303336376462 +6230653564633961620a643930616530646234323965333439663432383261363831393662623630 +64663132383538396135663132643034663264366331313665656632646365373165346132666535 +66653061626233303463653166363962373835393735616138616432373166333138323538653631 +36346563623436626436306538363730386563353631356263613763393662646164363763666661 +37393066323239656133633666393465373132353534626436633437363732383535333736623861 +61656361633436333035643462326233326565346566313239356431346562313736666265313261 +61653532313135613566343266663366356665663234663363613138356461326266343564396537 +61323261363565373536306532373530333262363532396266356266326662666665636431653062 +63323666396237303236666439366632366366343531373363313638633235366665333133363766 +30623863356339653437663931313563343336373034613833323666396134306464323163353333 +33313334393737373238383237623836623533366233663865626531646138663463356464386535 +62626430653131353133366437383130333537306530306136373331373530343134323932666530 +38353861613239306630343535663330653139346233666532626633346535656265656633396165 +35383665636431363932353837653736343230363035366432633261356135386361316133643963 +64383262636463313864353766303362366337363064353466336631386631343431333366653163 +62363565303739633033303465643939363563373338316133336433343662653531363063306663 +66646164623934656366393561316631343832396130343934653063356462333864393536353239 +65353361333564393430353437366532613737366434643130383439663635636236396637313666 +30306364366665373236353730643036326264306330626631663163656432663861386566653264 +36316236376366303564663930646266313635386339313734346431633534386238373038386537 +39313537613265376433313130303839333861346431363735616532626237626333663932373537 +62613939666336393538363366663066366130663364333362393130646433346665303961326438 +66623637643966666661616632313266393665376334656231366337373436653965313936633238 +33363834393332383431353038326563623064656136393336316135636365663435383935626462 +63356562323835326437323338393839363234353765666363303933316665616161613134626532 +36333136616163633866626561333735663137323461653136386662356663353637303964366332 +37326331626464353832376633646661333639663233346465646435663766663362333330356561 +64346535653134663734393836326637393437396334363033363532313039646236373565646666 +63626162363032396630316264383633376334313931613431336431656564366462356536653838 +64393464376636393138326232623633626635346133363461393338376561333331386534616639 +34643833346466616532313762316664333030323764316137383264383566366636393831613535 +61643162373064343537323535306532653636663064336336663936333163303565346232316432 +39373235346163363161376131346530393539373466633265313562326337336364373661356637 +32306663336238653562313230313738633931623234313766646561643236383637663531633137 +33333735333835666264373434303734646130366464363664653639353163383931623266666165 +38303834313661626338616139336566666162396430383064383432336432653036633762323138 +33353265383031623835346633333734626566316238343731626662663866646330393135313832 +65333464383733626539383361313230323665366431386666333862326339656461383365386263 +62326265363431386433323663323462363863396362333739396637303333613338363633343831 +36663739616264646562306137323639343934653763616163313431626532306663343162336537 +37613931616637373131356437343133393538636530633237656430353631316365303537636239 +37336466656134656661613563333332306665613366333539613831373731363736303137653031 +66386631396562303564373632613137613631653730376638633830306235343630343938396562 +37356166383039396262326230656366636461663662646630643638333632646664326565613033 +62646265303833616330663566636165656265313963656635343639616132386539323837306336 +62623234396336383263336136393166663466613564323932633462323835363934343165643138 +36393931613565663564336136643562326130613638383839383064343834326266633530366565 +61623633616438356238326664666665383338353735616264643364613965616663633065343165 +33336337323462323734316138666264303965326234653630313038613365336435616465633264 +38376633613139623966643331363936623831636263386264633965383637343036663261336433 +34383461306663356438636661663238653034636565633235373965313465616161343739656637 +35306339613064376539383661656264613333353961353962376339636362383966353631386637 +36623634323533643432633738616637626665376438666437326663303330383137356631346133 +66363166363161313666346433353731656231326361643639653031663633353762613735613337 +33323831333463653362386434623436633335666238386437366534383434656136363334343233 +31663565393532316538373361646636363432303066666437613139336633306561346263626632 +65653031373031306333363365386237363135346439336465626233393439303335636266323334 +64626234633061663837613133616539353234323135626262653939343163373162316334613431 +38356661656238653433396636366536636635326434396331356661613438383133643636333231 +65376431623963373933356366646333343935666561376533623333376632346335326165353361 +34613465623562653162316139616433383436386139313131653938306537633135353134616634 +36336135373062663663343438663739643364383566383062626437306364323835383961316266 +33623138306363653933326635663563353766326534373836363462623233373832373236386630 +66363363323765663165613933303738636335333931653139303665376263303535313239653461 +33343039643334633839363238366630643561326630663736366435393138356434333734613561 +34616136393932346336333165346436626333346231653734313162616135313461363264343163 +36313762383134613935653263633866303462313634363865313664373462646339383062353064 +62343039393266636131323439356536633031626631643962373833313261636364356235333538 +33643735313830663136393936303834356235343835346162633362656362316534666261363262 +63626364326633623964383139653838316666653262653466313562626137643330343630356637 +65386363316363373837643165656463636464383233643238653630303733386430643339643836 +37663734333162366461396666663662373861613965636439306362383232356535383936653430 +39356562623935643232313730383535303934393161316630373132303966626537623766663664 +62363566323534636631333538623563613263353336373033333730313636376432343035663132 +63353562313633333464303261656639353735333461393263623930633962633366653033316361 +36366231646534656264376331333736303539396464393534313530323063303732643935656362 +31653364316463663664666430323530633033616333316533626431663439386436383066643634 +62336338613233656634303937376532646630613163346164313266663964663239373561376664 +36393038373533323531356363666337363761313835353833396338366630303234646332383761 +35613866396661646364343532313562323666393161656331646664623630623137306332306233 +65323064613230373431 diff --git a/private/ondeck.unglue.it.csr b/private/ondeck.unglue.it.csr index 04a2884..263e987 100644 --- a/private/ondeck.unglue.it.csr +++ b/private/ondeck.unglue.it.csr @@ -1,85 +1,85 @@ $ANSIBLE_VAULT;1.1;AES256 -37643132316134353730656261616165383562623539336563636334663463633730663933306134 -3335376130303265303662336131353939373731333531380a393837393232386634653833663538 -33336132326563623535363836656639363462393832326263373266303561396364346239623835 -6631303362616139620a366433636235373635383831366431626438313233333338643131366532 -62626461383937386637353033626661636264663132343462333035353661333765353139396466 -30653335653435313661653961323738303337623530666137363437623635653561313835646630 -33313366343462313233333432383263653162313162613831356234386463633335633765363136 -30666636363837623830616465626364326437303637323131346335666132633337353664633839 -33343065326438333936616163643937666537636563623064326664393762643366653365393035 -64376631326262376262306532343438643662623136643764313336373230363162386538356565 -36646333343433616137306235326265636366373864616366346437643965363035633534323939 -37336338326562343839363233303365633238396130396537363733633730653164326630663766 -36363736663539333733383037613831646537326263343938343165343337316261373430353932 -63313865323562363933303263653236333033626562663434653837313265333538343166343662 -34333333336562396664613138383266313666336135363064356137626330643864313732393834 -33633265303938616461396436643335376161346430633139306631326433333031663738386237 -37366233653032396263623831623833656366323730343930303266383135333966633463643863 -37313163623065306632326632323061393565653766646363636632393339646431646337316162 -61656363626464323166303961616135353031643031396138656132393963373934333835633233 -65646638656530383261333031353063656439396163316633343237313861396165646562326530 -63323735356664326464313064316438353039373764323866323965336631376563376566346130 -38363636373861623136303264336538326666323431316337613263393863383232373164323766 -66616562646534653432646135646332636262396461323163396237393931663364323730666139 -34646132346263346662656238396265303439356136633735376163656630616538303733643731 -64366436666633656263306535343138643137353939643361336132373731666161633738653561 -63653130613430313031663631353638623333623063376331626632366235616632333435396431 -30316466356530376663333037646635326630363933393437383033323131633464633565613631 -62323730373964656635636139643063616136616262633033306462333138326464333534306230 -62333939363634353939323062653536383533363239303964623562356430643137383262373061 -63336132336138343261396533363735363139306434356561653063366331346163383233663437 -32633133363363653930613832323932356563356231336631643032333436303830336636396662 -61666333346665643734623530623364636335306331353665396435666563356537626162313939 -64366530373061343761353661323334646431343639393130313064646232623039396136343666 -61366364613061303164613234373537656265386636656132333439326466616236393662663963 -39363434353033343138383463653661393265393032666634633035623035306366376233376161 -32616263643336643830323336316261616662346461323135353861316465373039656662333866 -35383364346137343964326433383966386138316134396430613930363033373135636661303763 -37613730346630376237653231396563343130363839663064333466376238313139656333636266 -36373262323037646631363131303030326234363835613132393239303336323265376338396237 -32633439383763656339643435333763396537383534653962623330373063636462346237346436 -33386362666239393137623433666266646435656232353135393437626235326136303836316132 -33636532393231373866643963383762356361363737373831333230373964656133386639653330 -62396562613166663932393635303038643961386564666165353933633464633831363665656230 -36373437636530336338636537643061636138633633306465653565363236303634363635663331 -33336137616438306437336336346666363135373030643662373332393865366334373331306531 -36633364303338313438363134363638643461633032616265643633313134653739633430626139 -35376464666431313831306661333932396661626133366461396132653832376464666233656232 -64333730613662363163343230363134363962616462366163346235386361663565353236323662 -63643466306331656265313464663837663335626537333533396561663130646636653538333335 -32633836636666393037386430393434306435383764616438656634353434633432333165366630 -36333134323830326266613438636334363261323238363838623435313735303739313561666536 -31306436373062336564356439363238326565666333393763383765373332653966653534373862 -32353466633432323735613163316530333636623964303537633737323361353532363730613765 -65316435353139373338643331653033363363306462326639313933373032653561623764383436 -36643939363939393732646165383865656161333465646631353536613432663366323037623234 -66333866306337376564326334633030363634353436333163643934656135336335373132313366 -37373136366130333638383536336364316363313663303565306338623535613764623965316139 -65346536613235313631613232653862306237636337343863656466623761663463343461653238 -36353438393930613131366165306561353764313065346335656162326432623735653134343236 -63636434313562363065313330646336333162373831613965353933613830313465386236303166 -38353034336430656461326339646165653033316530343735383561306136313163643334363839 -39393837353061346235616436666262303338343738616232373037616461343366666365386663 -63346666333831353863653862653963633263626631356338643865623637373864663833623631 -36613733353237336636343361386436383962396138333534353566376662633164653236386538 -38303864343034303735343666623838366538386361353366383135643734353963646133363438 -38373639373232623461626364363935383465326231626435663365333832643739363533346539 -62373131313231363462643361343462616231336532396432393465326131396134666236303561 -39636439613732373733363362336561346166323833346666313061633134613634313438386331 -37343862343531343437653337373164376636303330333639356664633961313535613338323765 -37633332643464376462323632316232396561373636663263363737643830343637316164333238 -39626234626466326130353066383531663361316264363663316337653935383733303734656335 -65616231613030643335626237613466343863663562366437623238373163646136643666613562 -33356262316334356561353033316233616430323838363735613239616564366231616433626164 -30333666383536356266313263666438636164346632336366626533613865616362386265356432 -39313965613365306636386635303564366362323966353738333165653265313464313961356634 -62656562343238353261363530326463656234333136616634313635633934383733316534333332 -37393165376434663731633361656239663335303761393961363536626135326138366636366136 -62663666343537643236646235623164383030376564633736653662646537373066306330393237 -37333466383938316366663465343266343034363133383634343162303865386430376532633334 -30346463313337663337356434376661373662616164383931363661336235623836626435386164 -64636264633866626337346362626232613932313632306265333665373536303838343163623635 -33333533343331323733383331353366356561313332633031303539643334616333636565336166 -62393162353938366465666539336330643037336362616465306264663766356564366135663061 -62303864623266383537 +35313734373162323236633261313638316635343263323335616632353666613161323538616164 +3835303066653234663331666230313833346665303864300a366136336233356165383538623666 +64353064613938613138666630333436383064363463623230363236333165343930643233353835 +3539363937323132650a333737613964316364366563633439623764376536396463323130633739 +31336239623066376165623438343335336631306361363732636464313636323161653132663134 +30313534613266376363396562373863373965653862343239333764326365633266386463366131 +32656266363238303563633365306338646261663430333365393738323937376139316633653738 +64323961306333396434326634303130386264656133636265356138303735303539376365313861 +30666630383561313132336136646163323239343066656666316365353766656339323566626638 +65386433646464613363376332383737663335336133623236363732343338336561386435316237 +66326534623763373635336464336132316532366161356361653834313536393864643165393331 +63323337646138363238366161373838333763313230336566303163373462396436356438653231 +63373336316564316365393635666336313963353835656130373662333434373362343332316432 +36666438313130646432333062343432663762363163326261636234353430343036396162626561 +31306236373039303361366238363864363063376363643365653664303131613663393132623535 +66633062306635376538343432356131623432653636336438303632643432643839356633376338 +66363861323838363134636439353763616235666538373432333763636530313664393964633733 +33323836303638613065653437346233666332393665613636656136346531353165376661653739 +62356536306635326237363139393431323061383139396133333731666365343739306662653236 +61356466353739646366643837396139333736366463316163383230366532313334373132643438 +31643630343030376636366338613664643638636363653934653636353266363630613231323036 +39663862383831383863643364633935373665343166333365643261303766633136663238353862 +33623462343962653764346532373039633033646161383866653035653564383761653065663237 +35623464346635623736383230653262303239323038376231343932623733633966333563663437 +63656135336633623037663638383236376165343136383065343435363064633237663331623734 +66646336653134663566363637656639616463396162653639376232353332303166353836316233 +66633837356165656332323334346235303438333565646436396162653932323663313534343963 +62323164316134646330663834316131613738643033313563333337383338396231613164323236 +37333831393265383766643966663564336635653464396234346465303430333963326461633061 +35613430663036643238353637323235653138366638353163323039363862393063363437303364 +32306161376330343264666639623031316464326636303936323966666639666165653061313461 +36626665393138653636356437613438363964613738353663363765383937393134303736353537 +61376432323336613230616531623839623530323131613036666231636432323936663835643365 +34353762386634383130376131386330613832663562623236396261663838386566353739303438 +32623732323466396464656337396331303230653563316462383661363638313065323834653436 +33346161616334633264356363366363383464363030316231666636643164363063356366613439 +66313862623764333461653238336330393263636132653037383239356632333964343863356533 +37363839326463653333313633346639643632373334386537386665306465363962643161363762 +39343732373237303733303262376165333939336137303530663239383466386435356634303562 +32313566323639363537303063383363343032633730356138663634613862643562613137353963 +63353738623639356366393430326334396432346233393633363162633636393032383063336466 +37356534346635616233616639633633353662306634336131333437333238636362666263356165 +37633262626263343364353133393031643162373837373437303133656331333138663966323639 +39383465346537623439393366303135353734323066343535313336323638646335663232666663 +34316165316363333937303538363838363333356637373337356162623165376134333161373237 +30323164623035626231623231643334303962353561333166376134636135353763326161316630 +30323138316139333737326238373039653332363032643731613438363435353031643062353231 +66373037383233316438373161326364643563363666343235313163336135633430323236353437 +62623262376361616237646564666561646165666563366264343566363465633464346238346262 +38336562323361666266303030363462336262313437346537643661313730623939366462656630 +62306334383935316231336464383765366265626236373030323430396363343534616534313263 +62623634613936353164653937363565656565323134636239323935343835333161373133393030 +63623965303836356233333162306438656362336132393764363065396564366335346235346637 +65373533613464323230373738363761653934373561383935376662383533666138383561333063 +61346631636638333730343936663732343764396137343033333061373364356234346538323833 +31626166323238313733303039336365393438356138386162306363343162363733623736653464 +62663837333439316663643239626162376136623234626235316337323635643235376434633238 +64346363653835646133646634633561313561306431303265346333633663613462393065633865 +64363361356439333363383932353066303764663266643234313162333362366135656531353930 +32616631373866343635386230353931656333343965393466613562666535393235396164343665 +63396637373963343163626237356130396435666236656131306237393662646464626263313731 +30363164666439323932643737313165326132356334326162376464303161396664303332363763 +34623335643733346662353365373861363263313763366235363936623065353538656562633866 +30396134393132626236336564376633306231626435663739313464306330316162653963653735 +61303632313163666538656330623566326137386133656263383662336364666436396431633461 +61663131366539393361396333353163323564653131373034643262373731373234373063353061 +32306338333737313739386636373437316138336563323734623565323335373939643934393263 +36663336653539626232663664396361656162356563663939626361396261316432323437613432 +65646433333734353434363837373664316461346364626461366665666535346135323935643765 +30616638663739373338363630666331323038356539396533633932633262346539363063393835 +65363166326134386562303037323033653564343861373264336361303830353464356465363739 +37326538376665363431323232663639343966643333326330313738626539636236336238383938 +30316465353963643734353334343533613063313539616535633433386261353031323062636238 +39383134376365396333666166643166353232623431343330343966613866396663613239626636 +62633066356434636266356333623534666561643133633939373437343831623462613434373261 +64643230376334653236653537373064623062353231313836323063346338303835353935333433 +66343261636535646336646166633761393664343565303431663033363032353635626239343364 +65393634663137303666626665373230613434623637333666636638623231333836656563363232 +33383336616265653265396136666136616435643064623031616130393536363864363266376134 +34646365316164656230396161353261666661346436666136323934656265383834353663383732 +37316137306262353063366432333861623764663366346239396533353066393630313763393734 +61313831333637396165623335616662393332643766646633666263363137383364366134356664 +30393537346131613830316436383765353361326562623832666236663965396233623634396234 +39356135613839333735 diff --git a/private/ondeck.unglue.it.key b/private/ondeck.unglue.it.key index 29b1137..b4f046d 100644 --- a/private/ondeck.unglue.it.key +++ b/private/ondeck.unglue.it.key @@ -1,167 +1,167 @@ $ANSIBLE_VAULT;1.1;AES256 -61636634333838336663363966303531393663336562373063623536343735626163313166616462 -6362633364393730303961373130323439306662623133390a333439353538643938336333303234 -39336137633565383135633135636263643636643032313431386564326166386261383933663831 -3732376361393137360a643238646436653035346339633131623933346635336136663531643366 -31326630646438376438323033363166356233626637653331376136353566306165393761363333 -35323466313531616666613461346164346432303963666233396539333639373463346530666161 -34393366626134363964623836363633633637386235653636323533663266313234396330383166 -61623837383937623130646136633535303130623966323936306463356430343434373036623165 -62333865373234666433303034316138363530316330376334643636396130646636313164366330 -63383865613333323939383937316266383437343438316336323664393836323964353165666564 -63313564646234363362333232363835626365616261316539616437383039326233396165613637 -63323531613337323564663266333838316233343336356265666333353432323535653532356561 -36393834393465653738316365333661633832646463363436623030373465313436323636353064 -31663666613162376336643233663736336536306162326439383733333762363735333062383935 -65613630386334313035336662316233633666313435363535306634663033643233343831646131 -38376334623637663533323133396230656165323631393536653435373530613764323566663030 -64366631373431353436646565623331636138303232383837313662373765626638643663323061 -37393537326537613333643734663062653064643032656338636438303631363062633530393133 -38333064356139393863323461373834353334656237613039623332626638346161383266353638 -36623239663263646638656436326664323364666139653831333462303466303435343764313032 -64383138636239633439613533626336356636613439666335396130346462353163306630376564 -34383834333531323765623134623339346136353939643731393534313065363034323331653237 -65653865333862653733326439623036373866383231656636656337323339353263663763616134 -64343138306666653637633362653837373765623863613834313732663836333135386266326632 -33656263356165346430323336633035636330353565643966613239376666326633626433613764 -32613738376462306662363764623262653238323833303535316366613262626536656230323065 -39623830356237663634616265373232636432373666643361303834633539356636386265643137 -64303837356338623533663535396435626531336163613538643836346331633163653237336165 -61363664623330313235346463333163616461653062383737313036616564326163366563626632 -66623832373665396464346566656532306439633831653866306362666564633462303431393866 -61656534373163643234316330663135373737666331366438343632356339633234663565383433 -38333633343638613935396631386661653036313530333863643738303436353732356332666631 -66653265373561313730326337303836663136366364346234316565326333623361323635323234 -38666137656463663162363639393962663339336435336136666438306435633638616161376538 -32366561363266313365633766633736653933366433366235363136646633666133323461343030 -36343436643761366561666335323161646363333566613038623230396535616365326464313038 -30663266383235666364616462373964366162393366373039306165343435373464323063613463 -61366631316333623664656638343835613362316633646136376464326535623333323935306138 -64373336623437623265663738613631656162366535626264643363653765383936666332313938 -36363434316434353338623834666266633863363464626630363038313166633939636137336662 -30313363613566313231356430393462313062343137396362353737353533653865326530376264 -61653064343963346364383139373931363364643036386237613164316665333731336232313030 -65336138356634316163643437376530646463386333653039633334333161306138363430343330 -39666431393439386661316232363261303234623137396331393065386538373066646239643161 -38656232623334303236323630383364333565643537373834663336313434623164353834313338 -65343535316238656531366333313331383262666561303561613663326464666662636334356261 -62616165386632333461326235303862303238313563393763626137356664656532663462376661 -33353662346533353937313462626265396231383261316566303236666361643161333364356237 -62616530323561636366663235383834313436636364386639333435333639616534373562646566 -33333831386663633661306238303739333635396634343535653735313833663430663362643564 -34633662316566303864623236623565383931393465306339326163343564386632346638613863 -34366232643239303931373734646339386333383235636436323837393862636430373434663935 -61343134336233363961366633633439653266346439393634616665393339323663633137623864 -63663830653635616330396564643236633139346138306130633134633564613065636163313562 -38346530393462373637633038626636656163366139313062303563386334393965333133616566 -62393837653865633238646133323164353561623236616465356337353036373839316531343734 -36623132666138343265623234376434393261323366316334313563633030613061393364393434 -61323030623230386234303038333735326233363763616262616335323264326336333134633366 -34643865653961346364343735386230616339343435353461353331633666386662636235356166 -30306332633039666134333765313137363037323964636632343765633764646635643731613536 -64363165386136626533653563336263373735306261323061616231663261653564653035366334 -62623633366662343134363963653232656230366633663134643261666535333638323235646136 -30646462666663616134303936656439336534643062373863656238383637363265393561323535 -31393832613430386430336163333432343864393966653432643635383063666431373033643661 -38636531343266366363383939623036373363633230383837626539313832653962623039356662 -61356236343330316338666365653162373938393064326634396163356230333833313965376335 -39626235613631326136373035366363346538633535313738323631653965653536363236636438 -34646538326237626164383631646461383030643632303638396132353935336236663437363538 -32653562343734323937316333376139336163343037373634373563663735323433303066353262 -64366361356361613838306530323364316630633761376234633763613961646435623239393963 -62616539626566623065633065303735323931303834343936303839396465326339303262393539 -66333533333633633032346332393930643638306262663034373738626435636462306365353233 -32303536323466643435373263376465313662613338376164396535353334333233646631336565 -64653461383030323738653864656637383861306430363834326362343132386333366531626338 -32353538323864353136303731656335326334626665303032646531313036623734643566313364 -33376635663038333738313862343664303132356163306236373431323134633336646239363333 -35363637323032663832306162613536373361356366336239366164396530346139643730373562 -63663738663638646537653631383732356565383339336139373035396232386161393638333561 -65333532346266613735303136336636333231366237326363333334623532663833363230396139 -35356332633133313936373738376163646563373965633763356438333836623239343064333031 -32656232393561313962316661646536623130363363363664353332623766613631653635383739 -30626532353432646333343564353436333963373638366536376335303734646132316130313539 -66376639353634323261363266616662636534366330326532613962633133303339623635336637 -38316561343366653733653534323164613831303931656430363535633033323361383538313063 -31356431383335353639383064383937323766366131393961356433613666333365366566363438 -36343664633162363765356435646265383433663436346439656636353066343438393731363332 -62333635333431666632623763366461633931623230623330613839333633343435326464663632 -39383138303233613034316431303762633130653634366566663839623863313830633866343066 -31613835316363373839313162373736653634663930656639313664313565333063393236336336 -36346636643030646662363761656439393433343863373564383163333234386637316334316362 -61396639623338376364353932343531363061373839303262373137646638343233616132366465 -65343337366561333364323130393864323032396532333432396662666365396563663362376631 -62646433386530343562326230303266613731643935653463316234376338313533303364323164 -33313137663035666432336235613239643366353534323630643731613836633236363264623063 -65393337323261613737323131616636373630663530316134656132646665303434326165666563 -36666130643335333362613632353737333634323432663565313632343030323732313036633334 -32633438383735383731313834653832373765626131633563363235623761643831666234356263 -62613033373931383132356637303163646639633631393933613134343262313132366364373734 -66623566353837383539653164663463633764613662616161393739666162336438663462366139 -34366665303264386166333733633966366564666431643430333433383166353239336634666665 -66623666366638333030343963336461353564396636343032663135353939353362633864623463 -62633964646465396532643562303462643735393236346638386432633039656462373036663461 -66303164393033613631303763643661643963636662613964656637356466303763383234623639 -64366463646633626135616362613536333361656136373330383863356365333661666630313337 -61643063323663323834323964623763383233316333316663613863643863373436386137393961 -64623966333364346463636435303633353337333531343665393865646534633932353164303761 -62353235363638326464363832623035326563643335343232306533303633653633633136336335 -39313634333933336133363664313031343636303832333932323430333266303139666336336331 -33613065353434613637303032653338663935333165333032366532653335323661646631316235 -62363333306335626437663439623631313865376636386362653233343032663861656561653632 -30396265346438336430336530616533303534643833653034653931633134333333653432303461 -65393934353361633531663362393463633462393136326165373738396632346134323961626436 -66333462623561656563396663656538396262626462316132356436373465343466363132386330 -63366139383465373438343261383036373832656263653735343364346331623130396663393935 -62323936643864333565626236626264333562623031363633336438633033396665316637313839 -66333330336165373032356430653737346639633263353666376163373435383833323761316363 -33313535396466623932633134326463616561343666366438333332626562376535313438613633 -63613338383662623132656439356662623731343265356665666563643966373864666330656634 -35333139663131363436663663646334636532353462323466653966306134323164363764643030 -32343738653937636263363366363839333461656537646130386437646234386130333665383731 -64383932656131646533613835353563663130643063343363663461363635656638396262666433 -65663466653932613261336432333030643839346437633665623461343837663035323233373464 -33303965643265396439336161303335393336326238356138383430633066333338346664323066 -66303031623765343833613535663935366236323830626465366235343764316135646332396531 -39386165373161356563346361386333383263656661356164633039393332346334363139316132 -34626132323338373362386330633134393032333635346261666633626462376233363162303035 -65353964616362316538613065316235653332373539336534326166373566643535313439343262 -63396266323335633265663332396532326538363663633634373537346363633031393361393863 -63666638323536643536306638646634356665613039303838623238633266306166373463373661 -34313136343663343665633762646261623566643235636437316466636365653536666266376532 -63336362323536383033393161373964316561666236336264366638376431313065643762343930 -35633663643830663039366635353139636137373730306362353734373565383038303937653161 -61353930623365326565336162396463336264346263616135613561366366346265623734633131 -30386263336462613035663735613233393436316661613163626664663561646134353761383861 -61396361663634343463353739663839313935313430306265356636336436396437336435663132 -36663631646664386430656463313762646333366633326230353731336636613665303835386265 -64393837666335316334343433646165643535616631656431396138346362356161393265316230 -64313362333135663666356366366639313763336564333163646339363563616339386435343037 -30306161386335646364346633313036323531363639393762323235313335623431376238643331 -62613336363564313034633530363565363563633638346636346537653230336139336633653834 -37323665343061373034363433366234363563316630366234656437316532663737343139363431 -33623137653363336261646238616433663930323363353166633762393538356565643766613564 -30643963653166323064383534383331386331396631373465306530363938613132393165316164 -37306135656563363937326161663035326436376630373365366365623131396635666537656536 -31366462373635353364656137343266393761613232376333626161633665656334316666366665 -33643537326130613561613061343765613735656164393862356239376135653933653331336565 -34613433393330646237323666303433363232613165626566656563346334623139343164643966 -32303363373835393437376166306533363036383536363336633539303239653034386532386338 -62383736633863326535643132393533366464373562346632346337363961636466376366396635 -65316130386131366538656635313965323931383864653563383363333535356139326130663934 -32346533333766616162633439353430616563646630616561333636353234393139376537306133 -64343230653433336536323764356261366231383364633962363637343539623665393730396235 -36303564646266366438386336363963656566633038306663643431383532346230613564326263 -30643664633463653039633462316464626535303032653736656532323163393163343761333935 -64326361646133356164623635663939313730396464336564353636316639366332633763353233 -34653836323738623237356531313264303863636165326633363463616164313566303335653637 -66313765623234363734663435326433306232376565613266396134613634623530363861303262 -32623164663266666262623938356630326330626633386532313566396535356539393961646533 -33346432393564643231386532303838306331323233613837383232303861363637366333633934 -38653733663262366134373065306136343933306535336633326235653232303862303636633336 -39313532313465396431393834656137653231313238373335633165313933393834393137323930 -64323931623132303962386435346166633137616435373430623261663837376239633862656232 -32626238343738313035396433633639376532373861666130343637316536316334383039313533 -31326436663938323765383431663562373562663662616132373037396639396633346430303731 -38636332663232313637303933323362663861376132366465373433363335623432373364363530 -3364663236373331353833626536623966663439623536323265 +65383865313534663336633837306661393430613064373530356566636430333462626637313962 +6166316338653932366264363432666261306665346536610a393661326462303065313134326264 +39653966396530373535313139303065613563626630636564303465326433393263636666636266 +3132336135623061660a343566636637643639383536613834313539393262393138396435623135 +34613335356335303833626630333764313631363337393663646135376131616133333865653236 +63663462383563633461643262613139366465306531626662646135613035623663326332306166 +37636233613863396637383332633164383237633233326162306665346362386162663934323366 +33386236316639663966376463616630353363333835323536376537303238626361643639366233 +61656630323830383164346662663365313131363562663665353761616463363963313266336432 +30363164373464323138353834326537626332313639656438613630363735623061633261643763 +30666235346532653639363065623432663835356134666134356361623539383030623064323839 +64366438633162646337346336633032326437376333373565323639616337336433353364346436 +63396439383334386365313364336661663265353630666632626333636264343633316133313961 +64396139363666376639633332643164303834356266396237626333313064393761356463333233 +61663038646430316461653937396266383934653431613665386564326639633937343333303063 +63396361643533663036393835366238326465393334346534393663636233656633643634633065 +38636437643734366362613737393738356435333432666530623065653434636332623635363365 +34346163303731616236396535383265383037396633323862353639313861653666373731633831 +65633735363233393665383565376665393934313136343834343639386662623737306530363563 +39313161633038643635346666316162303066306539383239306264333434316361346132396433 +64363336353462663131393034653236656233343035633036343736613064383430316165666632 +32303463666561303863623937363338636131656630633931366161623130633266353166666665 +37643632646330386638663231373034323132383731343065306332306233653639326361363265 +33623136663035333663383863633963633938636462623564383366646637393237396662613331 +36336165356161346366353932663464616539376234656162383031363031323562653861336636 +63636464383230383561343866306530653566616231656434336533376362643237393735643437 +64353863623332343634353533373231383264353462396139666330616536613633363261303739 +35353239353330316536353338663837373666663030643565353164643535323466363265653839 +36376236373238636265343664346339366462626530363366333564376338616538386164366539 +66343261343432363763343030326466613633636334373530303765643065393439373839323739 +33633462366365666665666537393364333535613962393239383136306266326336623631623732 +35306439353264326366316465393032346439626235623265316134666233376465343236393965 +32653066663465313233616339633039616538306537363463363034633033306339646235623434 +37366361626665306635633335353936653337386634373331323136633135653836383664316636 +33303564633935663931633736643336393935646234303932346335646262656562366339396635 +66383866326533303763343033386461663734383835373039666665656165383635613634396239 +37373461333437636263393839383361346136663934326337373436633066323366613966373834 +35353139323237323063616235636565643437623939396534643937386538636137653538366661 +36636234373833353234363165393632326361346139323663663232336462316132316436623635 +64336633656134366163383030396263376337333436653361626439313464643834663666346434 +66383264646138376234313639626463653234636339306430613065333132316361623166303664 +66626361666432303335633766353439376532343563313765623237663236356363303037666164 +30643938363738633263346336653363613161613961663661363365376135336639386364363835 +62393437636339653664373438353831373131346638353934333065343262333664393537313839 +33643730363965613534316538643936333665653532356431666533323534353861366262396466 +34376362363664323432393534303366613637343839626663356135323635326334656535313366 +38623733366432356432343165343737393135333039356532376238386338386263306236313866 +64373633316233386362376432643230333731333332653035396366333466333265313866393366 +66313264653331333434616263643262633063326130616561303362366232323836366363643831 +65386631383532626564393331653834333232323763333465373436383861393030316333366233 +65376134616338663038636535646262616633373266323831643638613730366665386235316563 +32646234303432333636393336376564626238323430373834386466363563333465643130323938 +30643139333961386263653563353663396139383862333662316439386537633766333736613664 +32373439333262373337633133643334613938636630663366356634623863346430636365646439 +35393531323531393136616163613963336563383863646331353265643931363531363932386435 +66663063633239666663343437653131343837313230383364653130613833633236313231383139 +39373334666133303436373563656134303736623234616366653065626532333737383330326533 +33316263363562383736373662633034396166646461353139626364343965623931643234623539 +33616162303938303837653965326435363761386266646439633761393831306230373064363262 +33643437346239636462633231366436656565633464386261653531333631646432386130626134 +34373131393634333639323334366531336230343630336633363036636536646633653030306434 +62663334383333393034363034393932323363666565323266636465613165336561326536333562 +32343666383162383839343139346535396462393265633265373036333039396239333863616633 +33656533343435326361376137383532373863346461656633333030653763326461636630323661 +65636530373366393964613466326262303566376632333432646536303435663934386238643838 +32383531326565343361656533646163373632356663383439623565323931343038633339326263 +39633663373633316463623937346335353264656131643337643966343465303864636439346363 +35326634376236396338653832386466393731666136396135663163326239303738333663623563 +62343964363262306461356563346461393531616562646362643436663638303366663637613633 +61376262393461333336336263373132353236333564313864356539333436396330343131383231 +65653434356361353035353262316631666638613438616431623266613766653764353033623835 +65626563666531356463383463393761623462316464303334633635363164623634383732343664 +66656636366137383835643530636234626264396166343339616164366336323561306561623237 +33373564333366363538386337663832376131386362306365316166373534663938343764303932 +31353232393833343366323737616430613334396637313136666431316137613436636564393437 +66323732353834613863653162653036323937643437643464386662646637303234363536323036 +35336135386530323336313239623638316166323563653833383932333034616338616430396333 +37663235383133653164323865366239303332663530306537363536336565616563346439653162 +32666561663732643730643036336530303433336539666266613636646233356463373632656333 +30623466613539353239613839326165623036326461623634323835336365636232393863303834 +37376631653231633134306432336161643332303064363964653866326561616539363033323361 +61313431663765363461353436386238346366383735646437363533353564376165396437636363 +64363535353261366663643937343831386666316463363539623339363337663834393564333430 +33643162636637306534316263646238373732356332653064333862326664343763633534656335 +31653736366162666664376635343763333438306439393263376266633437346636346430306135 +39373532346436613130363838663563326235356537393230666333336539393731643434626437 +39373062326466623033373263313839653339353733303436306433323835643335643035363131 +61633339353861366238633437323934653336663864376466643833616333353937636433643266 +62633866323135316131333965663939363335643533366237303035386136643066373433613438 +66313830643238646632343739336362393636376366386461333161363937643564393239363632 +34616463373739373034353837613638343664383931386134303031363362386539353136343936 +65363561306230623036363039633566343832316463366130636339663865663464313930663734 +38353965396263313131303231306463646530633863353835306534656432383164616539633334 +30316661666161373863366636373335313061643465373135663062653531623365643261323931 +61633534666639633662376263376139356435316163613465313965353664633838643966366536 +64373364386238333831306463313935653363373964393538646164323965323437323166393937 +30633233613934386130343030323636636237623435326263613534353061663065373330626238 +66633865363534383466386539313330323465346637636439326661623731323334626536316135 +34616439643139343432656533343435366434326163656563326436383132376533316666366339 +36623466346363376665616366343638393032383238353264326564396439353266346137323066 +35386230373335323961666234343664333433343736396264386561323239303533316232646637 +32663135643137663232333239643364653763356236396530346366363965613737306134306464 +64313438333164653536366466343137376335393532346437613938363565636435343663616139 +65366138343162623032306462386236313736393834303364336535363634366432623534313831 +39373561336637633066336337376666343837613438656462666330666665343733663033353063 +65333434616531613939356432666361316236326539336634626565616138356665653039333236 +31663964316332633039393938656461356562633062303266333333666266376538393565343964 +30636139653831663666356239636339633230333732353339646439623165316538376162363534 +36363763653630653431383134643930383536393265663964346138646537653431666665336536 +38323964636233636463626434316536396532653336356635666232346239356261653931646666 +38363330636362323830616361633463343666393165643738613331386636613766663766383864 +30363237393066363132313936653031323935383132353131633863646662306562623164316437 +66613037356363653835373731363163623761326239363265373361633761303164383531373365 +63643634633334373339303130316366363463656634643337363366316262646530346431346437 +38346437343331646362623937623732306336613262366436343936663938656465373066663366 +30623238653864373034376238633038323865363034616432616535386234613931666362323931 +62373463336137313733616563303363323066313833653537656331386562336165363036306330 +39313066653039623435626366383166646433336230316631316566313566393935613163626164 +34303366646630336232353736396266663264656363303133613938343431386138663964656164 +30636438633162373362366639356534633464383031626165373337306462623139306665616566 +36373363653134363138323964333835303866663731383465623038353635343434623636386564 +34616362633162306566323631333435626133613463376639663635346639383063643430623063 +63646236633230346563616530306230653463396566393962616634313334306264626439393033 +65393439353134616335373263363233646363336434313063383834376666333038633238313665 +37316161613165636462633462656635353337333034383236356665393533643639613238376461 +64666539383636373333653230383966366135633766643463663130373137353633376339343763 +66626363613433636562613961353538343430313738396263633861333663663564663365646135 +36333261303766616563356633333461303162363038373366303065633166383033353438656663 +62363539663337633030303037666431626532303063373639386339346265356630613334333963 +64346631306335613534303336323739343332626537373564643364666430333530383937396636 +66393038353333336437616361636338393663626132353262346439336563623233373561613038 +65633430653266346261373839653635333630373934613633376165306461373731336566633535 +39613635326236346238393436363264393762353964326631356231376139353663666132373533 +31613037653533343363333532373665353639666632613538666430336431326232383331343031 +61623566343634333437376639383236356264366463366236613265326138343662626661626137 +63386335326662653135353539623231636531323835343461356161313730663736346234313266 +65363662636632653833326665663866626636316439666130326263333439636565373031616337 +33303238366336383931626662316338636162383233666331623866373039636234376438343666 +61323637386266643332616564653135303162376466616539666534333033363362656566333830 +37396232393531623432623138303531613334636532386334343239663463663063636233663836 +35666339323031343832643363653037336331353737383562613561326163616537323065653538 +66396562666432393030353964343564373363393836323533626535353930396232306331306238 +36643863643761303936646536346138323835326466663364316365633262353661613465326139 +39383037643466663435363365343039303832393238613535643062623065326139663239366636 +34636636643864643933626166623430306564653732376331326365323036373565653162663431 +33613230663133303131376430373363393736393630353433326661613838666633393230626462 +31666237623961666362313765393131323735653331616561323331636361326432346237386261 +61336134336362616431393538363238336232623430613061393638343638303266633261343938 +30396137666465653239623338373539633034316163333738623431636134613139363531346562 +32376433313334626565623636323335663434613131656134626337353130383033383961316562 +37633531313734663732623137623461396666626439656339363532313936613439653838353439 +36313636643833613062653730346636306265316139653431636566313762316162323039303161 +36316164646165346437353464386164653935343063373061303836383361303436393761663464 +37386561323433323932393365626262343937663231663066633036393938353465393736363161 +63613138613436373431633633666662303563363639313866643739636361343833333663326530 +63623566376661343936326334336130343738323238653639363835643637613339346561396466 +33393232643230373139396233383031653830636662316361386638323165663531663230643336 +61613831336437383531353739313539643265363434343361336432613364343530333663336238 +65653264313936383462643037333530643631353637623266376532646136363634313038346630 +35396166366233386430386365623461386130376265656230663430323837633561383437646363 +33616134303433643838613562646239353061346537353865333562396466626565393233303830 +62613436653432346232333864663638626330303663346139663438636166373164346663613135 +61353132613134623031656561663637363464333433333634653765653462336337393931663537 +37303135383738326561333563623539316330376233633138383731633862333432326136316334 +65383538316231313839376265386634613364333638343436656339346662393233656661336133 +6134373763623764383162396139643530323030386131633237 diff --git a/roles/regluit_common/defaults/main.yml b/roles/regluit_common/defaults/main.yml index a1f9926..c127a6f 100644 --- a/roles/regluit_common/defaults/main.yml +++ b/roles/regluit_common/defaults/main.yml @@ -10,10 +10,7 @@ mysql_db_host: "localhost" mysql_db_port: 3306 # Task Broker -broker_transport: "redis" -broker_host: "localhost" -broker_port: 6379 -broker_vhost: "0" +broker_url: "redis://localhost:6379//" # Common.py defaults boxstream_api_key: "012345678901234567890123456789" diff --git a/roles/regluit_common/files/celerybeat b/roles/regluit_common/files/celerybeat deleted file mode 100644 index 34b9ad6..0000000 --- a/roles/regluit_common/files/celerybeat +++ /dev/null @@ -1,154 +0,0 @@ -#!/bin/bash -# ========================================================= -# celerybeat - Starts the Celery periodic task scheduler. -# ========================================================= -# -# :Usage: /etc/init.d/celerybeat {start|stop|force-reload|restart|try-restart|status} -# :Configuration file: /etc/default/celerybeat or /etc/default/celeryd -# -# See http://docs.celeryq.org/en/latest/cookbook/daemonizing.html#init-script-celerybeat -# This file is copied from https://github.com/ask/celery/blob/2.4/contrib/generic-init.d/celerybeat - -### BEGIN INIT INFO -# Provides: celerybeat -# Required-Start: $network $local_fs $remote_fs -# Required-Stop: $network $local_fs $remote_fs -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: celery periodic task scheduler -### END INIT INFO - -# Cannot use set -e/bash -e since the kill -0 command will abort -# abnormally in the absence of a valid process ID. -#set -e - -DEFAULT_PID_FILE="/var/run/celerybeat.pid" -DEFAULT_LOG_FILE="/var/log/celerybeat.log" -DEFAULT_LOG_LEVEL="INFO" -DEFAULT_CELERYBEAT="celerybeat" - -# /etc/init.d/ssh: start and stop the celery task worker daemon. - -if test -f /etc/default/celeryd; then - . /etc/default/celeryd -fi - -if test -f /etc/default/celerybeat; then - . /etc/default/celerybeat -fi - -CELERYBEAT=${CELERYBEAT:-$DEFAULT_CELERYBEAT} -CELERYBEAT_PID_FILE=${CELERYBEAT_PID_FILE:-${CELERYBEAT_PIDFILE:-$DEFAULT_PID_FILE}} -CELERYBEAT_LOG_FILE=${CELERYBEAT_LOG_FILE:-${CELERYBEAT_LOGFILE:-$DEFAULT_LOG_FILE}} -CELERYBEAT_LOG_LEVEL=${CELERYBEAT_LOG_LEVEL:-${CELERYBEAT_LOGLEVEL:-$DEFAULT_LOG_LEVEL}} - -export CELERY_LOADER - -CELERYBEAT_OPTS="$CELERYBEAT_OPTS -f $CELERYBEAT_LOG_FILE -l $CELERYBEAT_LOG_LEVEL" - -if [ -n "$2" ]; then - CELERYBEAT_OPTS="$CELERYBEAT_OPTS $2" -fi - -CELERYBEAT_LOG_DIR=`dirname $CELERYBEAT_LOG_FILE` -CELERYBEAT_PID_DIR=`dirname $CELERYBEAT_PID_FILE` -if [ ! -d "$CELERYBEAT_LOG_DIR" ]; then - mkdir -p $CELERYBEAT_LOG_DIR -fi -if [ ! -d "$CELERYBEAT_PID_DIR" ]; then - mkdir -p $CELERYBEAT_PID_DIR -fi - -# Extra start-stop-daemon options, like user/group. -if [ -n "$CELERYBEAT_USER" ]; then - DAEMON_OPTS="$DAEMON_OPTS --uid $CELERYBEAT_USER" - chown "$CELERYBEAT_USER" $CELERYBEAT_LOG_DIR $CELERYBEAT_PID_DIR -fi -if [ -n "$CELERYBEAT_GROUP" ]; then - DAEMON_OPTS="$DAEMON_OPTS --gid $CELERYBEAT_GROUP" - chgrp "$CELERYBEAT_GROUP" $CELERYBEAT_LOG_DIR $CELERYBEAT_PID_DIR -fi - -CELERYBEAT_CHDIR=${CELERYBEAT_CHDIR:-$CELERYD_CHDIR} -if [ -n "$CELERYBEAT_CHDIR" ]; then - DAEMON_OPTS="$DAEMON_OPTS --workdir $CELERYBEAT_CHDIR" -fi - - -export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" - -check_dev_null() { - if [ ! -c /dev/null ]; then - echo "/dev/null is not a character device!" - exit 1 - fi -} - -wait_pid () { - pid=$1 - forever=1 - i=0 - while [ $forever -gt 0 ]; do - kill -0 $pid 1>/dev/null 2>&1 - if [ $? -eq 1 ]; then - echo "OK" - forever=0 - else - kill -TERM "$pid" - i=$((i + 1)) - if [ $i -gt 60 ]; then - echo "ERROR" - echo "Timed out while stopping (30s)" - forever=0 - else - sleep 0.5 - fi - fi - done -} - - -stop_beat () { - echo -n "Stopping celerybeat... " - if [ -f "$CELERYBEAT_PID_FILE" ]; then - wait_pid $(cat "$CELERYBEAT_PID_FILE") - else - echo "NOT RUNNING" - fi -} - -start_beat () { - echo "Starting celerybeat..." - if [ -n "$VIRTUALENV" ]; then - source $VIRTUALENV/bin/activate - fi - $CELERYBEAT $CELERYBEAT_OPTS $DAEMON_OPTS --detach \ - --pidfile="$CELERYBEAT_PID_FILE" -} - - - -case "$1" in - start) - check_dev_null - start_beat - ;; - stop) - stop_beat - ;; - reload|force-reload) - echo "Use start+stop" - ;; - restart) - echo "Restarting celery periodic task scheduler" - stop_beat - check_dev_null - start_beat - ;; - - *) - echo "Usage: /etc/init.d/celerybeat {start|stop|restart}" - exit 1 -esac - -exit 0 \ No newline at end of file diff --git a/roles/regluit_common/files/celeryd b/roles/regluit_common/files/celeryd deleted file mode 100644 index 12ff844..0000000 --- a/roles/regluit_common/files/celeryd +++ /dev/null @@ -1,217 +0,0 @@ -#!/bin/bash -# ============================================ -# celeryd - Starts the Celery worker daemon. -# ============================================ -# -# :Usage: /etc/init.d/celeryd {start|stop|force-reload|restart|try-restart|status} -# -# :Configuration file: /etc/default/celeryd -# -# To configure celeryd you probably need to tell it where to chdir. -# -# EXAMPLE CONFIGURATION -# ===================== -# -# this is an example configuration for a Python project: -# -# /etc/default/celeryd: -# -# # List of nodes to start -# CELERYD_NODES="worker1 worker2 worker3"k -# # ... can also be a number of workers -# CELERYD_NODES=3 -# -# # Where to chdir at start. -# CELERYD_CHDIR="/opt/Myproject/" -# -# # Extra arguments to celeryd -# CELERYD_OPTS="--time-limit=300" -# -# # Name of the celery config module.# -# CELERY_CONFIG_MODULE="celeryconfig" -# -# EXAMPLE DJANGO CONFIGURATION -# ============================ -# -# # Where the Django project is. -# CELERYD_CHDIR="/opt/Project/" -# -# # Name of the projects settings module. -# export DJANGO_SETTINGS_MODULE="settings" -# -# # Path to celeryd -# CELERYD="/opt/Project/manage.py celeryd" -# -# AVAILABLE OPTIONS -# ================= -# -# * CELERYD_NODES -# -# A space separated list of nodes, or a number describing the number of -# nodes, to start -# -# * CELERYD_OPTS -# Additional arguments to celeryd-multi, see `celeryd-multi --help` -# and `celeryd --help` for help. -# -# * CELERYD_CHDIR -# Path to chdir at start. Default is to stay in the current directory. -# -# * CELERYD_PIDFILE -# Full path to the pidfile. Default is /var/run/celeryd.pid. -# -# * CELERYD_LOGFILE -# Full path to the celeryd logfile. Default is /var/log/celeryd.log -# -# * CELERYD_LOG_LEVEL -# Log level to use for celeryd. Default is INFO. -# -# * CELERYD -# Path to the celeryd program. Default is `celeryd`. -# You can point this to an virtualenv, or even use manage.py for django. -# -# * CELERYD_USER -# User to run celeryd as. Default is current user. -# -# * CELERYD_GROUP -# Group to run celeryd as. Default is current user. - -# VARIABLE EXPANSION -# ================== -# -# The following abbreviations will be expanded -# -# * %n -> node name -# * %h -> host name - - -### BEGIN INIT INFO -# Provides: celeryd -# Required-Start: $network $local_fs $remote_fs -# Required-Stop: $network $local_fs $remote_fs -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: celery task worker daemon -### END INIT INFO - -#set -e - -DEFAULT_PID_FILE="/var/run/celeryd@%n.pid" -DEFAULT_LOG_FILE="/var/log/celeryd@%n.log" -DEFAULT_LOG_LEVEL="INFO" -DEFAULT_NODES="celery" -DEFAULT_CELERYD="-m celery.bin.celeryd_detach" - -# /etc/init.d/celeryd: start and stop the celery task worker daemon. - -CELERY_DEFAULTS=${CELERY_DEFAULTS:-"/etc/default/celeryd"} - -test -f "$CELERY_DEFAULTS" && . "$CELERY_DEFAULTS" -if [ -f "/etc/default/celeryd" ]; then - . /etc/default/celeryd -fi - -if [ -f $VIRTUALENV_ACTIVATE ]; then - echo "activating virtualenv $VIRTUALENV_ACTIVATE" - source "$VIRTUALENV_ACTIVATE" -fi - -CELERYD_PID_FILE=${CELERYD_PID_FILE:-${CELERYD_PIDFILE:-$DEFAULT_PID_FILE}} -CELERYD_LOG_FILE=${CELERYD_LOG_FILE:-${CELERYD_LOGFILE:-$DEFAULT_LOG_FILE}} -CELERYD_LOG_LEVEL=${CELERYD_LOG_LEVEL:-${CELERYD_LOGLEVEL:-$DEFAULT_LOG_LEVEL}} -CELERYD_MULTI=${CELERYD_MULTI:-"celeryd-multi"} -CELERYD=${CELERYD:-$DEFAULT_CELERYD} -CELERYD_NODES=${CELERYD_NODES:-$DEFAULT_NODES} - -export CELERY_LOADER - -if [ -n "$2" ]; then - CELERYD_OPTS="$CELERYD_OPTS $2" -fi - -# Extra start-stop-daemon options, like user/group. -if [ -n "$CELERYD_USER" ]; then - DAEMON_OPTS="$DAEMON_OPTS --uid=$CELERYD_USER" -fi -if [ -n "$CELERYD_GROUP" ]; then - DAEMON_OPTS="$DAEMON_OPTS --gid=$CELERYD_GROUP" -fi - -if [ -n "$CELERYD_CHDIR" ]; then - DAEMON_OPTS="$DAEMON_OPTS --workdir=\"$CELERYD_CHDIR\"" -fi - - -check_dev_null() { - if [ ! -c /dev/null ]; then - echo "/dev/null is not a character device!" - exit 1 - fi -} - - -export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" - - -stop_workers () { - $CELERYD_MULTI stop $CELERYD_NODES --pidfile="$CELERYD_PID_FILE" -} - - -start_workers () { - $CELERYD_MULTI start $CELERYD_NODES $DAEMON_OPTS \ - --pidfile="$CELERYD_PID_FILE" \ - --logfile="$CELERYD_LOG_FILE" \ - --loglevel="$CELERYD_LOG_LEVEL" \ - --cmd="$CELERYD" \ - $CELERYD_OPTS -} - - -restart_workers () { - $CELERYD_MULTI restart $CELERYD_NODES $DAEMON_OPTS \ - --pidfile="$CELERYD_PID_FILE" \ - --logfile="$CELERYD_LOG_FILE" \ - --loglevel="$CELERYD_LOG_LEVEL" \ - --cmd="$CELERYD" \ - $CELERYD_OPTS -} - - - -case "$1" in - start) - check_dev_null - start_workers - ;; - - stop) - check_dev_null - stop_workers - ;; - - reload|force-reload) - echo "Use restart" - ;; - - status) - celeryctl status - ;; - - restart) - check_dev_null - restart_workers - ;; - - try-restart) - check_dev_null - restart_workers - ;; - - *) - echo "Usage: /etc/init.d/celeryd {start|stop|restart|try-restart|kill}" - exit 1 - ;; -esac - -exit 0 diff --git a/roles/regluit_common/tasks/main.yml b/roles/regluit_common/tasks/main.yml index 38adc2a..d64108c 100644 --- a/roles/regluit_common/tasks/main.yml +++ b/roles/regluit_common/tasks/main.yml @@ -1,9 +1,9 @@ --- -# Need to install python2.7 and pip first so Ansible will function +# Need to install python3.6 and pip first so Ansible will function # This is due to Ubuntu 16 shipping with Python3 by default -- name: Install python2.7 and pip +- name: Install python3.6 and pip for common become: true - raw: bash -c "apt -qqy update && apt install -qqy python2.7-dev python-pip" + raw: bash -c "apt -qqy update && apt install -qqy python3.6-dev python3-pip" register: output changed_when: output.stdout != "" @@ -18,20 +18,20 @@ state: present - name: Install virtualenv - pip: + pip3: name: "virtualenv" state: present - name: Install python packages to virtualenv - pip: - requirements: "{{ project_path }}/requirements_versioned.pip" + pip3: + requirements: "{{ project_path }}/requirements.txt" state: present virtualenv: "{{ project_path }}/venv" - name: Add project to PYTHONPATH of virtualenv template: src: "{{ item }}.j2" - dest: "{{ project_path }}/venv/lib/python2.7/site-packages/{{ item }}" + dest: "{{ project_path }}/venv/lib/python3.6/site-packages/{{ item }}" with_items: - 'regluit.pth' - 'opt.pth' diff --git a/roles/regluit_common/templates/celery/celerybeat.j2 b/roles/regluit_common/templates/celery/celerybeat.j2 index d459ad8..36d9879 100644 --- a/roles/regluit_common/templates/celery/celerybeat.j2 +++ b/roles/regluit_common/templates/celery/celerybeat.j2 @@ -1,35 +1,19 @@ -# http://docs.celeryproject.org/en/latest/cookbook/daemonizing.html#generic-initd-celerybeat-example +# # to be placed at /etc/defaults/celerybeat # Where to chdir at start. -CELERYBEAT_CHDIR="{{ project_path }}t/" - -# Extra arguments to celerybeat -#CELERYBEAT_OPTS="--schedule=/var/run/celerybeat-schedule" - -# Name of the celery config module.# -CELERY_CONFIG_MODULE="celeryconfig" - -# Name of the projects settings module. -export DJANGO_SETTINGS_MODULE="{{ django_settings_module }}" +CELERYBEAT_CHDIR="{{ project_path }}/" # Path to celerybeat CELERYBEAT="{{ project_path }}/{{ virtualenv_name }}/bin/django-admin.py celerybeat" -# virtualenv to use -VIRTUALENV="{{ project_path }}/{{ virtualenv_name }}" +#Full path to the PID file. +CELERYBEAT_PIDFILE="/var/log/celery/celerybeat.pid" -#Full path to the PID file. Default is /var/run/celeryd.pid -CELERYBEAT_PIDFILE="/var/log/celerybeat/celerybeat.pid" - -#Full path to the celeryd log file. Default is /var/log/celeryd.log -CELERYBEAT_LOGFILE="/var/log/celerybeat/celerybeat.log" +#Full path to the celeryd log file. +CELERYBEAT_LOGFILE="/var/log/celery/celerybeat.log" #Log level to use for celeryd. Default is INFO. CELERYBEAT_LOG_LEVEL="INFO" -#User to run celeryd as. Default is current user. -#CELERYBEAT_USER -#Group to run celeryd as. Default is current user. -#CELERYBEAT_GROUP diff --git a/roles/regluit_common/templates/celery/celeryd.j2 b/roles/regluit_common/templates/celery/celeryd.j2 index c918efb..9cd1b4a 100644 --- a/roles/regluit_common/templates/celery/celeryd.j2 +++ b/roles/regluit_common/templates/celery/celeryd.j2 @@ -1,9 +1,11 @@ CELERYD_NODES="w1" +CELERY_APP="regluit" CELERYD_CHDIR="{{ project_path }}/" CELERYD_LOG_FILE="/var/log/celery/%n.log" CELERYD_PID_FILE="/var/log/celery/%n.pid" -CELERYD="{{ project_path }}/{{ virtualenv_name }}/bin/django-admin.py celeryd" -CELERYD_MULTI="{{ project_path }}/{{ virtualenv_name }}/bin/django-admin.py celeryd_multi" +CELERYD_BIN="{{ project_path }}/{{ virtualenv_name }}/bin/celery" +CELERYD_USER="celery" +CELERYD_GROUP="celery" VIRTUALENV_ACTIVATE="{{ project_path }}/{{ virtualenv_name }}/bin/activate" export DJANGO_SETTINGS_MODULE="{{ django_settings_module }}" diff --git a/roles/regluit_common/templates/me.py.j2 b/roles/regluit_common/templates/me.py.j2 index b82ede1..3554281 100644 --- a/roles/regluit_common/templates/me.py.j2 +++ b/roles/regluit_common/templates/me.py.j2 @@ -57,19 +57,13 @@ REDIRECT_IS_HTTPS = False #BASE_URL = 'http://0.0.0.0' BASE_URL_SECURE = 'https://0.0.0.0' -# use redis as queuing service -BROKER_TRANSPORT = "{{ broker_transport }}" -BROKER_HOST = "{{ broker_host }}" -BROKER_PORT = {{ broker_port }} -BROKER_VHOST = "{{ broker_vhost }}" - # send celery log to Python logging -CELERYD_HIJACK_ROOT_LOGGER = False +WORKER_HIJACK_ROOT_LOGGER = False # a debug_toolbar setting INTERNAL_IPS = ('127.0.0.1',) -CELERYD_LOG_LEVEL = "INFO" +WORKER_LOG_LEVEL = "INFO" # decide which of the period tasks to add to the schedule #CELERYBEAT_SCHEDULE['send_test_email'] = SEND_TEST_EMAIL_JOB diff --git a/roles/regluit_dev/tasks/main.yml b/roles/regluit_dev/tasks/main.yml index c39323e..04dde10 100644 --- a/roles/regluit_dev/tasks/main.yml +++ b/roles/regluit_dev/tasks/main.yml @@ -1,56 +1,114 @@ --- + + - name: Install dev dependencies become: true apt: - name: ['git', 'python-setuptools', 'python-lxml', 'build-essential', 'libssl-dev', 'libffi-dev', 'libxml2-dev', 'libxslt-dev', 'mysql-server', 'mysql-client', 'libmysqlclient-dev', 'python-mysqldb', 'libcairo2'] + name: ['git', 'python-setuptools', 'python-lxml', 'build-essential', 'libssl-dev', 'libffi-dev', 'libxml2-dev', 'libxslt-dev', 'mysql-server', 'mysql-client', 'libmysqlclient-dev', 'python3-mysqldb', 'libcairo2'] update_cache: true state: present -- name: Migrate database - django_manage: - app_path: "{{ project_path }}" - command: "migrate --noinput" - virtualenv: "{{ project_path }}/venv" - settings: "{{ django_settings_module }}" +- name: Create project directory + become: true + file: + path: "{{ project_path }}" + state: directory + owner: "{{ user_name }}" + mode: 0755 + +- name: Checkout regluit repo + git: + accept_hostkey: yes + force: yes + repo: "{{ git_repo }}" + dest: "{{ project_path }}" + version: "{{ git_branch }}" -- name: Import fixtures - django_manage: - app_path: "{{ project_path }}" - command: "loaddata" +- name: Install python packages to virtualenv + pip: + requirements: "{{ project_path }}/requirements.txt" + state: latest virtualenv: "{{ project_path }}/venv" - settings: "{{ django_settings_module }}" - fixtures: "core/fixtures/initial_data.json core/fixtures/bookloader.json" -- name: Start Celery Worker - django_manage: - app_path: "{{ project_path }}" - command: "celery worker --detach --loglevel=INFO" - virtualenv: "{{ project_path }}/venv" - settings: "{{ django_settings_module }}" - -- name: Start Celery Beat - django_manage: - app_path: "{{ project_path }}" - command: "celery beat --detach --loglevel=INFO" - virtualenv: "{{ project_path }}/venv" - settings: "{{ django_settings_module }}" - -- name: Copy activation script +- name: Add project to PYTHONPATH of virtualenv template: - src: "activate_venv.sh.j2" - dest: "/home/{{ ansible_user }}/activate_venv.sh" - owner: "{{ ansible_user }}" - mode: "u=rx,g=rx,o=rwx" + src: "{{ item }}.j2" + dest: "{{ project_path }}/venv/lib/python3.6/site-packages/{{ item }}" + with_items: + - 'regluit.pth' + - 'opt.pth' + +- name: Create keys directory + file: + path: "{{ project_path}}/settings/keys" + state: directory + owner: "{{ user_name }}" + mode: 0755 + +- name: Copy keys files + copy: + src: "{{ project_path }}/settings/dummy/__init__.py" + dest: "{{ project_path }}/settings/keys/__init__.py" + remote_src: yes + +- name: Copy django settings template + template: + src: prod.py.j2 + dest: "{{ project_path }}/settings/prod.py" + +- name: Copy key templates to keys directory + template: + src: "{{ item }}.j2" + dest: "{{ project_path }}/settings/keys/{{ item }}" + with_items: + - 'common.py' + - 'host.py' + +- name: Copy sysadmin scripts to home directory + become: yes + template: + src: "{{ item }}.j2" + dest: "/home/{{ user_name }}/{{ item }}" + mode: 0755 + with_items: + - 'setup.sh' + - 'dump.sh' + +- name: Create django log directory + become: yes + file: + path: "/var/log/regluit" + state: directory + owner: "{{ user_name }}" + group: "www-data" + mode: 02775 + +- name: Open ports on firewall + become: yes + ufw: + rule: allow + port: "{{ item }}" + proto: tcp + with_items: + - '22' + - '80' + - '443' + +- name: Run redis tasks + import_tasks: redis.yml + +# - name: Run mysql tasks +# import_tasks: mysql.yml + +- name: Run apache tasks + import_tasks: apache.yml + +- name: Run cert tasks + import_tasks: certs.yml + +- name: Run celery tasks + import_tasks: celery.yml + -- name: Source activation script in bash profile - blockinfile: - path: "/home/{{ ansible_user }}/.profile" - block: | - if [ -f ~/activate_venv.sh ]; then - source ~/activate_venv.sh - fi - marker: "# {mark} SOURCE REGLUIT ACTIVATION SCRIPT ON LOGIN" -- debug: - msg: "Successfully provisioned regluit development environment." diff --git a/roles/regluit_prod/files/celerybeat b/roles/regluit_prod/files/celerybeat index 34b9ad6..8f97790 100644 --- a/roles/regluit_prod/files/celerybeat +++ b/roles/regluit_prod/files/celerybeat @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh -e # ========================================================= # celerybeat - Starts the Celery periodic task scheduler. # ========================================================= @@ -6,8 +6,7 @@ # :Usage: /etc/init.d/celerybeat {start|stop|force-reload|restart|try-restart|status} # :Configuration file: /etc/default/celerybeat or /etc/default/celeryd # -# See http://docs.celeryq.org/en/latest/cookbook/daemonizing.html#init-script-celerybeat -# This file is copied from https://github.com/ask/celery/blob/2.4/contrib/generic-init.d/celerybeat +# See http://docs.celeryproject.org/en/latest/userguide/daemonizing.html#generic-init-scripts ### BEGIN INIT INFO # Provides: celerybeat @@ -21,27 +20,125 @@ # Cannot use set -e/bash -e since the kill -0 command will abort # abnormally in the absence of a valid process ID. #set -e +VERSION=10.1 +echo "celery init v${VERSION}." -DEFAULT_PID_FILE="/var/run/celerybeat.pid" -DEFAULT_LOG_FILE="/var/log/celerybeat.log" -DEFAULT_LOG_LEVEL="INFO" -DEFAULT_CELERYBEAT="celerybeat" +if [ $(id -u) -ne 0 ]; then + echo "Error: This program can only be used by the root user." + echo " Unpriviliged users must use 'celery beat --detach'" + exit 1 +fi -# /etc/init.d/ssh: start and stop the celery task worker daemon. +origin_is_runlevel_dir () { + set +e + dirname $0 | grep -q "/etc/rc.\.d" + echo $? +} + +# Can be a runlevel symlink (e.g., S02celeryd) +if [ $(origin_is_runlevel_dir) -eq 0 ]; then + SCRIPT_FILE=$(readlink "$0") +else + SCRIPT_FILE="$0" +fi +SCRIPT_NAME="$(basename "$SCRIPT_FILE")" + +# /etc/init.d/celerybeat: start and stop the celery periodic task scheduler daemon. + +# Make sure executable configuration script is owned by root +_config_sanity() { + local path="$1" + local owner=$(ls -ld "$path" | awk '{print $3}') + local iwgrp=$(ls -ld "$path" | cut -b 6) + local iwoth=$(ls -ld "$path" | cut -b 9) + + if [ "$(id -u $owner)" != "0" ]; then + echo "Error: Config script '$path' must be owned by root!" + echo + echo "Resolution:" + echo "Review the file carefully, and make sure it hasn't been " + echo "modified with mailicious intent. When sure the " + echo "script is safe to execute with superuser privileges " + echo "you can change ownership of the script:" + echo " $ sudo chown root '$path'" + exit 1 + fi + + if [ "$iwoth" != "-" ]; then # S_IWOTH + echo "Error: Config script '$path' cannot be writable by others!" + echo + echo "Resolution:" + echo "Review the file carefully, and make sure it hasn't been " + echo "modified with malicious intent. When sure the " + echo "script is safe to execute with superuser privileges " + echo "you can change the scripts permissions:" + echo " $ sudo chmod 640 '$path'" + exit 1 + fi + if [ "$iwgrp" != "-" ]; then # S_IWGRP + echo "Error: Config script '$path' cannot be writable by group!" + echo + echo "Resolution:" + echo "Review the file carefully, and make sure it hasn't been " + echo "modified with malicious intent. When sure the " + echo "script is safe to execute with superuser privileges " + echo "you can change the scripts permissions:" + echo " $ sudo chmod 640 '$path'" + exit 1 + fi +} + +scripts="" if test -f /etc/default/celeryd; then + scripts="/etc/default/celeryd" + _config_sanity /etc/default/celeryd . /etc/default/celeryd fi -if test -f /etc/default/celerybeat; then - . /etc/default/celerybeat +EXTRA_CONFIG="/etc/default/${SCRIPT_NAME}" +if test -f "$EXTRA_CONFIG"; then + scripts="$scripts, $EXTRA_CONFIG" + _config_sanity "$EXTRA_CONFIG" + . "$EXTRA_CONFIG" fi +echo "Using configuration: $scripts" + +CELERY_BIN=${CELERY_BIN:-"celery"} +DEFAULT_USER="celery" +DEFAULT_PID_FILE="/var/run/celery/beat.pid" +DEFAULT_LOG_FILE="/var/log/celery/beat.log" +DEFAULT_LOG_LEVEL="INFO" +DEFAULT_CELERYBEAT="$CELERY_BIN beat" + CELERYBEAT=${CELERYBEAT:-$DEFAULT_CELERYBEAT} -CELERYBEAT_PID_FILE=${CELERYBEAT_PID_FILE:-${CELERYBEAT_PIDFILE:-$DEFAULT_PID_FILE}} -CELERYBEAT_LOG_FILE=${CELERYBEAT_LOG_FILE:-${CELERYBEAT_LOGFILE:-$DEFAULT_LOG_FILE}} CELERYBEAT_LOG_LEVEL=${CELERYBEAT_LOG_LEVEL:-${CELERYBEAT_LOGLEVEL:-$DEFAULT_LOG_LEVEL}} +CELERYBEAT_SU=${CELERYBEAT_SU:-"su"} +CELERYBEAT_SU_ARGS=${CELERYBEAT_SU_ARGS:-""} + +# Sets --app argument for CELERY_BIN +CELERY_APP_ARG="" +if [ ! -z "$CELERY_APP" ]; then + CELERY_APP_ARG="--app=$CELERY_APP" +fi + +CELERYBEAT_USER=${CELERYBEAT_USER:-${CELERYD_USER:-$DEFAULT_USER}} + +# Set CELERY_CREATE_DIRS to always create log/pid dirs. +CELERY_CREATE_DIRS=${CELERY_CREATE_DIRS:-0} +CELERY_CREATE_RUNDIR=$CELERY_CREATE_DIRS +CELERY_CREATE_LOGDIR=$CELERY_CREATE_DIRS +if [ -z "$CELERYBEAT_PID_FILE" ]; then + CELERYBEAT_PID_FILE="$DEFAULT_PID_FILE" + CELERY_CREATE_RUNDIR=1 +fi +if [ -z "$CELERYBEAT_LOG_FILE" ]; then + CELERYBEAT_LOG_FILE="$DEFAULT_LOG_FILE" + CELERY_CREATE_LOGDIR=1 +fi + export CELERY_LOADER CELERYBEAT_OPTS="$CELERYBEAT_OPTS -f $CELERYBEAT_LOG_FILE -l $CELERYBEAT_LOG_LEVEL" @@ -52,26 +149,12 @@ fi CELERYBEAT_LOG_DIR=`dirname $CELERYBEAT_LOG_FILE` CELERYBEAT_PID_DIR=`dirname $CELERYBEAT_PID_FILE` -if [ ! -d "$CELERYBEAT_LOG_DIR" ]; then - mkdir -p $CELERYBEAT_LOG_DIR -fi -if [ ! -d "$CELERYBEAT_PID_DIR" ]; then - mkdir -p $CELERYBEAT_PID_DIR -fi # Extra start-stop-daemon options, like user/group. -if [ -n "$CELERYBEAT_USER" ]; then - DAEMON_OPTS="$DAEMON_OPTS --uid $CELERYBEAT_USER" - chown "$CELERYBEAT_USER" $CELERYBEAT_LOG_DIR $CELERYBEAT_PID_DIR -fi -if [ -n "$CELERYBEAT_GROUP" ]; then - DAEMON_OPTS="$DAEMON_OPTS --gid $CELERYBEAT_GROUP" - chgrp "$CELERYBEAT_GROUP" $CELERYBEAT_LOG_DIR $CELERYBEAT_PID_DIR -fi CELERYBEAT_CHDIR=${CELERYBEAT_CHDIR:-$CELERYD_CHDIR} if [ -n "$CELERYBEAT_CHDIR" ]; then - DAEMON_OPTS="$DAEMON_OPTS --workdir $CELERYBEAT_CHDIR" + DAEMON_OPTS="$DAEMON_OPTS --workdir=$CELERYBEAT_CHDIR" fi @@ -80,17 +163,64 @@ export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" check_dev_null() { if [ ! -c /dev/null ]; then echo "/dev/null is not a character device!" - exit 1 + exit 75 # EX_TEMPFAIL fi } +maybe_die() { + if [ $? -ne 0 ]; then + echo "Exiting: $*" + exit 77 # EX_NOPERM + fi +} + +create_default_dir() { + if [ ! -d "$1" ]; then + echo "- Creating default directory: '$1'" + mkdir -p "$1" + maybe_die "Couldn't create directory $1" + echo "- Changing permissions of '$1' to 02755" + chmod 02755 "$1" + maybe_die "Couldn't change permissions for $1" + if [ -n "$CELERYBEAT_USER" ]; then + echo "- Changing owner of '$1' to '$CELERYBEAT_USER'" + chown "$CELERYBEAT_USER" "$1" + maybe_die "Couldn't change owner of $1" + fi + if [ -n "$CELERYBEAT_GROUP" ]; then + echo "- Changing group of '$1' to '$CELERYBEAT_GROUP'" + chgrp "$CELERYBEAT_GROUP" "$1" + maybe_die "Couldn't change group of $1" + fi + fi +} + +check_paths() { + if [ $CELERY_CREATE_LOGDIR -eq 1 ]; then + create_default_dir "$CELERYBEAT_LOG_DIR" + fi + if [ $CELERY_CREATE_RUNDIR -eq 1 ]; then + create_default_dir "$CELERYBEAT_PID_DIR" + fi +} + + +create_paths () { + create_default_dir "$CELERYBEAT_LOG_DIR" + create_default_dir "$CELERYBEAT_PID_DIR" +} + +is_running() { + pid=$1 + ps $pid > /dev/null 2>&1 +} + wait_pid () { pid=$1 forever=1 i=0 while [ $forever -gt 0 ]; do - kill -0 $pid 1>/dev/null 2>&1 - if [ $? -eq 1 ]; then + if ! is_running $pid; then echo "OK" forever=0 else @@ -109,7 +239,7 @@ wait_pid () { stop_beat () { - echo -n "Stopping celerybeat... " + echo -n "Stopping ${SCRIPT_NAME}... " if [ -f "$CELERYBEAT_PID_FILE" ]; then wait_pid $(cat "$CELERYBEAT_PID_FILE") else @@ -117,38 +247,82 @@ stop_beat () { fi } +_chuid () { + ${CELERYBEAT_SU} ${CELERYBEAT_SU_ARGS} \ + "$CELERYBEAT_USER" -c "$CELERYBEAT $*" +} + start_beat () { - echo "Starting celerybeat..." - if [ -n "$VIRTUALENV" ]; then - source $VIRTUALENV/bin/activate - fi - $CELERYBEAT $CELERYBEAT_OPTS $DAEMON_OPTS --detach \ + echo "Starting ${SCRIPT_NAME}..." + _chuid $CELERY_APP_ARG $CELERYBEAT_OPTS $DAEMON_OPTS --detach \ --pidfile="$CELERYBEAT_PID_FILE" } +check_status () { + local failed= + local pid_file=$CELERYBEAT_PID_FILE + if [ ! -e $pid_file ]; then + echo "${SCRIPT_NAME} is down: no pid file found" + failed=true + elif [ ! -r $pid_file ]; then + echo "${SCRIPT_NAME} is in unknown state, user cannot read pid file." + failed=true + else + local pid=`cat "$pid_file"` + local cleaned_pid=`echo "$pid" | sed -e 's/[^0-9]//g'` + if [ -z "$pid" ] || [ "$cleaned_pid" != "$pid" ]; then + echo "${SCRIPT_NAME}: bad pid file ($pid_file)" + failed=true + else + local failed= + kill -0 $pid 2> /dev/null || failed=true + if [ "$failed" ]; then + echo "${SCRIPT_NAME} (pid $pid) is down, but pid file exists!" + failed=true + else + echo "${SCRIPT_NAME} (pid $pid) is up..." + fi + fi + fi + + [ "$failed" ] && exit 1 || exit 0 +} + case "$1" in - start) - check_dev_null - start_beat + start) + check_dev_null + check_paths + start_beat ;; - stop) - stop_beat + stop) + check_paths + stop_beat ;; - reload|force-reload) - echo "Use start+stop" + reload|force-reload) + echo "Use start+stop" ;; - restart) - echo "Restarting celery periodic task scheduler" - stop_beat - check_dev_null - start_beat + status) + check_status + ;; + restart) + echo "Restarting celery periodic task scheduler" + check_paths + stop_beat && check_dev_null && start_beat + ;; + create-paths) + check_dev_null + create_paths + ;; + check-paths) + check_dev_null + check_paths + ;; + *) + echo "Usage: /etc/init.d/${SCRIPT_NAME} {start|stop|restart|create-paths|status}" + exit 64 # EX_USAGE ;; - - *) - echo "Usage: /etc/init.d/celerybeat {start|stop|restart}" - exit 1 esac -exit 0 \ No newline at end of file +exit 0 diff --git a/roles/regluit_prod/files/celeryd b/roles/regluit_prod/files/celeryd index 12ff844..b439d16 100644 --- a/roles/regluit_prod/files/celeryd +++ b/roles/regluit_prod/files/celeryd @@ -1,88 +1,12 @@ -#!/bin/bash +#!/bin/sh -e # ============================================ # celeryd - Starts the Celery worker daemon. # ============================================ # # :Usage: /etc/init.d/celeryd {start|stop|force-reload|restart|try-restart|status} +# :Configuration file: /etc/default/celeryd (or /usr/local/etc/celeryd on BSD) # -# :Configuration file: /etc/default/celeryd -# -# To configure celeryd you probably need to tell it where to chdir. -# -# EXAMPLE CONFIGURATION -# ===================== -# -# this is an example configuration for a Python project: -# -# /etc/default/celeryd: -# -# # List of nodes to start -# CELERYD_NODES="worker1 worker2 worker3"k -# # ... can also be a number of workers -# CELERYD_NODES=3 -# -# # Where to chdir at start. -# CELERYD_CHDIR="/opt/Myproject/" -# -# # Extra arguments to celeryd -# CELERYD_OPTS="--time-limit=300" -# -# # Name of the celery config module.# -# CELERY_CONFIG_MODULE="celeryconfig" -# -# EXAMPLE DJANGO CONFIGURATION -# ============================ -# -# # Where the Django project is. -# CELERYD_CHDIR="/opt/Project/" -# -# # Name of the projects settings module. -# export DJANGO_SETTINGS_MODULE="settings" -# -# # Path to celeryd -# CELERYD="/opt/Project/manage.py celeryd" -# -# AVAILABLE OPTIONS -# ================= -# -# * CELERYD_NODES -# -# A space separated list of nodes, or a number describing the number of -# nodes, to start -# -# * CELERYD_OPTS -# Additional arguments to celeryd-multi, see `celeryd-multi --help` -# and `celeryd --help` for help. -# -# * CELERYD_CHDIR -# Path to chdir at start. Default is to stay in the current directory. -# -# * CELERYD_PIDFILE -# Full path to the pidfile. Default is /var/run/celeryd.pid. -# -# * CELERYD_LOGFILE -# Full path to the celeryd logfile. Default is /var/log/celeryd.log -# -# * CELERYD_LOG_LEVEL -# Log level to use for celeryd. Default is INFO. -# -# * CELERYD -# Path to the celeryd program. Default is `celeryd`. -# You can point this to an virtualenv, or even use manage.py for django. -# -# * CELERYD_USER -# User to run celeryd as. Default is current user. -# -# * CELERYD_GROUP -# Group to run celeryd as. Default is current user. - -# VARIABLE EXPANSION -# ================== -# -# The following abbreviations will be expanded -# -# * %n -> node name -# * %h -> host name +# See http://docs.celeryproject.org/en/latest/userguide/daemonizing.html#generic-init-scripts ### BEGIN INIT INFO @@ -93,34 +17,133 @@ # Default-Stop: 0 1 6 # Short-Description: celery task worker daemon ### END INIT INFO +# +# +# To implement separate init-scripts, copy this script and give it a different +# name. That is, if your new application named "little-worker" needs an init, +# you should use: +# +# cp /etc/init.d/celeryd /etc/init.d/little-worker +# +# You can then configure this by manipulating /etc/default/little-worker. +# +VERSION=10.1 +echo "celery init v${VERSION}." +if [ $(id -u) -ne 0 ]; then + echo "Error: This program can only be used by the root user." + echo " Unprivileged users must use the 'celery multi' utility, " + echo " or 'celery worker --detach'." + exit 1 +fi -#set -e +origin_is_runlevel_dir () { + set +e + dirname $0 | grep -q "/etc/rc.\.d" + echo $? +} -DEFAULT_PID_FILE="/var/run/celeryd@%n.pid" -DEFAULT_LOG_FILE="/var/log/celeryd@%n.log" +# Can be a runlevel symlink (e.g., S02celeryd) +if [ $(origin_is_runlevel_dir) -eq 0 ]; then + SCRIPT_FILE=$(readlink "$0") +else + SCRIPT_FILE="$0" +fi +SCRIPT_NAME="$(basename "$SCRIPT_FILE")" + +DEFAULT_USER="celery" +DEFAULT_PID_FILE="/var/run/celery/%n.pid" +DEFAULT_LOG_FILE="/var/log/celery/%n%I.log" DEFAULT_LOG_LEVEL="INFO" DEFAULT_NODES="celery" -DEFAULT_CELERYD="-m celery.bin.celeryd_detach" +DEFAULT_CELERYD="-m celery worker --detach" -# /etc/init.d/celeryd: start and stop the celery task worker daemon. - -CELERY_DEFAULTS=${CELERY_DEFAULTS:-"/etc/default/celeryd"} - -test -f "$CELERY_DEFAULTS" && . "$CELERY_DEFAULTS" -if [ -f "/etc/default/celeryd" ]; then - . /etc/default/celeryd +if [ -d "/etc/default" ]; then + CELERY_CONFIG_DIR="/etc/default" +else + CELERY_CONFIG_DIR="/usr/local/etc" fi -if [ -f $VIRTUALENV_ACTIVATE ]; then - echo "activating virtualenv $VIRTUALENV_ACTIVATE" - source "$VIRTUALENV_ACTIVATE" +CELERY_DEFAULTS=${CELERY_DEFAULTS:-"$CELERY_CONFIG_DIR/${SCRIPT_NAME}"} + +# Make sure executable configuration script is owned by root +_config_sanity() { + local path="$1" + local owner=$(ls -ld "$path" | awk '{print $3}') + local iwgrp=$(ls -ld "$path" | cut -b 6) + local iwoth=$(ls -ld "$path" | cut -b 9) + + if [ "$(id -u $owner)" != "0" ]; then + echo "Error: Config script '$path' must be owned by root!" + echo + echo "Resolution:" + echo "Review the file carefully, and make sure it hasn't been " + echo "modified with mailicious intent. When sure the " + echo "script is safe to execute with superuser privileges " + echo "you can change ownership of the script:" + echo " $ sudo chown root '$path'" + exit 1 + fi + + if [ "$iwoth" != "-" ]; then # S_IWOTH + echo "Error: Config script '$path' cannot be writable by others!" + echo + echo "Resolution:" + echo "Review the file carefully, and make sure it hasn't been " + echo "modified with malicious intent. When sure the " + echo "script is safe to execute with superuser privileges " + echo "you can change the scripts permissions:" + echo " $ sudo chmod 640 '$path'" + exit 1 + fi + if [ "$iwgrp" != "-" ]; then # S_IWGRP + echo "Error: Config script '$path' cannot be writable by group!" + echo + echo "Resolution:" + echo "Review the file carefully, and make sure it hasn't been " + echo "modified with malicious intent. When sure the " + echo "script is safe to execute with superuser privileges " + echo "you can change the scripts permissions:" + echo " $ sudo chmod 640 '$path'" + exit 1 + fi +} + +if [ -f "$CELERY_DEFAULTS" ]; then + _config_sanity "$CELERY_DEFAULTS" + echo "Using config script: $CELERY_DEFAULTS" + . "$CELERY_DEFAULTS" +fi + +# Sets --app argument for CELERY_BIN +CELERY_APP_ARG="" +if [ ! -z "$CELERY_APP" ]; then + CELERY_APP_ARG="--app=$CELERY_APP" +fi + +# Options to su +# can be used to enable login shell (CELERYD_SU_ARGS="-l"), +# or even to use start-stop-daemon instead of su. +CELERYD_SU=${CELERY_SU:-"su"} +CELERYD_SU_ARGS=${CELERYD_SU_ARGS:-""} + +CELERYD_USER=${CELERYD_USER:-$DEFAULT_USER} + +# Set CELERY_CREATE_DIRS to always create log/pid dirs. +CELERY_CREATE_DIRS=${CELERY_CREATE_DIRS:-0} +CELERY_CREATE_RUNDIR=$CELERY_CREATE_DIRS +CELERY_CREATE_LOGDIR=$CELERY_CREATE_DIRS +if [ -z "$CELERYD_PID_FILE" ]; then + CELERYD_PID_FILE="$DEFAULT_PID_FILE" + CELERY_CREATE_RUNDIR=1 +fi +if [ -z "$CELERYD_LOG_FILE" ]; then + CELERYD_LOG_FILE="$DEFAULT_LOG_FILE" + CELERY_CREATE_LOGDIR=1 fi -CELERYD_PID_FILE=${CELERYD_PID_FILE:-${CELERYD_PIDFILE:-$DEFAULT_PID_FILE}} -CELERYD_LOG_FILE=${CELERYD_LOG_FILE:-${CELERYD_LOGFILE:-$DEFAULT_LOG_FILE}} CELERYD_LOG_LEVEL=${CELERYD_LOG_LEVEL:-${CELERYD_LOGLEVEL:-$DEFAULT_LOG_LEVEL}} -CELERYD_MULTI=${CELERYD_MULTI:-"celeryd-multi"} -CELERYD=${CELERYD:-$DEFAULT_CELERYD} +CELERY_BIN=${CELERY_BIN:-"celery"} +CELERYD_MULTI=${CELERYD_MULTI:-"$CELERY_BIN multi"} CELERYD_NODES=${CELERYD_NODES:-$DEFAULT_NODES} export CELERY_LOADER @@ -129,64 +152,210 @@ if [ -n "$2" ]; then CELERYD_OPTS="$CELERYD_OPTS $2" fi -# Extra start-stop-daemon options, like user/group. -if [ -n "$CELERYD_USER" ]; then - DAEMON_OPTS="$DAEMON_OPTS --uid=$CELERYD_USER" -fi -if [ -n "$CELERYD_GROUP" ]; then - DAEMON_OPTS="$DAEMON_OPTS --gid=$CELERYD_GROUP" -fi +CELERYD_LOG_DIR=`dirname $CELERYD_LOG_FILE` +CELERYD_PID_DIR=`dirname $CELERYD_PID_FILE` +# Extra start-stop-daemon options, like user/group. if [ -n "$CELERYD_CHDIR" ]; then - DAEMON_OPTS="$DAEMON_OPTS --workdir=\"$CELERYD_CHDIR\"" + DAEMON_OPTS="$DAEMON_OPTS --workdir=$CELERYD_CHDIR" fi check_dev_null() { if [ ! -c /dev/null ]; then echo "/dev/null is not a character device!" - exit 1 + exit 75 # EX_TEMPFAIL fi } +maybe_die() { + if [ $? -ne 0 ]; then + echo "Exiting: $* (errno $?)" + exit 77 # EX_NOPERM + fi +} + +echo $CELERY_BIN + +create_default_dir() { + if [ ! -d "$1" ]; then + echo "- Creating default directory: '$1'" + mkdir -p "$1" + maybe_die "Couldn't create directory $1" + echo "- Changing permissions of '$1' to 02755" + chmod 02755 "$1" + maybe_die "Couldn't change permissions for $1" + if [ -n "$CELERYD_USER" ]; then + echo "- Changing owner of '$1' to '$CELERYD_USER'" + chown "$CELERYD_USER" "$1" + maybe_die "Couldn't change owner of $1" + fi + if [ -n "$CELERYD_GROUP" ]; then + echo "- Changing group of '$1' to '$CELERYD_GROUP'" + chgrp "$CELERYD_GROUP" "$1" + maybe_die "Couldn't change group of $1" + fi + fi +} + + +check_paths() { + if [ $CELERY_CREATE_LOGDIR -eq 1 ]; then + create_default_dir "$CELERYD_LOG_DIR" + fi + if [ $CELERY_CREATE_RUNDIR -eq 1 ]; then + create_default_dir "$CELERYD_PID_DIR" + fi +} + +create_paths() { + create_default_dir "$CELERYD_LOG_DIR" + create_default_dir "$CELERYD_PID_DIR" +} + export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" -stop_workers () { - $CELERYD_MULTI stop $CELERYD_NODES --pidfile="$CELERYD_PID_FILE" +_get_pidfiles () { + # note: multi < 3.1.14 output to stderr, not stdout, hence the redirect. + ${CELERYD_MULTI} expand "${CELERYD_PID_FILE}" ${CELERYD_NODES} 2>&1 +} + + +_get_pids() { + found_pids=0 + my_exitcode=0 + + for pidfile in $(_get_pidfiles); do + local pid=`cat "$pidfile"` + local cleaned_pid=`echo "$pid" | sed -e 's/[^0-9]//g'` + if [ -z "$pid" ] || [ "$cleaned_pid" != "$pid" ]; then + echo "bad pid file ($pidfile)" + one_failed=true + my_exitcode=1 + else + found_pids=1 + echo "$pid" + fi + + if [ $found_pids -eq 0 ]; then + echo "${SCRIPT_NAME}: All nodes down" + exit $my_exitcode + fi + done +} + + +_chuid () { + ${CELERYD_SU} ${CELERYD_SU_ARGS} "$CELERYD_USER" -c "$CELERYD_MULTI $*" } start_workers () { - $CELERYD_MULTI start $CELERYD_NODES $DAEMON_OPTS \ - --pidfile="$CELERYD_PID_FILE" \ - --logfile="$CELERYD_LOG_FILE" \ - --loglevel="$CELERYD_LOG_LEVEL" \ - --cmd="$CELERYD" \ - $CELERYD_OPTS + if [ ! -z "$CELERYD_ULIMIT" ]; then + ulimit $CELERYD_ULIMIT + fi + _chuid $* start $CELERYD_NODES $DAEMON_OPTS \ + --pidfile="$CELERYD_PID_FILE" \ + --logfile="$CELERYD_LOG_FILE" \ + --loglevel="$CELERYD_LOG_LEVEL" \ + $CELERY_APP_ARG \ + $CELERYD_OPTS +} + + +dryrun () { + (C_FAKEFORK=1 start_workers --verbose) +} + + +stop_workers () { + _chuid stopwait $CELERYD_NODES --pidfile="$CELERYD_PID_FILE" } restart_workers () { - $CELERYD_MULTI restart $CELERYD_NODES $DAEMON_OPTS \ - --pidfile="$CELERYD_PID_FILE" \ - --logfile="$CELERYD_LOG_FILE" \ - --loglevel="$CELERYD_LOG_LEVEL" \ - --cmd="$CELERYD" \ - $CELERYD_OPTS + _chuid restart $CELERYD_NODES $DAEMON_OPTS \ + --pidfile="$CELERYD_PID_FILE" \ + --logfile="$CELERYD_LOG_FILE" \ + --loglevel="$CELERYD_LOG_LEVEL" \ + $CELERY_APP_ARG \ + $CELERYD_OPTS } +kill_workers() { + _chuid kill $CELERYD_NODES $DAEMON_OPTS --pidfile="$CELERYD_PID_FILE" +} + + +restart_workers_graceful () { + echo "WARNING: Use with caution in production" + echo "The workers will attempt to restart, but they may not be able to." + local worker_pids= + worker_pids=`_get_pids` + [ "$one_failed" ] && exit 1 + + for worker_pid in $worker_pids; do + local failed= + kill -HUP $worker_pid 2> /dev/null || failed=true + if [ "$failed" ]; then + echo "${SCRIPT_NAME} worker (pid $worker_pid) could not be restarted" + one_failed=true + else + echo "${SCRIPT_NAME} worker (pid $worker_pid) received SIGHUP" + fi + done + + [ "$one_failed" ] && exit 1 || exit 0 +} + + +check_status () { + my_exitcode=0 + found_pids=0 + + local one_failed= + for pidfile in $(_get_pidfiles); do + if [ ! -r $pidfile ]; then + echo "${SCRIPT_NAME} down: no pidfiles found" + one_failed=true + break + fi + + local node=`basename "$pidfile" .pid` + local pid=`cat "$pidfile"` + local cleaned_pid=`echo "$pid" | sed -e 's/[^0-9]//g'` + if [ -z "$pid" ] || [ "$cleaned_pid" != "$pid" ]; then + echo "bad pid file ($pidfile)" + one_failed=true + else + local failed= + kill -0 $pid 2> /dev/null || failed=true + if [ "$failed" ]; then + echo "${SCRIPT_NAME} (node $node) (pid $pid) is down, but pidfile exists!" + one_failed=true + else + echo "${SCRIPT_NAME} (node $node) (pid $pid) is up..." + fi + fi + done + + [ "$one_failed" ] && exit 1 || exit 0 +} + case "$1" in start) check_dev_null + check_paths start_workers ;; stop) check_dev_null + check_paths stop_workers ;; @@ -195,22 +364,49 @@ case "$1" in ;; status) - celeryctl status + check_status ;; restart) check_dev_null + check_paths restart_workers ;; + graceful) + check_dev_null + restart_workers_graceful + ;; + + kill) + check_dev_null + kill_workers + ;; + + dryrun) + check_dev_null + dryrun + ;; + try-restart) check_dev_null + check_paths restart_workers ;; + create-paths) + check_dev_null + create_paths + ;; + + check-paths) + check_dev_null + check_paths + ;; + *) - echo "Usage: /etc/init.d/celeryd {start|stop|restart|try-restart|kill}" - exit 1 + echo "Usage: /etc/init.d/${SCRIPT_NAME} {start|stop|restart|graceful|kill|dryrun|create-paths}" + exit 64 # EX_USAGE ;; esac diff --git a/roles/regluit_prod/tasks/apache.yml b/roles/regluit_prod/tasks/apache.yml index 37aaa5d..49bf73e 100644 --- a/roles/regluit_prod/tasks/apache.yml +++ b/roles/regluit_prod/tasks/apache.yml @@ -2,7 +2,7 @@ - name: Install apache become: yes apt: - name: ['apache2', 'libapache2-mod-wsgi', 'cronolog'] + name: ['apache2', 'libapache2-mod-wsgi-py3', 'cronolog'] state: present - name: Ensure apache is running and enabled diff --git a/roles/regluit_prod/tasks/celery.yml b/roles/regluit_prod/tasks/celery.yml index 9d6d1d5..0c125ca 100644 --- a/roles/regluit_prod/tasks/celery.yml +++ b/roles/regluit_prod/tasks/celery.yml @@ -4,6 +4,8 @@ user: create_home: no name: "celery" + groups: + - www-data tags: - celery @@ -57,11 +59,9 @@ - celery - name: Start celeryd - django_manage: - app_path: "{{ project_path }}" - command: "celeryd_multi restart w1" - virtualenv: "{{ project_path }}/venv" - settings: "{{ django_settings_module }}" + become: yes + command: /etc/init.d/celeryd start - name: Start celerybeat + become: yes command: /etc/init.d/celerybeat start \ No newline at end of file diff --git a/roles/regluit_prod/tasks/certs.yml b/roles/regluit_prod/tasks/certs.yml index 38b6fc7..edda3ce 100644 --- a/roles/regluit_prod/tasks/certs.yml +++ b/roles/regluit_prod/tasks/certs.yml @@ -47,15 +47,15 @@ - name: Create a challenge for server_name using a account key file. acme_certificate: - account_key_src: private/decrypted/letsencrypt_account.key + account_key_src: "private/decrypted/letsencrypt_account.key" acme_directory: "{{ le_endpoint }}" acme_version: 2 remaining_days: 45 - force: no + force: yes # change this to yes if you have fake certs select_crypto_backend: openssl csr: "private/decrypted/{{ server_name }}.csr" - dest: private/certs/{{ server_name }}.crt - fullchain_dest: private/certs/{{ server_name }}.ca-bundle + dest: "private/certs/{{ server_name }}.crt" + fullchain_dest: "private/certs/{{ server_name }}.ca-bundle" delegate_to: 127.0.0.1 register: acme_challenge @@ -78,6 +78,10 @@ group: "{{ user_name }}" mode: 0755 +- name: debug + debug: + msg: "{{ acme_challenge }}" + - name: copy main challenge copy: dest: /var/www/static/{{ acme_challenge['challenge_data'][server_name]['http-01']['resource'] }} @@ -99,16 +103,16 @@ remaining_days: 45 select_crypto_backend: openssl csr: "private/decrypted/{{ server_name }}.csr" - dest: private/certs/{{ server_name }}.crt - fullchain_dest: private/certs/{{ server_name }}.ca-bundle + dest: "private/certs/{{ server_name }}.crt" + fullchain_dest: "private/certs/{{ server_name }}.ca-bundle" data: "{{ acme_challenge }}" delegate_to: 127.0.0.1 - name: Copy certs become: yes copy: - src: private/certs/{{ item }} - dest: /etc/ssl/certs/{{ item }} + src: "private/certs/{{ item }}" + dest: "/etc/ssl/certs/{{ item }}" owner: "{{ user_name }}" group: "{{ user_name }}" mode: 0600 @@ -123,8 +127,8 @@ - name: Copy server key become: yes copy: - src: private/{{ server_name }}.key - dest: /etc/ssl/private/server.key + src: "private/{{ server_name }}.key" + dest: "/etc/ssl/private/server.key" owner: "{{ user_name }}" group: "{{ user_name }}" mode: 0600 @@ -135,8 +139,8 @@ - name: delete decrypted files file: - path: private/decrypted/{{ item }} - state: absent + path: "private/decrypted/{{ item }}" + state: file with_items: - 'letsencrypt_account.key' - '{{ server_name }}.csr' diff --git a/roles/regluit_prod/tasks/main.yml b/roles/regluit_prod/tasks/main.yml index f6f90c1..29aedbe 100644 --- a/roles/regluit_prod/tasks/main.yml +++ b/roles/regluit_prod/tasks/main.yml @@ -2,7 +2,7 @@ - name: Install prod dependencies become: true apt: - name: ['git', 'python-setuptools', 'python-lxml', 'python-dev', 'python-virtualenv', 'build-essential', 'libssl-dev', 'libffi-dev', 'libxml2-dev', 'libxslt-dev', 'mysql-client', 'libmysqlclient-dev', 'python-mysqldb', 'libcairo2', 'postfix', 'libjpeg-dev'] + name: ['git', 'python-setuptools', 'python-lxml', 'python-dev', 'python-virtualenv', 'build-essential', 'libssl-dev', 'libffi-dev', 'libxml2-dev', 'libxslt-dev', 'mysql-client', 'libmysqlclient-dev', 'libcairo2', 'postfix', 'libjpeg-dev'] update_cache: true state: present @@ -24,14 +24,14 @@ - name: Install python packages to virtualenv pip: - requirements: "{{ project_path }}/requirements_versioned.pip" + requirements: "{{ project_path }}/requirements.txt" state: latest virtualenv: "{{ project_path }}/venv" - name: Add project to PYTHONPATH of virtualenv template: src: "{{ item }}.j2" - dest: "{{ project_path }}/venv/lib/python2.7/site-packages/{{ item }}" + dest: "{{ project_path }}/venv/lib/python3.6/site-packages/{{ item }}" with_items: - 'regluit.pth' - 'opt.pth' @@ -88,9 +88,9 @@ port: "{{ item }}" proto: tcp with_items: - - 22 - - 80 - - 443 + - '22' + - '80' + - '443' - name: Run redis tasks import_tasks: redis.yml diff --git a/roles/regluit_prod/templates/apache.conf.j2 b/roles/regluit_prod/templates/apache.conf.j2 index d85cc9c..22485d2 100644 --- a/roles/regluit_prod/templates/apache.conf.j2 +++ b/roles/regluit_prod/templates/apache.conf.j2 @@ -27,8 +27,6 @@ SSLCertificateFile /etc/ssl/certs/{{ server_name }}.crt SSLCertificateKeyFile /etc/ssl/private/server.key SSLCertificateChainFile /etc/ssl/certs/{{ server_name }}.ca-bundle -#SSLCertificateChainFile /etc/ssl/certs/gd_bundle.crt - WSGIDaemonProcess regluit processes=4 threads=4 python-eggs=/tmp/regluit-python-eggs WSGIScriptAlias / /opt/regluit/deploy/prod.wsgi diff --git a/roles/regluit_prod/templates/celery/celerybeat.j2 b/roles/regluit_prod/templates/celery/celerybeat.j2 index d459ad8..358edd2 100644 --- a/roles/regluit_prod/templates/celery/celerybeat.j2 +++ b/roles/regluit_prod/templates/celery/celerybeat.j2 @@ -2,34 +2,26 @@ # to be placed at /etc/defaults/celerybeat # Where to chdir at start. -CELERYBEAT_CHDIR="{{ project_path }}t/" - -# Extra arguments to celerybeat -#CELERYBEAT_OPTS="--schedule=/var/run/celerybeat-schedule" - -# Name of the celery config module.# -CELERY_CONFIG_MODULE="celeryconfig" +CELERYBEAT_CHDIR="{{ project_path }}/" # Name of the projects settings module. export DJANGO_SETTINGS_MODULE="{{ django_settings_module }}" -# Path to celerybeat -CELERYBEAT="{{ project_path }}/{{ virtualenv_name }}/bin/django-admin.py celerybeat" +# Path to celery +CELERY_BIN="{{ project_path }}/{{ virtualenv_name }}/bin/celery" # virtualenv to use VIRTUALENV="{{ project_path }}/{{ virtualenv_name }}" #Full path to the PID file. Default is /var/run/celeryd.pid -CELERYBEAT_PIDFILE="/var/log/celerybeat/celerybeat.pid" +CELERYBEAT_PID_FILE="/var/run/celery/celerybeat.pid" #Full path to the celeryd log file. Default is /var/log/celeryd.log -CELERYBEAT_LOGFILE="/var/log/celerybeat/celerybeat.log" +CELERYBEAT_LOG_FILE="/var/log/celery/beat.log" #Log level to use for celeryd. Default is INFO. CELERYBEAT_LOG_LEVEL="INFO" -#User to run celeryd as. Default is current user. -#CELERYBEAT_USER +CELERY_APP="regluit" -#Group to run celeryd as. Default is current user. -#CELERYBEAT_GROUP +CELERYBEAT_OPTS="--schedule=/var/run/celery/celerybeat-schedule" \ No newline at end of file diff --git a/roles/regluit_prod/templates/celery/celeryd.j2 b/roles/regluit_prod/templates/celery/celeryd.j2 index c918efb..c7e2736 100644 --- a/roles/regluit_prod/templates/celery/celeryd.j2 +++ b/roles/regluit_prod/templates/celery/celeryd.j2 @@ -1,9 +1,12 @@ CELERYD_NODES="w1" +CELERY_APP="regluit" CELERYD_CHDIR="{{ project_path }}/" CELERYD_LOG_FILE="/var/log/celery/%n.log" -CELERYD_PID_FILE="/var/log/celery/%n.pid" -CELERYD="{{ project_path }}/{{ virtualenv_name }}/bin/django-admin.py celeryd" -CELERYD_MULTI="{{ project_path }}/{{ virtualenv_name }}/bin/django-admin.py celeryd_multi" +CELERYD_PID_FILE="/var/run/celery/%n.pid" +CELERY_BIN="{{ project_path }}/{{ virtualenv_name }}/bin/celery" +CELERYD_USER="celery" +CELERYD_GROUP="celery" +CELERYD_LOG_LEVEL="DEBUG" VIRTUALENV_ACTIVATE="{{ project_path }}/{{ virtualenv_name }}/bin/activate" export DJANGO_SETTINGS_MODULE="{{ django_settings_module }}" diff --git a/roles/regluit_prod/templates/prod.py.j2 b/roles/regluit_prod/templates/prod.py.j2 index a46a917..7ddeb18 100644 --- a/roles/regluit_prod/templates/prod.py.j2 +++ b/roles/regluit_prod/templates/prod.py.j2 @@ -1,3 +1,4 @@ +# coding=utf-8 from .common import * ALLOWED_HOSTS = ['.unglue.it'] @@ -23,7 +24,9 @@ DATABASES = { 'PASSWORD': '{{ mysql_db_pass }}', 'HOST': '{{ mysql_db_host }}', 'PORT': '{{ mysql_db_port }}', - 'TEST_CHARSET': 'utf8', + 'TEST': { + 'CHARSET': 'utf8', + } } } @@ -35,25 +38,17 @@ TIME_ZONE = 'America/New_York' # Amazon SES -EMAIL_BACKEND = 'django_smtp_ssl.SSLEmailBackend' -MAIL_USE_TLS = True +EMAIL_USE_TLS = True EMAIL_HOST = '{{ email_host }}' EMAIL_PORT = '{{ email_port }}' DEFAULT_FROM_EMAIL = '{{ default_from_email }}' # send celery log to Python logging -CELERYD_HIJACK_ROOT_LOGGER = False +WORKER_HIJACK_ROOT_LOGGER = False # Next step to try https #BASE_URL = 'http://{{ server_name }}' BASE_URL_SECURE = 'https://{{ server_name }}' -IPN_SECURE_URL = False - -# use redis for production queue -BROKER_TRANSPORT = '{{ broker_transport }}' -BROKER_HOST = '{{ broker_host }}' -BROKER_PORT = '{{ broker_port }}' -BROKER_VHOST = '{{ broker_vhost }}' LOGGING = { 'version': 1, @@ -74,7 +69,7 @@ LOGGING = { }, 'file': { 'level': 'INFO', - 'class': 'logging.handlers.RotatingFileHandler', + 'class': 'logging.handlers.GroupWriteRotatingFileHandler', 'filename': join('/var/log/regluit', 'unglue.it.log'), 'maxBytes': 1024*1024*5, # 5 MB 'backupCount': 5, @@ -104,7 +99,7 @@ STATIC_ROOT = '/var/www/static' #CKEDITOR_UPLOAD_PREFIX = 'https://unglue.it/static/media/' # decide which of the period tasks to add to the schedule -CELERYBEAT_SCHEDULE['send_test_email'] = SEND_TEST_EMAIL_JOB +# CELERYBEAT_SCHEDULE['send_test_email'] = SEND_TEST_EMAIL_JOB # update the statuses of campaigns CELERYBEAT_SCHEDULE['update_active_campaign_statuses'] = UPDATE_ACTIVE_CAMPAIGN_STATUSES CELERYBEAT_SCHEDULE['report_new_ebooks'] = EBOOK_NOTIFICATIONS_JOB @@ -114,6 +109,8 @@ CELERYBEAT_SCHEDULE['notify_expiring_accounts'] = NOTIFY_EXPIRING_ACCOUNTS CELERYBEAT_SCHEDULE['refresh_acqs'] = REFRESH_ACQS_JOB CELERYBEAT_SCHEDULE['refresh_acqs'] = NOTIFY_UNCLAIMED_GIFTS +ACCEPT_CONTENT = ['pickle', 'json', 'msgpack', 'yaml'] + # set -- sandbox or production Amazon FPS? #AMAZON_FPS_HOST = "fps.sandbox.amazonaws.com" AMAZON_FPS_HOST = "fps.amazonaws.com" @@ -123,7 +120,7 @@ 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' +DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' # we should suppress Google Analytics outside of production SHOW_GOOGLE_ANALYTICS = True diff --git a/roles/regluit_prod/templates/prod.wsgi.j2 b/roles/regluit_prod/templates/prod.wsgi.j2 index 096c5f4..8736875 100644 --- a/roles/regluit_prod/templates/prod.wsgi.j2 +++ b/roles/regluit_prod/templates/prod.wsgi.j2 @@ -3,7 +3,7 @@ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "regluit.settings.prod") -os.environ['CELERY_LOADER'] = 'django' +#os.environ['CELERY_LOADER'] = 'django' {% for key in host_keys %} os.environ['{{ key|upper }}'] = '{{ host_keys[key] }}' diff --git a/setup-batterup.yml b/setup-batterup.yml index c151200..b38e6b1 100644 --- a/setup-batterup.yml +++ b/setup-batterup.yml @@ -2,11 +2,11 @@ - hosts: regluit-ondeck gather_facts: false tasks: - # Need to install python2.7 and pip first so Ansible will function + # Need to install python3.6 and pip first so Ansible will function # This is due to Ubuntu 16 shipping with Python3 by default - - name: Install python2.7 and pip + - name: Install python3.6 and pip become: true - raw: bash -c "apt -qqy update && apt install -qqy python2.7-dev python-pip" + raw: bash -c "apt -qqy update && apt install -qqy python3.6-dev python-pip" register: output changed_when: output.stdout != "" diff --git a/setup-dev.yml b/setup-dev.yml index 41d6b01..7fd6f54 100644 --- a/setup-dev.yml +++ b/setup-dev.yml @@ -1,14 +1,15 @@ - hosts: regluit-dev - gather_facts: false + gather_facts: true tasks: - # Need to install python2.7 and pip first so Ansible will function - # This is due to Ubuntu 16 shipping with Python3 by default - - name: Install python2.7 and pip + # Need to install python3.6 and pip first so Ansible will function + - name: Install python3.6 and pip for dev become: true - raw: bash -c "apt -qqy update && apt install -qqy python2.7-dev python-pip" + raw: bash -c "apt -qqy update && apt install -y python3.6 python3-pip python3-apt" register: output changed_when: output.stdout != "" + + - name: Gathering Facts setup: diff --git a/setup-ondeck.yml b/setup-ondeck.yml index 1a43748..6d8838d 100644 --- a/setup-ondeck.yml +++ b/setup-ondeck.yml @@ -1,11 +1,10 @@ - hosts: regluit-ondeck - gather_facts: false + gather_facts: true tasks: - # Need to install python2.7 and pip first so Ansible will function - # This is due to Ubuntu 16 shipping with Python3 by default - - name: Install python2.7 and pip + # Need to install python3.6 and pip first so Ansible will function + - name: Install python3.6 and pip for dev become: true - raw: bash -c "apt -qqy update && apt install -qqy python2.7-dev python-pip" + raw: bash -c "apt -qqy update && apt install -y python3.6 python3-pip python3-apt" register: output changed_when: output.stdout != ""