Merge branch 'release/0.3.0' into production
This commit is contained in:
commit
567e4a5b08
11 changed files with 104 additions and 100 deletions
106
Pipfile.lock
generated
106
Pipfile.lock
generated
|
@ -40,19 +40,19 @@
|
|||
},
|
||||
"celery": {
|
||||
"hashes": [
|
||||
"sha256:3c5fcd6bfcf9a6323cb742cfc121d1790d50cfeddf300ba723cfa0b356413f07",
|
||||
"sha256:a650525303ee866fb0c62c82f68681fcc2183eebbfafae552c27d30125fe518b"
|
||||
"sha256:108a0bf9018a871620936c33a3ee9f6336a89f8ef0a0f567a9001f4aa361415f",
|
||||
"sha256:5b4b37e276033fe47575107a2775469f0b721646a08c96ec2c61531e4fe45f2a"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==4.4.1"
|
||||
"version": "==4.4.2"
|
||||
},
|
||||
"importlib-metadata": {
|
||||
"hashes": [
|
||||
"sha256:06f5b3a99029c7134207dd882428a66992a9de2bef7c2b699b5641f9886c3302",
|
||||
"sha256:b97607a1a18a5100839aec1dc26a1ea17ee0d93b20b0f008d80a5a050afb200b"
|
||||
"sha256:2a688cbaa90e0cc587f1df48bdc97a6eadccdcd9c35fb3f976a09e3b5016d90f",
|
||||
"sha256:34513a8a0c4962bc66d35b359558fd8a5e10cd472d37aec5f66858addef32c1e"
|
||||
],
|
||||
"markers": "python_version < '3.8'",
|
||||
"version": "==1.5.0"
|
||||
"version": "==1.6.0"
|
||||
},
|
||||
"jinja2": {
|
||||
"hashes": [
|
||||
|
@ -156,10 +156,10 @@
|
|||
},
|
||||
"certifi": {
|
||||
"hashes": [
|
||||
"sha256:017c25db2a153ce562900032d5bc68e9f191e44e9a0f762f373977de9df1fbb3",
|
||||
"sha256:25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f"
|
||||
"sha256:1d987a998c75633c40847cc966fcf5904906c920a7f17ef374f5aa4282abd304",
|
||||
"sha256:51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519"
|
||||
],
|
||||
"version": "==2019.11.28"
|
||||
"version": "==2020.4.5.1"
|
||||
},
|
||||
"chardet": {
|
||||
"hashes": [
|
||||
|
@ -170,40 +170,40 @@
|
|||
},
|
||||
"coverage": {
|
||||
"hashes": [
|
||||
"sha256:15cf13a6896048d6d947bf7d222f36e4809ab926894beb748fc9caa14605d9c3",
|
||||
"sha256:1daa3eceed220f9fdb80d5ff950dd95112cd27f70d004c7918ca6dfc6c47054c",
|
||||
"sha256:1e44a022500d944d42f94df76727ba3fc0a5c0b672c358b61067abb88caee7a0",
|
||||
"sha256:25dbf1110d70bab68a74b4b9d74f30e99b177cde3388e07cc7272f2168bd1477",
|
||||
"sha256:3230d1003eec018ad4a472d254991e34241e0bbd513e97a29727c7c2f637bd2a",
|
||||
"sha256:3dbb72eaeea5763676a1a1efd9b427a048c97c39ed92e13336e726117d0b72bf",
|
||||
"sha256:5012d3b8d5a500834783689a5d2292fe06ec75dc86ee1ccdad04b6f5bf231691",
|
||||
"sha256:51bc7710b13a2ae0c726f69756cf7ffd4362f4ac36546e243136187cfcc8aa73",
|
||||
"sha256:527b4f316e6bf7755082a783726da20671a0cc388b786a64417780b90565b987",
|
||||
"sha256:722e4557c8039aad9592c6a4213db75da08c2cd9945320220634f637251c3894",
|
||||
"sha256:76e2057e8ffba5472fd28a3a010431fd9e928885ff480cb278877c6e9943cc2e",
|
||||
"sha256:77afca04240c40450c331fa796b3eab6f1e15c5ecf8bf2b8bee9706cd5452fef",
|
||||
"sha256:7afad9835e7a651d3551eab18cbc0fdb888f0a6136169fbef0662d9cdc9987cf",
|
||||
"sha256:9bea19ac2f08672636350f203db89382121c9c2ade85d945953ef3c8cf9d2a68",
|
||||
"sha256:a8b8ac7876bc3598e43e2603f772d2353d9931709345ad6c1149009fd1bc81b8",
|
||||
"sha256:b0840b45187699affd4c6588286d429cd79a99d509fe3de0f209594669bb0954",
|
||||
"sha256:b26aaf69713e5674efbde4d728fb7124e429c9466aeaf5f4a7e9e699b12c9fe2",
|
||||
"sha256:b63dd43f455ba878e5e9f80ba4f748c0a2156dde6e0e6e690310e24d6e8caf40",
|
||||
"sha256:be18f4ae5a9e46edae3f329de2191747966a34a3d93046dbdf897319923923bc",
|
||||
"sha256:c312e57847db2526bc92b9bfa78266bfbaabac3fdcd751df4d062cd4c23e46dc",
|
||||
"sha256:c60097190fe9dc2b329a0eb03393e2e0829156a589bd732e70794c0dd804258e",
|
||||
"sha256:c62a2143e1313944bf4a5ab34fd3b4be15367a02e9478b0ce800cb510e3bbb9d",
|
||||
"sha256:cc1109f54a14d940b8512ee9f1c3975c181bbb200306c6d8b87d93376538782f",
|
||||
"sha256:cd60f507c125ac0ad83f05803063bed27e50fa903b9c2cfee3f8a6867ca600fc",
|
||||
"sha256:d513cc3db248e566e07a0da99c230aca3556d9b09ed02f420664e2da97eac301",
|
||||
"sha256:d649dc0bcace6fcdb446ae02b98798a856593b19b637c1b9af8edadf2b150bea",
|
||||
"sha256:d7008a6796095a79544f4da1ee49418901961c97ca9e9d44904205ff7d6aa8cb",
|
||||
"sha256:da93027835164b8223e8e5af2cf902a4c80ed93cb0909417234f4a9df3bcd9af",
|
||||
"sha256:e69215621707119c6baf99bda014a45b999d37602cb7043d943c76a59b05bf52",
|
||||
"sha256:ea9525e0fef2de9208250d6c5aeeee0138921057cd67fcef90fbed49c4d62d37",
|
||||
"sha256:fca1669d464f0c9831fd10be2eef6b86f5ebd76c724d1e0706ebdff86bb4adf0"
|
||||
"sha256:03f630aba2b9b0d69871c2e8d23a69b7fe94a1e2f5f10df5049c0df99db639a0",
|
||||
"sha256:046a1a742e66d065d16fb564a26c2a15867f17695e7f3d358d7b1ad8a61bca30",
|
||||
"sha256:0a907199566269e1cfa304325cc3b45c72ae341fbb3253ddde19fa820ded7a8b",
|
||||
"sha256:165a48268bfb5a77e2d9dbb80de7ea917332a79c7adb747bd005b3a07ff8caf0",
|
||||
"sha256:1b60a95fc995649464e0cd48cecc8288bac5f4198f21d04b8229dc4097d76823",
|
||||
"sha256:1f66cf263ec77af5b8fe14ef14c5e46e2eb4a795ac495ad7c03adc72ae43fafe",
|
||||
"sha256:2e08c32cbede4a29e2a701822291ae2bc9b5220a971bba9d1e7615312efd3037",
|
||||
"sha256:3844c3dab800ca8536f75ae89f3cf566848a3eb2af4d9f7b1103b4f4f7a5dad6",
|
||||
"sha256:408ce64078398b2ee2ec08199ea3fcf382828d2f8a19c5a5ba2946fe5ddc6c31",
|
||||
"sha256:443be7602c790960b9514567917af538cac7807a7c0c0727c4d2bbd4014920fd",
|
||||
"sha256:4482f69e0701139d0f2c44f3c395d1d1d37abd81bfafbf9b6efbe2542679d892",
|
||||
"sha256:4a8a259bf990044351baf69d3b23e575699dd60b18460c71e81dc565f5819ac1",
|
||||
"sha256:513e6526e0082c59a984448f4104c9bf346c2da9961779ede1fc458e8e8a1f78",
|
||||
"sha256:5f587dfd83cb669933186661a351ad6fc7166273bc3e3a1531ec5c783d997aac",
|
||||
"sha256:62061e87071497951155cbccee487980524d7abea647a1b2a6eb6b9647df9006",
|
||||
"sha256:641e329e7f2c01531c45c687efcec8aeca2a78a4ff26d49184dce3d53fc35014",
|
||||
"sha256:65a7e00c00472cd0f59ae09d2fb8a8aaae7f4a0cf54b2b74f3138d9f9ceb9cb2",
|
||||
"sha256:6ad6ca45e9e92c05295f638e78cd42bfaaf8ee07878c9ed73e93190b26c125f7",
|
||||
"sha256:73aa6e86034dad9f00f4bbf5a666a889d17d79db73bc5af04abd6c20a014d9c8",
|
||||
"sha256:7c9762f80a25d8d0e4ab3cb1af5d9dffbddb3ee5d21c43e3474c84bf5ff941f7",
|
||||
"sha256:85596aa5d9aac1bf39fe39d9fa1051b0f00823982a1de5766e35d495b4a36ca9",
|
||||
"sha256:86a0ea78fd851b313b2e712266f663e13b6bc78c2fb260b079e8b67d970474b1",
|
||||
"sha256:8a620767b8209f3446197c0e29ba895d75a1e272a36af0786ec70fe7834e4307",
|
||||
"sha256:922fb9ef2c67c3ab20e22948dcfd783397e4c043a5c5fa5ff5e9df5529074b0a",
|
||||
"sha256:9fad78c13e71546a76c2f8789623eec8e499f8d2d799f4b4547162ce0a4df435",
|
||||
"sha256:a37c6233b28e5bc340054cf6170e7090a4e85069513320275a4dc929144dccf0",
|
||||
"sha256:c3fc325ce4cbf902d05a80daa47b645d07e796a80682c1c5800d6ac5045193e5",
|
||||
"sha256:cda33311cb9fb9323958a69499a667bd728a39a7aa4718d7622597a44c4f1441",
|
||||
"sha256:db1d4e38c9b15be1521722e946ee24f6db95b189d1447fa9ff18dd16ba89f732",
|
||||
"sha256:eda55e6e9ea258f5e4add23bcf33dc53b2c319e70806e180aecbff8d90ea24de",
|
||||
"sha256:f372cdbb240e09ee855735b9d85e7f50730dcfb6296b74b95a3e5dea0615c4c1"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==5.0.3"
|
||||
"version": "==5.0.4"
|
||||
},
|
||||
"docutils": {
|
||||
"hashes": [
|
||||
|
@ -274,24 +274,24 @@
|
|||
},
|
||||
"packaging": {
|
||||
"hashes": [
|
||||
"sha256:170748228214b70b672c581a3dd610ee51f733018650740e98c7df862a583f73",
|
||||
"sha256:e665345f9eef0c621aa0bf2f8d78cf6d21904eef16a93f020240b704a57f1334"
|
||||
"sha256:3c292b474fda1671ec57d46d739d072bfd495a4f51ad01a055121d81e952b7a3",
|
||||
"sha256:82f77b9bee21c1bafbf35a84905d604d5d1223801d639cf3ed140bd651c08752"
|
||||
],
|
||||
"version": "==20.1"
|
||||
"version": "==20.3"
|
||||
},
|
||||
"pygments": {
|
||||
"hashes": [
|
||||
"sha256:2a3fe295e54a20164a9df49c75fa58526d3be48e14aceba6d6b1e8ac0bfd6f1b",
|
||||
"sha256:98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe"
|
||||
"sha256:647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44",
|
||||
"sha256:ff7a40b4860b727ab48fad6360eb351cc1b33cbf9b15a0f689ca5353e9463324"
|
||||
],
|
||||
"version": "==2.5.2"
|
||||
"version": "==2.6.1"
|
||||
},
|
||||
"pyparsing": {
|
||||
"hashes": [
|
||||
"sha256:4c830582a84fb022400b85429791bc551f1f4871c33f23e44f353119e92f969f",
|
||||
"sha256:c342dccb5250c08d45fd6f8b4a559613ca603b57498511740e65cd11a2e7dcec"
|
||||
"sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1",
|
||||
"sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"
|
||||
],
|
||||
"version": "==2.4.6"
|
||||
"version": "==2.4.7"
|
||||
},
|
||||
"pytz": {
|
||||
"hashes": [
|
||||
|
@ -339,11 +339,11 @@
|
|||
},
|
||||
"sphinx": {
|
||||
"hashes": [
|
||||
"sha256:776ff8333181138fae52df65be733127539623bb46cc692e7fa0fcfc80d7aa88",
|
||||
"sha256:ca762da97c3b5107cbf0ab9e11d3ec7ab8d3c31377266fd613b962ed971df709"
|
||||
"sha256:6a099e6faffdc3ceba99ca8c2d09982d43022245e409249375edf111caf79ed3",
|
||||
"sha256:b63a0c879c4ff9a4dffcb05217fa55672ce07abdeb81e33c73303a563f8d8901"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.4.3"
|
||||
"version": "==3.0.0"
|
||||
},
|
||||
"sphinxcontrib-applehelp": {
|
||||
"hashes": [
|
||||
|
|
14
Vagrantfile
vendored
14
Vagrantfile
vendored
|
@ -2,7 +2,7 @@
|
|||
# vi: set ft=ruby :
|
||||
|
||||
Vagrant.configure(2) do |config|
|
||||
config.vm.box = "debian/contrib-jessie64"
|
||||
config.vm.box = "debian/buster64"
|
||||
|
||||
config.vm.hostname = "gvaweb.local"
|
||||
config.vm.network "private_network", ip: "172.16.3.5"
|
||||
|
@ -10,18 +10,20 @@ Vagrant.configure(2) do |config|
|
|||
config.vm.synced_folder "../gvasalt/states/", "/srv/salt/"
|
||||
config.vm.synced_folder "../gvasalt/pillar/", "/srv/pillar/"
|
||||
|
||||
config.vm.provider "virtualbox" do |vb|
|
||||
# vb.gui = true
|
||||
vb.memory = "512"
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.memory = 1024
|
||||
end
|
||||
|
||||
config.vm.provision :shell, path: "change-vmdebootstrap-default-dhcp.sh"
|
||||
|
||||
config.vm.provision :salt do |salt|
|
||||
salt.bootstrap_script = "salt/bootstrap.sh"
|
||||
salt.bootstrap_options = "-x python3"
|
||||
salt.minion_id = "gvaweb"
|
||||
salt.masterless = true
|
||||
salt.run_highstate = true
|
||||
salt.verbose = true
|
||||
salt.colorize = true
|
||||
salt.log_level = "warning"
|
||||
salt.grains_config = "salt/grains"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
15
change-vmdebootstrap-default-dhcp.sh
Normal file
15
change-vmdebootstrap-default-dhcp.sh
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
debootstrap_network=/etc/systemd/network/99-dhcp.network
|
||||
|
||||
if grep -q '^Name=\\*' "${debootstrap_network}"; then
|
||||
primary_nic=$(ls -1 /sys/class/net | grep -v lo |sort | head -1)
|
||||
sed -i "s/^Name=e\\*/Name=${primary_nic}/" \
|
||||
"${debootstrap_network}"
|
||||
systemctl restart systemd-networkd.service
|
||||
echo "Changed systemd network configuration"
|
||||
else
|
||||
echo "Systemd network configuration has already been changed"
|
||||
fi
|
|
@ -1,6 +1,9 @@
|
|||
Changelog
|
||||
=========
|
||||
|
||||
* :release:`0.3.0 <2020-04-10>`
|
||||
* :support:`-` update Vagrant setup to libvirt and Debian Buster
|
||||
|
||||
* :release:`0.2.0 <2020-03-03>`
|
||||
* :support:`-` add Docker setup for lightweight local testing
|
||||
* :support:`-` restructure code to have celery in the webtasks module and drop
|
||||
|
|
|
@ -24,6 +24,7 @@ os.environ['GVAWEB_BROKER_URL'] = 'amqp://'
|
|||
os.environ['GVAWEB_NGINX_SITES_AVAILABLE'] = '/etc/nginx/sites-available'
|
||||
os.environ['GVAWEB_NGINX_SITES_ENABLED'] = '/etc/nginx/sites-enabled'
|
||||
os.environ['GVAWEB_PHPFPM_POOL'] = '/etc/php5/fpm/pool.d'
|
||||
os.environ["GVAWEB_RESULTS_REDIS_URL"] = "redis://"
|
||||
os.environ['GVAWEB_WWWUSER_MOUNT'] = '/srv/wwwfiles'
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ This module contains :py:mod:`webtasks.tasks`.
|
|||
|
||||
"""
|
||||
|
||||
__version__ = "0.2.0"
|
||||
__version__ = "0.3.0"
|
||||
|
||||
from webtasks.celery import app as celery_app
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ def create_web_vhost_config(username, sitename, wildcard):
|
|||
config_file = None
|
||||
try:
|
||||
nginx_temp_file, filename = mkstemp()
|
||||
config_file = os.fdopen(nginx_temp_file, 'w')
|
||||
config_file = os.fdopen(nginx_temp_file, 'wb')
|
||||
config_file.write(config_data.encode('utf8'))
|
||||
finally:
|
||||
if config_file:
|
||||
|
|
|
@ -3,7 +3,7 @@ server {
|
|||
server_name .{{ domain|parentdomain }};
|
||||
{% else -%}
|
||||
server_name {{ domain }};
|
||||
{% -endif %}
|
||||
{%- endif %}
|
||||
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
#!/bin/sh -
|
||||
|
||||
echo "deb http://httpredir.debian.org/debian jessie-backports main" >/etc/apt/sources.list.d/backports.list
|
||||
|
||||
apt-get update
|
||||
apt-get install -y -t jessie-backports python-cryptography
|
||||
|
||||
# We just download the bootstrap script by default and execute that.
|
||||
if [ -x /usr/bin/fetch ]; then
|
||||
/usr/bin/fetch -o - https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh | sh -s -- "$@"
|
||||
elif [ -x /usr/bin/curl ]; then
|
||||
/usr/bin/curl -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh | sh -s -- "$@"
|
||||
else
|
||||
python \
|
||||
-c 'import urllib; print urllib.urlopen("https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh").read()' \
|
||||
| sh -s -- "$@"
|
||||
fi
|
||||
|
||||
cat >/etc/salt/minion <<EOF
|
||||
file_client: local
|
||||
|
||||
file_roots:
|
||||
base:
|
||||
- /srv/salt/
|
||||
|
||||
pillar_roots:
|
||||
base:
|
||||
- /srv/pillar
|
||||
|
||||
log_file: file:///dev/log
|
||||
EOF
|
||||
|
||||
umask 077
|
||||
cat >/etc/salt/grains <<EOF
|
||||
roles:
|
||||
- webserver
|
||||
- gnuviechadmin.gvaweb
|
||||
EOF
|
10
salt/grains
Normal file
10
salt/grains
Normal file
|
@ -0,0 +1,10 @@
|
|||
gnuviechadmin:
|
||||
user: vagrant
|
||||
group: vagrant
|
||||
checkout: /vagrant
|
||||
home: /home/vagrant
|
||||
update_git: False
|
||||
roles:
|
||||
- vagrant
|
||||
- webserver
|
||||
- gnuviechadmin.gvaweb
|
11
salt/minion
Normal file
11
salt/minion
Normal file
|
@ -0,0 +1,11 @@
|
|||
file_client: local
|
||||
|
||||
file_roots:
|
||||
base:
|
||||
- /srv/salt/
|
||||
|
||||
pillar_roots:
|
||||
base:
|
||||
- /srv/pillar
|
||||
|
||||
log_file: file:///dev/log
|
Loading…
Reference in a new issue