Upgrade to Pro — share decks privately, control downloads, hide ads and more …

非エンジニアから開発者まで!DrupalPodを使用したDrupal環境の作成

 非エンジニアから開発者まで!DrupalPodを使用したDrupal環境の作成

https://drupal-meetup-haneda.connpass.com/event/249475/
#DrupalPod #Gitpod #IDE #VSCode #ローカル開発環境

19afb3151b470385f9f88f94a59a6960?s=128

HikaruMaruyama

June 27, 2022
Tweet

More Decks by HikaruMaruyama

Other Decks in Programming

Transcript

  1. ඇΤϯδχΞ͔Β։ൃऀ·Ͱʂ DrupalPodΛ࢖༻ͨ͠Drupal؀ڥͷ࡞੒ ·Δ΍· ͻ͔Δ

  2. ࣗݾ঺հ • 1991೥10݄29೔ ੜ·Ε • ಠཱܥιϑτ΢ΣΞ։ൃձࣾͰιϑτ΢ΣΞΤϯδχΞ • ͷͪΤόϯδΣϦετͱͯ͠ϓϩμΫτͷܒ໤׆ಈ • 2019೥8݄

    ΞΫΠΞʹδϣΠϯ • ΢ΣϒαΠτͷίϯςϯπͷٕज़຋༁΍ϩʔΧϥΠζΛ ୲౰ Ruby / Rails / Web API / Docker / AWS 
 ϥʔϝϯ / εΠʔπ / Ωϟϯϓ൧ / ొࢁ ؙࢁ ͻ͔Δ 
 ΞΫΠΞδϟύϯ ςΫχΧϧτϥϯεϨʔλʔ
  3. ࠂ஌ ٕज़ॻయ12Ͱ൦෍ͨ͠ॻ੶͕ 
 ঎ۀࢽʹͳΓ·ͨ͠ʂʂ ʮDrupal 9 ͓͍͍͠Ϩγϐू 2ʯ ΞϚκϯͰ޷ධൃചத̇

  4. DrupalΛαΫοͱ ߏங͍ͨ͠ɾɾɾ 
 ͲΜͳํ๏͕͋ΔͩΖ͏͔ ʁ

  5. Drupal؀ڥΛαΫοͱ༻ҙ͢Δํ๏ • Acquia Dev Desktop 
 • Docker, Lando, DDEV

    
 • Simplytest.me → αϙʔτऴྃ 
 
 → ඇΤϯδχΞʹ͸೉͍͠ 
 
 → ੍࣌ؒݶ͕͋Δ(݁ߏ୹͍) DrupalPod͕ྑ͍ͷͰ͸ʁ
  6. ຊ೔ͷ಺༰ • DrupalPodͷ֓ཁ • DrupalPodͷ͸͡Ίํ • Gitpodͱ͸Կ͔ • DrupalPodͷػೳ΍࢓༷ʹ͍ͭ ͯ

    • ·ͱΊ
  7. DrupalPodͷ֓ཁ DrupalΛΑΓߩݙ͠΍͘͢͢ΔͨΊʹɺ 
 ϫϯΫϦοΫͰ׬શͳDrupal։ൃ؀ڥΛ 
 ༻ҙͯ͘͠ΕΔπʔϧ ࡞ऀɿOfer Shaal 
 ެࣜαΠτɿhttps://www.drupalpod.com

  8. DrupalPodͷ͸͡Ίํ 1. ϒϥ΢β֦ுΛΠϯετʔϧ 2. Drupal.orgͷissueϖʔδʹҠಈ 3. DrupalPod֦ுͷϘλϯΛΫϦοΫ

  9. ૣ଎σϞ 
 ϫϯΫϦοΫʂ 1. ϒϥ΢β֦ுΛΠϯετʔϧ 2. Drupal.orgͷissueϖʔδʹҠಈ 3. DrupalPod֦ுͷϘλϯΛΫϦοΫ

  10. DrupalPodͷ͍͢͝ͱ͜Ζ ඇΤϯδχΞʙ։ൃऀ·Ͱ ෯޿͍૚Ͱ׆༻Ͱ͖ͦ͏ʂ

  11. ͔͜͜Βɾɾ গ͠։ൃ໨ઢͷ࿩

  12. DrupalPod͸ҰମͳΜͳͷ͔ • DrupalPod͸ཪଆͰ͸ Gitpod ͱ͍͏αʔϏεΛ࢖ͬͯϦονIDE ؀ڥΛىಈ͍ͯ͠Δ

  13. Gitpodͱ͸ • ແྉͰ࢖͑ΔΫϥ΢υIDE ◦ GitHubͳͲͷϦϙδτϦͱ࿈ܞͯ͠ɺϒϥ΢β্ͰIDE͕Քಇ͠·͢ ◦ URLɺ΋͘͠͸ϒϥ΢β֦ுͰىಈ https://gitpod.io/#https://github.com/org/repo ʹΞΫηεɺ΋͘͠͸ ϒϥ΢β֦ு͔ΒϘλϯΫϦοΫ

    ʘ IDE ര஀ ʗ
  14. Gitpodͷಛ௃ͦͷᶃ շదͳ։ൃ؀ڥ • VS Codeͱಉ͡Α͏ͳ ૢ࡞ײ(Theiaͱ͍͏Φʔ ϓϯιʔεIDEΛར༻) 
 • ֦ுػೳͰσόοά

    πʔϧ΋ઃఆՄೳ λʔϛφϧ ΤσΟλ ϓϨϏϡʔ αΠτ
  15. Gitpodͷಛ௃ͦͷᶄ ࢖͍ࣺͯײ֮Ͱ࡞੒Ͱ͖ΔϫʔΫεϖʔε • ϫʔΫεϖʔεΛ4ͭ·Ͱฒྻ ͰՔಇՄೳ • 50࣌ؒ/݄·ͰແྉͰར༻Մೳ Քಇத Քಇத ఀࢭத

    ఀࢭத ఀࢭத
  16. Gitpodͷಛ௃ͦͷᶅ ར༻͢Δʹ͸GitpodͷΞΧ΢ϯτొ࿥͕ඞཁ • GitLab, GitHub, BitbucketͷΞΧ΢ϯτ ࿈ܞ͕Մೳ

  17. Gitpod͚ͩͰྑͦ͞͏͡Όͳ͍ʁ DrupalPodඞཁʁͱ͍͏ํͷͨΊʹ Github͔ΒDrupalͷGitlabϦϙδτϦΛࢦఆͯ͠ىಈ͢ΔͱͲ͏ͳΔ͔ • Drupalͷιʔείʔυ͕Ϋϩʔϯ͞ΕͨIDE؀ڥ্ཱ͕͕ͪΔ • ͔ͦ͜Βcomposer installͨ͠ΓDB༻ҙͨ͠ΓWebαʔόʔىಈ͢Δͷ͸λʔϛφϧܦ༝Ͱߦ͏ඞ ཁ͕͋Δ •

    GitpodͰ͸.gitpod.ymlͱ͍͏ઃఆϑΝΠϧʹ৭ʑهड़͢Δ͜ͱͰಛఆͷDockerΠϝʔδΛར༻͠ ͨΓ೚ҙͷεΫϦϓτΛ࣮ߦͰ͖Δ 
 • ͦΕΛΰϦΰϦʹDrupal༻ʹ࠷దԽͯ͘͠Ε͍ͯΔͷ͕DrupalPod
  18. DrupalPodͷ࿩ʹ໭ͬͯ DrupalPodͷ 
 ػೳ΍࢓༷

  19. DrupalPodͷϢʔεέʔε • ॳΊͯDrupalΛࢼ͢ɻ • DrupalͷҟͳΔόʔδϣϯΛࢼ͢ɻ • issue͔ΒύονΛςετ͢Δɻ • ਺෼ͰDrupal։ൃ؀ڥΛηοτΞοϓ͢Δɻ •

    ։ൃ؀ڥΛଞͷਓͱڞ༗ͯ͠ɺڞಉ࡞ۀΛߦ͏ɻ • ։ൃதͷWIPιϦϡʔγϣϯΛଞͷਓʹݟͯ΋Β͏ɻ
  20. DrupalPodΛ࢖͏ͨΊʹ༻ҙ͢Δ΋ͷ • GitHubΞΧ΢ϯτ • GitpodΞΧ΢ϯτ(GitHubΞΧ΢ϯτ࿈ܞ) • ϒϥ΢β (Chrome or Firefox)

    • DrupalPodϒϥ΢β֦ுػೳ
  21. DrupalPodΛ࢖༻͢Δ • DrupalαΠτͷϢʔβʔ໊/ύεϫʔυɿadmin/admin • DevelɺAdmin ToolbarɺDrush͸ΠϯετʔϧࡁΈ • λʔϛφϧ͔Βddev, git, drush,

    composerίϚϯυ͕࣮ߦՄೳ • ςετ΍Xdebugͷ࣮ߦ • phpmyadminɺϝʔϧαʔόʔͷར༻ • DrupalαΠτΛڞ༗ͨ͠Γɺ࣮ߦதͷϫʔΫεϖʔεΛڞ༗ͯ͠ڞಉ࡞ۀͰ͖Δ
  22. ᶅIDE ര஀ DrupalPodͷ࢓૊Έ • DrupalPodͷϒϥ΢β֦ுͰԿ͕ߦΘΕ͍ͯΔͷ͔ʁ ◦ issueϖʔδ͔Βඞཁͳ৘ใΛूΊͯɺURLΛੜ੒͍ͯ͠Δ ᶃissueϖʔδʹΞΫηε https://gitpod.io/ #DP_PROJECT_NAME=google_analytics,DP_ISSUE_FORK=

    google_analytics-3291489,DP_ISSUE_BRANCH=3291489- googleanalytics.visibility-has- a,DP_PROJECT_TYPE=project_module,DP_MODULE_VERSI ON=4.0.0,DP_CORE_VERSION=9.1.x,DP_PATCH_FILE=,DP_I NSTALL_PROFILE=standard/https://github.com/shaal/ drupalpod ᶄDrupalPodͷϒϥ΢β֦ு 
 ͰGitpodͷURLΛੜ੒
  23. URLΛ֦େ͠·ͨ͠ https://gitpod.io/# 
 DP_PROJECT_NAME=google_analytics, 
 DP_ISSUE_FORK=google_analytics-3291489, 
 DP_ISSUE_BRANCH=3291489-googleanalytics.visibility-has-a, 
 DP_PROJECT_TYPE=project_module,

    
 DP_MODULE_VERSION=4.0.0, 
 DP_CORE_VERSION=9.1.x, 
 DP_PATCH_FILE=, 
 DP_INSTALL_PROFILE=standard 
 /https://github.com/shaal/drupalpod Կ΍ΒύϥϝʔλͰ ৭ʑ੍ޚͰ͖Δ 
 Α͏Ͱ͢Ͷɾɾɾ
  24. ΫΤϦจࣈྻΛউखʹղऍͯ͠Έͨ ύϥϝʔλ໊ આ໌ ྫ DP_PROJECT_NAME DrupalϓϩδΣΫτͷϚγϯ໊ ɾdrupal ɾgoogle_analytics ɾbootstrap_barrio DP_ISSUE_FORK

    ʢΦϓγϣϯʣϑΥʔΫϦϙδτϦͷࢦఆ ɾgoogle_analytics-3291489 DP_ISSUE_BRANCH ʢΦϓγϣϯʣissueʹϒϥϯν͕࡞੒͞Ε͍ͯΔ৔߹ɺϒϥϯνΛࢦఆͰ͖Δ ɾ3291489-googleanalytics.visibility-has-a DP_PROJECT_TYPE https://www.drupal.org/api-d7/node.json? field_project_machine_name={DP_PROJECT_NAME} ͷtypeͷ஋ ɾproject_core ɾproject_module ɾproject_theme DP_MODULE_VERSION ର৅ϓϩδΣΫτͷόʔδϣϯࢦఆ ɾ9.4.x ɾ5.5.x DP_CORE_VERSION DrupalίΞͷόʔδϣϯࢦఆɻର৅ϓϩδΣΫτ͕Ϟδϡʔϧ/ςʔϚͰ͸ͳ͘Drupal ίΞͷ৔߹͸DP_MODULE_VERSIONͷ஋ʹ্ॻ͖͞ΕΔɻ ɾ9.4.x DP_PATCH_FILE ʢΦϓγϣϯʣissueʹύον͕Ξοϓϩʔυ͞Ε͍ͯΔ৔߹ɺύονϑΝΠϧΛࢦఆ Ͱ͖Δ ɾhttps%3A%2F%2Fwww.drupal.org%2Ffiles 
 %2Fissues%2F2020-09-16%2F2906445-10.patch DP_INSTALL_PROFILE ʢΦϓγϣϯʣΠϯετʔϧϓϩϑΟʔϧͷࢦఆɻʮ’’ʯͷ৔߹ɺΠϯλϥΫςΟϒΠ ϯετʔϥʔ͕ىಈɻۭ΍ଘࡏ͠ͳ͍ΠϯετʔϧϓϩϑΟʔϧΛࢦఆͨ͠৔߹ɺ demo_umami͕ىಈɻ ɾstandard ɾdemo_umami ɾminimal
  25. ύϥϝʔλͷ࢓༷(?)͕෼͔ͬͨͱ͜ΖͰ https://gitpod.io/# 
 DP_PROJECT_NAME=drupal, 
 DP_ISSUE_FORK=, 
 DP_ISSUE_BRANCH=, 
 DP_PROJECT_TYPE=project_core,

    
 DP_MODULE_VERSION=9.4.0, 
 DP_CORE_VERSION=9.4.0, 
 DP_PATCH_FILE=, 
 DP_INSTALL_PROFILE=standard 
 /https://github.com/shaal/drupalpod ಛఆͷDrupalίΞόʔ δϣϯͰىಈ͢Δ͜ͱ ΋Մೳ
  26. ·ͱΊ • DrupalPod͸ɺDrupal։ൃ؀ڥΛ ϫϯΫϦοΫͰ؆୯ʹ༻ҙͯ͘͠ ΕΔศརͳπʔϧͰ͢ɻ • ࠇ͍ը໘Λ৮ΒͣʹDrupalαΠτ Λ࡞Γ͍ͨඇΤϯδχΞ͔Βɺ ϦονͳϩʔΧϧ։ൃ؀ڥ͕ཉ͠ ͍։ൃऀ·Ͱ෯޿͘࢖͑ΔΑ͏ʹ

    ײ͡·ͨ͠ɻ • Drupalͷֶश΍ߩݙ͕͞ΒʹՃ ଎ʁ
  27. ࢀߟ • DrupalPod ެࣜαΠτ (Github) 
 https://www.drupalpod.com/ 
 • DrupalPodͷ࢖͍ํ

    (Drupal Wiki) 
 https://www.drupal.org/docs/develop/development-tools/drupalpod 
 • DrupalPodͷνϡʔτϦΞϧಈը (Youtube) 
 https://youtu.be/bA4oYXFygPY
  28. ͝ਗ਼ௌ͋Γ͕ͱ͏ ͍͟͝·ͨ͠