Commit 4227d12230f0ed075257a024a9fc76bff4596952

Authored by Sergio Oliveira
2 parents ea748818 039e2ae8
Exists in backup

Merge branch 'master' into backup

Showing 58 changed files with 2269 additions and 1423 deletions   Show diff stats
.gitignore
1 1 /utils/obs/isv*
2 2 /Gemfile.lock
3 3 /config/local/ssh_config
  4 +/config/lxc/
4 5 /.tmp
5 6 /tmp
6 7 /docs/_build
  8 +/docs/dns.rst
7 9 /.*.html
8 10 /local.rake
9 11 *.swp
... ...
Rakefile
  1 +require 'yaml'
  2 +
1 3 begin
2 4 load 'local.rake'
3 5 rescue LoadError
... ... @@ -13,15 +15,40 @@ iptables_file = "config/#{$SPB_ENV}/iptables-filter-rules"
13 15  
14 16 ENV['CHAKE_SSH_CONFIG'] = ssh_config_file
15 17  
  18 +if $SPB_ENV == 'lxc'
  19 + system("mkdir -p config/lxc; sudo lxc-ls -f -F name,ipv4 | sed -e '/^softwarepublico/ !d; s/softwarepublico_//; s/_[0-9_]*/:/ ' > #{ips_file}.new")
  20 + begin
  21 + ips = YAML.load_file("#{ips_file}.new")
  22 + raise ArgumentError unless ips.is_a?(Hash)
  23 + FileUtils.mv ips_file + '.new', ips_file
  24 + rescue Exception => ex
  25 + puts ex.message
  26 + puts
  27 + puts "Q: did you boot the containers first?"
  28 + exit
  29 + end
  30 + config = YAML.load_file('config/local/config.yaml')
  31 + config['external_ip'] = ips['reverseproxy']
  32 + config['relay_ip'] = ips['email']
  33 + File.open(config_file, 'w') do |f|
  34 + f.puts(YAML.dump(config))
  35 + end
  36 +
  37 + File.open('config/lxc/iptables-filter-rules', 'w') do |f|
  38 + lxc_host_bridge_ip = '192.168.122.1' # FIXME don't hardcode
  39 + f.puts "-A INPUT -s #{lxc_host_bridge_ip} -p tcp -m state --state NEW --dport 22 -j ACCEPT"
  40 + end
  41 +end
  42 +
16 43 require 'chake'
17 44  
18 45 if Chake::VERSION < '0.4.3'
19 46 fail "Please upgrade to chake 0.4.3+"
20 47 end
21 48  
22   -config = YAML.load_file(config_file)
23   -ips = YAML.load_file(ips_file)
24   -firewall = File.open(iptables_file).read
  49 +ips ||= YAML.load_file(ips_file)
  50 +config ||= YAML.load_file(config_file)
  51 +firewall ||= File.open(iptables_file).read
25 52 $nodes.each do |node|
26 53 node.data['config'] = config
27 54 node.data['peers'] = ips
... ... @@ -38,13 +65,41 @@ task :test do
38 65 end
39 66  
40 67 file 'ssh_config.erb'
41   -file 'config/local/ssh_config' => ['nodes.yaml', 'config/local/ips.yaml', 'ssh_config.erb', 'Rakefile'] do |t|
42   - require 'erb'
43   - template = ERB.new(File.read('ssh_config.erb'))
44   - File.open(t.name, 'w') do |f|
45   - f.write(template.result(binding))
  68 +if ['local', 'lxc'].include?($SPB_ENV)
  69 + file ssh_config_file => ['nodes.yaml', ips_file, 'ssh_config.erb', 'Rakefile'] do |t|
  70 + require 'erb'
  71 + template = ERB.new(File.read('ssh_config.erb'))
  72 + File.open(t.name, 'w') do |f|
  73 + f.write(template.result(binding))
  74 + end
  75 + puts 'ERB %s' % t.name
46 76 end
47   - puts 'ERB %s' % t.name
  77 +end
  78 +
  79 +task :backup => ssh_config_file do
  80 + # setup
  81 + sh 'ssh', '-F', ssh_config_file, 'integration', 'sudo', 'rm -rf /tmp/backups'
  82 + sh 'ssh', '-F', ssh_config_file, 'social', 'sudo', 'rm -rf /tmp/backups'
  83 + sh 'mkdir', '-p', 'backups'
  84 + # integration
  85 + sh 'scp', '-F', ssh_config_file, 'utils/migration/backup_integration.sh', 'integration:/tmp'
  86 + sh 'ssh', '-F', ssh_config_file, 'integration', 'sudo', '/tmp/backup_integration.sh'
  87 + sh 'scp', '-F', ssh_config_file, 'integration:/tmp/backups/*', 'backups/'
  88 + # social
  89 + sh 'scp', '-F', ssh_config_file, 'utils/migration/backup_social.sh', 'social:/tmp'
  90 + sh 'ssh', '-F', ssh_config_file, 'social', 'sudo', '/tmp/backup_social.sh'
  91 + sh 'scp', '-F', ssh_config_file, 'social:/tmp/backups/*', 'backups/'
  92 +end
  93 +
  94 +task :restore => ssh_config_file do
  95 + #integration
  96 + sh 'scp', '-r', '-F', ssh_config_file, 'backups', 'integration:/tmp'
  97 + sh 'scp', '-F', ssh_config_file, 'utils/migration/restore_integration.sh', 'integration:/tmp'
  98 + sh 'ssh', '-F', ssh_config_file, 'integration', 'sudo', '/tmp/restore_integration.sh'
  99 + #social
  100 + sh 'scp', '-r', '-F', ssh_config_file, 'backups', 'social:/tmp'
  101 + sh 'scp', '-F', ssh_config_file, 'utils/migration/restore_social.sh', 'social:/tmp'
  102 + sh 'ssh', '-F', ssh_config_file, 'social', 'sudo', '/tmp/restore_social.sh'
48 103 end
49 104  
50 105 task :backup => ssh_config_file do
... ... @@ -98,3 +153,5 @@ task :preconfig =&gt; ssh_config_file do
98 153 end
99 154 end
100 155 end
  156 +
  157 +Dir.glob('tasks/*.rake').each { |f| load f }
... ...
Vagrantfile
... ... @@ -7,34 +7,49 @@ require &#39;yaml&#39;
7 7 VAGRANTFILE_API_VERSION = "2"
8 8  
9 9 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
10   - config.vm.box = ENV.fetch("VAGRANT_BOX", 'centos7')
  10 + config.vm.box = ENV.fetch("VAGRANT_BOX", 'chef/centos-7.0')
11 11 proxy = ENV['http_proxy'] || ENV['HTTP_PROXY']
12 12 if proxy
13 13 config.vm.provision 'shell', path: 'utils/proxy.sh', args: [proxy]
14 14 end
15 15  
16   - ips = YAML.load_file('config/local/ips.yaml')
  16 + load './local.rake' if File.exists?('local.rake')
  17 + env = ENV.fetch('SPB_ENV', 'local')
  18 +
  19 + if File.exist?("config/#{env}/ips.yaml")
  20 + ips = YAML.load_file("config/#{env}/ips.yaml")
  21 + else
  22 + ips = nil
  23 + end
17 24  
18 25 config.vm.define 'database' do |database|
19   - database.vm.network 'private_network', ip: ips['database']
  26 + database.vm.provider "virtualbox" do |vm|
  27 + database.vm.network 'private_network', ip: ips['database'] if ips
  28 + end
20 29 end
21 30 config.vm.define 'integration' do |integration|
22   - integration.vm.network 'private_network', ip: ips['integration']
23   - integration.vm.provider "virtualbox" do |v|
24   - v.memory = 1024
25   - v.cpus = 2
  31 + integration.vm.provider "virtualbox" do |vm|
  32 + integration.vm.network 'private_network', ip: ips['integration'] if ips
  33 + vm.memory = 1024
  34 + vm.cpus = 2
26 35 end
27 36 end
28 37 config.vm.define 'email' do |email|
29   - email.vm.network 'private_network', ip: ips['email']
  38 + email.vm.provider "virtualbox" do |vm|
  39 + email.vm.network 'private_network', ip: ips['email'] if ips
  40 + end
30 41 end
31 42 config.vm.define 'social' do |social|
32   - social.vm.network 'private_network', ip: ips['social']
  43 + social.vm.provider "virtualbox" do |vm|
  44 + social.vm.network 'private_network', ip: ips['social'] if ips
  45 + end
33 46 end
34 47 config.vm.define 'reverseproxy' do |reverseproxy|
35   - reverseproxy.vm.network 'private_network', ip: ips['reverseproxy']
36   - if File.exist?('tmp/preconfig.local.stamp')
37   - reverseproxy.ssh.port = File.read('tmp/preconfig.local.stamp').strip.to_i
  48 + reverseproxy.vm.provider "virtualbox" do |vm|
  49 + reverseproxy.vm.network 'private_network', ip: ips['reverseproxy'] if ips
  50 + end
  51 + if File.exist?("tmp/preconfig.#{env}.stamp")
  52 + reverseproxy.ssh.port = File.read("tmp/preconfig.#{env}.stamp").strip.to_i
38 53 reverseproxy.ssh.host = ips['reverseproxy']
39 54 end
40 55 end
... ...
config/dev/config.yaml 0 → 100644
... ... @@ -0,0 +1,15 @@
  1 +admins:
  2 + - ["Paulo Meirelles", "paulo@softwarelivre.org"]
  3 +external_hostname: dev.softwarepublico.gov.br
  4 +external_ip: 189.9.151.16
  5 +site_url: https://dev.softwarepublico.gov.br
  6 +colab_from_address: '"Portal do Software Publico (dev)" <noreply@dev.softwarepublico.gov.br>'
  7 +server_email: '"Portal do Software Publico (dev)" <noreply@dev.softwarepublico.gov.br>'
  8 +email_subject_prefix: '[spb|dev]'
  9 +lists_hostname: listas.dev.softwarepublico.gov.br
  10 +lists_admin: paulo@softwarelivre.org
  11 +from_address: noreply@dev.softwarepublico.gov.br
  12 +relay_hostname: relay.dev.softwarepublico.gov.br
  13 +relay_ip: 189.9.151.44
  14 +external_outgoing_mail_relay: 189.9.150.53
  15 +external_outgoing_mail_domain: serpro.gov.br
... ...
config/dev/ips.yaml 0 → 100644
... ... @@ -0,0 +1,5 @@
  1 +reverseproxy: 10.18.0.15
  2 +database: 10.18.0.16
  3 +social: 10.18.0.17
  4 +email: 10.18.0.18
  5 +integration: 10.18.0.19
... ...
config/dev/iptables-filter-rules 0 → 100644
... ... @@ -0,0 +1,23 @@
  1 +
  2 +-A INPUT -s 200.198.196.192/26 -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
  3 +-A INPUT -s 200.198.196.192/26 -p tcp -m state --state NEW -m tcp --dport 5432 -j ACCEPT
  4 +-A INPUT -s 200.198.196.192/26 -p icmp --icmp-type 8 -j ACCEPT
  5 +-A INPUT -s 200.198.196.201/32 -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
  6 +-A INPUT -s 200.198.196.206/32 -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
  7 +
  8 +-A INPUT -s 189.9.150.85/32 -p tcp -m state --state NEW -m multiport --dports 22,80,5432 -j ACCEPT
  9 +
  10 +
  11 +# UnB
  12 +-A INPUT -s 164.41.86.12/32 -p tcp -m state --state NEW -m multiport --dports 22,80,443 -j ACCEPT
  13 +-A INPUT -s 164.41.9.36/32 -p tcp -m state --state NEW -m multiport --dports 22,80,5432 -j ACCEPT
  14 +
  15 +
  16 +# Sergio Oliveira
  17 +-A INPUT -s 179.111.229.232/32 -p tcp -m state --state NEW -m multiport --dports 22,80,5432 -j ACCEPT
  18 +
  19 +
  20 +-A INPUT -s 10.18.0.0/16 -p tcp -m state --state NEW -m multiport --dports 22,80,5432 -j ACCEPT
  21 +-A INPUT -s 10.18.0.0/16 -p icmp --icmp-type 8 -j ACCEPT
  22 +-A INPUT -s 189.9.137.239/32 -p tcp -m state --state NEW -m tcp --dport 10050 -j ACCEPT
  23 +-A INPUT -s 189.9.137.239/32 -p icmp --icmp-type 8 -j ACCEPT
... ...
config/dev/ssh_config 0 → 100644
... ... @@ -0,0 +1,30 @@
  1 +Host *
  2 + ForwardAgent yes
  3 +
  4 +Host reverseproxy
  5 + Hostname 189.9.151.16
  6 + User spb
  7 +
  8 +Host database
  9 + Hostname 10.18.0.16
  10 + User spb
  11 + # connect via reverseproxy host
  12 + ProxyCommand ssh spb@189.9.151.16 nc %h %p
  13 +
  14 +Host social
  15 + Hostname 10.18.0.17
  16 + User spb
  17 + # connect via reverseproxy host
  18 + ProxyCommand ssh spb@189.9.151.16 nc %h %p
  19 +
  20 +Host email
  21 + Hostname 10.18.0.18
  22 + User spb
  23 + # connect via reverseproxy host
  24 + ProxyCommand ssh spb@189.9.151.16 nc %h %p
  25 +
  26 +Host integration
  27 + Hostname 10.18.0.19
  28 + User spb
  29 + # connect via reverseproxy host
  30 + ProxyCommand ssh spb@189.9.151.16 nc %h %p
... ...
config/development/config.yaml
... ... @@ -1,13 +0,0 @@
1   -admins:
2   - -
3   - - Paulo Meirelles
4   - - paulo@softwarelivre.org
5   -external_hostname: dev.softwarepublico.gov.br
6   -site_url: https://dev.softwarepublico.gov.br
7   -colab_from_address: '"Portal do Software Publico (dev)" <noreply@dev.softwarepublico.gov.br>'
8   -server_email: '"Portal do Software Publico (dev)" <noreply@dev.softwarepublico.gov.br>'
9   -email_subject_prefix: '[spb|dev]'
10   -lists_hostname: listas.dev.softwarepublico.gov.br
11   -lists_admin: paulo@softwarelivre.org
12   -relay_hostname: relay.dev.softwarepublico.gov.br
13   -from_address: noreply@dev.softwarepublico.gov.br
config/development/ips.yaml
... ... @@ -1,5 +0,0 @@
1   -reverseproxy: 10.18.0.15
2   -database: 10.18.0.16
3   -social: 10.18.0.17
4   -email: 10.18.0.18
5   -integration: 10.18.0.19
config/development/iptables-filter-rules
... ... @@ -1,23 +0,0 @@
1   -
2   --A INPUT -s 200.198.196.192/26 -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
3   --A INPUT -s 200.198.196.192/26 -p tcp -m state --state NEW -m tcp --dport 5432 -j ACCEPT
4   --A INPUT -s 200.198.196.192/26 -p icmp --icmp-type 8 -j ACCEPT
5   --A INPUT -s 200.198.196.201/32 -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
6   --A INPUT -s 200.198.196.206/32 -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
7   -
8   --A INPUT -s 189.9.150.85/32 -p tcp -m state --state NEW -m multiport --dports 22,80,5432 -j ACCEPT
9   -
10   -
11   -# UnB
12   --A INPUT -s 164.41.86.12/32 -p tcp -m state --state NEW -m multiport --dports 22,80,443 -j ACCEPT
13   --A INPUT -s 164.41.9.36/32 -p tcp -m state --state NEW -m multiport --dports 22,80,5432 -j ACCEPT
14   -
15   -
16   -# Sergio Oliveira
17   --A INPUT -s 179.111.229.232/32 -p tcp -m state --state NEW -m multiport --dports 22,80,5432 -j ACCEPT
18   -
19   -
20   --A INPUT -s 10.18.0.0/16 -p tcp -m state --state NEW -m multiport --dports 22,80,5432 -j ACCEPT
21   --A INPUT -s 10.18.0.0/16 -p icmp --icmp-type 8 -j ACCEPT
22   --A INPUT -s 189.9.137.239/32 -p tcp -m state --state NEW -m tcp --dport 10050 -j ACCEPT
23   --A INPUT -s 189.9.137.239/32 -p icmp --icmp-type 8 -j ACCEPT
config/development/ssh_config
... ... @@ -1,30 +0,0 @@
1   -Host *
2   - ForwardAgent yes
3   -
4   -Host reverseproxy
5   - Hostname 189.9.151.16
6   - User spb
7   -
8   -Host database
9   - Hostname 10.18.0.16
10   - User spb
11   - # connect via reverseproxy host
12   - ProxyCommand ssh spb@189.9.151.16 nc %h %p
13   -
14   -Host social
15   - Hostname 10.18.0.17
16   - User spb
17   - # connect via reverseproxy host
18   - ProxyCommand ssh spb@189.9.151.16 nc %h %p
19   -
20   -Host email
21   - Hostname 10.18.0.18
22   - User spb
23   - # connect via reverseproxy host
24   - ProxyCommand ssh spb@189.9.151.16 nc %h %p
25   -
26   -Host integration
27   - Hostname 10.18.0.19
28   - User spb
29   - # connect via reverseproxy host
30   - ProxyCommand ssh spb@189.9.151.16 nc %h %p
config/homologa/config.yaml 0 → 100644
... ... @@ -0,0 +1,16 @@
  1 +admins:
  2 + - ["Nayanne Araújo", "nayanne.bonifacio@planejamento.gov.br"]
  3 + - ["Marisa Souza dos Santos", "marisa.santos@planejamento.gov.br"]
  4 +external_hostname: homologa.softwarepublico.gov.br
  5 +external_ip: 189.9.151.65
  6 +site_url: https://homologa.softwarepublico.gov.br
  7 +colab_from_address: '"Portal do Software Publico (homologação)" <noreply@homologa.softwarepublico.gov.br>'
  8 +server_email: '"Portal do Software Publico (homologação)" <noreply@homologa.softwarepublico.gov.br>'
  9 +email_subject_prefix: '[spb]'
  10 +lists_hostname: listas.homologa.softwarepublico.gov.br
  11 +lists_admin: nayanne.bonifacio@planejamento.gov.br
  12 +from_address: noreply@homologa.softwarepublico.gov.br
  13 +relay_hostname: relay.homologa.softwarepublico.gov.br
  14 +relay_ip: 189.9.151.66
  15 +external_outgoing_mail_relay: 189.9.150.53
  16 +external_outgoing_mail_domain: serpro.gov.br
... ...
config/homologa/ips.yaml 0 → 100644
... ... @@ -0,0 +1,5 @@
  1 +reverseproxy: 10.0.13.2
  2 +database: 10.0.13.6
  3 +social: 10.0.13.4
  4 +email: 10.0.13.5
  5 +integration: 10.0.13.7
... ...
config/homologa/iptables-filter-rules 0 → 100644
... ... @@ -0,0 +1 @@
  1 +# nothing yet
... ...
config/homologa/ssh_config 0 → 100644
... ... @@ -0,0 +1,35 @@
  1 +Host *
  2 + ForwardAgent yes
  3 +
  4 +Host reverseproxy.unconfigured
  5 + Hostname 189.9.151.65
  6 + User spb
  7 +
  8 +Host reverseproxy
  9 + Hostname 10.0.13.2
  10 + User spb
  11 + # connect via reverseproxy host
  12 + ProxyCommand ssh spb@189.9.151.65 nc %h %p
  13 +
  14 +Host database
  15 + Hostname 10.0.13.6
  16 + User spb
  17 + # connect via reverseproxy host
  18 + ProxyCommand ssh spb@189.9.151.65 nc %h %p
  19 +
  20 +Host social
  21 + Hostname 10.0.13.4
  22 + User spb
  23 + # connect via reverseproxy host
  24 + ProxyCommand ssh spb@189.9.151.65 nc %h %p
  25 +
  26 +Host email
  27 + Hostname 10.0.13.5
  28 + User spb
  29 + # connect via reverseproxy host
  30 + ProxyCommand ssh spb@189.9.151.65 nc %h %p
  31 +
  32 +Host integration
  33 + Hostname 10.0.13.7
  34 + User spb
  35 + # Porta 22 de 189.9.151.65 cai aqui entao nao precisa de ProxyCommand
