Commit 53720eada805ba50176ca4b407733ec3f85b12f3

Authored by Antonio Terceiro
1 parent 5b537710
Exists in master and in 90 other branches 3.x, add_sisp_to_chef, add_super_archives_plugin, api_for_colab, automates_core_packing, backup, backup_not_prod, cdtc_configuration, changes_in_buttons_on_content_panel, colab_automated_login, colab_spb_plugin_recipe, colab_widgets_settings, design_validation, dev-lappis, dev_env_minimal, disable_email_dev, docs, fix_breadcrumbs_position, fix_categories_software_link, fix_edit_institution, fix_edit_software_with_another_license, fix_get_license_info, fix_gitlab_assets_permission, fix_list_style_inside_article, fix_list_style_on_folder_elements, fix_members_pagination, fix_merge_request_url, fix_models_translations, fix_no_license, fix_software_api, fix_software_block_migration, fix_software_communities_translations, fix_software_communities_unit_test, fix_style_create_institution_admin_panel, fix_superarchives_imports, fix_sym_links_noosfero, focus_search_field_theme, gov-user-refactoring, gov-user-refactoring-rails4, header_fix, institution_modal_on_rating, kalibro-conf-refactoring, kalibro-processor-package, lxc_settings, margin_fix, mezuro_cookbook, performance, prezento, r3, refactor_download_block, refactor_software_communities, refactor_software_for_sisp, register_page, release-process, release-process-v2, remove-unused-images, remove_backup_emails, remove_broken_theme, remove_secondary_email_from_user, remove_sisp_buttons, removing_super_archives_email, review_message, scope2method, signals_user_noosfero, sisp_catalog_header, sisp_colab_config, sisp_dev, sisp_dev_master, sisp_simple_version, software_as_organization, software_catalog_style_fix, software_communities_html_refactor, software_infos_api, spb_minimal_env, spb_to_rails4, spec_refactor, stable-4.1, stable-4.2, stable-4.x, stable-devel, support_docs, syslog, temp_soft_comm_refactoring, theme_header, theme_javascript_refactory, thread_dropdown, thread_page, update_search_by_categories, update_software_api, update_softwares_boxes

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)