Merge branch 'release/0.1.2' into production

* release/0.1.2:
  Update versions and URLs, document fixed issue
  Update dependencies to latest patch level
  Ignore disabled sites' nginx configuration
  Add Vagrantfile and salt bootstrap config
  Ignore PyCharm files
  add listen directive to enable IPv6
This commit is contained in:
Jan Dittberner 2019-06-30 12:32:03 +02:00
commit 2d2c0adad7
9 changed files with 85 additions and 12 deletions

2
.gitignore vendored
View file

@ -41,3 +41,5 @@ Desktop.ini
.ropeproject .ropeproject
_build/ _build/
*.sqlite3 *.sqlite3
.idea/
.vagrant/

27
Vagrantfile vendored Normal file
View file

@ -0,0 +1,27 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "debian/contrib-jessie64"
config.vm.hostname = "gvaweb.local"
config.vm.network "private_network", ip: "172.16.3.5"
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"
end
config.vm.provision :salt do |salt|
salt.bootstrap_script = "salt/bootstrap.sh"
salt.minion_id = "gvaweb"
salt.masterless = true
salt.run_highstate = true
salt.verbose = true
salt.colorize = true
salt.log_level = "warning"
end
end

View file

@ -1,6 +1,10 @@
Changelog Changelog
========= =========
* :release:`0.1.2 <2019-06-30>`
* :bug:`5` ignore missing site configuration when disabling sites
* :bug:`-` add listen directive to enable IPv6
* :release:`0.1.1 <2015-01-27>` * :release:`0.1.1 <2015-01-27>`
* :bug:`-` force symlink creation for enable_web_vhost task to make it * :bug:`-` force symlink creation for enable_web_vhost task to make it
idempotent idempotent

View file

@ -38,9 +38,9 @@ extensions = ['releases', 'sphinx.ext.autodoc', 'celery.contrib.sphinx']
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']
releases_issue_uri = 'https://dev.gnuviech-server.de/gvaweb/ticket/%s' releases_issue_uri = 'https://git.dittberner.info/gnuviech/gvaweb/issues/%s'
releases_release_uri = 'https://dev.gnuviech-server.de/gvaweb/milestone/%s' releases_release_uri = 'https://git.dittberner.info/gnuviech/gvaweb/src/tag/%s'
# The suffix of source filenames. # The suffix of source filenames.
source_suffix = '.rst' source_suffix = '.rst'
@ -53,7 +53,7 @@ master_doc = 'index'
# General information about the project. # General information about the project.
project = u'gvaweb' project = u'gvaweb'
copyright = u'2015, Jan Dittberner' copyright = u'2015-2019, Jan Dittberner'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
@ -62,7 +62,7 @@ copyright = u'2015, Jan Dittberner'
# The short X.Y version. # The short X.Y version.
version = '0.1' version = '0.1'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = '0.1.1' release = '0.1.2'
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.

View file

@ -113,7 +113,7 @@ def disable_web_vhost(sitename):
""" """
try: try:
subprocess.check_output([ subprocess.check_output([
SUDO_CMD, RM_CMD, _build_enabled_vhost_path(sitename)], SUDO_CMD, RM_CMD, "-f", _build_enabled_vhost_path(sitename)],
stderr=subprocess.STDOUT) stderr=subprocess.STDOUT)
subprocess.check_output([ subprocess.check_output([
SUDO_CMD, SERVICE_CMD, 'nginx', 'reload'], SUDO_CMD, SERVICE_CMD, 'nginx', 'reload'],

View file

@ -4,6 +4,8 @@ server {
server_name *.{{ domain|parentdomain }}; server_name *.{{ domain|parentdomain }};
{%- endif %} {%- endif %}
listen [::]:80;
access_log /var/log/nginx/{{ domain }}.access.log; access_log /var/log/nginx/{{ domain }}.access.log;
error_log /var/log/nginx/{{ domain }}.error.log; error_log /var/log/nginx/{{ domain }}.error.log;

View file

@ -1,8 +1,8 @@
amqp==1.4.6 amqp==1.4.9
bpython==0.13.1 bpython==0.13.2
anyjson==0.3.3 anyjson==0.3.3
billiard==3.3.0.19 billiard==3.3.0.23
celery==3.1.17 celery==3.1.26.post2
kombu==3.0.24 kombu==3.0.37
pytz==2014.10 pytz==2019.1
Jinja2==2.7.3 Jinja2==2.7.3

View file

@ -2,5 +2,5 @@
-r base.txt -r base.txt
coverage==3.7.1 coverage==3.7.1
Sphinx==1.2.3 Sphinx==1.2.3
sqlparse==0.1.14 sqlparse==0.1.19
releases==0.7.0 releases==0.7.0

38
salt/bootstrap.sh Executable file
View file

@ -0,0 +1,38 @@
#!/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