Commit 53720eada805ba50176ca4b407733ec3f85b12f3

Authored by Antonio Terceiro
1 parent 5b537710

Rename "development" environment to "local"

1 /utils/obs/isv* 1 /utils/obs/isv*
2 /Gemfile.lock 2 /Gemfile.lock
3 -/config/development/ssh_config 3 +/config/local/ssh_config
4 /.tmp 4 /.tmp
5 /tmp 5 /tmp
6 /docs/_build 6 /docs/_build
@@ -17,8 +17,8 @@ For development @@ -17,8 +17,8 @@ For development
17 All configuration parameters are defined in `nodes.yaml`, with exception of IP 17 All configuration parameters are defined in `nodes.yaml`, with exception of IP
18 addresses, which are defined in different files: 18 addresses, which are defined in different files:
19 19
20 -- for development, the IP addresses of the Vagrant VMs are defined in  
21 - config/development/ips.yaml. 20 +- for local development, the IP addresses of the Vagrant VMs are defined in
  21 + config/local/ips.yaml.
22 22
23 - for production, you need to create a new file called 23 - for production, you need to create a new file called
24 `config/production/ips.yaml` 24 `config/production/ips.yaml`
@@ -63,7 +63,7 @@ You can also do `export SPB_ENV=production` in your shell and omit it in the @@ -63,7 +63,7 @@ You can also do `export SPB_ENV=production` in your shell and omit it in the
63 63
64 See the output of `rake -T` for other tasks. 64 See the output of `rake -T` for other tasks.
65 65
66 -## Viewing the running site in development 66 +## Viewing the running site when developping locally
67 67
68 Run: 68 Run:
69 69
1 -$SPB_ENV = ENV.fetch('SPB_ENV', 'development') 1 +$SPB_ENV = ENV.fetch('SPB_ENV', 'local')
2 2
3 ssh_config_file = "config/#{$SPB_ENV}/ssh_config" 3 ssh_config_file = "config/#{$SPB_ENV}/ssh_config"
4 ips_file = "config/#{$SPB_ENV}/ips.yaml" 4 ips_file = "config/#{$SPB_ENV}/ips.yaml"
@@ -37,7 +37,7 @@ end @@ -37,7 +37,7 @@ end
37 task :default => :test 37 task :default => :test
38 38
39 file 'ssh_config.erb' 39 file 'ssh_config.erb'
40 -file 'config/development/ssh_config' => ['nodes.yaml', 'config/development/ips.yaml', 'ssh_config.erb'] do |t| 40 +file 'config/local/ssh_config' => ['nodes.yaml', 'config/local/ips.yaml', 'ssh_config.erb'] do |t|
41 require 'erb' 41 require 'erb'
42 template = ERB.new(File.read('ssh_config.erb')) 42 template = ERB.new(File.read('ssh_config.erb'))
43 File.open(t.name, 'w') do |f| 43 File.open(t.name, 'w') do |f|
@@ -46,7 +46,7 @@ file 'config/development/ssh_config' => ['nodes.yaml', 'config/development/ips.y @@ -46,7 +46,7 @@ file 'config/development/ssh_config' => ['nodes.yaml', 'config/development/ips.y
46 puts 'ERB %s' % t.name 46 puts 'ERB %s' % t.name
47 end 47 end
48 48
49 -task :bootstrap_common => 'config/development/ssh_config' 49 +task :bootstrap_common => 'config/local/ssh_config'
50 50
51 unless ENV['nodeps'] 51 unless ENV['nodeps']
52 task 'converge:integration' => 'converge:database' 52 task 'converge:integration' => 'converge:database'
@@ -13,7 +13,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| @@ -13,7 +13,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
13 config.vm.provision 'shell', path: 'utils/proxy.sh', args: [proxy] 13 config.vm.provision 'shell', path: 'utils/proxy.sh', args: [proxy]
14 end 14 end
15 15
16 - ips = YAML.load_file('config/development/ips.yaml') 16 + ips = YAML.load_file('config/local/ips.yaml')
17 17
18 config.vm.define 'database' do |database| 18 config.vm.define 'database' do |database|
19 database.vm.network 'private_network', ip: ips['database'] 19 database.vm.network 'private_network', ip: ips['database']
config/development/config.yaml
@@ -1,13 +0,0 @@ @@ -1,13 +0,0 @@
1 -admins:  
2 - -  
3 - - Paulo Meirelles  
4 - - paulo@softwarelivre.org  
5 -external_hostname: softwarepublico.dev  
6 -site_url: https://softwarepublico.dev  
7 -colab_from_address: '"Portal do Software Publico" <noreply@softwarepublico.dev>'  
8 -server_email: '"Portal do Software Publico" <noreply@softwarepublico.dev>'  
9 -email_subject_prefix: '[spb]'  
10 -lists_hostname: listas.softwarepublico.dev  
11 -lists_admin: paulo@softwarelivre.org  
12 -relay_hostname: relay.softwarepublico.dev  
13 -  
config/development/ips.yaml
@@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
1 -integration: 10.10.10.2  
2 -email: 10.10.10.3  
3 -social: 10.10.10.4  
4 -database: 10.10.10.5  
5 -reverseproxy: 10.10.10.6  
6 -  
config/local/config.yaml 0 → 100644
@@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
  1 +admins:
  2 + -
  3 + - Paulo Meirelles
  4 + - paulo@softwarelivre.org
  5 +external_hostname: softwarepublico.dev
  6 +site_url: https://softwarepublico.dev
  7 +colab_from_address: '"Portal do Software Publico" <noreply@softwarepublico.dev>'
  8 +server_email: '"Portal do Software Publico" <noreply@softwarepublico.dev>'
  9 +email_subject_prefix: '[spb]'
  10 +lists_hostname: listas.softwarepublico.dev
  11 +lists_admin: paulo@softwarelivre.org
  12 +relay_hostname: relay.softwarepublico.dev
  13 +
config/local/ips.yaml 0 → 100644
@@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
  1 +integration: 10.10.10.2
  2 +email: 10.10.10.3
  3 +social: 10.10.10.4
  4 +database: 10.10.10.5
  5 +reverseproxy: 10.10.10.6
  6 +
test/ip_helper.sh
@@ -7,4 +7,4 @@ @@ -7,4 +7,4 @@
7 # Each entry in config/${SPB_ENV}/ips.yaml will have its own variable 7 # Each entry in config/${SPB_ENV}/ips.yaml will have its own variable
8 # 8 #
9 9
10 -eval $(sed -E '/[0-9]{1,3}\./!d; s/^ *//; s/: */=/' ${ROOTDIR:-.}/config/${SPB_ENV:-development}/ips.yaml) 10 +eval $(sed -E '/[0-9]{1,3}\./!d; s/^ *//; s/: */=/' ${ROOTDIR:-.}/config/${SPB_ENV:-local}/ips.yaml)