CodeandoMexico / ckan

CKAN is an open-source DMS (data management system) for powering data hubs and data portals. CKAN makes it easy to publish, share and use data. It powers the http://thedatahub.org/ and http://data.gov.uk/ among many other sites.
http://ckan.org/
Other
3 stars 0 forks source link

Create a staging, production and development environment with chef-solo #17

Open ElHacker opened 11 years ago

ElHacker commented 11 years ago

Each environment is going to be deployed into its own machine. Meet following requirements:

ElHacker commented 11 years ago

Check the changes of configuration files and recipes on the submodule chef-ckan repo: https://github.com/HackerOfDreams/chef-ckan/tree/production_staging_config

ElHacker commented 11 years ago

I'm in doubt if to create a loop to have the production and staging environment, something like this:

["staging", "production"].each do |env|
  # Create CKAN Apache config file
  template "/etc/apache2/sites-available/ckan_#{env}" do
    source "ckan_default.erb"
    variables({
      :source_dir => SOURCE_DIR,
      :server_name => ENV["#{env.upcase}_SERVER_NAME"],
      :server_alias => ENV["#{env.upcase}_SERVER_ALIAS"]
    })
  end
end

And so on for every piece of the recipe that needs to be repeated for the both environments. What do you think? @wilhelmbot

defvol commented 11 years ago

no entiendo el por qué del ciclo; por qué correrías los 2 ambientes en una máquina?

ElHacker commented 11 years ago

Todo este tiempo pensé que eso era lo que se quería. Pero si van a estar en máquinas separadas prácticamente ya está terminado. A excepción de algunos detalles.

ElHacker commented 11 years ago

En un futuro, podría ser buena idea usar Chef-server para tener environments controlados por chef.