... ...
config/local/config.yaml
1 1 admins:
2   - -
3   - - Paulo Meirelles
4   - - paulo@softwarelivre.org
5   -external_hostname: softwarepublico.dev
  2 + - ["Paulo Meirelles", "paulo@softwarelivre.org"]
6 3 site_url: https://softwarepublico.dev
  4 +external_hostname: softwarepublico.dev
  5 +external_ip: 10.10.10.6
7 6 colab_from_address: '"Portal do Software Publico" <noreply@softwarepublico.dev>'
8 7 server_email: '"Portal do Software Publico" <noreply@softwarepublico.dev>'
9 8 email_subject_prefix: '[spb]'
10 9 lists_hostname: listas.softwarepublico.dev
11 10 lists_admin: paulo@softwarelivre.org
12 11 relay_hostname: relay.softwarepublico.dev
  12 +relay_ip: 10.10.10.3
13 13 alt_ssh_port: 5555
14 14 from_address: noreply@softwarepublico.dev
... ...
config/production/config.yaml
1 1 admins:
2   - -
3   - - Paulo Meirelles
4   - - paulo@softwarelivre.org
  2 + - ["Paulo Meirelles", "paulo@softwarelivre.org"]
5 3 external_hostname: beta.softwarepublico.gov.br
  4 +external_ip: 164.41.9.49
6 5 site_url: https://beta.softwarepublico.gov.br
7 6 colab_from_address: '"Portal do Software Publico" <noreply@beta.softwarepublico.gov.br>'
8 7 server_email: '"Portal do Software Publico" <noreply@beta.softwarepublico.gov.br>'
... ... @@ -10,5 +9,6 @@ email_subject_prefix: &#39;[spb]&#39;
10 9 lists_hostname: listas.softwarepublico.gov.br
11 10 lists_admin: paulo@softwarelivre.org
12 11 relay_hostname: relay.softwarepublico.gov.br
  12 +relay_ip: 164.41.9.48
13 13 alt_ssh_port: 55555
14 14 from_address: noreply@softwarepublico.gov.br
... ...
cookbooks/basics/files/default/is-a-container 0 → 100644
... ... @@ -0,0 +1,13 @@
  1 +#!/bin/sh
  2 +
  3 +# MANAGED WITH CHEF; DO NOT CHANGE BY HAND
  4 +
  5 +set -e
  6 +
  7 +if grep -q '/$' /proc/1/cgroup; then
  8 + # "Real" system
  9 + exit 1
  10 +else
  11 + # container
  12 + exit 0
  13 +fi
... ...
cookbooks/basics/files/default/selinux-enabled 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +#!/bin/sh
  2 +
  3 +# MANAGED WITH CHEF; DO NOT CHANGE BY HAND
  4 +
  5 +set -e
  6 +
  7 +selinux_status=$(sestatus | sed -e '/^SELinux status:/ !d; s/.*\s//')
  8 +[ "$selinux_status" = 'enabled' ]
