Vanilla Forums: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
No edit summary
No edit summary
 
(27 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''[http://vanillaforums.org/ Vanilla Forums] are open-source, standards-compliant, customizable discussion forums.'''
'''[http://vanillaforums.org/ Vanilla Forums] are open-source, standards-compliant, customizable discussion forums.'''


==Tips==
=Forums Deprecated=
{{Tip|Tips for using our [http://openfarmtech.org/forum/ discussion forum]|
 
* Under section '''Discussion Views''' ''(right sidebar)'', you can change the view to see '''[http://openfarmtech.org/forum/discussions latest discussions]''' or '''[http://openfarmtech.org/forum/categories/discussions latest discussions with categories]'''
In 2018, the forums were no longer moderated or maintained, and the decision was made to deprecate support for the site. The content is still accessible in as static-content; new content is not possible.
* Hover your mouse over '''Discussions''' ''(at the top)'' to see a '''category menu'''
 
** A ''category'' contains discussions (a.k.a ''forum posts'') related to a given ''topic''
For more information, please see [[CHG-2018-02-04]]
** Create an '''[http://vanillaforums.org/addon/636/emailsubscribe email subscription]''' to a category of your interest by clicking on '''[http://openfarmtech.org/forum/profile/subscriptions E-mail Subscriptions]'''
 
** To subscribe to a particular discussion, click on '''Follows''' at the right side of the discussion title
=CLI Guides=
*** You can see the number of people who subscribed to a discussion right under ''Follows''
 
* Click on your login name (top left side) to access your '''account page''' and change your preferences.
This section will provide commands to achieve certain actions for managing Vanilla Forums
** Change your '''notification settings''' by clicking on '''My Preferences''' on your ''account page''
 
}}
==migrate site from hetzner1 to hetzner2==
 
this process was used to migrate the forum from hetzner1 (shared hosting) to hetzner2 (dedicated server)
 
<pre>
 
#############################
# run on hetzner1 (osemain) #
#############################
 
# STEP 0: CREATE BACKUPS
source /usr/home/osemain/backups/backup.settings
/usr/home/osemain/backups/backup.sh
 
# when finished, SSH into the dreamhost server to verify that the whole system backup was successful before proceeding
bash -c 'source /usr/home/osemain/backups/backup.settings; ssh $RSYNC_USER@$RSYNC_HOST du -sh backups/hetzner1/*'
 
###############################
# run on hetzner1 (oseforum) #
###############################
 
# DECLARE VARIABLES
stamp=`date +%Y%m%d`
backupDir_hetzner1="/usr/home/oseforum/tmp/backups_for_migration_to_hetzner2/oseforum_${stamp}"
backupFileName_db_hetzner1="mysqldump_oseforum.${stamp}.sql.bz2"
backupFileName_files_hetzner1="oseforum_files.${stamp}.tar.gz"
vhostDir_hetzner1='/usr/www/users/osefourm'
dbName_hetzner1='ose_oseforum'
dbUser_hetzner1="oseforum"
dbPass_hetzner1="CHANGEME"
 
# STEP 1: BACKUP DB
mkdir -p ${backupDir_hetzner1}/{current,old}
pushd ${backupDir_hetzner1}/current/
mv ${backupDir_hetzner1}/current/* ${backupDir_hetzner1}/old/
time nice mysqldump -u"${dbUser_hetzner1}" -p"${dbPass_hetzner1}" --all-databases | bzip2 -c > ${backupDir_hetzner1}/current/${backupFileName_db_hetzner1}
 
# STEP 2: BACKUP FILES
time nice tar -czvf ${backupDir_hetzner1}/current/${backupFileName_files_hetzner1} ${vhostDir_hetzner1}
 
####################
# run on hetzner2 #
####################
 
sudo su -
 
# STEP 0: CREATE BACKUPS
# for good measure, trigger a backup of the entire system's database & files:
time /bin/nice /root/backups/backup.sh &>> /var/log/backups/backup.log
 
# when finished, SSH into the dreamhost server to verify that the whole system backup was successful before proceeding
bash -c 'source /root/backups/backup.settings; ssh $RSYNC_USER@$RSYNC_HOST du -sh backups/hetzner2/*'
 
####################
# run on hetzner2 #
####################
 
sudo su -
 
# STEP 0: CREATE BACKUPS
# for good measure, trigger a backup of the entire system's database & files:
time /bin/nice /root/backups/backup.sh &>> /var/log/backups/backup.log
 
# when finished, SSH into the dreamhost server to verify that the whole system backup was successful before proceeding
bash -c 'source /root/backups/backup.settings; ssh $RSYNC_USER@$RSYNC_HOST du -sh backups/hetzner2/*'
 
# DECLARE VARIABLES
source /root/backups/backup.settings
stamp=`date +%Y%m%d`
backupDir_hetzner1="/usr/home/oseforum/tmp/backups_for_migration_to_hetzner2/oseforum_${stamp}"
backupDir_hetzner2="/var/tmp/backups_for_migration_from_hetzner1/oseforum_${stamp}"
backupFileName_db_hetzner1="mysqldump_oseforum.${stamp}.sql.bz2"
backupFileName_files_hetzner1="oseforum_files.${stamp}.tar.gz"
dbName_hetzner1='oseforum'
dbName_hetzner2='oseforum_db'
dbUser_hetzner2="oseforum_user"
dbPass_hetzner2="CHANGEME"
vhostDir_hetzner2="/var/www/html/forum.opensourceecology.org"
docrootDir_hetzner2="${vhostDir_hetzner2}/htdocs"
 
# STEP 1: COPY FROM HETZNER1
 
mkdir -p ${backupDir_hetzner2}/{current,old}
mv ${backupDir_hetzner2}/current/* ${backupDir_hetzner2}/old/
scp -P 222 oseforum@dedi978.your-server.de:${backupDir_hetzner1}/current/* ${backupDir_hetzner2}/current/
 
# STEP 2: ADD DB
 
# create backup before we start changing the sql file
pushd ${backupDir_hetzner2}/current
cp ${backupFileName_db_hetzner1} ${backupFileName_db_hetzner1}.orig
 
# extract .sql.bz2 -> .sql
bzip2 -dc ${backupFileName_db_hetzner1} > db.sql
 
# verify the first 2 (non-comment) occurances of $dbName meet the naming convention of "<siteName>_db
vim db.sql
 
time nice mysql -uroot -p${mysqlPass} -sNe "DROP DATABASE IF EXISTS ${dbName_hetzner2};"
time nice mysql -uroot -p${mysqlPass} -sNe "CREATE DATABASE ${dbName_hetzner2}; USE ${dbName_hetzner2};"
time nice mysql -uroot -p${mysqlPass} < "db.sql"
time nice mysql -uroot -p${mysqlPass} -sNe "GRANT ALL ON ${dbName_hetzner2}.* TO '${dbUser_hetzner2}'@'localhost' IDENTIFIED BY '${dbPass_hetzner2}'; FLUSH PRIVILEGES;"
 
# STEP 3: Add vhost files
mv ${vhostDir_hetzner2}/* ${backupDir_hetzner2}/old/
time nice tar -xzvf ${backupFileName_files_hetzner1}
 
mkdir -p ${docrootDir_hetzner2}
time nice rsync -av --progress usr/www/users/oseforum/.* ${docrootDir_hetzner2}/
 
pushd ${docrootDir_hetzner2}
 
# set ['Database'] Name/User/Password
vim "${docrootDir_hetzner2}/conf/config.php"
 
# set permissions
chown -R apache:apache "${vhostDir_hetzner2}"
find "${vhostDir_hetzner2}" -type d -exec chmod 0750 {} \;
find "${vhostDir_hetzner2}" -type f -exec chmod 0640 {} \;
 
# TODO: find the equivalent of these content dirs for vanilla
#find "${docrootDir_hetzner2}/wp-content" -type f -exec chmod 0660 {} \;
#find "${docrootDir_hetzner2}/wp-content" -type d -exec chmod 0770 {} \;
 
chown apache:apache-admins "${docrootDir_hetzner2}/conf/config.php"
chmod 0440 "${docrootDir_hetzner2}/conf/config.php"
 
</pre>
 
=Changes=
 
As of 2018-02, we have no ticket tracking or change control process. For now, everything is on the wiki as there's higher priorities. Hence, here's some articles used to track production changes:
 
# [[CHG-2018-02-04]] - migration (of static content archive) from hetzner1 to hetzner2 [[User:Maltfield|Michael Altfield]]
 
=See Also=
# [[OSE_Forum]]
# [[OSE Server]]
# [[CHG-2018-02-04]]
# [[Web server configuration]]
# [[Forum Policy]]
# Evaluation of Vanilla Forum use for OSE - [[/Evaluation]]
# Vanilla Forums [https://github.com/vanillaforums source code]


==Plugins we use==
* [http://vanillaforums.org/addon/636/emailsubscribe Email Subscribe]
* Facebook
* Google Sign In
* Twitter
* Gravatar
* FileUpload
* Flagging
* ...


[[Category: IT Infrastructure]]
[[Category: IT Infrastructure]]

Latest revision as of 19:04, 11 July 2018

Vanilla Forums are open-source, standards-compliant, customizable discussion forums.

Forums Deprecated

In 2018, the forums were no longer moderated or maintained, and the decision was made to deprecate support for the site. The content is still accessible in as static-content; new content is not possible.

For more information, please see CHG-2018-02-04

CLI Guides

This section will provide commands to achieve certain actions for managing Vanilla Forums

migrate site from hetzner1 to hetzner2

this process was used to migrate the forum from hetzner1 (shared hosting) to hetzner2 (dedicated server)


#############################
# run on hetzner1 (osemain) #
#############################

# STEP 0: CREATE BACKUPS
source /usr/home/osemain/backups/backup.settings
/usr/home/osemain/backups/backup.sh

# when finished, SSH into the dreamhost server to verify that the whole system backup was successful before proceeding
bash -c 'source /usr/home/osemain/backups/backup.settings; ssh $RSYNC_USER@$RSYNC_HOST du -sh backups/hetzner1/*'

###############################
# run on hetzner1 (oseforum) #
###############################

# DECLARE VARIABLES
stamp=`date +%Y%m%d`
backupDir_hetzner1="/usr/home/oseforum/tmp/backups_for_migration_to_hetzner2/oseforum_${stamp}"
backupFileName_db_hetzner1="mysqldump_oseforum.${stamp}.sql.bz2"
backupFileName_files_hetzner1="oseforum_files.${stamp}.tar.gz"
vhostDir_hetzner1='/usr/www/users/osefourm'
dbName_hetzner1='ose_oseforum'
 dbUser_hetzner1="oseforum"
 dbPass_hetzner1="CHANGEME"

# STEP 1: BACKUP DB
mkdir -p ${backupDir_hetzner1}/{current,old}
pushd ${backupDir_hetzner1}/current/
mv ${backupDir_hetzner1}/current/* ${backupDir_hetzner1}/old/
time nice mysqldump -u"${dbUser_hetzner1}" -p"${dbPass_hetzner1}" --all-databases | bzip2 -c > ${backupDir_hetzner1}/current/${backupFileName_db_hetzner1}

# STEP 2: BACKUP FILES
time nice tar -czvf ${backupDir_hetzner1}/current/${backupFileName_files_hetzner1} ${vhostDir_hetzner1}

####################
# run on hetzner2 #
####################

sudo su -

# STEP 0: CREATE BACKUPS
# for good measure, trigger a backup of the entire system's database & files:
time /bin/nice /root/backups/backup.sh &>> /var/log/backups/backup.log

# when finished, SSH into the dreamhost server to verify that the whole system backup was successful before proceeding
bash -c 'source /root/backups/backup.settings; ssh $RSYNC_USER@$RSYNC_HOST du -sh backups/hetzner2/*'

####################
# run on hetzner2 #
####################

sudo su -

# STEP 0: CREATE BACKUPS
# for good measure, trigger a backup of the entire system's database & files:
time /bin/nice /root/backups/backup.sh &>> /var/log/backups/backup.log

# when finished, SSH into the dreamhost server to verify that the whole system backup was successful before proceeding
bash -c 'source /root/backups/backup.settings; ssh $RSYNC_USER@$RSYNC_HOST du -sh backups/hetzner2/*'

# DECLARE VARIABLES
source /root/backups/backup.settings
stamp=`date +%Y%m%d`
backupDir_hetzner1="/usr/home/oseforum/tmp/backups_for_migration_to_hetzner2/oseforum_${stamp}"
backupDir_hetzner2="/var/tmp/backups_for_migration_from_hetzner1/oseforum_${stamp}"
backupFileName_db_hetzner1="mysqldump_oseforum.${stamp}.sql.bz2"
backupFileName_files_hetzner1="oseforum_files.${stamp}.tar.gz"
dbName_hetzner1='oseforum'
dbName_hetzner2='oseforum_db'
 dbUser_hetzner2="oseforum_user"
 dbPass_hetzner2="CHANGEME"
vhostDir_hetzner2="/var/www/html/forum.opensourceecology.org"
docrootDir_hetzner2="${vhostDir_hetzner2}/htdocs"

# STEP 1: COPY FROM HETZNER1

mkdir -p ${backupDir_hetzner2}/{current,old}
mv ${backupDir_hetzner2}/current/* ${backupDir_hetzner2}/old/
scp -P 222 oseforum@dedi978.your-server.de:${backupDir_hetzner1}/current/* ${backupDir_hetzner2}/current/

# STEP 2: ADD DB

# create backup before we start changing the sql file
pushd ${backupDir_hetzner2}/current
cp ${backupFileName_db_hetzner1} ${backupFileName_db_hetzner1}.orig

# extract .sql.bz2 -> .sql
bzip2 -dc ${backupFileName_db_hetzner1} > db.sql

# verify the first 2 (non-comment) occurances of $dbName meet the naming convention of "<siteName>_db
vim db.sql

 time nice mysql -uroot -p${mysqlPass} -sNe "DROP DATABASE IF EXISTS ${dbName_hetzner2};" 
 time nice mysql -uroot -p${mysqlPass} -sNe "CREATE DATABASE ${dbName_hetzner2}; USE ${dbName_hetzner2};"
 time nice mysql -uroot -p${mysqlPass} < "db.sql"
 time nice mysql -uroot -p${mysqlPass} -sNe "GRANT ALL ON ${dbName_hetzner2}.* TO '${dbUser_hetzner2}'@'localhost' IDENTIFIED BY '${dbPass_hetzner2}'; FLUSH PRIVILEGES;"

# STEP 3: Add vhost files
mv ${vhostDir_hetzner2}/* ${backupDir_hetzner2}/old/
time nice tar -xzvf ${backupFileName_files_hetzner1}

mkdir -p ${docrootDir_hetzner2}
time nice rsync -av --progress usr/www/users/oseforum/.* ${docrootDir_hetzner2}/

pushd ${docrootDir_hetzner2}

# set ['Database'] Name/User/Password
vim "${docrootDir_hetzner2}/conf/config.php"

# set permissions
chown -R apache:apache "${vhostDir_hetzner2}"
find "${vhostDir_hetzner2}" -type d -exec chmod 0750 {} \;
find "${vhostDir_hetzner2}" -type f -exec chmod 0640 {} \;

# TODO: find the equivalent of these content dirs for vanilla
#find "${docrootDir_hetzner2}/wp-content" -type f -exec chmod 0660 {} \;
#find "${docrootDir_hetzner2}/wp-content" -type d -exec chmod 0770 {} \;

chown apache:apache-admins "${docrootDir_hetzner2}/conf/config.php"
chmod 0440 "${docrootDir_hetzner2}/conf/config.php"

Changes

As of 2018-02, we have no ticket tracking or change control process. For now, everything is on the wiki as there's higher priorities. Hence, here's some articles used to track production changes:

  1. CHG-2018-02-04 - migration (of static content archive) from hetzner1 to hetzner2 Michael Altfield

See Also

  1. OSE_Forum
  2. OSE Server
  3. CHG-2018-02-04
  4. Web server configuration
  5. Forum Policy
  6. Evaluation of Vanilla Forum use for OSE - /Evaluation
  7. Vanilla Forums source code