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
_build/
*.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
=========
* :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>`
* :bug:`-` force symlink creation for enable_web_vhost task to make it
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.
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.
source_suffix = '.rst'
@ -53,7 +53,7 @@ master_doc = 'index'
# General information about the project.
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
# |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.
version = '0.1'
# 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
# for a list of supported languages.

View File

@ -113,7 +113,7 @@ def disable_web_vhost(sitename):
"""
try:
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)
subprocess.check_output([
SUDO_CMD, SERVICE_CMD, 'nginx', 'reload'],

View File

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

View File

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

View File

@ -2,5 +2,5 @@
-r base.txt
coverage==3.7.1
Sphinx==1.2.3
sqlparse==0.1.14
sqlparse==0.1.19
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