Author: chambej
Date: Wed Dec 13 22:03:30 2017
New Revision: 1818071
URL: http://svn.apache.org/viewvc?rev=1818071&view=rev
Log:
Update Vagrant and Salt files to include new bloodhound vm
Added:
bloodhound/tags/0.8/Vagrantfile
bloodhound/tags/0.8/salt/
bloodhound/tags/0.8/salt/minion
bloodhound/tags/0.8/salt/roots/
bloodhound/tags/0.8/salt/roots/pillar/
bloodhound/tags/0.8/salt/roots/pillar/settings.sls
bloodhound/tags/0.8/salt/roots/pillar/top.sls
bloodhound/tags/0.8/salt/roots/salt/
bloodhound/tags/0.8/salt/roots/salt/bloodhound/
bloodhound/tags/0.8/salt/roots/salt/bloodhound/init.sls
bloodhound/tags/0.8/salt/roots/salt/bloodhound/requirements.txt
bloodhound/tags/0.8/salt/roots/salt/postgresql/
bloodhound/tags/0.8/salt/roots/salt/postgresql/init.sls
bloodhound/tags/0.8/salt/roots/salt/postgresql/pg_hba_8.4.conf
bloodhound/tags/0.8/salt/roots/salt/postgresql/pg_hba_9.1.conf
bloodhound/tags/0.8/salt/roots/salt/requirements/
bloodhound/tags/0.8/salt/roots/salt/requirements/init.sls
bloodhound/tags/0.8/salt/roots/salt/top.sls
bloodhound/tags/0.8/salt/roots/salt/webserver/
bloodhound/tags/0.8/salt/roots/salt/webserver/bloodhound.site
bloodhound/tags/0.8/salt/roots/salt/webserver/init.sls
Modified:
bloodhound/tags/0.4-incubating/installer/requirements-dev.txt
bloodhound/tags/0.4-incubating/installer/requirements.txt
bloodhound/trunk/Vagrantfile
bloodhound/trunk/salt/roots/pillar/settings.sls
bloodhound/trunk/salt/roots/salt/webserver/bloodhound.site
Modified: bloodhound/tags/0.4-incubating/installer/requirements-dev.txt
URL:
http://svn.apache.org/viewvc/bloodhound/tags/0.4-incubating/installer/requirements-dev.txt?rev=1818071&r1=1818070&r2=1818071&view=diff
==============================================================================
--- bloodhound/tags/0.4-incubating/installer/requirements-dev.txt (original)
+++ bloodhound/tags/0.4-incubating/installer/requirements-dev.txt Wed Dec 13
22:03:30 2017
@@ -17,7 +17,7 @@
Pygments
pytz
-Babel
+Babel==0.9.6
Genshi
-e ../trac
TracAccountManager
Modified: bloodhound/tags/0.4-incubating/installer/requirements.txt
URL:
http://svn.apache.org/viewvc/bloodhound/tags/0.4-incubating/installer/requirements.txt?rev=1818071&r1=1818070&r2=1818071&view=diff
==============================================================================
--- bloodhound/tags/0.4-incubating/installer/requirements.txt (original)
+++ bloodhound/tags/0.4-incubating/installer/requirements.txt Wed Dec 13
22:03:30 2017
@@ -17,7 +17,7 @@
Pygments
pytz
-Babel
+Babel==0.9.6
Genshi
../trac
TracAccountManager
Added: bloodhound/tags/0.8/Vagrantfile
URL:
http://svn.apache.org/viewvc/bloodhound/tags/0.8/Vagrantfile?rev=1818071&view=auto
==============================================================================
--- bloodhound/tags/0.8/Vagrantfile (added)
+++ bloodhound/tags/0.8/Vagrantfile Wed Dec 13 22:03:30 2017
@@ -0,0 +1,46 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Vagrant configuration version 2
+# Please don't change it unless you know what you're doing.
+Vagrant.configure(2) do |config|
+ config.vm.box = "bento/ubuntu-16.04"
+ config.vm.define "bloodhound"
+
+ # Forwarded port mappings:
+ # For apache served bloodhound use http://localhost:8280/
+ config.vm.network :forwarded_port, guest: 80, host: 8280
+ # For tracd served bloodhound on port 8000, use http://localhost:8281/
+ config.vm.network :forwarded_port, guest: 8000, host: 8281
+
+ # Sharing the salt folders with the guest VM:
+ config.vm.synced_folder "salt/roots/", "/srv/"
+
+ config.vm.provision :salt do |salt|
+ # basic settings
+ salt.pillar({
+ "use_webserver" => true
+ })
+
+ salt.minion_config = "salt/minion"
+ salt.run_highstate = true
+ salt.verbose = true
+ end
+end
Added: bloodhound/tags/0.8/salt/minion
URL:
http://svn.apache.org/viewvc/bloodhound/tags/0.8/salt/minion?rev=1818071&view=auto
==============================================================================
--- bloodhound/tags/0.8/salt/minion (added)
+++ bloodhound/tags/0.8/salt/minion Wed Dec 13 22:03:30 2017
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+master: localhost
+file_client: local
Added: bloodhound/tags/0.8/salt/roots/pillar/settings.sls
URL:
http://svn.apache.org/viewvc/bloodhound/tags/0.8/salt/roots/pillar/settings.sls?rev=1818071&view=auto
==============================================================================
--- bloodhound/tags/0.8/salt/roots/pillar/settings.sls (added)
+++ bloodhound/tags/0.8/salt/roots/pillar/settings.sls Wed Dec 13 22:03:30 2017
@@ -0,0 +1,86 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# comment out any projects here that you don't want loaded by default..
+enabled_projects:
+# - postgres
+# - sqlite
+ - bloodhound
+
+# controls whether webserver is required:
+enable_webserver: True
+
+# these settings are not tested thoroughly with many boxes so will probably
+# need correcting
+{% if grains['oscodename'] in ['lucid', 'natty', 'maverick', 'squeeze'] %}
+pg_version: 8.4
+postgresql: postgresql-8.4
+pg_hba_file: /etc/postgresql/8.4/bhcluster/pg_hba.conf
+pg_hba_replace: pg_hba_8.4.conf
+{% elif grains['oscodename'] == 'xenial' %}
+pg_version: 9.5
+postgresql: postgresql-9.5
+pg_hba_file: /etc/postgresql/9.5/bhcluster/pg_hba.conf
+pg_hba_replace: pg_hba_9.1.conf
+{% else %}
+pg_version: 9.1
+postgresql: postgresql-9.1
+pg_hba_file: /etc/postgresql/9.1/bhcluster/pg_hba.conf
+pg_hba_replace: pg_hba_9.1.conf
+{% endif %}
+{% if grains['oscodename'] in ['lucid', 'natty', 'maverick'] %}
+postgresql_service: postgresql-8.4
+{% else %}
+postgresql_service: postgresql
+{% endif %}
+
+# add new projects to this list, enable them at the top of the file
+projects:
+ postgres:
+ dbtype: postgres
+ dbname: bhdb
+ dbuser: bloodhound
+ dbpassword: bloodhound
+ dbhost: localhost
+ dbport: 5434
+ adminuser: admin
+ adminpassword: adminpass
+ project: test
+ prodprefix: TEST
+ sqlite:
+ dbtype: sqlite
+ dbname: a
+ dbuser: a
+ dbpassword: a
+ dbhost: a
+ dbport: a
+ adminuser: admin
+ adminpassword: adminpass
+ project: test
+ prodprefix: TEST
+ bloodhound:
+ dbtype: postgres
+ dbname: bloodhound
+ dbuser: bloodhound
+ dbpassword: bloodhound
+ dbhost: localhost
+ dbport: 5434
+ adminuser: admin
+ adminpassword: adminpass
+ project: Bloodhound
+ prodprefix: BLDHND
+
Added: bloodhound/tags/0.8/salt/roots/pillar/top.sls
URL:
http://svn.apache.org/viewvc/bloodhound/tags/0.8/salt/roots/pillar/top.sls?rev=1818071&view=auto
==============================================================================
--- bloodhound/tags/0.8/salt/roots/pillar/top.sls (added)
+++ bloodhound/tags/0.8/salt/roots/pillar/top.sls Wed Dec 13 22:03:30 2017
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+base:
+ '*':
+ - settings
Added: bloodhound/tags/0.8/salt/roots/salt/bloodhound/init.sls
URL:
http://svn.apache.org/viewvc/bloodhound/tags/0.8/salt/roots/salt/bloodhound/init.sls?rev=1818071&view=auto
==============================================================================
--- bloodhound/tags/0.8/salt/roots/salt/bloodhound/init.sls (added)
+++ bloodhound/tags/0.8/salt/roots/salt/bloodhound/init.sls Wed Dec 13 22:03:30
2017
@@ -0,0 +1,102 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+include:
+ - webserver
+ - requirements
+ - postgresql
+
+/home/vagrant/bhenv:
+ virtualenv.managed:
+ - system_site_packages: False
+ - user: vagrant
+ - requirements: /vagrant/installer/requirements-dev.txt
+ - cwd: /vagrant/installer/
+ - require:
+ - pkg: python-dev
+ - pkg: python-virtualenv
+ - pkg: libpq-dev
+
+project environment requirements:
+ cmd.run:
+ - user: vagrant
+ - cwd: /vagrant/installer/
+ - name: "source /home/vagrant/bhenv/bin/activate
+ && pip install -r pgrequirements.txt"
+ - require:
+ - virtualenv: /home/vagrant/bhenv
+
+{% for project, data in pillar['projects'].items() %} {% if project in
pillar['enabled_projects'] %}
+create {{ project }} project environment:
+ cmd.run:
+ - user: vagrant
+ - unless: "test -d /home/vagrant/environments/{{ project }}"
+ - cwd: /vagrant/installer/
+ - name: "source /home/vagrant/bhenv/bin/activate &&
+ python bloodhound_setup.py
--environments_directory=/home/vagrant/environments
+ --project={{ project }}
+ --default-product-prefix={{
data['prodprefix'] }}
+ --database-type={{ data['dbtype'] }}
+ --database-name={{ data['dbname'] }}
+ --user={{ data['dbuser'] }}
+ --password={{ data['dbpassword'] }}
+ --database-port={{ data['dbport'] }}
+ --database-host={{ data['dbhost'] }}
+ --admin-user={{ data['adminuser'] }}
+ --admin-password={{
data['adminpassword'] }}"
+ - require:
+ {% if data['dbtype'] == 'postgres' %}
+ - postgres_database: bloodhounddb for {{ project }}
+ {% endif %}
+ - cmd: project environment requirements
+
+create bloodhound {{ project }} site dirs:
+ cmd.run:
+ - user: vagrant
+ - onlyif: "test -d /home/vagrant/environments/{{ project }}"
+ - cwd: /home/vagrant/environments/
+ - name: "source /home/vagrant/bhenv/bin/activate &&
+ trac-admin {{ project }} deploy {{ project }}/site"
+ - require:
+ - virtualenv: /home/vagrant/bhenv
+ - cmd: create {{ project }} project environment
+
+{% if data['dbtype'] == 'postgres' %}
+bloodhounduser for {{ project }}:
+ postgres_user.present:
+ - name: {{ data['dbuser'] }}
+ - password: {{ data['dbpassword'] }}
+ - user: postgres
+ - db_port: {{ data['dbport'] }}
+ - require:
+ - pkg: {{ pillar['postgresql'] }}
+ - service: {{ pillar['postgresql_service'] }}
+
+
+bloodhounddb for {{ project }}:
+ postgres_database.present:
+ - name: {{ data['dbname'] }}
+ - encoding: 'UTF8'
+ - template: template0
+ - owner: {{ data['dbuser'] }}
+ - user: postgres
+ - db_port: {{ data['dbport'] }}
+ - require:
+ - postgres_user: bloodhounduser for {{ project }}
+{% endif %}
+
+{% endif %}{% endfor %}
Added: bloodhound/tags/0.8/salt/roots/salt/bloodhound/requirements.txt
URL:
http://svn.apache.org/viewvc/bloodhound/tags/0.8/salt/roots/salt/bloodhound/requirements.txt?rev=1818071&view=auto
==============================================================================
--- bloodhound/tags/0.8/salt/roots/salt/bloodhound/requirements.txt (added)
+++ bloodhound/tags/0.8/salt/roots/salt/bloodhound/requirements.txt Wed Dec 13
22:03:30 2017
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+psycopg2==2.4.5
Added: bloodhound/tags/0.8/salt/roots/salt/postgresql/init.sls
URL:
http://svn.apache.org/viewvc/bloodhound/tags/0.8/salt/roots/salt/postgresql/init.sls?rev=1818071&view=auto
==============================================================================
--- bloodhound/tags/0.8/salt/roots/salt/postgresql/init.sls (added)
+++ bloodhound/tags/0.8/salt/roots/salt/postgresql/init.sls Wed Dec 13 22:03:30
2017
@@ -0,0 +1,56 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+{% set firstloop=True %}
+{% for project, data in pillar['projects'].items() %} {% if project in
pillar['enabled_projects'] and data['dbtype'] == 'postgres' %}
+
+{% if firstloop %}
+{% set firstloop=False %}
+pg_hb.conf:
+ file.managed:
+ - name: {{ pillar['pg_hba_file'] }}
+ - source: salt://postgresql/{{ pillar['pg_hba_replace'] }}
+ - template: jinja
+ - user: postgres
+ - group: postgres
+ - mode: 644
+ - require:
+ - postgres_cluster: bhcluster
+ - pkg: {{ pillar['postgresql'] }}
+
+postgresql:
+ pkg:
+ - name: {{ pillar['postgresql'] }}
+ - installed
+ service.running:
+ - name: {{ pillar['postgresql_service'] }}
+ - enable: True
+ - watch:
+ - file: {{ pillar['pg_hba_file'] }}
+
+bhcluster:
+ postgres_cluster.present:
+ - name: 'bhcluster'
+ - version: '{{ pillar["pg_version"] }}'
+ - encoding: 'UTF8'
+ - port: '{{ data["dbport"] }}'
+ - require:
+ - pkg: {{ pillar['postgresql'] }}
+ - unless: test -d /etc/postgresql/{{ pillar["pg_version"] }}/bhcluster
+
+{% endif %}
+{% endif %} {% endfor %}
Added: bloodhound/tags/0.8/salt/roots/salt/postgresql/pg_hba_8.4.conf
URL:
http://svn.apache.org/viewvc/bloodhound/tags/0.8/salt/roots/salt/postgresql/pg_hba_8.4.conf?rev=1818071&view=auto
==============================================================================
--- bloodhound/tags/0.8/salt/roots/salt/postgresql/pg_hba_8.4.conf (added)
+++ bloodhound/tags/0.8/salt/roots/salt/postgresql/pg_hba_8.4.conf Wed Dec 13
22:03:30 2017
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+{% for project, data in pillar['projects'].items() %}{% if project in
pillar['enabled_projects'] and data['dbtype'] == 'postgres' %}
+local {{ data['dbname'] }} {{ data['dbuser'] }} md5
+{% endif %} {% endfor %}
+local all postgres ident
+local all all ident
+host all all 127.0.0.1/32 trust
+host all all ::1/128 trust
+
Added: bloodhound/tags/0.8/salt/roots/salt/postgresql/pg_hba_9.1.conf
URL:
http://svn.apache.org/viewvc/bloodhound/tags/0.8/salt/roots/salt/postgresql/pg_hba_9.1.conf?rev=1818071&view=auto
==============================================================================
--- bloodhound/tags/0.8/salt/roots/salt/postgresql/pg_hba_9.1.conf (added)
+++ bloodhound/tags/0.8/salt/roots/salt/postgresql/pg_hba_9.1.conf Wed Dec 13
22:03:30 2017
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+{% for project, data in pillar['projects'].items() %}{% if project in
pillar['enabled_projects'] and data['dbtype'] == 'postgres' %}
+local {{ data['dbname'] }} {{ data['dbuser'] }} md5
+{% endif %} {% endfor %}
+local all postgres peer
+local all all peer
+host all all 127.0.0.1/32 trust
+host all all ::1/128 trust
Added: bloodhound/tags/0.8/salt/roots/salt/requirements/init.sls
URL:
http://svn.apache.org/viewvc/bloodhound/tags/0.8/salt/roots/salt/requirements/init.sls?rev=1818071&view=auto
==============================================================================
--- bloodhound/tags/0.8/salt/roots/salt/requirements/init.sls (added)
+++ bloodhound/tags/0.8/salt/roots/salt/requirements/init.sls Wed Dec 13
22:03:30 2017
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+packages:
+ pkg.installed:
+ - names:
+ - python-virtualenv
+ - python-dev
+ - libpq-dev
Added: bloodhound/tags/0.8/salt/roots/salt/top.sls
URL:
http://svn.apache.org/viewvc/bloodhound/tags/0.8/salt/roots/salt/top.sls?rev=1818071&view=auto
==============================================================================
--- bloodhound/tags/0.8/salt/roots/salt/top.sls (added)
+++ bloodhound/tags/0.8/salt/roots/salt/top.sls Wed Dec 13 22:03:30 2017
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+base:
+ '*':
+ - requirements
+ - postgresql
+ - bloodhound
Added: bloodhound/tags/0.8/salt/roots/salt/webserver/bloodhound.site
URL:
http://svn.apache.org/viewvc/bloodhound/tags/0.8/salt/roots/salt/webserver/bloodhound.site?rev=1818071&view=auto
==============================================================================
--- bloodhound/tags/0.8/salt/roots/salt/webserver/bloodhound.site (added)
+++ bloodhound/tags/0.8/salt/roots/salt/webserver/bloodhound.site Wed Dec 13
22:03:30 2017
@@ -0,0 +1,41 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+<VirtualHost *:80>
+ {% for project, data in pillar['projects'].items() %} {% if project in
pillar['enabled_projects'] %}
+ WSGIDaemonProcess bh_{{ project }} user=vagrant
python-path=/home/vagrant/bhenv/lib/python2.7/site-packages
+ WSGIScriptAlias /{{ project }} /home/vagrant/environments/{{ project
}}/site/cgi-bin/trac.wsgi
+ <Directory /home/vagrant/environments/{{ project }}/site/cgi-bin>
+ WSGIProcessGroup bh_{{ project }}
+ WSGIApplicationGroup %{GLOBAL}
+ Order deny,allow
+ Allow from all
+ </Directory>
+ <Directory /home/vagrant/environments/{{ project }}/site/>
+ Options Indexes FollowSymLinks
+ AllowOverride None
+ Require all granted
+ </Directory>
+ <LocationMatch "/{{ project }}/[^/]+/login">
+ AuthType Digest
+ AuthName "Bloodhound"
+ AuthDigestDomain /{{ project }}
+ AuthUserFile /home/vagrant/environments/{{ project }}/bloodhound.htdigest
+ Require valid-user
+ </LocationMatch>
+ {% endif %} {% endfor %}
+</VirtualHost>
Added: bloodhound/tags/0.8/salt/roots/salt/webserver/init.sls
URL:
http://svn.apache.org/viewvc/bloodhound/tags/0.8/salt/roots/salt/webserver/init.sls?rev=1818071&view=auto
==============================================================================
--- bloodhound/tags/0.8/salt/roots/salt/webserver/init.sls (added)
+++ bloodhound/tags/0.8/salt/roots/salt/webserver/init.sls Wed Dec 13 22:03:30
2017
@@ -0,0 +1,81 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+{% if pillar['enable_webserver'] %}
+libapache2-mod-wsgi:
+ pkg:
+ - installed
+ - require:
+ - pkg: apache2
+
+a2enmod wsgi:
+ cmd.run:
+ - unless: test -L /etc/apache2/mods-enabled/wsgi.load
+ - watch:
+ - pkg: libapache2-mod-wsgi
+ - require:
+ - pkg: apache2
+
+a2enmod auth_digest:
+ cmd.run:
+ - unless: test -L /etc/apache2/mods-enabled/auth_digest.load
+ - require:
+ - pkg: apache2
+
+bloodhound_site:
+ file:
+ - managed
+ - template: jinja
+ - name: /etc/apache2/sites-available/bloodhound.conf
+ - source: salt://webserver/bloodhound.site
+ - require:
+ - pkg: apache2
+
+{% if grains['os_family'] == 'Debian' %}
+a2dissite 000-default:
+ cmd.run:
+ - onlyif: test -L /etc/apache2/sites-enabled/000-default.conf
+ - require:
+ - pkg: apache2
+{% endif %}
+
+a2ensite bloodhound:
+ cmd.run:
+ - unless: test -L /etc/apache2/sites-enabled/bloodhound.conf
+ - watch:
+ - file: bloodhound_site
+ - require:
+ - pkg: apache2
+ - cmd: a2dissite 000-default
+ - cmd: a2enmod auth_digest
+ - cmd: a2enmod wsgi
+ {% for project, data in pillar['projects'].items() %} {% if project in
pillar['enabled_projects'] %}
+ - cmd: create bloodhound {{ project }} site dirs
+ {% endif %} {% endfor %}
+
+apache2:
+ pkg:
+ - installed
+ service:
+ - running
+ - watch:
+ - file: bloodhound_site
+ - cmd: a2ensite bloodhound
+ - require:
+ - pkg: apache2
+
+{% endif %}
Modified: bloodhound/trunk/Vagrantfile
URL:
http://svn.apache.org/viewvc/bloodhound/trunk/Vagrantfile?rev=1818071&r1=1818070&r2=1818071&view=diff
==============================================================================
--- bloodhound/trunk/Vagrantfile (original)
+++ bloodhound/trunk/Vagrantfile Wed Dec 13 22:03:30 2017
@@ -22,6 +22,7 @@
# Please don't change it unless you know what you're doing.
Vagrant.configure(2) do |config|
config.vm.box = "bento/ubuntu-16.04"
+ config.vm.define "bloodhound"
# Forwarded port mappings:
# For apache served bloodhound use http://localhost:8280/
Modified: bloodhound/trunk/salt/roots/pillar/settings.sls
URL:
http://svn.apache.org/viewvc/bloodhound/trunk/salt/roots/pillar/settings.sls?rev=1818071&r1=1818070&r2=1818071&view=diff
==============================================================================
--- bloodhound/trunk/salt/roots/pillar/settings.sls (original)
+++ bloodhound/trunk/salt/roots/pillar/settings.sls Wed Dec 13 22:03:30 2017
@@ -19,6 +19,7 @@
enabled_projects:
- postgres
- sqlite
+ - bloodhound
# controls whether webserver is required:
enable_webserver: True
@@ -71,3 +72,15 @@ projects:
adminpassword: adminpass
project: test
prodprefix: TEST
+ bloodhound:
+ dbtype: postgres
+ dbname: bloodhound
+ dbuser: bloodhound
+ dbpassword: bloodhound
+ dbhost: localhost
+ dbport: 5434
+ adminuser: admin
+ adminpassword: adminpass
+ project: Bloodhound
+ prodprefix: BLDHND
+
Modified: bloodhound/trunk/salt/roots/salt/webserver/bloodhound.site
URL:
http://svn.apache.org/viewvc/bloodhound/trunk/salt/roots/salt/webserver/bloodhound.site?rev=1818071&r1=1818070&r2=1818071&view=diff
==============================================================================
--- bloodhound/trunk/salt/roots/salt/webserver/bloodhound.site (original)
+++ bloodhound/trunk/salt/roots/salt/webserver/bloodhound.site Wed Dec 13
22:03:30 2017
@@ -25,6 +25,11 @@
Order deny,allow
Allow from all
</Directory>
+ <Directory /home/vagrant/environments/{{ project }}/site/>
+ Options Indexes FollowSymLinks
+ AllowOverride None
+ Require all granted
+ </Directory>
<LocationMatch "/{{ project }}/[^/]+/login">
AuthType Digest
AuthName "Bloodhound"