capacity4dev / capacity4more

A Drupal 7 powered distribution providing a community platform to share knowledge.
10 stars 9 forks source link

Move export/ import modules into the repo #80

Closed amitaibu closed 10 years ago

amitaibu commented 10 years ago

@zero2one I think that as long as the SQL itself remains outside of the repo, for easier colaboration we should add the import/export modules. I would suggest :

  1. c4d-export can go under /data_migrate/c4d-export -- where one would also add the SQL + files,
  2. c4d-export would go under the contrib modules folder, but will be enable via the install.sh script.
zero2one commented 10 years ago

c4d-export is the export of the data from the old platform. This repo is only about the capacity4more distribution, we should try to keep it like this.

I could create 2 new repo's for the export and import.

What we did now is:

Example:

##
# External folders or files that need to be symlinked into the www folder
# AFTER the make files have been processed.
# The variable is an array, add each with an unique index number.
# Each line should contain the source path > target path.
# The target path needs to be relative to the www folder (Drupal root).
#
# Example:
#   SYMLINKS[0]="path/to/the/source/folder>subpath/of/the/www-folder"
##
SYMLINKS[0]="/PATH/TO/capacity4more-migrate/c4d_migrate>sites/all/modules/c4d_migrate"

##
# Commands to run after the installation is finished.
##
function post_install {
  cd $ROOT/www

  # Enable & configure the c4d_migrate module.
  echo "Enable and confgure the ${WHITE}c4d_migrate${RESTORE} module."
  drush -y en c4d_migrate
  drush vset c4d_migrate_db_database "DBNAME"
  drush vset c4d_migrate_db_hostname "127.0.0.1"
  drush vset c4d_migrate_db_password "PASSWORD"
  drush vset c4d_migrate_db_username "USERNAME"
  drush vset c4d_migrate_files_root "/PATH/TO/OLD/WEBSITE/ROOT"

  cd $ROOT
}

##
# Commands to run after the upgrade is finished.
##
function post_upgrade {
  post_install
}

##
# Commands to run after the reset is is finished.
##
function post_reset {
  post_install
}
amitaibu commented 10 years ago

This repo is only about the capacity4more distribution, we should try to keep it like this.

I partially agree :) for two main reasons:

  1. The fact we are building this is a distro is great, but it shouldn't make development difficult. Since at this point we're the only consumers of this distro, we're not "hurting" anyone.
  2. Having this in the repo, would allow other systems (i.e. not C4D itself) to migrate content into the distro, and understand import/ export isn't too complicated.

Like this, if needed, a single PR could touch all components needed for a successful migrate

zero2one commented 10 years ago

We don't want to end up with the migration modules on production. They are development modules.

I added them to their own public repository and added documentation how to use them (including installation instructions).

See https://github.com/capacity4dev/c4d_import

amitaibu commented 10 years ago

ok, thanks.