Use right tool for your job.

30
cheppers.com Miro Michalicka Drupal developer DUG Budapest January 2017 USE RIGHT TOOLS FOR YOUR JOB

Transcript of Use right tool for your job.

Page 1: Use right tool for your job.

cheppers.com Miro MichalickaDrupal developer

DUG BudapestJanuary 2017

USE RIGHT TOOLS FOR YOUR JOB

Page 2: Use right tool for your job.

Drupal enthusiast @Cheppers5+ years experience with web developmentBoard member of Slovak Drupal Association

whoami

Page 3: Use right tool for your job.

SLOVAK DRUPALASSOCIATION

Everything Drupal related in SlovakiaDrupalCampCS together with Czech communityPlatform for cooperation and contribution

Page 4: Use right tool for your job.

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

Page 5: Use right tool for your job.

MOTIVATION

different age of websiteshard to hostno documentationcritique from communitylow engagement of visitors

Page 6: Use right tool for your job.

SOLUTION

Migrate static websites to GitHub PagesDeprecate komunita.drupal.skMigrate drupal.sk forums to new platformDeprecate blogs on drupal.sk

Page 7: Use right tool for your job.

DRUPAL.SK REBUILDREQUIREMENTS

Modern platformLow maintenanceEasy to hostEasy to migrateCost of migration

Page 8: Use right tool for your job.

DRUPAL.SK REBUILDCANDIDATES

FB GROUP DISCOURSEDRUPAL FORUM

Drupal 7 + ArrayShiftDrupal 8 + custom

code

PHPBB FLARUM

Page 9: Use right tool for your job.

Discourse

Page 10: Use right tool for your job.

DRUPAL.SK REBUILDMIGRATION

Content freeze

Backup as static site

Test migration

Launch on new platform

Page 11: Use right tool for your job.

DRUPAL.SK REBUILDLEGACY SITE

Page 12: Use right tool for your job.

DRUPAL.SK REBUILDLEGACY SITE

Page 13: Use right tool for your job.

CONTENT FREEZE

DRUPAL.SK REBUILDMIGRATION

Remove permissionsRemove formsRemove filters

Page 14: Use right tool for your job.

STATIC SITE

DRUPAL.SK REBUILDMIGRATION

Drupal modulesSystem utilities

Page 15: Use right tool for your job.

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

Page 16: Use right tool for your job.

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

Page 17: Use right tool for your job.

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 '/((?<![\'"])\/

Page 18: Use right tool for your job.

STATIC SITE

DRUPAL.SK REBUILDMIGRATION

https://pages.github.com/

Deploy to GitHub PagesSet up custom domain

Page 19: Use right tool for your job.

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

Page 20: Use right tool for your job.

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

Page 21: Use right tool for your job.

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

Page 22: Use right tool for your job.

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

Page 23: Use right tool for your job.

DRUPAL.SK REBUILDMIGRATION

Page 24: Use right tool for your job.

LAUNCH

DRUPAL.SK REBUILDMIGRATION

Import migrated content

Enjoy :)

Page 25: Use right tool for your job.

LAUNCH

DRUPAL.SK REBUILDMIGRATION

Page 26: Use right tool for your job.

LAUNCH

DRUPAL.SK REBUILDMIGRATION

Page 27: Use right tool for your job.

SOME STATISTICS

BEFORE(December 2016)

1073SINCE LAUNCH

47.7k

Page 28: Use right tool for your job.

PLANS

Slight redesignAdd aggregator optionDrupal 8 site for the Association

Page 29: Use right tool for your job.

PLANS

Page 30: Use right tool for your job.

THANK YOUQUESTIONS?