diff --git a/.gitignore b/.gitignore index c3cd5e7..fc8fe81 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ /utils/obs/isv* /Gemfile.lock -/config/development/ssh_config +/config/local/ssh_config /.tmp /tmp /docs/_build diff --git a/README.md b/README.md index 6e308bb..a69e4c8 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@ For development All configuration parameters are defined in `nodes.yaml`, with exception of IP addresses, which are defined in different files: -- for development, the IP addresses of the Vagrant VMs are defined in - config/development/ips.yaml. +- for local development, the IP addresses of the Vagrant VMs are defined in + config/local/ips.yaml. - for production, you need to create a new file called `config/production/ips.yaml` @@ -63,7 +63,7 @@ You can also do `export SPB_ENV=production` in your shell and omit it in the See the output of `rake -T` for other tasks. -## Viewing the running site in development +## Viewing the running site when developping locally Run: diff --git a/Rakefile b/Rakefile index 2a3cce3..b677f48 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,4 @@ -$SPB_ENV = ENV.fetch('SPB_ENV', 'development') +$SPB_ENV = ENV.fetch('SPB_ENV', 'local') ssh_config_file = "config/#{$SPB_ENV}/ssh_config" ips_file = "config/#{$SPB_ENV}/ips.yaml" @@ -37,7 +37,7 @@ end task :default => :test file 'ssh_config.erb' -file 'config/development/ssh_config' => ['nodes.yaml', 'config/development/ips.yaml', 'ssh_config.erb'] do |t| +file 'config/local/ssh_config' => ['nodes.yaml', 'config/local/ips.yaml', 'ssh_config.erb'] do |t| require 'erb' template = ERB.new(File.read('ssh_config.erb')) File.open(t.name, 'w') do |f| @@ -46,7 +46,7 @@ file 'config/development/ssh_config' => ['nodes.yaml', 'config/development/ips.y puts 'ERB %s' % t.name end -task :bootstrap_common => 'config/development/ssh_config' +task :bootstrap_common => 'config/local/ssh_config' unless ENV['nodeps'] task 'converge:integration' => 'converge:database' diff --git a/Vagrantfile b/Vagrantfile index c4dc1b0..aea9f54 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -13,7 +13,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.provision 'shell', path: 'utils/proxy.sh', args: [proxy] end - ips = YAML.load_file('config/development/ips.yaml') + ips = YAML.load_file('config/local/ips.yaml') config.vm.define 'database' do |database| database.vm.network 'private_network', ip: ips['database'] diff --git a/config/development/config.yaml b/config/development/config.yaml deleted file mode 100644 index 088fd61..0000000 --- a/config/development/config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -admins: - - - - Paulo Meirelles - - paulo@softwarelivre.org -external_hostname: softwarepublico.dev -site_url: https://softwarepublico.dev -colab_from_address: '"Portal do Software Publico" ' -server_email: '"Portal do Software Publico" ' -email_subject_prefix: '[spb]' -lists_hostname: listas.softwarepublico.dev -lists_admin: paulo@softwarelivre.org -relay_hostname: relay.softwarepublico.dev - diff --git a/config/development/ips.yaml b/config/development/ips.yaml deleted file mode 100644 index 8709b17..0000000 --- a/config/development/ips.yaml +++ /dev/null @@ -1,6 +0,0 @@ -integration: 10.10.10.2 -email: 10.10.10.3 -social: 10.10.10.4 -database: 10.10.10.5 -reverseproxy: 10.10.10.6 - diff --git a/config/local/config.yaml b/config/local/config.yaml new file mode 100644 index 0000000..088fd61 --- /dev/null +++ b/config/local/config.yaml @@ -0,0 +1,13 @@ +admins: + - + - Paulo Meirelles + - paulo@softwarelivre.org +external_hostname: softwarepublico.dev +site_url: https://softwarepublico.dev +colab_from_address: '"Portal do Software Publico" ' +server_email: '"Portal do Software Publico" ' +email_subject_prefix: '[spb]' +lists_hostname: listas.softwarepublico.dev +lists_admin: paulo@softwarelivre.org +relay_hostname: relay.softwarepublico.dev + diff --git a/config/local/ips.yaml b/config/local/ips.yaml new file mode 100644 index 0000000..8709b17 --- /dev/null +++ b/config/local/ips.yaml @@ -0,0 +1,6 @@ +integration: 10.10.10.2 +email: 10.10.10.3 +social: 10.10.10.4 +database: 10.10.10.5 +reverseproxy: 10.10.10.6 + diff --git a/test/ip_helper.sh b/test/ip_helper.sh index 3c85ae5..f881998 100644 --- a/test/ip_helper.sh +++ b/test/ip_helper.sh @@ -7,4 +7,4 @@ # Each entry in config/${SPB_ENV}/ips.yaml will have its own variable # -eval $(sed -E '/[0-9]{1,3}\./!d; s/^ *//; s/: */=/' ${ROOTDIR:-.}/config/${SPB_ENV:-development}/ips.yaml) +eval $(sed -E '/[0-9]{1,3}\./!d; s/^ *//; s/: */=/' ${ROOTDIR:-.}/config/${SPB_ENV:-local}/ips.yaml) -- libgit2 0.21.2