... ...
cookbooks/basics/files/default/selinux-install-module
... ... @@ -9,6 +9,12 @@ if [ $# -ne 1 ]; then
9 9 exit 1
10 10 fi
11 11  
  12 +selinux_status=$(sestatus | sed -e '/^SELinux status:/ !d; s/.*\s//')
  13 +if ! selinux-enabled; then
  14 + echo "I: SELinux disabled, skipping"
  15 + exit 0
  16 +fi
  17 +
12 18 input="$1"
13 19  
14 20 directory=$(dirname "$input")
... ...
cookbooks/basics/recipes/default.rb
... ... @@ -10,8 +10,19 @@ cookbook_file &#39;/etc/selinux/config&#39; do
10 10 group 'root'
11 11 mode 0644
12 12 end
13   -execute 'setenforce Enforcing'
14   -execute 'setsebool httpd_can_network_connect 1'
  13 +
  14 +cookbook_file '/usr/local/bin/selinux-enabled' do
  15 + owner 'root'
  16 + group 'root'
  17 + mode '0755'
  18 +end
  19 +
  20 +execute 'setenforce Enforcing' do
  21 + only_if 'selinux-enabled'
  22 +end
  23 +execute 'setsebool httpd_can_network_connect 1' do
  24 + only_if 'selinux-enabled'
  25 +end
15 26 # directory for local type enforcements
16 27 directory '/etc/selinux/local' do
17 28 owner 'root'
... ... @@ -32,8 +43,14 @@ package &#39;less&#39;
32 43 package 'htop'
33 44 package 'ntp'
34 45  
  46 +cookbook_file '/usr/local/bin/is-a-container' do
  47 + owner 'root'
  48 + group 'root'
  49 + mode '0755'
  50 +end
35 51 service 'ntpd' do
36 52 action [:enable, :start]
  53 + not_if 'is-a-container'
37 54 end
38 55  
39 56 service 'firewalld' do
... ...
cookbooks/email/recipes/relay.rb
... ... @@ -46,3 +46,10 @@ execute &#39;transport:postmap&#39; do
46 46 command "postmap /etc/postfix/transport"
47 47 action :nothing
48 48 end
  49 +
  50 +external_relay = node['config']['external_outgoing_mail_relay']
  51 +if external_relay
  52 + execute "postconf relayhost=#{external_relay}"
  53 +else
  54 + execute 'postconf -X relayhost'
  55 +end
... ...
cookbooks/firewall/templates/default/iptables.erb
... ... @@ -33,5 +33,5 @@ COMMIT
33 33  
34 34  
35 35 *nat
36   -<%= render 'iptables-nat.erb' if node.hostname == 'reverseproxy' %>
  36 +<%= render 'iptables-nat.erb' %>
37 37 COMMIT
... ...
cookbooks/firewall/templates/host-database/iptables-nat.erb 0 → 100644
... ... @@ -0,0 +1,2 @@
  1 +
  2 +
... ...
cookbooks/firewall/templates/host-email/iptables-filter.erb
1 1  
2 2 # Allow access to Postfix
3   --A INPUT -s <%= node['peers']['integration'] %> -p tcp -m state --state NEW --dport 25 -j ACCEPT
4   --A INPUT -s <%= node['peers']['social'] %> -p tcp -m state --state NEW --dport 25 -j ACCEPT
5   --A INPUT -s <%= node['peers']['database'] %> -p tcp -m state --state NEW --dport 25 -j ACCEPT
6   --A INPUT -s <%= node['peers']['reverseproxy'] %> -p tcp -m state --state NEW --dport 25 -j ACCEPT
  3 +-A INPUT -p tcp -m state --state NEW --dport 25 -j ACCEPT
... ...
cookbooks/firewall/templates/host-email/iptables-nat.erb 0 → 100644
... ... @@ -0,0 +1,2 @@
  1 +
  2 +
... ...
cookbooks/firewall/templates/host-integration/iptables-nat.erb 0 → 100644
... ... @@ -0,0 +1,2 @@
  1 +
  2 +
... ...
cookbooks/firewall/templates/host-social/iptables-nat.erb 0 → 100644
... ... @@ -0,0 +1,2 @@
  1 +
  2 +
... ...
cookbooks/gitlab/recipes/default.rb
... ... @@ -18,7 +18,8 @@ end
18 18 execute 'gitlab:setup' do
19 19 user 'git'
20 20 cwd '/usr/lib/gitlab'
21   - command 'yes yes | bundle exec rake db:setup RAILS_ENV=production'
  21 + command 'yes yes | bundle exec rake db:setup RAILS_ENV=production && touch /var/lib/gitlab/setup.done'
  22 + not_if { File.exists?('/var/lib/gitlab/setup.done') }
22 23  
23 24 action :nothing
24 25 notifies :restart, 'service[gitlab]'
... ...
cookbooks/noosfero/recipes/default.rb
... ... @@ -42,6 +42,10 @@ execute &#39;plugins:enable&#39; do
42 42 command '/usr/lib/noosfero/script/noosfero-plugins enable ' + plugins.join(' ')
43 43 end
44 44  
  45 +execute 'plugins:activate' do
  46 + command "RAILS_ENV=production bundle exec rake noosfero:plugins:enable_all_plugins"
  47 +end
  48 +
45 49 execute 'theme:enable' do
46 50 command 'psql -h database -U noosfero --no-align --tuples-only -q -c "update environments set theme=\'noosfero-spb-theme\' where id=1;"'
47 51 end
... ...
cookbooks/reverse_proxy/recipes/default.rb
... ... @@ -12,7 +12,9 @@ cookbook_file &quot;/etc/sysctl.d/ip_forward.conf&quot; do
12 12 mode 0644
13 13 end
14 14  
15   -execute 'sysctl -w net.ipv4.ip_forward=1'
  15 +execute 'sysctl -w net.ipv4.ip_forward=1' do
  16 + not_if 'is-a-container'
  17 +end
16 18  
17 19 cookbook_file "/etc/nginx/#{node['config']['external_hostname']}.key" do
18 20 owner 'root'
... ...
docs/Makefile
1   -# Makefile for Sphinx documentation
2   -#
3   -
4   -# You can set these variables from the command line.
5   -SPHINXOPTS =
6   -SPHINXBUILD = sphinx-build
7   -PAPER =
8   -BUILDDIR = _build
9   -
10   -# User-friendly check for sphinx-build
11   -ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
12   -$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
13   -endif
14   -
15   -# Internal variables.
16   -PAPEROPT_a4 = -D latex_paper_size=a4
17   -PAPEROPT_letter = -D latex_paper_size=letter
18   -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
19   -# the i18n builder cannot share the environment and doctrees with the others
20   -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
21   -
22   -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
23   -
24   -help:
25   - @echo "Please use \`make <target>' where <target> is one of"
26   - @echo " html to make standalone HTML files"
27   - @echo " dirhtml to make HTML files named index.html in directories"
28   - @echo " singlehtml to make a single large HTML file"
29   - @echo " pickle to make pickle files"
30   - @echo " json to make JSON files"
31   - @echo " htmlhelp to make HTML files and a HTML help project"
32   - @echo " qthelp to make HTML files and a qthelp project"
33   - @echo " devhelp to make HTML files and a Devhelp project"
34   - @echo " epub to make an epub"
35   - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
36   - @echo " latexpdf to make LaTeX files and run them through pdflatex"
37   - @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
38   - @echo " text to make text files"
39   - @echo " man to make manual pages"
40   - @echo " texinfo to make Texinfo files"
41   - @echo " info to make Texinfo files and run them through makeinfo"
42   - @echo " gettext to make PO message catalogs"
43   - @echo " changes to make an overview of all changed/added/deprecated items"
44   - @echo " xml to make Docutils-native XML files"
45   - @echo " pseudoxml to make pseudoxml-XML files for display purposes"
46   - @echo " linkcheck to check all external links for integrity"
47   - @echo " doctest to run all doctests embedded in the documentation (if enabled)"
48   -
49   -clean:
50   - rm -rf $(BUILDDIR)/*
51   -
52   -html:
53   - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
54   - @echo
55   - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
56   -
57   -dirhtml:
58   - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
59   - @echo
60   - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
61   -
62   -singlehtml:
63   - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
64   - @echo
65   - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
66   -
67   -pickle:
68   - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
69   - @echo
70   - @echo "Build finished; now you can process the pickle files."
71   -
72   -json:
73   - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
74   - @echo
75   - @echo "Build finished; now you can process the JSON files."
76   -
77   -htmlhelp:
78   - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
79   - @echo
80   - @echo "Build finished; now you can run HTML Help Workshop with the" \
81   - ".hhp project file in $(BUILDDIR)/htmlhelp."
82   -
83   -qthelp:
84   - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
  1 +all:
  2 + @echo "Usage:"
85 3 @echo
86   - @echo "Build finished; now you can run "qcollectiongenerator" with the" \
87   - ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
88   - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/softwarepublico.qhcp"
89   - @echo "To view the help file:"
90   - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/softwarepublico.qhc"
  4 + @echo "make html Builds the documentation in HTML"
  5 + @echo "make latexpdf Builds the documentation in PDF"
91 6  
92   -devhelp:
93   - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
94   - @echo
95   - @echo "Build finished."
96   - @echo "To view the help file:"
97   - @echo "# mkdir -p $$HOME/.local/share/devhelp/softwarepublico"
98   - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/softwarepublico"
99   - @echo "# devhelp"
100   -
101   -epub:
102   - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
103   - @echo
104   - @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
105   -
106   -latex:
107   - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
108   - @echo
109   - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
110   - @echo "Run \`make' in that directory to run these through (pdf)latex" \
111   - "(use \`make latexpdf' here to do that automatically)."
112   -
113   -latexpdf:
114   - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
115   - @echo "Running LaTeX files through pdflatex..."
116   - $(MAKE) -C $(BUILDDIR)/latex all-pdf
117   - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
118   -
119   -latexpdfja:
120   - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
121   - @echo "Running LaTeX files through platex and dvipdfmx..."
122   - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
123   - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
124   -
125   -text:
126   - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
127   - @echo
128   - @echo "Build finished. The text files are in $(BUILDDIR)/text."
129   -
130   -man:
131   - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
132   - @echo
133   - @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
134   -
135   -texinfo:
136   - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
137   - @echo
138   - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
139   - @echo "Run \`make' in that directory to run these through makeinfo" \
140   - "(use \`make info' here to do that automatically)."
  7 +SPB_ENV ?= local
141 8  
142   -info:
143   - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
144   - @echo "Running Texinfo files through makeinfo..."
145   - make -C $(BUILDDIR)/texinfo info
146   - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
147   -
148   -gettext:
149   - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
150   - @echo
151   - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
  9 +# autogenerated DNS documentation
  10 +BUILT += _build/dns.rst
  11 +_build/dns.rst: ../test/dns_test.sh
  12 + (cd .. && sh test/dns_test.sh --doc) > $@
152 13  
153   -changes:
154   - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
155   - @echo
156   - @echo "The overview file is in $(BUILDDIR)/changes."
  14 +BUILT += $(patsubst %.svg, _build/%.png, $(wildcard *.svg))
  15 +_build/%.png: %.svg
  16 + inkscape --export-area-page --export-width=800 --export-width=600 --export-png=$@ $<
157 17  
158   -linkcheck:
159   - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
160   - @echo
161   - @echo "Link check complete; look for any errors in the above output " \
162   - "or in $(BUILDDIR)/linkcheck/output.txt."
  18 +BUILT += $(patsubst %.in, _build/%, $(wildcard *.in))
  19 +_build/%: %.in build.rb
  20 + ruby -p build.rb $< > $@ || ($(RM) $@; false)
163 21  
164   -doctest:
165   - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
166   - @echo "Testing of doctests in the sources finished, look at the " \
167   - "results in $(BUILDDIR)/doctest/output.txt."
  22 +CLEAN_FILES += $(BUILT)
168 23  
169   -xml:
170   - $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
171   - @echo
172   - @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
  24 +html latexpdf: $(BUILT)
  25 + $(MAKE) -C _build $@
173 26  
174   -pseudoxml:
175   - $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
176   - @echo
177   - @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
  27 +clean:
  28 + $(RM) $(BUILT)
  29 + $(MAKE) -C _build $@
... ...
docs/_build/Makefile 0 → 100644
... ... @@ -0,0 +1,177 @@
  1 +# Makefile for Sphinx documentation
  2 +#
  3 +
  4 +# You can set these variables from the command line.
  5 +SPHINXOPTS =
  6 +SPHINXBUILD = sphinx-build
  7 +PAPER =
  8 +BUILDDIR = .
  9 +
  10 +# User-friendly check for sphinx-build
  11 +ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
  12 +$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
  13 +endif
  14 +
  15 +# Internal variables.
  16 +PAPEROPT_a4 = -D latex_paper_size=a4
  17 +PAPEROPT_letter = -D latex_paper_size=letter
  18 +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
  19 +# the i18n builder cannot share the environment and doctrees with the others
  20 +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
  21 +
  22 +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
  23 +
  24 +help:
  25 + @echo "Please use \`make <target>' where <target> is one of"
  26 + @echo " html to make standalone HTML files"
  27 + @echo " dirhtml to make HTML files named index.html in directories"
  28 + @echo " singlehtml to make a single large HTML file"
  29 + @echo " pickle to make pickle files"
  30 + @echo " json to make JSON files"
  31 + @echo " htmlhelp to make HTML files and a HTML help project"
  32 + @echo " qthelp to make HTML files and a qthelp project"
  33 + @echo " devhelp to make HTML files and a Devhelp project"
  34 + @echo " epub to make an epub"
  35 + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
  36 + @echo " latexpdf to make LaTeX files and run them through pdflatex"
  37 + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
  38 + @echo " text to make text files"
  39 + @echo " man to make manual pages"
  40 + @echo " texinfo to make Texinfo files"
  41 + @echo " info to make Texinfo files and run them through makeinfo"
  42 + @echo " gettext to make PO message catalogs"
  43 + @echo " changes to make an overview of all changed/added/deprecated items"
  44 + @echo " xml to make Docutils-native XML files"
  45 + @echo " pseudoxml to make pseudoxml-XML files for display purposes"
  46 + @echo " linkcheck to check all external links for integrity"
  47 + @echo " doctest to run all doctests embedded in the documentation (if enabled)"
  48 +
  49 +clean:
  50 + rm -rf $(BUILDDIR)/[a-z]*
  51 +
  52 +html:
  53 + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
  54 + @echo
  55 + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
  56 +
  57 +dirhtml:
  58 + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
  59 + @echo
  60 + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
  61 +
  62 +singlehtml:
  63 + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
  64 + @echo
  65 + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
  66 +
  67 +pickle:
  68 + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
  69 + @echo
  70 + @echo "Build finished; now you can process the pickle files."
  71 +
  72 +json:
  73 + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
  74 + @echo
  75 + @echo "Build finished; now you can process the JSON files."
  76 +
  77 +htmlhelp:
  78 + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
  79 + @echo
  80 + @echo "Build finished; now you can run HTML Help Workshop with the" \
  81 + ".hhp project file in $(BUILDDIR)/htmlhelp."
  82 +
  83 +qthelp:
  84 + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
  85 + @echo
  86 + @echo "Build finished; now you can run "qcollectiongenerator" with the" \
  87 +
  88 + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/softwarepublico.qhcp"
  89 + @echo
  90 + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/softwarepublico.qhc"
  91 +
  92 +devhelp:
  93 + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
  94 + @echo
  95 + @echo "Build finished."
  96 + @echo
  97 + @echo "# mkdir -p $$HOME/.local/share/devhelp/softwarepublico"
  98 + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/softwarepublico"
  99 + @echo "# devhelp"
  100 +
  101 +epub:
  102 + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
  103 + @echo
  104 + @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
  105 +
  106 +latex:
  107 + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
  108 + @echo
  109 + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
  110 + @echo "Run \`make' in that directory to run these through (pdf)latex" \
  111 + "(use \`make latexpdf' here to do that automatically)."
  112 +
  113 +latexpdf:
  114 + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
  115 + @echo "Running LaTeX files through pdflatex..."
  116 + $(MAKE) -C $(BUILDDIR)/latex all-pdf
  117 + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
  118 +
  119 +latexpdfja:
  120 + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
  121 + @echo "Running LaTeX files through platex and dvipdfmx..."
  122 + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
  123 + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
  124 +
  125 +text:
  126 + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
  127 + @echo
  128 + @echo "Build finished. The text files are in $(BUILDDIR)/text."
  129 +
  130 +man:
  131 + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
  132 + @echo
  133 + @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
  134 +
  135 +texinfo:
  136 + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
  137 + @echo
  138 + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
  139 + @echo "Run \`make' in that directory to run these through makeinfo" \
  140 + "(use \`make info' here to do that automatically)."
  141 +
  142 +info:
  143 + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
  144 + @echo "Running Texinfo files through makeinfo..."
  145 + make -C $(BUILDDIR)/texinfo info
  146 + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
  147 +
  148 +gettext:
  149 + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
  150 + @echo
  151 + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
  152 +
  153 +changes:
  154 + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
  155 + @echo
  156 + @echo "The overview file is in $(BUILDDIR)/changes."
  157 +
  158 +linkcheck:
  159 + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
  160 + @echo
  161 + @echo "Link check complete; look for any errors in the above output " \
  162 + "or in $(BUILDDIR)/linkcheck/output.txt."
  163 +
  164 +doctest:
  165 + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
  166 + @echo "Testing of doctests in the sources finished, look at the " \
  167 + "results in $(BUILDDIR)/doctest/output.txt."
  168 +
  169 +xml:
  170 + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
  171 + @echo
  172 + @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
  173 +
  174 +pseudoxml:
  175 + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
  176 + @echo
  177 + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
... ...
docs/architecture.dot
... ... @@ -1,27 +0,0 @@
1   -digraph architecture {
2   -
3   - subgraph cluster_0 {
4   - style=filled;
5   - color="#d3d7cf";
6   - label = "Local network";
7   - node [style=filled,fillcolor=white];
8   -
9   - reverseproxy [shape=box];
10   - social [shape=box];
11   - email [shape=box];
12   - integration [shape=box];
13   - database [shape=box];
14   -
15   - reverseproxy -> social [label="HTTP"];
16   - social -> integration [label="HTTP"];
17   - social -> database [label="PostgreSQL (5432)"];
18   - integration -> database [label="PostgreSQL (5432)"];
19   - email -> integration [label="SMTP"];
20   -
21   - }
22   -
23   - internet -> reverseproxy [label="HTTP"];
24   - internet -> email [label="SMTP"];
25   - email -> internet [label="SMTP"];
26   -
27   -}
docs/arquitetura.rst.in 0 → 100644
... ... @@ -0,0 +1,25 @@
  1 +Arquitetura
  2 +===========
  3 +
  4 +A arquitetura do SPB consiste em 5 servidores, representados na figura
  5 +a seguir.
  6 +
  7 +.. image:: arquitetura.png
  8 +
  9 +Servidores e serviços
  10 +---------------------
  11 +
  12 +*Esta seção é um trabalho em andamento. Ela cobrirá:*
  13 +
  14 +* descrever arquitetura
  15 +* descrever papel de cada máquina
  16 +* descrever conexões
  17 +
  18 +Gestão de configuração
  19 +----------------------
  20 +
  21 +*Esta seção é um trabalho em andamento. Ela cobrirá:*
  22 +
  23 +* adicionar links com o repositório de gestão de configuração
  24 +* descrever repositório de gestão de configuração
  25 +* descrever como o chake funciona
... ...
docs/arquitetura.svg 0 → 100644
... ... @@ -0,0 +1,818 @@
  1 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
  3 +
  4 +<svg
  5 + xmlns:dc="http://purl.org/dc/elements/1.1/"
  6 + xmlns:cc="http://creativecommons.org/ns#"
  7 + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  8 + xmlns:svg="http://www.w3.org/2000/svg"
  9 + xmlns="http://www.w3.org/2000/svg"
  10 + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  11 + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  12 + width="1052.3622"
  13 + height="744.09448"
  14 + id="svg2"
  15 + version="1.1"
  16 + inkscape:version="0.91 r13725"
  17 + sodipodi:docname="arquitetura.svg">
  18 + <defs
  19 + id="defs4">
  20 + <marker
  21 + inkscape:stockid="Arrow2Lend"
  22 + orient="auto"
  23 + refY="0.0"
  24 + refX="0.0"
  25 + id="Arrow2Lend"
  26 + style="overflow:visible;">
  27 + <path
  28 + id="path4235"
  29 + style="fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
  30 + d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
  31 + transform="scale(1.1) rotate(180) translate(1,0)" />
  32 + </marker>
  33 + <marker
  34 + inkscape:stockid="Arrow1Lend"
  35 + orient="auto"
  36 + refY="0.0"
  37 + refX="0.0"
  38 + id="Arrow1Lend"
  39 + style="overflow:visible;">
  40 + <path
  41 + id="path4217"
  42 + d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  43 + style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;"
  44 + transform="scale(0.8) rotate(180) translate(12.5,0)" />
  45 + </marker>
  46 + <marker
  47 + inkscape:stockid="Arrow2Lstart"
  48 + orient="auto"
  49 + refY="0.0"
  50 + refX="0.0"
  51 + id="Arrow2Lstart"
  52 + style="overflow:visible">
  53 + <path
  54 + id="path4232"
  55 + style="fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round"
  56 + d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
  57 + transform="scale(1.1) translate(1,0)" />
  58 + </marker>
  59 + <marker
  60 + inkscape:stockid="Arrow2Lstart"
  61 + orient="auto"
  62 + refY="0"
  63 + refX="0"
  64 + id="Arrow2Lstart-4"
  65 + style="overflow:visible">
  66 + <path
  67 + inkscape:connector-curvature="0"
  68 + id="path4232-0"
  69 + style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
  70 + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
  71 + transform="matrix(1.1,0,0,1.1,1.1,0)" />
  72 + </marker>
  73 + </defs>
  74 + <sodipodi:namedview
  75 + id="base"
  76 + pagecolor="#ffffff"
  77 + bordercolor="#666666"
  78 + borderopacity="1.0"
  79 + inkscape:pageopacity="0.0"
  80 + inkscape:pageshadow="2"
  81 + inkscape:zoom="0.65045503"
  82 + inkscape:cx="526.18109"
  83 + inkscape:cy="372.04724"
  84 + inkscape:document-units="px"
  85 + inkscape:current-layer="layer6"
  86 + showgrid="false"
  87 + inkscape:window-width="1366"
  88 + inkscape:window-height="702"
  89 + inkscape:window-x="0"
  90 + inkscape:window-y="27"
  91 + inkscape:window-maximized="1" />
  92 + <metadata
  93 + id="metadata7">
  94 + <rdf:RDF>
  95 + <cc:Work
  96 + rdf:about="">
  97 + <dc:format>image/svg+xml</dc:format>
  98 + <dc:type
  99 + rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  100 + <dc:title />
  101 + </cc:Work>
  102 + </rdf:RDF>
  103 + </metadata>
  104 + <g
  105 + inkscape:label="Camada 1"
  106 + inkscape:groupmode="layer"
  107 + id="layer1"
  108 + transform="translate(0,-308.2677)"
  109 + style="display:inline">
  110 + <g
  111 + inkscape:groupmode="layer"
  112 + id="layer4"
  113 + inkscape:label="Release 1"
  114 + style="display:inline">
  115 + <text
  116 + xml:space="preserve"
  117 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24.06708527px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;display:inline;fill:#000000;fill-opacity:1;stroke:none"
  118 + x="642.34241"
  119 + y="491.6839"
  120 + id="text5794"
  121 + sodipodi:linespacing="125%"><tspan
  122 + style="font-size:16.46647072px"
  123 + id="tspan5796"
  124 + sodipodi:role="line"
  125 + x="642.34241"
  126 + y="491.6839">HTTP</tspan><tspan
  127 + style="font-size:16.46647072px"
  128 + id="tspan5798"
  129 + sodipodi:role="line"
  130 + x="642.34241"
  131 + y="512.26697">reverse proxy</tspan></text>
  132 + <g
  133 + id="g4382"
  134 + transform="matrix(0.68610294,0,0,0.68610294,325.50286,328.94289)">
  135 + <g
  136 + transform="translate(-104.51642,-10.919621)"
  137 + id="g4315">
  138 + <rect
  139 + style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#babdb6;fill-opacity:0.61568627;fill-rule:nonzero;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
  140 + id="rect4317"
  141 + width="703.53589"
  142 + height="193.43335"
  143 + x="45.238449"
  144 + y="819.93018"
  145 + rx="24.959101"
  146 + ry="24.959101" />
  147 + <text
  148 + xml:space="preserve"
  149 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15.92820835px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;letter-spacing:0px;word-spacing:0px;fill:#555753;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
  150 + x="62.26289"
  151 + y="991.02106"
  152 + id="text4319"
  153 + sodipodi:linespacing="125%"><tspan
  154 + sodipodi:role="line"
  155 + id="tspan4321"
  156 + x="62.26289"
  157 + y="991.02106"
  158 + style="font-size:22.5px;fill:#555753">database</tspan></text>
  159 + </g>
  160 + <g
  161 + style="display:inline"
  162 + id="g4246"
  163 + transform="matrix(1.0487632,0,0,1.0487632,-73.081866,298.25531)">
  164 + <rect
  165 + transform="translate(0,308.2677)"
  166 + ry="24.959145"
  167 + rx="24.959145"
  168 + y="205.91293"
  169 + x="99.836578"
  170 + height="106.07636"
  171 + width="215.27261"
  172 + id="rect4248"
  173 + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#fce94f;fill-opacity:1;fill-rule:nonzero;stroke:#c4a000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.55984557;marker:none;enable-background:accumulate" />
  174 + <text
  175 + sodipodi:linespacing="125%"
  176 + id="text4250"
  177 + y="575.53479"
  178 + x="143.37675"
  179 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
  180 + xml:space="preserve"><tspan
  181 + y="575.53479"
  182 + x="143.37675"
  183 + id="tspan4252"
  184 + sodipodi:role="line">PostgreSQL</tspan></text>
  185 + </g>
  186 + <g
  187 + transform="matrix(1.0487632,0,0,1.0487632,218.62813,298.25532)"
  188 + id="g4263"
  189 + style="display:inline">
  190 + <rect
  191 + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#fce94f;fill-opacity:1;fill-rule:nonzero;stroke:#c4a000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.55984557;marker:none;enable-background:accumulate"
  192 + id="rect4265"
  193 + width="215.27261"
  194 + height="106.07636"
  195 + x="99.836578"
  196 + y="205.91293"
  197 + rx="24.959145"
  198 + ry="24.959145"
  199 + transform="translate(0,308.2677)" />
  200 + <text
  201 + xml:space="preserve"
  202 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
  203 + x="178.57445"
  204 + y="575.53479"
  205 + id="text4267"
  206 + sodipodi:linespacing="125%"><tspan
  207 + sodipodi:role="line"
  208 + id="tspan4269"
  209 + x="178.57445"
  210 + y="575.53479">Redis</tspan></text>
  211 + </g>
  212 + </g>
  213 + <g
  214 + id="g4396"
  215 + transform="matrix(0.68610294,0,0,0.68610294,548.29673,158.97368)">
  216 + <g
  217 + id="g4307"
  218 + transform="translate(-73.317486,-262.07101)">
  219 + <rect
  220 + ry="24.959101"
  221 + rx="24.959101"
  222 + y="819.93018"
  223 + x="45.238449"
  224 + height="385.60645"
  225 + width="641.40228"
  226 + id="rect4309"
  227 + style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#babdb6;fill-opacity:0.61568627;fill-rule:nonzero;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" />
  228 + <text
  229 + sodipodi:linespacing="125%"
  230 + id="text4311"
  231 + y="1185.0211"
  232 + x="62.26289"
  233 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15.92820835px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;letter-spacing:0px;word-spacing:0px;fill:#555753;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
  234 + xml:space="preserve"><tspan
  235 + style="font-size:22.5px;fill:#555753"
  236 + y="1185.0211"
  237 + x="62.26289"
  238 + id="tspan4313"
  239 + sodipodi:role="line">integration</tspan></text>
  240 + </g>
  241 + <g
  242 + transform="matrix(1.0487632,0,0,1.0487632,-79.431935,244.40644)"
  243 + id="g3018"
  244 + style="display:inline">
  245 + <rect
  246 + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#fce94f;fill-opacity:1;fill-rule:nonzero;stroke:#c4a000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.55984557;marker:none;enable-background:accumulate"
  247 + id="rect3020"
  248 + width="215.27261"
  249 + height="106.07636"
  250 + x="99.836578"
  251 + y="205.91293"
  252 + transform="translate(0,308.2677)"
  253 + rx="24.959145"
  254 + ry="24.959145" />
  255 + <text
  256 + xml:space="preserve"
  257 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
  258 + x="175.63876"
  259 + y="575.49884"
  260 + id="text3022"
  261 + sodipodi:linespacing="125%"><tspan
  262 + sodipodi:role="line"
  263 + id="tspan3024"
  264 + x="175.63876"
  265 + y="575.49884">Gitlab</tspan></text>
  266 + </g>
  267 + <g
  268 + transform="matrix(1.0487632,0,0,1.0487632,-80.194985,44.124888)"
  269 + id="g3034"
  270 + style="display:inline">
  271 + <rect
  272 + transform="translate(0,308.2677)"
  273 + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#fce94f;fill-opacity:1;fill-rule:nonzero;stroke:#c4a000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.55984557;marker:none;enable-background:accumulate"
  274 + id="rect3036"
  275 + width="215.27261"
  276 + height="106.07636"
  277 + x="99.836578"
  278 + y="205.91293"
  279 + rx="24.959145"
  280 + ry="24.959145" />
  281 + <text
  282 + xml:space="preserve"
  283 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
  284 + x="169.5842"
  285 + y="575.53479"
  286 + id="text3038"
  287 + sodipodi:linespacing="125%"><tspan
  288 + sodipodi:role="line"
  289 + id="tspan3040"
  290 + x="169.5842"
  291 + y="575.53479">COLAB</tspan></text>
  292 + </g>
  293 + <g
  294 + transform="matrix(1.0487632,0,0,1.0487632,226.64988,243.33747)"
  295 + id="g4271"
  296 + style="display:inline">
  297 + <rect
  298 + transform="translate(0,308.2677)"
  299 + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#fce94f;fill-opacity:1;fill-rule:nonzero;stroke:#c4a000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.55984557;marker:none;enable-background:accumulate"
  300 + id="rect4273"
  301 + width="215.27261"
  302 + height="106.07636"
  303 + x="99.836578"
  304 + y="205.91293"
  305 + rx="24.959145"
  306 + ry="24.959145" />
  307 + <text
  308 + xml:space="preserve"
  309 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
  310 + x="163.01907"
  311 + y="575.53479"
  312 + id="text4275"
  313 + sodipodi:linespacing="125%"><tspan
  314 + sodipodi:role="line"
  315 + id="tspan4277"
  316 + x="163.01907"
  317 + y="575.53479">Mailman</tspan></text>
  318 + </g>
  319 + <g
  320 + style="display:inline"
  321 + id="g4288"
  322 + transform="matrix(1.0487632,0,0,1.0487632,226.64988,125.74526)">
  323 + <rect
  324 + ry="24.959145"
  325 + rx="24.959145"
  326 + y="205.91293"
  327 + x="99.836578"
  328 + height="106.07636"
  329 + width="215.27261"
  330 + id="rect4290"
  331 + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#fce94f;fill-opacity:1;fill-rule:nonzero;stroke:#c4a000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.55984557;marker:none;enable-background:accumulate"
  332 + transform="translate(0,308.2677)" />
  333 + <text
  334 + sodipodi:linespacing="125%"
  335 + id="text4292"
  336 + y="575.53479"
  337 + x="140.90532"
  338 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
  339 + xml:space="preserve"><tspan
  340 + y="575.53479"
  341 + x="140.90532"
  342 + id="tspan4294"
  343 + sodipodi:role="line">Mailman-API</tspan></text>
  344 + </g>
  345 + </g>
  346 + <text
  347 + sodipodi:linespacing="125%"
  348 + id="text4541"
  349 + y="619.28687"
  350 + x="457.85617"
  351 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24.06708527px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;display:inline;fill:#000000;fill-opacity:1;stroke:none"
  352 + xml:space="preserve"><tspan
  353 + y="619.28687"
  354 + x="457.85617"
  355 + sodipodi:role="line"
  356 + id="tspan4543"
  357 + style="font-size:16.46647072px">HTTP</tspan><tspan
  358 + y="639.86993"
  359 + x="457.85617"
  360 + sodipodi:role="line"
  361 + id="tspan4545"
  362 + style="font-size:16.46647072px">reverse proxy</tspan></text>
  363 + <text
  364 + xml:space="preserve"
  365 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24.06708527px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;display:inline;fill:#000000;fill-opacity:1;stroke:none"
  366 + x="649.13086"
  367 + y="657.7215"
  368 + id="text4547"
  369 + sodipodi:linespacing="125%"><tspan
  370 + style="font-size:16.46647072px;text-align:start;text-anchor:start"
  371 + id="tspan4549"
  372 + sodipodi:role="line"
  373 + x="649.13086"
  374 + y="657.7215">HTTP</tspan><tspan
  375 + style="font-size:16.46647072px;text-align:start;text-anchor:start"
  376 + id="tspan4551"
  377 + sodipodi:role="line"
  378 + x="649.13086"
  379 + y="678.30457">reverse proxy</tspan></text>
  380 + <text
  381 + sodipodi:linespacing="125%"
  382 + id="text4553"
  383 + y="566.24707"
  384 + x="769.04694"
  385 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24.06708527px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;display:inline;fill:#000000;fill-opacity:1;stroke:none"
  386 + xml:space="preserve"><tspan
  387 + y="566.24707"
  388 + x="769.04694"
  389 + sodipodi:role="line"
  390 + id="tspan4557"
  391 + style="font-size:16.46647072px;text-align:start;text-anchor:start">HTTP</tspan></text>
  392 + <text
  393 + xml:space="preserve"
  394 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24.06708527px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;display:inline;fill:#000000;fill-opacity:1;stroke:none"
  395 + x="345.62704"
  396 + y="851.43207"
  397 + id="text4561"
  398 + sodipodi:linespacing="125%"><tspan
  399 + style="font-size:16.46647072px"
  400 + id="tspan4565"
  401 + sodipodi:role="line"
  402 + x="345.62704"
  403 + y="851.43207">SQL</tspan></text>
  404 + <text
  405 + sodipodi:linespacing="125%"
  406 + id="text4569"
  407 + y="753.59344"
  408 + x="485.86237"
  409 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24.06708527px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;display:inline;fill:#000000;fill-opacity:1;stroke:none"
  410 + xml:space="preserve"><tspan
  411 + y="753.59344"
  412 + x="485.86237"
  413 + sodipodi:role="line"
  414 + id="tspan4571"
  415 + style="font-size:16.46647072px">SQL</tspan></text>
  416 + <text
  417 + xml:space="preserve"
  418 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24.06708527px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;display:inline;fill:#000000;fill-opacity:1;stroke:none"
  419 + x="513.03973"
  420 + y="822.08044"
  421 + id="text4573"
  422 + sodipodi:linespacing="125%"><tspan
  423 + style="font-size:16.46647072px"
  424 + id="tspan4575"
  425 + sodipodi:role="line"
  426 + x="513.03973"
  427 + y="822.08044">SQL</tspan></text>
  428 + <text
  429 + sodipodi:linespacing="125%"
  430 + id="text4577"
  431 + y="850.34491"
  432 + x="643.99384"
  433 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24.06708527px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;text-align:start;letter-spacing:0px;word-spacing:0px;text-anchor:start;display:inline;fill:#000000;fill-opacity:1;stroke:none"
  434 + xml:space="preserve"><tspan
  435 + y="850.34491"
  436 + x="643.99384"
  437 + sodipodi:role="line"
  438 + id="tspan4579"
  439 + style="font-size:16.46647072px;text-align:start;text-anchor:start">Protocolo</tspan><tspan
  440 + y="870.92798"
  441 + x="643.99384"
  442 + sodipodi:role="line"
  443 + style="font-size:16.46647072px;text-align:start;text-anchor:start"
  444 + id="tspan4581">nativo</tspan></text>
  445 + <text
  446 + sodipodi:linespacing="125%"
  447 + id="text4589"
  448 + y="556.0722"
  449 + x="177.66902"
  450 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24.06708527px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;display:inline;fill:#000000;fill-opacity:1;stroke:none"
  451 + xml:space="preserve"><tspan
  452 + y="556.0722"
  453 + x="177.66902"
  454 + sodipodi:role="line"
  455 + id="tspan4591"
  456 + style="font-size:16.46647072px">SMTP</tspan></text>
  457 + <text
  458 + sodipodi:linespacing="125%"
  459 + id="text4597"
  460 + y="505.26852"
  461 + x="432.2182"
  462 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24.06708527px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;display:inline;fill:#000000;fill-opacity:1;stroke:none"
  463 + xml:space="preserve"><tspan
  464 + y="505.26852"
  465 + x="432.2182"
  466 + sodipodi:role="line"
  467 + id="tspan4599"
  468 + style="font-size:16.46647072px">SMTP</tspan></text>
  469 + </g>
  470 + <g
  471 + inkscape:groupmode="layer"
  472 + id="layer5"
  473 + inkscape:label="Release 2"
  474 + style="display:inline">
  475 + <g
  476 + id="g4372"
  477 + transform="matrix(0.68610294,0,0,0.68610294,-257.62288,142.05473)">
  478 + <g
  479 + id="g4323"
  480 + transform="translate(471.10384,-45.23844)"
  481 + style="display:inline">
  482 + <rect
  483 + ry="24.959101"
  484 + rx="24.959101"
  485 + y="819.93018"
  486 + x="45.238449"
  487 + height="193.43336"
  488 + width="491.38315"
  489 + id="rect4325"
  490 + style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#babdb6;fill-opacity:0.61568627;fill-rule:nonzero;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" />
  491 + <text
  492 + sodipodi:linespacing="125%"
  493 + id="text4327"
  494 + y="991.02106"
  495 + x="62.26289"
  496 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15.92820835px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;letter-spacing:0px;word-spacing:0px;fill:#555753;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
  497 + xml:space="preserve"><tspan
  498 + style="font-size:22.5px;fill:#555753"
  499 + y="991.02106"
  500 + x="62.26289"
  501 + id="tspan4329"
  502 + sodipodi:role="line">social</tspan></text>
  503 + </g>
  504 + <g
  505 + id="g3042"
  506 + transform="matrix(1.0487632,0,0,1.0487632,544.44394,276.5302)"
  507 + style="display:inline">
  508 + <rect
  509 + ry="24.959145"
  510 + rx="24.959145"
  511 + transform="translate(0,308.2677)"
  512 + y="205.91293"
  513 + x="99.836578"
  514 + height="106.07636"
  515 + width="215.27261"
  516 + id="rect3044"
  517 + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#fce94f;fill-opacity:1;fill-rule:nonzero;stroke:#c4a000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.55984557;marker:none;enable-background:accumulate" />
  518 + <text
  519 + sodipodi:linespacing="125%"
  520 + id="text3046"
  521 + y="575.46283"
  522 + x="157.44057"
  523 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
  524 + xml:space="preserve"><tspan
  525 + y="575.46283"
  526 + x="157.44057"
  527 + id="tspan3048"
  528 + sodipodi:role="line">Noosfero</tspan></text>
  529 + </g>
  530 + </g>
  531 + <g
  532 + id="g4343"
  533 + transform="matrix(0.68610294,0,0,0.68610294,-313.27764,36.270151)">
  534 + <g
  535 + transform="translate(552.22106,-389.98662)"
  536 + id="g4331"
  537 + style="display:inline">
  538 + <rect
  539 + style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#babdb6;fill-opacity:0.61568627;fill-rule:nonzero;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
  540 + id="rect4333"
  541 + width="491.38315"
  542 + height="193.43336"
  543 + x="45.238449"
  544 + y="819.93018"
  545 + rx="24.959101"
  546 + ry="24.959101" />
  547 + <text
  548 + xml:space="preserve"
  549 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15.92820835px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;letter-spacing:0px;word-spacing:0px;fill:#555753;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
  550 + x="62.26289"
  551 + y="991.02106"
  552 + id="text4335"
  553 + sodipodi:linespacing="125%"><tspan
  554 + sodipodi:role="line"
  555 + id="tspan4337"
  556 + x="62.26289"
  557 + y="991.02106"
  558 + style="font-size:22.5px;fill:#555753">email</tspan></text>
  559 + </g>
  560 + <g
  561 + transform="translate(277.45747,43.873309)"
  562 + id="g4240">
  563 + <g
  564 + id="g4232"
  565 + transform="matrix(1.0487632,0,0,1.0487632,348.10369,-112.09129)"
  566 + style="display:inline">
  567 + <rect
  568 + ry="24.959145"
  569 + rx="24.959145"
  570 + transform="translate(0,308.2677)"
  571 + y="205.91293"
  572 + x="99.836578"
  573 + height="106.07636"
  574 + width="215.27261"
  575 + id="rect4234"
  576 + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#fce94f;fill-opacity:1;fill-rule:nonzero;stroke:#c4a000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.55984557;marker:none;enable-background:accumulate" />
  577 + <text
  578 + sodipodi:linespacing="125%"
  579 + id="text4236"
  580 + y="575.46283"
  581 + x="170.96269"
  582 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
  583 + xml:space="preserve"><tspan
  584 + y="575.46283"
  585 + x="170.96269"
  586 + id="tspan4238"
  587 + sodipodi:role="line">Postfix</tspan></text>
  588 + </g>
  589 + </g>
  590 + </g>
  591 + <g
  592 + transform="matrix(0.68610294,0,0,0.68610294,-326.80522,364.9756)"
  593 + id="g4449">
  594 + <rect
  595 + style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#d3d7cf;fill-opacity:0.61568627;fill-rule:nonzero;stroke:#babdb6;stroke-width:2.91501451;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
  596 + id="rect4531"
  597 + width="257.68625"
  598 + height="245.36218"
  599 + x="494.24698"
  600 + y="743.06433"
  601 + rx="9.5793791"
  602 + ry="9.5793791" />
  603 + <g
  604 + style="display:inline"
  605 + transform="translate(471.03,-45.23844)"
  606 + id="g4451">
  607 + <rect
  608 + style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#babdb6;fill-opacity:0.61568627;fill-rule:nonzero;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
  609 + id="rect4453"
  610 + width="213.55743"
  611 + height="65.710571"
  612 + x="45.238449"
  613 + y="947.65295"
  614 + rx="15.452409"
  615 + ry="15.452409" />
  616 + <text
  617 + xml:space="preserve"
  618 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15.92820835px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;letter-spacing:0px;word-spacing:0px;fill:#555753;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
  619 + x="62.26289"
  620 + y="991.02106"
  621 + id="text4455"
  622 + sodipodi:linespacing="125%"><tspan
  623 + sodipodi:role="line"
  624 + id="tspan4457"
  625 + x="62.26289"
  626 + y="991.02106"
  627 + style="font-size:22.5px;fill:#555753">servidor</tspan></text>
  628 + </g>
  629 + <g
  630 + style="display:inline"
  631 + transform="matrix(1.0487632,0,0,1.0487632,410.82571,289.93364)"
  632 + id="g4459">
  633 + <rect
  634 + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#fce94f;fill-opacity:1;fill-rule:nonzero;stroke:#c4a000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.55984557;marker:none;enable-background:accumulate"
  635 + id="rect4461"
  636 + width="106.31865"
  637 + height="52.388897"
  638 + x="99.836578"
  639 + y="205.91293"
  640 + transform="translate(0,308.2677)"
  641 + rx="6.5724359"
  642 + ry="6.5724359" />
  643 + <text
  644 + xml:space="preserve"
  645 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
  646 + x="112.57272"
  647 + y="546.08508"
  648 + id="text4463"
  649 + sodipodi:linespacing="125%"><tspan
  650 + sodipodi:role="line"
  651 + id="tspan4465"
  652 + x="112.57272"
  653 + y="546.08508">Serviço</tspan></text>
  654 + </g>
  655 + <g
  656 + id="g4526"
  657 + transform="translate(0,3.0637686e-6)">
  658 + <path
  659 + sodipodi:nodetypes="cc"
  660 + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#000000;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:url(#Arrow2Lstart-4);enable-background:accumulate"
  661 + d="m 615.18822,805.26531 -99.9181,0.22208"
  662 + id="path4467"
  663 + inkscape:connector-curvature="0" />
  664 + <text
  665 + sodipodi:linespacing="125%"
  666 + id="text4522"
  667 + y="794.6015"
  668 + x="515.53412"
  669 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20.40509987px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
  670 + xml:space="preserve"><tspan
  671 + y="794.6015"
  672 + x="515.53412"
  673 + id="tspan4524"
  674 + sodipodi:role="line">conexão</tspan></text>
  675 + </g>
  676 + <text
  677 + xml:space="preserve"
  678 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20.40509987px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;letter-spacing:0px;word-spacing:0px;fill:#555753;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
  679 + x="665.66437"
  680 + y="769.95325"
  681 + id="text4533"
  682 + sodipodi:linespacing="125%"><tspan
  683 + sodipodi:role="line"
  684 + id="tspan4535"
  685 + x="665.66437"
  686 + y="769.95325"
  687 + style="-inkscape-font-specification:'Cantarell Bold';font-family:Cantarell;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal;fill:#555753;">Legenda</tspan></text>
  688 + </g>
  689 + </g>
  690 + <g
  691 + inkscape:groupmode="layer"
  692 + id="layer6"
  693 + inkscape:label="Release 3"
  694 + style="display:inline">
  695 + <g
  696 + id="g4358"
  697 + transform="matrix(0.68610294,0,0,0.68610294,499.06367,112.26031)">
  698 + <g
  699 + transform="translate(-1.5599465,-500.74283)"
  700 + id="g4302"
  701 + style="display:inline">
  702 + <rect
  703 + style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#babdb6;fill-opacity:0.61568627;fill-rule:nonzero;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
  704 + id="rect4296"
  705 + width="491.38315"
  706 + height="193.43336"
  707 + x="45.238449"
  708 + y="819.93018"
  709 + rx="24.959101"
  710 + ry="24.959101" />
  711 + <text
  712 + xml:space="preserve"
  713 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15.92820835px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;letter-spacing:0px;word-spacing:0px;fill:#555753;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
  714 + x="62.26289"
  715 + y="991.02106"
  716 + id="text4298"
  717 + sodipodi:linespacing="125%"><tspan
  718 + sodipodi:role="line"
  719 + id="tspan4300"
  720 + x="62.26289"
  721 + y="991.02106"
  722 + style="font-size:22.5px;fill:#555753">reverseproxy</tspan></text>
  723 + </g>
  724 + <g
  725 + id="g3987"
  726 + transform="matrix(1.0487632,0,0,1.0487632,71.78015,-178.97419)"
  727 + style="display:inline">
  728 + <rect
  729 + ry="24.959145"
  730 + rx="24.959145"
  731 + y="205.91293"
  732 + x="99.836578"
  733 + height="106.07636"
  734 + width="215.27261"
  735 + id="rect3989"
  736 + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#fce94f;fill-opacity:1;fill-rule:nonzero;stroke:#c4a000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.55984557;marker:none;enable-background:accumulate"
  737 + transform="translate(0,308.2677)" />
  738 + <text
  739 + sodipodi:linespacing="125%"
  740 + id="text3991"
  741 + y="575.11481"
  742 + x="126.62383"
  743 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:Cantarell;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
  744 + xml:space="preserve"><tspan
  745 + y="575.11481"
  746 + x="126.62383"
  747 + id="tspan3993"
  748 + sodipodi:role="line">Frontend HTTP</tspan></text>
  749 + </g>
  750 + </g>
  751 + <path
  752 + inkscape:connector-curvature="0"
  753 + id="path5590"
  754 + d="m 634.01413,553.48165 c -0.36236,-61.8148 62.32682,-56.21368 62.508,-114.76719"
  755 + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#000000;stroke-width:1.02915442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:url(#Arrow2Lstart);enable-background:accumulate"
  756 + sodipodi:nodetypes="cc" />
  757 + <path
  758 + sodipodi:nodetypes="cc"
  759 + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#000000;stroke-width:1.02915442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:url(#Arrow2Lstart);enable-background:accumulate"
  760 + d="m 642.85409,689.15591 0.62824,-49.04397"
  761 + id="path4433"
  762 + inkscape:connector-curvature="0" />
  763 + <path
  764 + sodipodi:nodetypes="cc"
  765 + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#000000;stroke-width:1.02915442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:url(#Arrow2Lstart);enable-background:accumulate"
  766 + d="M 859.12722,609.13106 C 829.91865,575.18646 753.05114,554.30963 723.07388,599.54037"
  767 + id="path4437"
  768 + inkscape:connector-curvature="0" />
  769 + <path
  770 + inkscape:connector-curvature="0"
  771 + id="path4439"
  772 + d="m 271.00931,696.41651 c -0.36236,-61.8148 48.40654,-100.93072 283.89148,-100.93072"
  773 + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#000000;stroke-width:1.02915442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:url(#Arrow2Lstart);enable-background:accumulate"
  774 + sodipodi:nodetypes="cc" />
  775 + <path
  776 + inkscape:connector-curvature="0"
  777 + id="path4441"
  778 + d="m 630.55501,896.50178 c -2.09667,-64.00693 20.40483,-66.51846 19.07686,-115.92023"
  779 + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#000000;stroke-width:1.02915442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:url(#Arrow2Lstart);enable-background:accumulate"
  780 + sodipodi:nodetypes="cc" />
  781 + <path
  782 + sodipodi:nodetypes="cc"
  783 + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#000000;stroke-width:1.02915442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:url(#Arrow2Lstart);enable-background:accumulate"
  784 + d="M 397.48723,898.80785 C 397.78887,788.16087 262.61615,877.38604 264.36295,782.88763"
  785 + id="path4443"
  786 + inkscape:connector-curvature="0" />
  787 + <path
  788 + inkscape:connector-curvature="0"
  789 + id="path4445"
  790 + d="m 424.41946,896.50178 c -1.80573,-37.68499 12.38386,-120.28208 48.96766,-120.62805 38.60999,-0.36513 5.96395,-98.15121 42.04501,-99.61416 86.6488,-3.51329 82.65006,9.13901 86.41488,-35.58008"
  791 + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#000000;stroke-width:1.02915442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:url(#Arrow2Lstart);enable-background:accumulate"
  792 + sodipodi:nodetypes="cssc" />
  793 + <path
  794 + sodipodi:nodetypes="cc"
  795 + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#000000;stroke-width:1.02915442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:url(#Arrow2Lstart);enable-background:accumulate"
  796 + d="M 450.58299,896.50178 C 451.5611,765.36235 628.56982,888.6602 627.24185,779.81286"
  797 + id="path4447"
  798 + inkscape:connector-curvature="0" />
  799 + <path
  800 + sodipodi:nodetypes="cc"
  801 + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#000000;stroke-width:1.02915442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:url(#Arrow2Lstart);enable-background:accumulate"
  802 + d="m 260.24762,444.28533 c 2.71241,99.61065 -131.46755,100.46675 -126.5904,221.92019"
  803 + id="path4583"
  804 + inkscape:connector-curvature="0" />
  805 + <path
  806 + inkscape:connector-curvature="0"
  807 + id="path4585"
  808 + d="m 301.98953,444.28533 c -11.02329,92.39356 107.94916,65.41353 177.6501,74.78698 29.8001,4.00755 50.59374,14.66025 48.37091,44.1284"
  809 + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#000000;stroke-width:1.02915442;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:url(#Arrow2Lstart);enable-background:accumulate"
  810 + sodipodi:nodetypes="csc" />
  811 + </g>
  812 + </g>
  813 + <g
  814 + inkscape:groupmode="layer"
  815 + id="layer2"
  816 + inkscape:label="Manutenção"
  817 + style="display:inline" />
  818 +</svg>
... ...
docs/backup.rst.in 0 → 100644
... ... @@ -0,0 +1,39 @@
  1 +Backup
  2 +======
  3 +
  4 +O SPB possui rotinas automatizadas para backup e restore dos dados de
  5 +todos os seus componentes. As seções a seguir descrevem estas rotinas.
  6 +Ambos os procedimentos devem ser realizados num *shell* onde o diretório
  7 +atual é o repositório de controle de versão do SPB.
  8 +
  9 +Procedimento de backup
  10 +----------------------
  11 +
  12 +Suponha que estamos realizando um backup do ambiente de produção,
  13 +chamado de ``prod``; o comando para realizar um *backup* é o seguinte
  14 +(note ``SPB_ENV=prod``)::
  15 +
  16 + $ rake backup SPB_ENV=prod
  17 +
  18 +Esta operação vai copiar arquivos e *dumps* dos bancos de dados do
  19 +Noosfero, GitLab, Colab e Mailman, e copiá-los para um subdiretório
  20 +chamado ``backups`` na sua estação de trabalho.
  21 +
  22 +Procedimento de restauração
  23 +---------------------------
  24 +
  25 +**Importante:** o procedimento de restauração é suportado apenas para uma
  26 +versão idêntica da plataforma, ou seja, não é suportado fazer um *backup*
  27 +de uma versão mais antiga da plataforma e restaurar esse *backup* numa
  28 +versão mais recente da plataforma, e nem vice-versa.
  29 +
  30 +O comando para restaurar um backup no ambiente **@@SPB_ENV@@** é o seguinte::
  31 +
  32 + $ rake restore SPB_ENV=@@SPB_ENV@@
  33 +
  34 +Esta operação vai restaurar o último backup realizado no ambiente
  35 +chamado **@@SPB_ENV@@**.
  36 +
  37 +**Importante:** a restauração do backup irá apagar os dados existes no
  38 +ambiente @@SPB_ENV@@. Confira duas vezes antes de iniciar o
  39 +procedimento.
... ...
docs/build.rb 0 → 100644
... ... @@ -0,0 +1,10 @@
  1 +$SPB_ENV = ENV.fetch('SPB_ENV', 'local')
  2 +
  3 +$_.gsub!('@@SPB_ENV@@', $SPB_ENV)
  4 +
  5 +$_.gsub!(/@@config\(([^\)]*)\)@@/) do |f|
  6 + lines = File.read("../config/#{$SPB_ENV}/#{$1}").lines
  7 + lines.shift + lines.map do |line|
  8 + ' ' + line
  9 + end.join
  10 +end
... ...
docs/conf.py
... ... @@ -1,331 +0,0 @@
1   -# -*- coding: utf-8 -*-
2   -#
3   -# softwarepublico documentation build configuration file, created by
4   -# sphinx-quickstart on Thu Nov 6 15:48:07 2014.
5   -#
6   -# This file is execfile()d with the current directory set to its
7   -# containing dir.
8   -#
9   -# Note that not all possible configuration values are present in this
10   -# autogenerated file.
11   -#
12   -# All configuration values have a default; values that are commented out
13   -# serve to show the default.
14   -
15   -import sys
16   -import os
17   -
18   -# If extensions (or modules to document with autodoc) are in another directory,
19   -# add these directories to sys.path here. If the directory is relative to the
20   -# documentation root, use os.path.abspath to make it absolute, like shown here.
21   -#sys.path.insert(0, os.path.abspath('.'))
22   -
23   -# -- General configuration ------------------------------------------------
24   -
25   -# If your documentation needs a minimal Sphinx version, state it here.
26   -#needs_sphinx = '1.0'
27   -
28   -# Add any Sphinx extension module names here, as strings. They can be
29   -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
30   -# ones.
31   -extensions = []
32   -
33   -# Add any paths that contain templates here, relative to this directory.
34   -templates_path = ['_templates']
35   -
36   -# The suffix of source filenames.
37   -source_suffix = '.rst'
38   -
39   -# The encoding of source files.
40   -#source_encoding = 'utf-8-sig'
41   -
42   -# The master toctree document.
43   -master_doc = 'index'
44   -
45   -# General information about the project.
46   -project = u'softwarepublico'
47   -copyright = u'2014, Universidade de Brasília - UnB. Documentação licenciada sob a Licença Creative Commons Atribuição-CompartilhaIgual 4.0 Internacional'
48   -
49   -# The version info for the project you're documenting, acts as replacement for
50   -# |version| and |release|, also used in various other places throughout the
51   -# built documents.
52   -#
53   -# The short X.Y version.
54   -version = '2.0'
55   -# The full version, including alpha/beta/rc tags.
56   -release = '2.0'
57   -
58   -# The language for content autogenerated by Sphinx. Refer to documentation
59   -# for a list of supported languages.
60   -#language = None
61   -
62   -# There are two options for replacing |today|: either, you set today to some
63   -# non-false value, then it is used:
64   -#today = ''
65   -# Else, today_fmt is used as the format for a strftime call.
66   -#today_fmt = '%B %d, %Y'
67   -
68   -# List of patterns, relative to source directory, that match files and
69   -# directories to ignore when looking for source files.
70   -exclude_patterns = ['_build']
71   -
72   -# The reST default role (used for this markup: `text`) to use for all
73   -# documents.
74   -#default_role = None
75   -
76   -# If true, '()' will be appended to :func: etc. cross-reference text.
77   -#add_function_parentheses = True
78   -
79   -# If true, the current module name will be prepended to all description
80   -# unit titles (such as .. function::).
81   -#add_module_names = True
82   -
83   -# If true, sectionauthor and moduleauthor directives will be shown in the
84   -# output. They are ignored by default.
85   -#show_authors = False
86   -
87   -# The name of the Pygments (syntax highlighting) style to use.
88   -pygments_style = 'sphinx'
89   -
90   -# A list of ignored prefixes for module index sorting.
91   -#modindex_common_prefix = []
92   -
93   -# If true, keep warnings as "system message" paragraphs in the built documents.
94   -#keep_warnings = False
95   -
96   -
97   -# -- Options for HTML output ----------------------------------------------
98   -
99   -# The theme to use for HTML and HTML Help pages. See the documentation for
100   -# a list of builtin themes.
101   -html_theme = 'default'
102   -
103   -# Theme options are theme-specific and customize the look and feel of a theme
104   -# further. For a list of options available for each theme, see the
105   -# documentation.
106   -#html_theme_options = {}
107   -
108   -# Add any paths that contain custom themes here, relative to this directory.
109   -#html_theme_path = []
110   -
111   -# The name for this set of Sphinx documents. If None, it defaults to
112   -# "<project> v<release> documentation".
113   -#html_title = None
114   -
115   -# A shorter title for the navigation bar. Default is the same as html_title.
116   -#html_short_title = None
117   -
118   -# The name of an image file (relative to this directory) to place at the top
119   -# of the sidebar.
120   -#html_logo = None
121   -
122   -# The name of an image file (within the static path) to use as favicon of the
123   -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
124   -# pixels large.
125   -#html_favicon = None
126   -
127   -# Add any paths that contain custom static files (such as style sheets) here,
128   -# relative to this directory. They are copied after the builtin static files,
129   -# so a file named "default.css" will overwrite the builtin "default.css".
130   -html_static_path = ['_static']
131   -
132   -# Add any extra paths that contain custom files (such as robots.txt or
133   -# .htaccess) here, relative to this directory. These files are copied
134   -# directly to the root of the documentation.
135   -#html_extra_path = []
136   -
137   -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
138   -# using the given strftime format.
139   -#html_last_updated_fmt = '%b %d, %Y'
140   -
141   -# If true, SmartyPants will be used to convert quotes and dashes to
142   -# typographically correct entities.
143   -#html_use_smartypants = True
144   -
145   -# Custom sidebar templates, maps document names to template names.
146   -#html_sidebars = {}
147   -
148   -# Additional templates that should be rendered to pages, maps page names to
149   -# template names.
150   -#html_additional_pages = {}
151   -
152   -# If false, no module index is generated.
153   -#html_domain_indices = True
154   -
155   -# If false, no index is generated.
156   -#html_use_index = True
157   -
158   -# If true, the index is split into individual pages for each letter.
159   -#html_split_index = False
160   -
161   -# If true, links to the reST sources are added to the pages.
162   -#html_show_sourcelink = True
163   -
164   -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
165   -#html_show_sphinx = True
166   -
167   -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
168   -#html_show_copyright = True
169   -
170   -# If true, an OpenSearch description file will be output, and all pages will
171   -# contain a <link> tag referring to it. The value of this option must be the
172   -# base URL from which the finished HTML is served.
173   -#html_use_opensearch = ''
174   -
175   -# This is the file name suffix for HTML files (e.g. ".xhtml").
176   -#html_file_suffix = None
177   -
178   -# Output file base name for HTML help builder.
179   -htmlhelp_basename = 'softwarepublicodoc'
180   -
181   -
182   -# -- Options for LaTeX output ---------------------------------------------
183   -
184   -latex_elements = {
185   -# The paper size ('letterpaper' or 'a4paper').
186   -#'papersize': 'letterpaper',
187   -
188   -# The font size ('10pt', '11pt' or '12pt').
189   -#'pointsize': '10pt',
190   -
191   -# Additional stuff for the LaTeX preamble.
192   -#'preamble': '',
193   -}
194   -
195   -# Grouping the document tree into LaTeX files. List of tuples
196   -# (source start file, target name, title,
197   -# author, documentclass [howto, manual, or own class]).
198   -latex_documents = [
199   - ('index', 'softwarepublico.tex',
200   - u'Documentação - Software Público Brasileiro (SPB)',
201   - u'Universidade de Brasília', 'manual'),
202   -]
203   -
204   -# The name of an image file (relative to this directory) to place at the top of
205   -# the title page.
206   -#latex_logo = None
207   -
208   -# For "manual" documents, if this is true, then toplevel headings are parts,
209   -# not chapters.
210   -#latex_use_parts = False
211   -
212   -# If true, show page references after internal links.
213   -#latex_show_pagerefs = False
214   -
215   -# If true, show URL addresses after external links.
216   -#latex_show_urls = False
217   -
218   -# Documents to append as an appendix to all manuals.
219   -#latex_appendices = []
220   -
221   -# If false, no module index is generated.
222   -#latex_domain_indices = True
223   -
224   -
225   -# -- Options for manual page output ---------------------------------------
226   -
227   -# One entry per manual page. List of tuples
228   -# (source start file, name, description, authors, manual section).
229   -man_pages = [
230   - ('index', 'softwarepublico',
231   - u'Documentação - Software Público Brasileiro (SPB)',
232   - [u'Universidade de Brasília'], 1)
233   -]
234   -
235   -# If true, show URL addresses after external links.
236   -#man_show_urls = False
237   -
238   -
239   -# -- Options for Texinfo output -------------------------------------------
240   -
241   -# Grouping the document tree into Texinfo files. List of tuples
242   -# (source start file, target name, title, author,
243   -# dir menu entry, description, category)
244   -texinfo_documents = [
245   - ('index', 'softwarepublico',
246   - u'Documentação - Software Público Brasileiro (SPB)',
247   - u'Universidade de Brasília', 'softwarepublico', 'One line description of project.',
248   - 'Miscellaneous'),
249   -]
250   -
251   -# Documents to append as an appendix to all manuals.
252   -#texinfo_appendices = []
253   -
254   -# If false, no module index is generated.
255   -#texinfo_domain_indices = True
256   -
257   -# How to display URL addresses: 'footnote', 'no', or 'inline'.
258   -#texinfo_show_urls = 'footnote'
259   -
260   -# If true, do not generate a @detailmenu in the "Top" node's menu.
261   -#texinfo_no_detailmenu = False
262   -
263   -
264   -# -- Options for Epub output ----------------------------------------------
265   -
266   -# Bibliographic Dublin Core info.
267   -epub_title = u'softwarepublico'
268   -epub_author = u'Universidade de Brasília'
269   -epub_publisher = u'Universidade de Brasília'
270   -epub_copyright = u'2014, Universidade de Brasília. Documentação licenciada sob a Licença Crea tive Commons Atribuição-CompartilhaIgual 4.0 Internacional'
271   -
272   -# The basename for the epub file. It defaults to the project name.
273   -#epub_basename = u'softwarepublico'
274   -
275   -# The HTML theme for the epub output. Since the default themes are not optimized
276   -# for small screen space, using the same theme for HTML and epub output is
277   -# usually not wise. This defaults to 'epub', a theme designed to save visual
278   -# space.
279   -#epub_theme = 'epub'
280   -
281   -# The language of the text. It defaults to the language option
282   -# or en if the language is not set.
283   -#epub_language = ''
284   -
285   -# The scheme of the identifier. Typical schemes are ISBN or URL.
286   -#epub_scheme = ''
287   -
288   -# The unique identifier of the text. This can be a ISBN number
289   -# or the project homepage.
290   -#epub_identifier = ''
291   -
292   -# A unique identification for the text.
293   -#epub_uid = ''
294   -
295   -# A tuple containing the cover image and cover page html template filenames.
296   -#epub_cover = ()
297   -
298   -# A sequence of (type, uri, title) tuples for the guide element of content.opf.
299   -#epub_guide = ()
300   -
301   -# HTML files that should be inserted before the pages created by sphinx.
302   -# The format is a list of tuples containing the path and title.
303   -#epub_pre_files = []
304   -
305   -# HTML files shat should be inserted after the pages created by sphinx.
306   -# The format is a list of tuples containing the path and title.
307   -#epub_post_files = []
308   -
309   -# A list of files that should not be packed into the epub file.
310   -epub_exclude_files = ['search.html']
311   -
312   -# The depth of the table of contents in toc.ncx.
313   -#epub_tocdepth = 3
314   -
315   -# Allow duplicate toc entries.
316   -#epub_tocdup = True
317   -
318   -# Choose between 'default' and 'includehidden'.
319   -#epub_tocscope = 'default'
320   -
321   -# Fix unsupported image types using the PIL.
322   -#epub_fix_images = False
323   -
324   -# Scale large images.
325   -#epub_max_image_width = 0
326   -
327   -# How to display URL addresses: 'footnote', 'no', or 'inline'.
328   -#epub_show_urls = 'inline'
329   -
330   -# If false, no index is generated.
331   -#epub_use_index = True
docs/conf.py.in 0 → 100644
... ... @@ -0,0 +1,331 @@
  1 +# -*- coding: utf-8 -*-
  2 +#
  3 +# softwarepublico documentation build configuration file, created by
  4 +# sphinx-quickstart on Thu Nov 6 15:48:07 2014.
  5 +#
  6 +# This file is execfile()d with the current directory set to its
  7 +# containing dir.
  8 +#
  9 +# Note that not all possible configuration values are present in this
  10 +# autogenerated file.
  11 +#
  12 +# All configuration values have a default; values that are commented out
  13 +# serve to show the default.
  14 +
  15 +import sys
  16 +import os
  17 +
  18 +# If extensions (or modules to document with autodoc) are in another directory,
  19 +# add these directories to sys.path here. If the directory is relative to the
  20 +# documentation root, use os.path.abspath to make it absolute, like shown here.
  21 +#sys.path.insert(0, os.path.abspath('.'))
  22 +
  23 +# -- General configuration ------------------------------------------------
  24 +
  25 +# If your documentation needs a minimal Sphinx version, state it here.
  26 +#needs_sphinx = '1.0'
  27 +
  28 +# Add any Sphinx extension module names here, as strings. They can be
  29 +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  30 +# ones.
  31 +extensions = []
  32 +
  33 +# Add any paths that contain templates here, relative to this directory.
  34 +templates_path = ['_templates']
  35 +
  36 +# The suffix of source filenames.
  37 +source_suffix = '.rst'
  38 +
  39 +# The encoding of source files.
  40 +#source_encoding = 'utf-8-sig'
  41 +
  42 +# The master toctree document.
  43 +master_doc = 'index'
  44 +
  45 +# General information about the project.
  46 +project = u'softwarepublico'
  47 +copyright = u'2014-2015, Universidade de Brasília - UnB. Documentação licenciada sob a Licença Creative Commons Atribuição-CompartilhaIgual 4.0 Internacional'
  48 +
  49 +# The version info for the project you're documenting, acts as replacement for
  50 +# |version| and |release|, also used in various other places throughout the
  51 +# built documents.
  52 +#
  53 +# The short X.Y version.
  54 +version = '3'
  55 +# The full version, including alpha/beta/rc tags.
  56 +release = '3'
  57 +
  58 +# The language for content autogenerated by Sphinx. Refer to documentation
  59 +# for a list of supported languages.
  60 +language = 'pt_BR'
  61 +
  62 +# There are two options for replacing |today|: either, you set today to some
  63 +# non-false value, then it is used:
  64 +#today = ''
  65 +# Else, today_fmt is used as the format for a strftime call.
  66 +#today_fmt = '%B %d, %Y'
  67 +
  68 +# List of patterns, relative to source directory, that match files and
  69 +# directories to ignore when looking for source files.
  70 +exclude_patterns = ['_build']
  71 +
  72 +# The reST default role (used for this markup: `text`) to use for all
  73 +# documents.
  74 +#default_role = None
  75 +
  76 +# If true, '()' will be appended to :func: etc. cross-reference text.
  77 +#add_function_parentheses = True
  78 +
  79 +# If true, the current module name will be prepended to all description
  80 +# unit titles (such as .. function::).
  81 +#add_module_names = True
  82 +
  83 +# If true, sectionauthor and moduleauthor directives will be shown in the
  84 +# output. They are ignored by default.
  85 +#show_authors = False
  86 +
  87 +# The name of the Pygments (syntax highlighting) style to use.
  88 +pygments_style = 'sphinx'
  89 +
  90 +# A list of ignored prefixes for module index sorting.
  91 +#modindex_common_prefix = []
  92 +
  93 +# If true, keep warnings as "system message" paragraphs in the built documents.
  94 +#keep_warnings = False
  95 +
  96 +
  97 +# -- Options for HTML output ----------------------------------------------
  98 +
  99 +# The theme to use for HTML and HTML Help pages. See the documentation for
  100 +# a list of builtin themes.
  101 +html_theme = 'default'
  102 +
  103 +# Theme options are theme-specific and customize the look and feel of a theme
  104 +# further. For a list of options available for each theme, see the
  105 +# documentation.
  106 +#html_theme_options = {}
  107 +
  108 +# Add any paths that contain custom themes here, relative to this directory.
  109 +#html_theme_path = []
  110 +
  111 +# The name for this set of Sphinx documents. If None, it defaults to
  112 +# "<project> v<release> documentation".
  113 +#html_title = None
  114 +
  115 +# A shorter title for the navigation bar. Default is the same as html_title.
  116 +#html_short_title = None
  117 +
  118 +# The name of an image file (relative to this directory) to place at the top
  119 +# of the sidebar.
  120 +#html_logo = None
  121 +
  122 +# The name of an image file (within the static path) to use as favicon of the
  123 +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
  124 +# pixels large.
  125 +#html_favicon = None
  126 +
  127 +# Add any paths that contain custom static files (such as style sheets) here,
  128 +# relative to this directory. They are copied after the builtin static files,
  129 +# so a file named "default.css" will overwrite the builtin "default.css".
  130 +html_static_path = ['_static']
  131 +
  132 +# Add any extra paths that contain custom files (such as robots.txt or
  133 +# .htaccess) here, relative to this directory. These files are copied
  134 +# directly to the root of the documentation.
  135 +#html_extra_path = []
  136 +
  137 +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
  138 +# using the given strftime format.
  139 +#html_last_updated_fmt = '%b %d, %Y'
  140 +
  141 +# If true, SmartyPants will be used to convert quotes and dashes to
  142 +# typographically correct entities.
  143 +#html_use_smartypants = True
  144 +
  145 +# Custom sidebar templates, maps document names to template names.
  146 +#html_sidebars = {}
  147 +
  148 +# Additional templates that should be rendered to pages, maps page names to
  149 +# template names.
  150 +#html_additional_pages = {}
  151 +
  152 +# If false, no module index is generated.
  153 +#html_domain_indices = True
  154 +
  155 +# If false, no index is generated.
  156 +#html_use_index = True
  157 +
  158 +# If true, the index is split into individual pages for each letter.
  159 +#html_split_index = False
  160 +
  161 +# If true, links to the reST sources are added to the pages.
  162 +#html_show_sourcelink = True
  163 +
  164 +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
  165 +#html_show_sphinx = True
  166 +
  167 +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
  168 +#html_show_copyright = True
  169 +
  170 +# If true, an OpenSearch description file will be output, and all pages will
  171 +# contain a <link> tag referring to it. The value of this option must be the
  172 +# base URL from which the finished HTML is served.
  173 +#html_use_opensearch = ''
  174 +
  175 +# This is the file name suffix for HTML files (e.g. ".xhtml").
  176 +#html_file_suffix = None
  177 +
  178 +# Output file base name for HTML help builder.
  179 +htmlhelp_basename = 'softwarepublicodoc'
  180 +
  181 +
  182 +# -- Options for LaTeX output ---------------------------------------------
  183 +
  184 +latex_elements = {
  185 +# The paper size ('letterpaper' or 'a4paper').
  186 +#'papersize': 'letterpaper',
  187 +
  188 +# The font size ('10pt', '11pt' or '12pt').
  189 +#'pointsize': '10pt',
  190 +
  191 +# Additional stuff for the LaTeX preamble.
  192 +#'preamble': '',
  193 +}
  194 +
  195 +# Grouping the document tree into LaTeX files. List of tuples
  196 +# (source start file, target name, title,
  197 +# author, documentclass [howto, manual, or own class]).
  198 +latex_documents = [
  199 + ('index', 'softwarepublico.tex',
  200 + u'Software Público Brasileiro: Manual de Operação (@@SPB_ENV@@)',
  201 + u'Universidade de Brasília', 'manual'),
  202 +]
  203 +
  204 +# The name of an image file (relative to this directory) to place at the top of
  205 +# the title page.
  206 +#latex_logo = None
  207 +
  208 +# For "manual" documents, if this is true, then toplevel headings are parts,
  209 +# not chapters.
  210 +#latex_use_parts = False
  211 +
  212 +# If true, show page references after internal links.
  213 +#latex_show_pagerefs = False
  214 +
  215 +# If true, show URL addresses after external links.
  216 +#latex_show_urls = False
  217 +
  218 +# Documents to append as an appendix to all manuals.
  219 +#latex_appendices = []
  220 +
  221 +# If false, no module index is generated.
  222 +#latex_domain_indices = True
  223 +
  224 +
  225 +# -- Options for manual page output ---------------------------------------
  226 +
  227 +# One entry per manual page. List of tuples
  228 +# (source start file, name, description, authors, manual section).
  229 +man_pages = [
  230 + ('index', 'softwarepublico',
  231 + u'Documentação - Software Público Brasileiro (SPB)',
  232 + [u'Universidade de Brasília'], 1)
  233 +]
  234 +
  235 +# If true, show URL addresses after external links.
  236 +#man_show_urls = False
  237 +
  238 +
  239 +# -- Options for Texinfo output -------------------------------------------
  240 +
  241 +# Grouping the document tree into Texinfo files. List of tuples
  242 +# (source start file, target name, title, author,
  243 +# dir menu entry, description, category)
  244 +texinfo_documents = [
  245 + ('index', 'softwarepublico',
  246 + u'Documentação - Software Público Brasileiro (SPB)',
  247 + u'Universidade de Brasília', 'softwarepublico', 'One line description of project.',
  248 + 'Miscellaneous'),
  249 +]
  250 +
  251 +# Documents to append as an appendix to all manuals.
  252 +#texinfo_appendices = []
  253 +
  254 +# If false, no module index is generated.
  255 +#texinfo_domain_indices = True
  256 +
  257 +# How to display URL addresses: 'footnote', 'no', or 'inline'.
  258 +#texinfo_show_urls = 'footnote'
  259 +
  260 +# If true, do not generate a @detailmenu in the "Top" node's menu.
  261 +#texinfo_no_detailmenu = False
  262 +
  263 +
  264 +# -- Options for Epub output ----------------------------------------------
  265 +
  266 +# Bibliographic Dublin Core info.
  267 +epub_title = u'softwarepublico'
  268 +epub_author = u'Universidade de Brasília'
  269 +epub_publisher = u'Universidade de Brasília'
  270 +epub_copyright = u'2014, Universidade de Brasília. Documentação licenciada sob a Licença Crea tive Commons Atribuição-CompartilhaIgual 4.0 Internacional'
  271 +
  272 +# The basename for the epub file. It defaults to the project name.
  273 +#epub_basename = u'softwarepublico'
  274 +
  275 +# The HTML theme for the epub output. Since the default themes are not optimized
  276 +# for small screen space, using the same theme for HTML and epub output is
  277 +# usually not wise. This defaults to 'epub', a theme designed to save visual
  278 +# space.
  279 +#epub_theme = 'epub'
  280 +
  281 +# The language of the text. It defaults to the language option
  282 +# or en if the language is not set.
  283 +#epub_language = ''
  284 +
  285 +# The scheme of the identifier. Typical schemes are ISBN or URL.
  286 +#epub_scheme = ''
  287 +
  288 +# The unique identifier of the text. This can be a ISBN number
  289 +# or the project homepage.
  290 +#epub_identifier = ''
  291 +
  292 +# A unique identification for the text.
  293 +#epub_uid = ''
  294 +
  295 +# A tuple containing the cover image and cover page html template filenames.
  296 +#epub_cover = ()
  297 +
  298 +# A sequence of (type, uri, title) tuples for the guide element of content.opf.
  299 +#epub_guide = ()
  300 +
  301 +# HTML files that should be inserted before the pages created by sphinx.
  302 +# The format is a list of tuples containing the path and title.
  303 +#epub_pre_files = []
  304 +
  305 +# HTML files shat should be inserted after the pages created by sphinx.
  306 +# The format is a list of tuples containing the path and title.
  307 +#epub_post_files = []
  308 +
  309 +# A list of files that should not be packed into the epub file.
  310 +epub_exclude_files = ['search.html']
  311 +
  312 +# The depth of the table of contents in toc.ncx.
  313 +#epub_tocdepth = 3
  314 +
  315 +# Allow duplicate toc entries.
  316 +#epub_tocdup = True
  317 +
  318 +# Choose between 'default' and 'includehidden'.
  319 +#epub_tocscope = 'default'
  320 +
  321 +# Fix unsupported image types using the PIL.
  322 +#epub_fix_images = False
  323 +
  324 +# Scale large images.
  325 +#epub_max_image_width = 0
  326 +
  327 +# How to display URL addresses: 'footnote', 'no', or 'inline'.
  328 +#epub_show_urls = 'inline'
  329 +
  330 +# If false, no index is generated.
  331 +#epub_use_index = True
... ...
docs/dependencies.rst
... ... @@ -1,96 +0,0 @@
1   -
2   -.. _dependencies:
3   -
4   -Dependências
5   -============
6   -
7   -O repositório do SPB contém os pacotes que não são nativos do Sistema
8   -Operacional onde o mesmo o sistema do Portal do Software Público deve ser
9   -instalado. Esse repositório contém os pacotes referentes ao Bottle, Mailman-api,
10   -Solr, Colab e às dependências do Colab (pacote Colab-deps).
11   -
12   -Colab
13   -----------
14   -Esse pacote, contém o sistema Colab. O processo de
15   -criação desse pacote depende do pacote `python-virtualenv`, além de um
16   -conjunto de dependências python, contidos no pacote `colab-deps`, descrito na
17   -próxima seção. O processo de instalação desse pacote requer uma instalação
18   -prévia do pacote `colab-deps`, que é instalado automaticamente se o repositório
19   -do mesmo estiver disponível no conjunto de repositórios do `yum`.
20   -
21   -Colab-deps
22   -----------
23   -Este pacote contém as dependências *python* do Colab. Tais dependências foram
24   -encapsuladas em um ambiente virtual python (`python-virtualenv`), permitindo uma
25   -maior independência e, consequentemente, compatibilidade com o Sistema
26   -Operacional no qual o pacote seja instalado. Esse pacote é composto pelas
27   -ferramentas listadas a seguir.
28   -
29   -* Chardet
30   -* Django
31   -* Django-browserid
32   -* Django-cliauth
33   -* Django-common
34   -* Django-conversejs
35   -* Django-haystack
36   -* Django-hitcounter
37   -* Django-i18n-model
38   -* Django-mobile
39   -* Django-mptt
40   -* Django-piston
41   -* Django-revproxy
42   -* Django-taggit
43   -* Django-tastypie
44   -* Dpaste
45   -* Etiquetando
46   -* Eventlet
47   -* Fancy_tag
48   -* Feedzilla
49   -* Grab
50   -* Gunicorn
51   -* Html2text
52   -* Lorem-ipsum-generator
53   -* Lxml
54   -* Paste
55   -* Pip
56   -* Poster
57   -* Psycopg2
58   -* Pure-sasl
59   -* Pygments
60   -* Pysolr
61   -* Python-dateutil
62   -* Python-memcached
63   -* Python-mimeparse
64   -* PyYAML
65   -* Raven
66   -* Repoze.lru
67   -* Requests
68   -* Setuptools
69   -* Six
70   -* Sleekxmpp
71   -* South
72   -* Stemming
73   -* Tornado
74   -* Transliterate
75   -
76   -
77   -Mailman-api
78   ------------
79   -
80   -Esse pacote contém o Mailman-api. Esta ferramenta python possui como
81   -dependência os pacotes Bottle e python. Como o Bottle não é provido
82   -nativamente pelo CentOS 7, foi necessário empacotá-lo separadamente.
83   -
84   -Bottle
85   ------------
86   -
87   -Esse pacote contém a ferramenta Bottle, um framowork web escrito em
88   -python, e requisito para a utilização da ferramenta Mailman-api. Este pacote
89   -possui como dependência o pacote python, que está disponível nativamente no
90   -CentOS.
91   -
92   -Solr
93   -----
94   -Esse pacote contém a ferramenta python Bottle, e integra o conjunto de
95   -ferramentas do SPB. Sua instalação requer o pacote Java, que já existe
96   -nativamente no CentOS.
docs/firewall.rst.in 0 → 100644
... ... @@ -0,0 +1,72 @@
  1 +Gestão do Firewall
  2 +==================
  3 +
  4 +Firewall Interno
  5 +-----------------
  6 +
  7 +O Portal do Software Público atualmente é composto por diversos serviços
  8 +funcionando em diferentes servidores. Para o seu correto funcionamento é
  9 +esperado que estes serviços se comuniquem através de TCP/IP.
  10 +
  11 +Os scripts de instalação do Portal do Software Público também cuidam da
  12 +manutenção das regras de firewall. Cada máquina possui um firewall
  13 +(iptables) local que por padrão nega todos os tipos de conexão de
  14 +entrada em todas as portas (INPUT rules) mas permite conexões de saída
  15 +(OUTPUT rules).
  16 +
  17 +Todas as regras de firewall são definidas no cookbook ``firewall``. Para
  18 +definir regras de comunidacação entre hosts locais, válidas para todos
  19 +os ambientes (local, produção, homologação, testes, etc) são utilizados
  20 +templates que podem ser encontrados em
  21 +``cookbooks/firewall/templates/``. Para regras de filtro utilize o
  22 +arquivo ``iptables-filter.erb`` e para regras de `NAT` o arquivo
  23 +``iptables-nat.erb``.
  24 +
  25 +Para adicionar regras específicas de cada ambiente (por exemplo, abrir
  26 +uma porta diferente em homologação) utilize o arquivo
  27 +``config/@@SPB_ENV@@/iptables-filter-rules``. Este arquivo aceita apenas
  28 +regras de filtro do tipo INPUT.
  29 +
  30 +
  31 +Comunicação Entre Serviços
  32 +++++++++++++++++++++++++++++
  33 +
  34 +Os serviços que compõe o portal e suas portas de entrada são descritos
  35 +na tabela a seguir:
  36 +
  37 +============= ============= ============== =====
  38 +Destino Origem Serviço Porta
  39 +============= ============= ============== =====
  40 +database integration Redis 6379
  41 +database integration PostgreSQL 5432
  42 +database social PostgreSQL 5432
  43 +social reverseproxy Nginx 80
  44 +social reverseproxy Nginx 443
  45 +integration reverseproxy Nginx 80
  46 +integration reverseproxy Nginx 443
  47 +email externa Postfix 25
  48 +reverseproxy externa Nginx 80
  49 +reverseproxy externa Nginx 443
  50 +reverseproxy externa OpenSSH (git) 22
  51 +============= ============= ============== =====
  52 +
  53 +
  54 +Comunicação externa
  55 +-------------------
  56 +
  57 +============ ============= =====
  58 +Destino Serviço Porta
  59 +============ ============= =====
  60 +email Postfix 25
  61 +reverseproxy Nginx 80
  62 +reverseproxy Nginx 443
  63 +reverseproxy OpenSSH (git) 22
  64 +============ ============= =====
  65 +
  66 +**Outros firewalls da rede:**
  67 +
  68 +Além do firewall local é importante que os serviços com origem
  69 +``externa`` tenham suas portas de INPUT abertas em todos os firewalls da
  70 +rede. No caso do host ``email`` a porta **25** também deve estar aberta
  71 +para OUTPUT (alternativamente o Postfix pode ser configurado para enviar
  72 +e-mails utilizando um relay interno).
... ...
docs/implantacao.rst.in 0 → 100644
... ... @@ -0,0 +1,202 @@
  1 +Implantação
  2 +===========
  3 +
  4 +Preparação da estação de trabalho
  5 +---------------------------------
  6 +
  7 +Para gerenciar o SPB, é necessária uma estação de trabalho GNU/Linux,
  8 +que pode ser Debian 8 ou posterior, Ubuntu 14.04 ou superior, ou CentOS
  9 +7 ou superior (e equivalentes como RHEL 7 ou superior, ou Fedora). O
  10 +processo também pode ser feito em outros sistemas, desde que os pacotes
  11 +equivalentes estejam instalados.
  12 +
  13 +As seguintes ferramentas serão necessárias:
  14 +
  15 +* git_: ferramenta de controle de versão.
  16 +* chake_: ferramenta de gestão de configuração.
  17 +
  18 +.. _chake: https://gitlab.com/terceiro/chake
  19 +.. _git: http://git-scm.com/
  20 +
  21 +Para instalar em Debian/Ubuntu::
  22 +
  23 + $ sudo apt-get install git ruby
  24 + $ sudo gem install chake
  25 +
  26 +Para instalar em CentOS/RHEL/Fedora::
  27 +
  28 + $ sudo yum install git ruby
  29 + $ sudo gem install chake
  30 +
  31 +Além dessas ferramentas, será necessário um emulador de terminal. O
  32 +emulador de terminal padrão do seu ambiente de trabalho, ou qualquer
  33 +outro, vai servir.
  34 +
  35 +Obtendo o repositório de configuração
  36 +-------------------------------------
  37 +
  38 +Para iniciar, é necessário uma conta e usuário no SPB, com uma chave SSH
  39 +configurada.
  40 +
  41 +Para obter o repositório de configuração, é necessário clonar o
  42 +repositório com ``git``::
  43 +
  44 + $ git clone git@beta.softwarepublico.gov.br:softwarepublico/softwarepublico.git
  45 +
  46 +A partir daqui, todos os passos serão executados de dentro do
  47 +repositório, então se certifique que o seu *shell* está no diretório
  48 +onde foi clonado o repositório::
  49 +
  50 + $ cd softwarepublico/
  51 +
  52 +
  53 +Preparação dos servidores
  54 +-------------------------
  55 +
  56 +* Os servidores precisam estar acessíveis por SSH. Caso necessário,
  57 + podem ser feitas configurações do SSH em
  58 + ``config/@@SPB_ENV@@/ssh_config`` para isso.
  59 +* O usuário que vai conectar via SSH nos servidores precisa:
  60 + * ter acesso SSH configurado via chave SSH para evitar digitar senha.
  61 + * ter permissão de usar ``sudo`` sem a necessidade de digitar senha.
  62 +
  63 +Configuração do ambiente alvo
  64 +-----------------------------
  65 +
  66 +O SPB tem o conceito de "ambientes", que são diferentes instalações da
  67 +mesma plataforma. Todas as informações específicas sobre um determinado
  68 +ambiente estão centralizadas em arquivos dentro do diretório
  69 +``config/${ambiente}/``. Por exemplo, o ambiente "local", que se destina
  70 +ao uso para desenvolvimento local com máquinas virtuais, possui o
  71 +seguinte conteúdo::
  72 +
  73 + $ find config/local/ | sort
  74 + config/local/config.yaml
  75 + config/local/ips.yaml
  76 + config/local/ssh_config
  77 +
  78 +Estes arquivos possuem a seguinte finalidade:
  79 +
  80 +* ``config.yaml``: Parâmetros gerais de configuração
  81 +* ``ips.yaml``: Tabela de IP's (na rede local) das máquinas que compõem
  82 + o ambiente.
  83 +* ``ssh_config``: Configuração necessária para o SSH. Pode ser um
  84 + arquivo caso não seja necessária nenhuma configuração especial para
  85 + acessar as máquinas (e.g. se você está na mesma rede local que elas.
  86 +
  87 +Vamos agora verificar o conteúdo de cada arquivo no ambiente
  88 +**@@SPB_ENV@@**. Primeiro, ``config.yaml``:
  89 +
  90 +.. code-block:: yaml
  91 +
  92 + @@config(config.yaml)@@
  93 +
  94 +Para nossa sorte, o significado de cada um dos campo acima deve ser
  95 +autoexplicativo.
  96 +
  97 +O arquivo ``ips.yaml`` contém uma tabela com os endereços IP de cada
  98 +servidor da plataforma na rede local. Exemplo:
  99 +
  100 +.. code-block:: yaml
  101 +
  102 + @@config(ips.yaml)@@
  103 +
  104 +Já o arquivo ``ssh_config`` contém opções padrão de configuração do
  105 +``ssh`` para conexão às máquinas::
  106 +
  107 + @@config(ssh_config)@@
  108 +
  109 +Configuração do DNS
  110 +-------------------
  111 +
  112 +A tabela a seguir foi gerada dinamicamente a partir da configuração do
  113 +ambiente **@@SPB_ENV@@**. As seguintes entradas precisam ser configuradas no
  114 +DNS:
  115 +
  116 +.. include:: dns.rst
  117 +
  118 +Verificando o ambiente
  119 +----------------------
  120 +
  121 +Para listar as máquinas do ambiente::
  122 +
  123 + $ rake nodes SPB_ENV=@@SPB_ENV@@
  124 +
  125 +O comando acima deve dar o seguinte resultado::
  126 +
  127 + integration ssh
  128 + email ssh
  129 + social ssh
  130 + database ssh
  131 + reverseproxy ssh
  132 +
  133 +Note que todas as vezes que formos chamar ``rake``, será preciso
  134 +informar sobre qual ambiente desejamos operar (``SPB_ENV=@@SPB_ENV@@``).
  135 +Caso você for operar sobre apenas um ambiente, ou caso você queira
  136 +evitar digitação, você pode criar um arquivo ``local.rake`` na raiz do
  137 +repositório com o seguinte conteúdo::
  138 +
  139 + ENV['SPB_ENV'] ||= '@@SPB_ENV@@'
  140 +
  141 +Isto fará com que o valor e ``SPB_ENV`` seja sempre ``@@SPB_ENV@@``, a
  142 +não ser que você informe na linha de comando. Daqui para frente, vamos
  143 +sempre exibir o parâmetro ``SPB_ENV=@@SPB_ENV@@``, mas lembre-se que ele pode ser omitido se você tiver configurado o *default* em ``local.rake``.
  144 +
  145 +Para testar a conectividade às máquinas, podemos executar um comando
  146 +nelas::
  147 +
  148 + $ rake nodes SPB_ENV=@@SPB_ENV@@
  149 + $ <PROMPT PARA VOCÊ DIGITAR>
  150 +
  151 +No prompt, entre um comando simples como ``sudo date``. O resultado deve ser
  152 +parecido com o seguinte::
  153 +
  154 + $ rake run
  155 + $ sudo date
  156 + integration: $ sudo date
  157 + integration: Qui Mai 14 18:59:19 BRT 2015
  158 + email: $ sudo date
  159 + email: Qui Mai 14 18:59:22 BRT 2015
  160 + social: $ sudo date
  161 + social: Qui Mai 14 18:59:24 BRT 2015
  162 + database: $ sudo date
  163 + database: Qui Mai 14 18:59:27 BRT 2015
  164 + reverseproxy: $ sudo date
  165 + reverseproxy: Qui Mai 14 18:59:28 BRT 2015
  166 +
  167 +Se o resultado se parece com o exemplo acima, e você não precisou digitar a sua
  168 +senha nehuma vez, significa que 1) você conseguiu conectar em todas as máquinas
  169 +e 2) o sudo sem senha está configurado corretamente. Está tudo certo para
  170 +começar!
  171 +
  172 +Primeira instalação
  173 +-------------------
  174 +
  175 +Uma vez configurados os parâmetros em ``config/@@SPB_ENV@@/``, podemos
  176 +dar início à instalação. O primeiro passo é uma preconfiguração que
  177 +precisamos fazer::
  178 +
  179 + $ rake preconfig SPB_ENV=@@SPB_ENV@@
  180 +
  181 +
  182 +Este comando vai fazer uma configuração inicial que é necessária para o
  183 +resto do processo, e **só é necessária fazer uma vez**.
  184 +
  185 +Depois de completo o procedimento acima, para aplicar as configurações a
  186 +todos os servidores basta executar::
  187 +
  188 + $ rake converge SPB_ENV=@@SPB_ENV@@
  189 +
  190 +O comando ``converge`` na verdade é o *default*, então o seguinte é
  191 +equivalente::
  192 +
  193 + $ rake SPB_ENV=@@SPB_ENV@@
  194 +
  195 +Se você tiver configurado o ambiente **@@SPB_ENV@@** no ``local.rake``
  196 +(ver instruções acima), então o comando seguinte, também equivalente, é
  197 +muito mais simples::
  198 +
  199 + $ rake
  200 +
  201 +Todas as possibilidades de comandos serão listados se você executar
  202 +``rake -T``. Consulte também a documentação do chake_.
... ...
docs/index.rst
... ... @@ -1,39 +0,0 @@
1   -
2   -Documentação do Software Público Brasileiro (SPB)
3   -=================================================
4   -
5   -Introdução
6   -----------
7   -
8   -Bem-vindo a documentação do Portal do Software Público Brasileiro.
9   -
10   -O Portal do Software Público Brasileiro (SPB), na prática, é um sistema Web
11   -que se consolidou como um ambiente de compartilhamento de softwares. O projeto
12   -de evolução deste portal está sendo desenvolvido pela Universidade de Brasília.
13   -
14   -Hoje o SPB é um sistema Web composto por ferramentas livres integradas porém com
15   -desenvolvimento e comunidades independentes.
16   -
17   -As ferramentas que compõe o Software Público são:
18   -
19   -* **Mailman**: Para lista de e-mail estamos utilizando o Mailman na versão 2, que é um software gratuito para gerenciamento de discussão eletrônica de e-mail e listas *e-newsletter*;
20   -
21   -* **Noosfero**: Para rede social estamos utilizando o Noosfero que é uma plataforma web livre para criação de redes sociais com blog, e-Portifólios, CMS, RSS, discussão temática, agenda de eventos, galeria de imagens, chat, entre outros. Ele foi desenvolvido pela Cooperativa de Tecnologias Livres – Colivre 3 em 2007, sob a licença AGPL v.3, com a proposta de permitir ao usuário criar sua própria rede social personalizada, livre e autônoma;
22   -
23   -* **Gitlab**: Para Forge para Git estamos utilizando o GitLab, que é um software livre de colaboração de código *online* que utiliza a ferramenta de gerência de código fonte Git;
24   -
25   -* **Solr**: Para Plataforma de Buscas estamos utilizando Apache Solr, que é uma plataforma de busca open source da Apache Lucene escrita em Java;
26   -
27   -* **Persona**: Para suporte a autentição Federada estamos utilizando o Mozilla Persona, que foi desenvolvido pela Mozilla Foundation.
28   -
29   -* **Colab**: Para integrar todas estas ferramentas estamos utilizando o Colab, que é uma plataforma de integração de ferramentas. Nele, são também integradas as interfaces das ferramentas para que, ao navegar, o usuário tenha a sensação de estar navegando em uma única ferramenta.
30   -
31   -
32   -Conteúdos
33   -----------
34   -
35   -.. toctree::
36   - :maxdepth: 3
37   -
38   - install
39   - dependencies
docs/index.rst.in 0 → 100644
... ... @@ -0,0 +1,12 @@
  1 +Software Público Brasileiro: Manual de Operação (@@SPB_ENV@@)
  2 +*******************************************************************************
  3 +
  4 +.. toctree::
  5 + :maxdepth: 1
  6 +
  7 + introducao
  8 + arquitetura
  9 + implantacao
  10 + manutencao
  11 + backup
  12 + firewall
... ...
docs/install.rst
... ... @@ -1,403 +0,0 @@
1   -Instalação
2   -==========
3   -
4   -.. Descrição dos pacotes e listagem das dependências de cada pacote
5   -
6   -Para instalação das ferramentas que compõem o Software Público, é necessária a
7   -instalação de um conjunto de pacotes RPM. Um pacote RPM consiste em uma coleção
8   -de uma ou mais ferramentas que permite um meio automático de instalação,
9   -atualização, configuração e remoção de softwares.
10   -
11   -O processo de instalação aqui descrito permite a instalação e configuração
12   -desses pacotes em uma máquina com o Sistema Operacional CentOS 7 instalado e
13   -atualizado. Os pacotes a seguir já são fornecidos nativamente pelo Sistema
14   -Operacional, não sendo necessária uma configuração adicional para a
15   -instalação dos mesmos.
16   -
17   -* Mailman
18   -* Nginx
19   -* PostgreSQL Server
20   -
21   -Somados a esses, alguns pacotes não fornecidos nativamente também são
22   -necessários. Os mesmos estão listados a seguir.
23   -
24   -* Noosfero
25   -* Gitlab
26   -* Gitlab-deps
27   -* Solr
28   -* Colab
29   -* Colab-deps
30   -* Mailman-api
31   -
32   -Para disponibilizar cada pacote não nativo do CentOS 7, fez-se um levantamento
33   -das dependências de cada ferramenta empacotada, bem como do processo de
34   -instalação de cada uma, de modo a automatizar esse processo.
35   -A seção :ref:`dependencies` descreve brevemente o levantamento de dependências
36   -feito.
37   -
38   -
39   -Repositório do SPB
40   --------------------
41   -
42   -.. Configuração do repositório yum em /etc/yum.repos.d
43   -
44   -Para instalação dos pacotes existentes no repositório do SPB através do
45   -gerenciador de instalação e remoção de pacotes do CentOS (o *Yum*), é preciso
46   -adicionar o arquivo de configuração desse repositório no diretório
47   -`/etc/yum.repos.d/` do Sistema Operacional onde o Portal do Software Público deve
48   -Procedimento:
49   -
50   -Os comandos a seguir devem ser executados via terminal, com permissões de super
51   -usuário do sistema.
52   -
53   -1. Instalar (caso não esteja instalado) o programa `wget`, para download das
54   - configurações de repositório
55   -
56   -::
57   -
58   - yum install -y wget
59   -
60   -2. Ir para o diretório `/etc/yum.repos.d/`
61   -
62   -::
63   -
64   - cd /etc/yum.repos.d/
65   -
66   -3. Fazer o *download* dos arquivos de configuração nesse diretório:
67   -
68   -::
69   -
70   - wget http://download.opensuse.org/repositories/isv:/spb:/colab/CentOS_7/isv:spb:colab.repo
71   - wget http://download.opensuse.org/repositories/isv:/spb:/mailman-api/CentOS_7/isv:spb:mailman-api.repo
72   - wget http://download.opensuse.org/repositories/isv:/spb:/gitlab/CentOS_7/isv:spb:gitlab.repo
73   -
74   -4. Instalar repositório para instalação do servidor web Nginx:
75   -
76   -::
77   -
78   - rpm -i http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
79   -
80   -
81   -Instalação das Ferramentas (via pacote)
82   ----------------------------------------
83   -
84   -.. Instalação dos pacotes via yum
85   -
86   -Após a configuração do repositório do SPB, todos os pacotes deverão estar
87   -disponíveis através do *yum*. Ainda que algumas dependências sejam tratadas
88   -automaticamente, o comportamento de alguns pacotes é dependente da ordem em que
89   -os mesmos são instalados. Portanto, deve-se executar a instalação na ordem
90   -especificada a seguir.
91   -Os comandos a seguir devem ser executados via terminal, com permissões de super
92   -usuário do sistema.
93   -
94   -Procedimento:
95   -
96   -1. Instalar o pacote PostreSQL Server
97   -
98   -::
99   -
100   - yum install -y postgresql-server
101   -
102   -2. Instalar o pacote do servidor de estrutura de dados Redis
103   -
104   -::
105   -
106   - yum install -y redis
107   -
108   -3. Instalar os pacotes do source forge Gitlab e gerenciador de repositórios
109   - Gitlab-shell
110   -
111   -::
112   -
113   - yum install -y gitlab gitlab-shell
114   -
115   -4. Instalar o pacote da ferramenta Noosfero
116   -
117   -::
118   -
119   - yum install -y noosfero
120   -
121   -5. Instalar o pacote da ferramenta de integração Colab
122   -
123   -::
124   -
125   - yum install -y colab
126   -
127   -6. Instalar o pacote do servidor web Nginx
128   -
129   -::
130   -
131   - yum install -y nginx
132   -
133   -Configurações
134   ---------------
135   -
136   -
137   -Nginx
138   -+++++
139   -
140   -Para configurar o Nginx crie o arquivo ``/etc/nginx/conf.d/colab.conf`` com o conteúdo abaixo:
141   -
142   -.. code-block:: nginx
143   -
144   - upstream colab {
145   - server 127.0.0.1:8001 fail_timeout=10s;
146   - }
147   -
148   - server {
149   - listen *:80;
150   -
151   - server_name beta.softwarepublico.gov.br;
152   - return 301 https://$server_name$request_uri;
153   - }
154   -
155   - server {
156   - listen *:443 ssl;
157   -
158   - server_name beta.softwarepublico.gov.br;
159   -
160   - ssl on;
161   -
162   - ssl_certificate /etc/nginx/colab.crt;
163   - ssl_certificate_key /etc/nginx/colab.key;
164   - ssl_session_cache shared:SSL:10m;
165   - ssl_session_timeout 5m;
166   - ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
167   - ssl_ciphers HIGH:!aNULL:!MD5;
168   - ssl_prefer_server_ciphers on;
169   -
170   - access_log /var/log/nginx/ssl-colab.access.log;
171   - error_log /var/log/nginx/ssl-colab.error.log;
172   -
173   - location /gitlab/assets/ {
174   - alias /var/lib/gitlab-assets/;
175   - }
176   -
177   - location / {
178   - root /usr/share/nginx/colab;
179   - try_files $uri @colab-app;
180   - }
181   -
182   - location @colab-app {
183   - proxy_pass http://colab;
184   - proxy_read_timeout 90;
185   - proxy_connect_timeout 90;
186   - proxy_redirect off;
187   - proxy_set_header Host $host;
188   - proxy_set_header X-Real-IP $remote_addr;
189   - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
190   - proxy_set_header X-Forwarded-Proto https;
191   - }
192   - }
193   -
194   -
195   -Substitua o domínio de exemplo ``beta.softwarepublico.gov.br`` pelo domínio
196   -desejado.
197   -
198   -Certifique-se de instalar o certificado SSL (``/etc/nginx/colab.crt``) e sua
199   -chave privada (``/etc/nginx/colab.key``).
200   -
201   -Reinicie o serviço do Nginx com o comando: ``sudo service nginx restart``.
202   -
203   -
204   -Colab
205   -+++++
206   -
207   -Edite o arquivo ``/etc/colab/settings.yaml`` e adicione o nome e e-mail dos administradores do sistema:
208   -
209   -.. code-block:: yaml
210   -
211   - ## System admins
212   - ADMINS: &admin
213   - -
214   - - John Foo
215   - - john@example.com
216   - -
217   - - Mary Bar
218   - - mary@example.com
219   -
220   - MANAGERS: *admin
221   -
222   -
223   -Edite o arquivo ``/etc/colab/settings.yaml`` e configure a URL principal da aplicação, quais hosts deverão aceitar requisições e quais hosts poderão ser utilizadas para que o login seja efetuado. Exemplo:
224   -
225   -.. code-block:: yaml
226   -
227   - SITE_URL: 'https://beta.softwarepublico.gov.br'
228   -
229   - ALLOWED_HOSTS:
230   - - beta.softwarepublico.gov.br
231   -
232   - BROWSERID_AUDIENCES:
233   - - http://beta.softwarepublico.gov.br
234   - - https://beta.softwarepublico.gov.br
235   -
236   -
237   -Edite o arquivo ``/etc/colab/settings.yaml`` e configure o endereço que será utilizado no FROM dos e-mails enviados pelo Colab. Veja o exemplo:
238   -
239   -.. code-block:: yaml
240   -
241   - COLAB_FROM_ADDRESS: '"Portal do Software Publico" <noreply@beta.softwarepublico.gov.br>'
242   - SERVER_EMAIL: '"Portal do Software Publico" <noreply@beta.softwarepublico.gov.br>'
243   -
244   -
245   -Edite o arquivo ``/etc/colab/settings.yaml`` e configure o endereço das ferramentas a serem integradas ao Colab. Veja o exemplo:
246   -
247   -.. code-block:: yaml
248   -
249   - PROXIED_APPS:
250   - gitlab:
251   - upstream: 'http://localhost:8080/gitlab'
252   - noosfero:
253   - upstream: 'http://localhost:8090/noosfero'
254   -
255   -
256   -Após editar todos os arquivos desejados reinicie o processo do Colab com
257   -utilizando o comando ``service colab restart``.
258   -
259   -
260   -Gitlab
261   -++++++
262   -
263   -Edite o arquivo ``/etc/gitlab/gitlab.yml`` acrescentando o atributo
264   -relative_url_root após a linha ``email_from: example@example.com``.
265   -Veja o exemplo a seguir:
266   -
267   -.. code-block:: yaml
268   -
269   - email_from:example@example.com
270   - relative_url_root: /gitlab
271   -
272   -
273   -Descomente a linha a seguir no arquivo ``/etc/gitlab/unicorn.rb``, veja o exemplo:
274   -
275   -.. code-block:: ruby
276   -
277   - ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab"
278   -
279   -
280   -Altere o atributo gitlab_url no arquivo ``/etc/gitlab-shell/config.yml``, acrescentando /gitlab a url existente. Veja o exemplo:
281   -
282   -.. code-block:: yaml
283   -
284   - gitlab_url: "http://localhost:8080/gitlab"
285   -
286   -
287   -Descomente a linha a seguir no arquivo ``/usr/lib/gitlab/config/application.rb``, veja o exemplo:
288   -
289   -.. code-block:: ruby
290   -
291   - config.relative_url_root = "/gitlab"
292   -
293   -
294   -Após a configuração acima ter sido feita o serviço do gitlab precisa ser reiniciado utilizando o comando ``service gitlab restart``.
295   -
296   -Noosfero
297   -++++++++
298   -
299   -Edite o arquivo ``/etc/noosfero/thin.yml``, e adicione uma linha com o
300   -seguinte conteúdo:
301   -
302   -.. code-block:: yaml
303   -
304   - prefix: /social
305   -
306   -Crie/edite o arquivo ``/etc/default/noosfero`` e adicione a seguinte
307   -linha:
308   -
309   -.. code-block:: ruby
310   -
311   - export RAILS_RELATIVE_URL_ROOT=/social
312   -
313   -Reinicie o serviço:
314   -
315   -.. code-block:: sh
316   -
317   - $ sudo service noosfero restart
318   -
319   -Mailman
320   -+++++++
321   -
322   -Edite o arquivo de configuração do `mailman` em
323   -``/etc/mailman/mm_cfg.py``, e ajuste os seguintes valores:
324   -
325   -.. code-block:: python
326   -
327   - DEFAULT_EMAIL_HOST = 'listas.softwarepublico.gov.br'
328   - MTA = None
329   - POSTFIX_STYLE_VIRTUAL_DOMAINS = ['listas.softwarepublico.gov.br']
330   -
331   -Crie a lista de discussão default, necessária para a inicialização do
332   -serviço. Substitua ``USER@DOMAIN.COM`` pelo email a ser usado como
333   -administrador do `mailman`, e ``PASSWORD`` pela senha de administração do
334   -`mailman`.
335   -
336   -.. code-block:: sh
337   -
338   - $ sudo -u mailman /usr/lib/mailman/bin/newlist --quiet mailman USER@DOMAIN.COM PASSWORD
339   - $ sudo service mailman restart
340   -
341   -
342   -Postfix
343   -+++++++
344   -
345   -Configure o postfix:
346   -
347   -.. code-block:: sh
348   -
349   - $ sudo postconf relay_domains=listas.softwarepublico.gov.br
350   - $ sudo postconf transport_maps=hash:/etc/postfix/transport
351   -
352   -Crie/edite ``/etc/postfix/transport`` com o seguinte conteúdo:
353   -
354   -.. code-block:: sh
355   -
356   - listas.softwarepublico.gov.br mailman:
357   -
358   -
359   -Faça o download do arquivo :download:`postfix-to-mailman-centos.py` e salve no
360   -diretório ``/etc/postfix``, e altere as permissões para tornar o arquivo
361   -executável:
362   -
363   -.. code-block:: sh
364   -
365   - $ sudo chmod +x /etc/postfix/postfix-to-mailman-centos.py
366   -
367   -Adicione o seguinte conteúdo no final do arquivo ``/etc/postfix/master.cf``:
368   -
369   -::
370   -
371   - mailman unix - n n - - pipe
372   - flags=FR user=mailman:mailman
373   - argv=/etc/postfix/postfix-to-mailman-centos.py ${nexthop} ${user}
374   -
375   -Gere o banco de dados para consulta, e reinicie o serviço:
376   -
377   -.. code-block:: sh
378   -
379   - $ sudo postmap /etc/postfix/transport
380   - $ sudo service postfix restart
381   -
382   -Inicie o serviço do mailman-api:
383   -
384   -.. code-block:: sh
385   -
386   - $ sudo service mailman-api start
387   -
388   -
389   -Habilitar inicialização automática dos serviços
390   -+++++++++++++++++++++++++++++++++++++++++++++++
391   -
392   -Para permitir que os serviços iniciem automaticamente, execute os comandos
393   -abaixo:
394   -
395   -.. code-block:: sh
396   -
397   - $ sudo systemctl enable mailman
398   - $ sudo systemctl enable mailman-api
399   - $ sudo systemctl enable nginx
400   - $ sudo systemctl enable colab
401   - $ sudo systemctl enable noosfero
402   - $ sudo chkconfig --add gitlab
403   - $ sudo chkconfig --add solr
docs/introducao.rst.in 0 → 100644
... ... @@ -0,0 +1,55 @@
  1 +Introdução
  2 +==========
  3 +
  4 +Bem-vindo a documentação do Portal do Software Público Brasileiro.
  5 +
  6 +O Portal do Software Público Brasileiro (SPB) é uma plataforma de
  7 +compartilhamento e colaboração no desenvolvimento de softwares. O
  8 +projeto de evolução deste portal está sendo desenvolvido pela
  9 +Universidade de Brasília.
  10 +
  11 +O SPB é composto de um conjunto de ferramentas com funcionalidades
  12 +complementares, que são desenvolvidas de forma independentes pelas suas
  13 +respectivas comunidades. Estas ferramentas estão sendo integradas pela
  14 +nossa equipe de forma a apresentar uma experiência de usuário
  15 +consistente.
  16 +
  17 +* O Colab_ é uma ferramenta especializada na integração de outras
  18 + ferramentas. O Colab fornece um ponto central de autenticação de
  19 + usuários para as demais ferramentas da plataforma, indexa informações
  20 + das demais ferramentas para busca e gamificação, e fornece integração
  21 + visual entre as diferentes ferramentas que compõem o SOB. O Colab é um
  22 + software livre criado no Brasil, que teve sua origem no
  23 + Programa `Interlegis` do Senado Federal.
  24 +
  25 +.. _Colab: https://github.com/colab-community
  26 +.. _`Programa Interlegis do Senado Federal`: http://www.interlegis.leg.br/
  27 +
  28 +* O Noosfero_ é uma plataforma para criação de redes sociais que conta com
  29 + diversas funcionalidades de gestão de conteúdo como blogs, galeria de
  30 + imagens e vídeos, entre outros. O Noosfero também é um software livre
  31 + criado no Brasil, iniciado em 2007 pela COLIVRE_ e que hoje conta com
  32 + uma comunidade de desenvolvimento que inclui o SERPRO, a Universidade de
  33 + Brasília e o Fórum Brasileiro de Economia Solidária.
  34 +
  35 +.. _Noosfero: http://www.noosfero.org/
  36 +.. _COLIVRE: http://www.colivre.coop.br/
  37 +
  38 +* O Gitlab_ é uma plataforma para desenvolvimento colaborativo. Projetos
  39 + no gitlab são mantidos em repositorios ``git``, com gestão de tarefas
  40 + (*issue tracker*), *merge requests*, gestão de marcos (*milestones*),
  41 + suporte a integração com plataformas de integração contínua e
  42 + notificações.
  43 +
  44 +.. _Gitlab: https://www.gitlab.com/
  45 +
  46 +* O `GNU Mailman`_ é uma gerenciador de listas de email tradicionalmente
  47 + usado por diversas organizações no Brasil e no mundo.
  48 +
  49 +.. _`GNU Mailman`: http://www.gnu.org/software/mailman/
  50 +
  51 +O restando deste manual descreve a arquitetura do SPB bem como os
  52 +procedimentos necessários para sua implantação, manutenção, backup e
  53 +restauração e gestão de firewall.
  54 +
  55 +
... ...
docs/make.bat
... ... @@ -1,242 +0,0 @@
1   -@ECHO OFF
2   -
3   -REM Command file for Sphinx documentation
4   -
5   -if "%SPHINXBUILD%" == "" (
6   - set SPHINXBUILD=sphinx-build
7   -)
8   -set BUILDDIR=_build
9   -set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
10   -set I18NSPHINXOPTS=%SPHINXOPTS% .
11   -if NOT "%PAPER%" == "" (
12   - set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
13   - set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
14   -)
15   -
16   -if "%1" == "" goto help
17   -
18   -if "%1" == "help" (
19   - :help
20   - echo.Please use `make ^<target^>` where ^<target^> is one of
21   - echo. html to make standalone HTML files
22   - echo. dirhtml to make HTML files named index.html in directories
23   - echo. singlehtml to make a single large HTML file
24   - echo. pickle to make pickle files
25   - echo. json to make JSON files
26   - echo. htmlhelp to make HTML files and a HTML help project
27   - echo. qthelp to make HTML files and a qthelp project
28   - echo. devhelp to make HTML files and a Devhelp project
29   - echo. epub to make an epub
30   - echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
31   - echo. text to make text files
32   - echo. man to make manual pages
33   - echo. texinfo to make Texinfo files
34   - echo. gettext to make PO message catalogs
35   - echo. changes to make an overview over all changed/added/deprecated items
36   - echo. xml to make Docutils-native XML files
37   - echo. pseudoxml to make pseudoxml-XML files for display purposes
38   - echo. linkcheck to check all external links for integrity
39   - echo. doctest to run all doctests embedded in the documentation if enabled
40   - goto end
41   -)
42   -
43   -if "%1" == "clean" (
44   - for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
45   - del /q /s %BUILDDIR%\*
46   - goto end
47   -)
48   -
49   -
50   -%SPHINXBUILD% 2> nul
51   -if errorlevel 9009 (
52   - echo.
53   - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
54   - echo.installed, then set the SPHINXBUILD environment variable to point
55   - echo.to the full path of the 'sphinx-build' executable. Alternatively you
56   - echo.may add the Sphinx directory to PATH.
57   - echo.
58   - echo.If you don't have Sphinx installed, grab it from
59   - echo.http://sphinx-doc.org/
60   - exit /b 1
61   -)
62   -
63   -if "%1" == "html" (
64   - %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
65   - if errorlevel 1 exit /b 1
66   - echo.
67   - echo.Build finished. The HTML pages are in %BUILDDIR%/html.
68   - goto end
69   -)
70   -
71   -if "%1" == "dirhtml" (
72   - %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
73   - if errorlevel 1 exit /b 1
74   - echo.
75   - echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
76   - goto end
77   -)
78   -
79   -if "%1" == "singlehtml" (
80   - %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
81   - if errorlevel 1 exit /b 1
82   - echo.
83   - echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
84   - goto end
85   -)
86   -
87   -if "%1" == "pickle" (
88   - %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
89   - if errorlevel 1 exit /b 1
90   - echo.
91   - echo.Build finished; now you can process the pickle files.
92   - goto end
93   -)
94   -
95   -if "%1" == "json" (
96   - %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
97   - if errorlevel 1 exit /b 1
98   - echo.
99   - echo.Build finished; now you can process the JSON files.
100   - goto end
101   -)
102   -
103   -if "%1" == "htmlhelp" (
104   - %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
105   - if errorlevel 1 exit /b 1
106   - echo.
107   - echo.Build finished; now you can run HTML Help Workshop with the ^
108   -.hhp project file in %BUILDDIR%/htmlhelp.
109   - goto end
110   -)
111   -
112   -if "%1" == "qthelp" (
113   - %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
114   - if errorlevel 1 exit /b 1
115   - echo.
116   - echo.Build finished; now you can run "qcollectiongenerator" with the ^
117   -.qhcp project file in %BUILDDIR%/qthelp, like this:
118   - echo.^> qcollectiongenerator %BUILDDIR%\qthelp\softwarepublico.qhcp
119   - echo.To view the help file:
120   - echo.^> assistant -collectionFile %BUILDDIR%\qthelp\softwarepublico.ghc
121   - goto end
122   -)
123   -
124   -if "%1" == "devhelp" (
125   - %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
126   - if errorlevel 1 exit /b 1
127   - echo.
128   - echo.Build finished.
129   - goto end
130   -)
131   -
132   -if "%1" == "epub" (
133   - %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
134   - if errorlevel 1 exit /b 1
135   - echo.
136   - echo.Build finished. The epub file is in %BUILDDIR%/epub.
137   - goto end
138   -)
139   -
140   -if "%1" == "latex" (
141   - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
142   - if errorlevel 1 exit /b 1
143   - echo.
144   - echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
145   - goto end
146   -)
147   -
148   -if "%1" == "latexpdf" (
149   - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
150   - cd %BUILDDIR%/latex
151   - make all-pdf
152   - cd %BUILDDIR%/..
153   - echo.
154   - echo.Build finished; the PDF files are in %BUILDDIR%/latex.
155   - goto end
156   -)
157   -
158   -if "%1" == "latexpdfja" (
159   - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
160   - cd %BUILDDIR%/latex
161   - make all-pdf-ja
162   - cd %BUILDDIR%/..
163   - echo.
164   - echo.Build finished; the PDF files are in %BUILDDIR%/latex.
165   - goto end
166   -)
167   -
168   -if "%1" == "text" (
169   - %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
170   - if errorlevel 1 exit /b 1
171   - echo.
172   - echo.Build finished. The text files are in %BUILDDIR%/text.
173   - goto end
174   -)
175   -
176   -if "%1" == "man" (
177   - %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
178   - if errorlevel 1 exit /b 1
179   - echo.
180   - echo.Build finished. The manual pages are in %BUILDDIR%/man.
181   - goto end
182   -)
183   -
184   -if "%1" == "texinfo" (
185   - %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
186   - if errorlevel 1 exit /b 1
187   - echo.
188   - echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
189   - goto end
190   -)
191   -
192   -if "%1" == "gettext" (
193   - %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
194   - if errorlevel 1 exit /b 1
195   - echo.
196   - echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
197   - goto end
198   -)
199   -
200   -if "%1" == "changes" (
201   - %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
202   - if errorlevel 1 exit /b 1
203   - echo.
204   - echo.The overview file is in %BUILDDIR%/changes.
205   - goto end
206   -)
207   -
208   -if "%1" == "linkcheck" (
209   - %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
210   - if errorlevel 1 exit /b 1
211   - echo.
212   - echo.Link check complete; look for any errors in the above output ^
213   -or in %BUILDDIR%/linkcheck/output.txt.
214   - goto end
215   -)
216   -
217   -if "%1" == "doctest" (
218   - %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
219   - if errorlevel 1 exit /b 1
220   - echo.
221   - echo.Testing of doctests in the sources finished, look at the ^
222   -results in %BUILDDIR%/doctest/output.txt.
223   - goto end
224   -)
225   -
226   -if "%1" == "xml" (
227   - %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
228   - if errorlevel 1 exit /b 1
229   - echo.
230   - echo.Build finished. The XML files are in %BUILDDIR%/xml.
231   - goto end
232   -)
233   -
234   -if "%1" == "pseudoxml" (
235   - %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
236   - if errorlevel 1 exit /b 1
237   - echo.
238   - echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
239   - goto end
240   -)
241   -
242   -:end
docs/manutencao.rst.in 0 → 100644
... ... @@ -0,0 +1,12 @@
  1 +Manutenção
  2 +==========
  3 +
  4 +Mantendo o sistema atualizado
  5 +-----------------------------
  6 +
  7 +*Esta seção é um trabalho em andamento.*
  8 +
  9 +Modificando configurações
  10 +-------------------------
  11 +
  12 +*Esta seção é um trabalho em andamento.*
... ...
docs/postfix-to-mailman-centos.py
... ... @@ -1 +0,0 @@
1   -../cookbooks/mailman/files/centos/postfix-to-mailman-centos.py
2 0 \ No newline at end of file
tasks/doc.rake 0 → 100644
... ... @@ -0,0 +1,32 @@
  1 +desc 'Builds documentation (HTML)'
  2 +task :doc do
  3 + sh 'make -C docs/ html'
  4 +end
  5 +
  6 +desc 'Builds documentation (PDF)'
  7 +task :pdf do
  8 + sh 'make -C docs/ latexpdf'
  9 +end
  10 +
  11 +desc 'Opens PDF documentation'
  12 +task :viewpdf => :pdf do
  13 + sh 'xdg-open', 'docs/_build/latex/softwarepublico.pdf'
  14 +end
  15 +
  16 +desc 'Publishes PDF'
  17 +task :pdfupload => :pdf do
  18 + require 'date'
  19 +
  20 + tag = Date.today.strftime('doc-%Y-%m-%d-') + $SPB_ENV
  21 + blob = `git hash-object -w docs/_build/latex/softwarepublico.pdf`.strip
  22 + tree = `printf '100644 blob #{blob}\tsoftwarepublico-#{$SPB_ENV}.pdf\n' | git mktree`.strip
  23 + commit = `git commit-tree -m #{tag} #{tree}`.strip
  24 +
  25 + sh 'git', 'tag', tag, commit
  26 + sh 'git', 'push', 'origin', tag
  27 +end
  28 +
  29 +desc 'Removes generated files'
  30 +task :clean do
  31 + sh 'make -C docs/ clean'
  32 +end
... ...
test/colab_test.sh
... ... @@ -21,16 +21,16 @@ test_nginx_responds() {
21 21 }
22 22  
23 23 test_nginx_virtualhost() {
24   - local title="$(curl --header 'Host: softwarepublico.dev' http://$integration/dashboard | grep '<title>' | sed -e 's/^\s*//')"
  24 + local title="$(curl --header 'Host: softwarepublico.dev' http://$config_external_hostname/dashboard | grep '<title>' | sed -e 's/^\s*//')"
25 25 assertEquals "<title>Home - Colab</title>" "$title"
26 26 }
27 27  
28 28 test_reverse_proxy_gitlab() {
29   - assertTrue 'Reverse proxy for gitlab' "curl --header 'Host: softwarepublico.dev' http://$integration/gitlab/public/projects | grep -i '<meta.*gitlab.*>'"
  29 + assertTrue 'Reverse proxy for gitlab' "curl --header 'Host: softwarepublico.dev' http://$config_external_hostname/gitlab/public/projects | grep -i '<meta.*gitlab.*>'"
30 30 }
31 31  
32 32 test_reverse_proxy_noosfero() {
33   - assertTrue 'Reverse proxy for noosfero' "curl --header 'Host: softwarepublico.dev' http://$integration/social/search/people | grep -i '<meta.*noosfero.*>'"
  33 + assertTrue 'Reverse proxy for noosfero' "curl --header 'Host: softwarepublico.dev' http://$config_external_hostname/social/search/people | grep -i '<meta.*noosfero.*>'"
34 34 }
35 35  
36 36 load_shunit2
... ...
test/config_helper.sh 0 → 100644
... ... @@ -0,0 +1,6 @@
  1 +# exports all configuration variables into the environment with a config_
  2 +# prefix, e.g.
  3 +#
  4 +# external_hostname → $config_external_hostname
  5 +
  6 +eval $(sed -e '/^\S*:\s*\S\+/!d; s/^/config_/; s/:\s*/=/' ${ROOTDIR:-.}/config/${SPB_ENV:-local}/config.yaml)
