Use right tool for your job.
-
Upload
miro-michalicka -
Category
Technology
-
view
30 -
download
0
Transcript of Use right tool for your job.
cheppers.com Miro MichalickaDrupal developer
DUG BudapestJanuary 2017
USE RIGHT TOOLS FOR YOUR JOB
Drupal enthusiast @Cheppers5+ years experience with web developmentBoard member of Slovak Drupal Association
whoami
SLOVAK DRUPALASSOCIATION
Everything Drupal related in SlovakiaDrupalCampCS together with Czech communityPlatform for cooperation and contribution
SLOVAK DRUPALASSOCIATION Main community site
drupal.sk
DrupalCampCS website
drupalcs.camp
Showcase website
komunita.drupal.sk
The association website
sda.drupal.sk
OUR WEBSITES
2009Drupal 6Acquia Community Hosting
2016Drupal 8websupport.sk
2015Static websiteAcquia Community Hosting
2016Static websitewebsupport.sk
MOTIVATION
different age of websiteshard to hostno documentationcritique from communitylow engagement of visitors
SOLUTION
Migrate static websites to GitHub PagesDeprecate komunita.drupal.skMigrate drupal.sk forums to new platformDeprecate blogs on drupal.sk
DRUPAL.SK REBUILDREQUIREMENTS
Modern platformLow maintenanceEasy to hostEasy to migrateCost of migration
DRUPAL.SK REBUILDCANDIDATES
FB GROUP DISCOURSEDRUPAL FORUM
Drupal 7 + ArrayShiftDrupal 8 + custom
code
PHPBB FLARUM
Discourse
DRUPAL.SK REBUILDMIGRATION
Content freeze
Backup as static site
Test migration
Launch on new platform
DRUPAL.SK REBUILDLEGACY SITE
DRUPAL.SK REBUILDLEGACY SITE
CONTENT FREEZE
DRUPAL.SK REBUILDMIGRATION
Remove permissionsRemove formsRemove filters
STATIC SITE
DRUPAL.SK REBUILDMIGRATION
Drupal modulesSystem utilities
STATIC SITE
DRUPAL.SK REBUILDMIGRATION
HTML Export [1]
Static Generator [2]
Boost [3]
[1] https://www.drupal.org/project/html_export [2] https://www.drupal.org/project/static [3] https://www.drupal.org/project/boost
STATIC SITE
DRUPAL.SK REBUILDMIGRATION
wget
https://www.drupal.org/node/27882
wget -q --mirror -p --adjust-extension -e robots=off --base=./ -k -P ./ http://example.com
find -name "*.*\?*" | while read filename; do mv "$filename" "${filename%%\?*}"; done
STATIC SITE
DRUPAL.SK REBUILDMIGRATION
HTTrack
https://www.lullabot.com/blog/article/sending-drupal-site-retirement
httrack "http://${root_uri}" -O "$targetdir" -N "%h%p/%n/index%[page].%t" -WqQ%v --robots=0
find . -name "*.html" -type f -print0 | xargs -0 perl -i -pe '/((?<![\'"])\/
STATIC SITE
DRUPAL.SK REBUILDMIGRATION
https://pages.github.com/
Deploy to GitHub PagesSet up custom domain
TEST MIGRATION
DRUPAL.SK REBUILDMIGRATION
[1] https://meta.discourse.org/t/beginners-guide-to-install-discourse-on-ubuntu-for-development/14727/153
Different VPS as productionPrepare development environment for Discourse [1]
Install mysql and bundle it
$ sudo apt-get install mysql-server libmysqlclient-dev -y
$ vim Gemfile > gem ‘mysql2’
$ gem install mysql2 -v ‘0.4.5'
$ bundle install
TEST MIGRATION
DRUPAL.SK REBUILDMIGRATION
[1] https://meta.discourse.org/t/beginners-guide-to-install-discourse-on-ubuntu-for-development/14727/153
Create DB and import Drupal DB
$ mysql -u root -p > CREATE DATABASE ‘d6’
$ mysql -u root -p d6 < ~/d6_dump.sql
Install Discourse
$ bundle exec rake db:migrate db:test:prepare db:seed_fu
TEST MIGRATION
DRUPAL.SK REBUILDMIGRATION
[1] https://meta.discourse.org/t/beginners-guide-to-install-discourse-on-ubuntu-for-development/14727/153
Run import
$ bundle exec ruby script/import_scripts/drupal-6.rb
Assign admin role
$ rake admin:create > UID1 email
Run Discourse from other world
$ bundle exec rails server --binding=0.0.0.0
LAUNCH
DRUPAL.SK REBUILDMIGRATION
https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md
Install Docker
$ wget -qO- https://get.docker.com/ | sh
Clone Discourse container
$ git clone https://github.com/discourse/discourse_docker.git /var/discourse
Run installer
$ ./discourse-setup
DRUPAL.SK REBUILDMIGRATION
LAUNCH
DRUPAL.SK REBUILDMIGRATION
Import migrated content
Enjoy :)
LAUNCH
DRUPAL.SK REBUILDMIGRATION
LAUNCH
DRUPAL.SK REBUILDMIGRATION
SOME STATISTICS
BEFORE(December 2016)
1073SINCE LAUNCH
47.7k
PLANS
Slight redesignAdd aggregator optionDrupal 8 site for the Association
PLANS
THANK YOUQUESTIONS?