... ...
test/dns_test.sh 0 → 100644
... ... @@ -0,0 +1,137 @@
  1 +. $(dirname $0)/test_helper.sh
  2 +
  3 +if [ "$SPB_ENV" = local -o "$SPB_ENV" = lxc ]; then
  4 + echo "_No DNS for local environment_"
  5 + exit
  6 +fi
  7 +
  8 +
  9 +export LANG=C
  10 +
  11 +check_hostname() {
  12 + local host="$1"
  13 + local ip="$2"
  14 + local results="$(host -t A $host)"
  15 + local expected="$host has address $ip"
  16 + assertEquals "$host must resolve to $ip" "$results" "$expected"
  17 +}
  18 +
  19 +check_mx() {
  20 + local host="$1"
  21 + local mx="$2"
  22 + local results="$(host -t MX $host)"
  23 + local expected="$host mail is handled by 0 ${mx}."
  24 + assertEquals "$host MX must be $mx" "$results" "$expected"
  25 +}
  26 +
  27 +check_reverse_dns() {
  28 + local ip="$1"
  29 + local hostname="$2"
  30 + local results="$(host $ip)"
  31 + local expected=".*in-addr.arpa domain name pointer ${hostname}."
  32 + assertTrue "Reverse DNS of $ip must be $hostname (found: $results)" "expr match '$results' 'include:$expected\$'"
  33 +}
  34 +
  35 +check_spf() {
  36 + domain="$1"
  37 + spf_domain="$2"
  38 + local results="$(host -t TXT "$domain")"
  39 + assertTrue "TXT entry for $domain must have include:$spf_domain (found: $results)" "expr match '$results' 'include:$spf_domain'"
  40 +}
  41 +
  42 +test_dns_web() {
  43 + check_hostname "$config_external_hostname" "$config_external_ip"
  44 +}
  45 +
  46 +test_mx() {
  47 + check_mx "$config_external_hostname" "${config_relay_hostname}"
  48 +}
  49 +
  50 +test_dns_lists() {
  51 + check_hostname "$config_lists_hostname" "$config_external_ip"
  52 +}
  53 +
  54 +test_mx_lists() {
  55 + check_mx "$config_lists_hostname" "$config_relay_hostname"
  56 +}
  57 +
  58 +test_dns_relay() {
  59 + check_hostname "$config_relay_hostname" "$config_relay_ip"
  60 +}
  61 +
  62 +test_reverse_dns_web() {
  63 + check_reverse_dns "$config_external_ip" "$config_external_hostname"
  64 +}
  65 +
  66 +test_reverse_dns_relay() {
  67 + check_reverse_dns "$config_relay_ip" "$config_relay_hostname"
  68 +}
  69 +
  70 +if [ -n "$config_external_outgoing_mail_domain" ]; then
  71 + test_spf_domain() {
  72 + check_spf "$config_external_hostname" "$config_external_outgoing_mail_domain"
  73 + }
  74 + test_spf_lists() {
  75 + check_spf "$config_lists_hostname" "$config_external_outgoing_mail_domain"
  76 + }
  77 +fi
  78 +
  79 +if [ "$1" = '--doc' ]; then
  80 + check_hostname() {
  81 + echo ' * - A'
  82 + echo " - $1"
  83 + echo " - ${2}"
  84 + }
  85 + check_mx() {
  86 + echo ' * - MX'
  87 + echo " - $1"
  88 + echo " - ${2}."
  89 + }
  90 + check_reverse_dns() {
  91 + echo ' * - PTR'
  92 + echo " - $1"
  93 + echo " - ${2}."
  94 + }
  95 + check_spf() {
  96 + echo " * - TXT (SPF: \"v=spf1 ...\")"
  97 + echo " - $1 "
  98 + echo " - include:${2} "
  99 + }
  100 + header() {
  101 + local aponta="${2:-Aponta para}"
  102 + echo '.. list-table::'
  103 + echo ' :header-rows: 1'
  104 + echo
  105 + echo ' * - Tipo'
  106 + echo ' - Entrada'
  107 + echo " - $aponta"
  108 + }
  109 + footer() {
  110 + echo
  111 + }
  112 + (
  113 + header 'DNS(A)'
  114 + test_dns_web
  115 + test_dns_lists
  116 + test_dns_relay
  117 + footer
  118 +
  119 + header 'MX'
  120 + test_mx
  121 + test_mx_lists
  122 + footer
  123 +
  124 + header 'DNS reverso'
  125 + test_reverse_dns_web
  126 + test_reverse_dns_relay
  127 + footer
  128 +
  129 + header 'SPF' 'Deve conter'
  130 + test_spf_domain
  131 + test_spf_lists
  132 + footer
  133 +
  134 + )
  135 +else
  136 + . shunit2
  137 +fi
... ...
test/mailman_test.sh
... ... @@ -21,7 +21,7 @@ test_mailman_delivery() {
21 21 }
22 22  
23 23 test_mailman_web_interface() {
24   - local title="$(curl --location --header 'Host: listas.softwarepublico.dev' http://$integration/mailman/cgi-bin/listinfo | grep -i '<title>')"
  24 + local title="$(curl --location --header 'Host: listas.softwarepublico.dev' http://$config_external_hostname/mailman/cgi-bin/listinfo | grep -i '<title>')"
25 25 assertEquals "<TITLE>listas.softwarepublico.dev Mailing Lists</TITLE>" "$title"
26 26 }
27 27  
... ...
test/noosfero_test.sh
... ... @@ -19,12 +19,12 @@ test_reverse_proxy_noosfero() {
19 19 }
20 20  
21 21 test_reverse_proxy_static_files() {
22   - local content_type="$(curl-host softwarepublico.dev --head http://$social/social/images/noosfero-network.png | grep-header Content-Type)"
  22 + local content_type="$(curl-host softwarepublico.dev --head http://$config_external_hostname/social/images/noosfero-network.png | grep-header Content-Type)"
23 23 assertEquals "Content-Type: image/png" "$content_type"
24 24 }
25 25  
26 26 test_redirect_with_correct_hostname_behind_proxy() {
27   - local redirect="$(curl-host softwarepublico.dev --head https://softwarepublico.dev/social/search/contents | grep-header Location)"
  27 + local redirect="$(curl-host softwarepublico.dev --head https://$config_external_hostname/social/search/contents | grep-header Location)"
28 28 assertEquals "Location: https://softwarepublico.dev/social/search/articles" "$redirect"
29 29 }
30 30  
... ...
test/test_helper.sh
... ... @@ -19,4 +19,5 @@ load_shunit2() {
19 19 }
20 20  
21 21 . $(dirname $0)/ip_helper.sh
  22 +. $(dirname $0)/config_helper.sh
22 23  
... ...
utils/reverseproxy_ssh_setup
... ... @@ -11,7 +11,15 @@ sed -i -e &#39;s/^#\?\s*Port\s*[0-9]\+\s*$/Port &#39;$port&#39;/g&#39; /etc/ssh/sshd_config
11 11 yum install -y selinux-policy policycoreutils-python
12 12  
13 13 # Tell SELinux to allow the new port
14   -semanage port -a -t ssh_port_t -p tcp "$port"
  14 +if grep -q '/$' /proc/1/cgroup; then
  15 + # not in a container
  16 + semanage port -a -t ssh_port_t -p tcp "$port"
  17 +else
  18 + # in container; will fail if host does not have SELinux enabled
  19 + if ! semanage port -a -t ssh_port_t -p tcp "$port"; then
  20 + echo "I: can't use SELinux, your host probably does not have it enabled"
  21 + fi
  22 +fi
15 23  
16 24 # Restart SSH
17 25 systemctl restart sshd
... ...