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

でぶちゃんねる vol.7 Acquia Developer Studioで始めるDrupal...

でぶちゃんねる vol.7 Acquia Developer Studioで始めるDrupal開発 / Starting Drupal Development with Acquia Developer Studio

More Decks by アクイアジャパン Acquia Japan

Other Decks in Programming

Transcript

  1. ։ൃ ςʔϚ։ൃ Ϟδϡʔϧ ։ൃ ςετ όʔδϣϯ ؅ཧ ʢGit Hookʣ Ϗϧυ

    ςετ Ξϥʔτ Ϩϙʔτ ؀ڥߏங Docker ؀ڥߏங ։ൃπʔϧ
 ಋೖ (DrushɺSCSS) Drupal Πϯετʔϧ Drupal ॳظઃఆ IDEઃఆ σʔλಉظ σϦόϦ σϓϩΠ खಈ࡞ۀɾ֤։ൃऀʹΑΔ؀ڥͷόϥπΩɾ։ൃ։࢝લʹ๲େͳ४උ࣌ؒ CI/CD Drupal։ൃͷྲྀΕ
  2. Developer Studioͷػೳ • Developer Studio CLI • Cloud IDE (౷߹։ൃ؀ڥ)

    • Acquia BLT (ϏϧυɾσϓϩΠπʔϧ) • Acquia Pipeline (CI/CDπʔϧ)
  3. • ads new project-name ˓ %PDLFSίϯςφͷμ΢ϯϩʔυ ˓ ϩʔΧϧ։ൃ؀ڥΛࣗಈߏங ˓ %SVQBMͷࣗಈΠϯετʔϧ

    • ads start ads destroy ˓ ϩʔΧϧ؀ڥͷ։࢝ɾഁغ • ads logs ˓ ؀ڥͷϩάͷදࣔ • ads ide ˓ ϦϞʔτ*%&Λࣗಈߏங Developer Studio ͷػೳ Developer Studio CLI CLIͰϞμϯͳDrupalͷϩʔΧϧ։ൃ؀ڥΛ؆୯ʹηοτΞοϓ For Everyone
  4. Acquia BLT • ίϚϯυҰͭͰ୯ମςετɺػೳςετɺ
 ίʔσΟϯάελϯμʔυͷνΣοΫ • CI/CDΛηοτΞοϓ • Acquia؀ڥͱσʔλɺϑΝΠϧɺ
 ίʔυͷಉظ

    • ࣗಈͰͷϏϧυɾσϓϩΠ • ΧελϜίϚϯυͷ࡞੒ DrupalͷςετɾϏϧυɾσϓϩΠΛࣗಈԽ For Everyone Developer Studio ͷػೳ
  5. Acquia Pipelines • Drupalʹ࠷దԽ͞ΕͨCI/CDπʔϧ • ίϯςφ؀ڥ಺ʹDrupalؔ࿈πʔϧΛಉᧁ (composer, imagemagick, 
 headless

    chrome, drush, ruby, node౳) • BLTͱͷγʔϜϨεͳ࿈ܞ • GithubɺBitbucketͷwebhookͱͷ࿈ܞ Acquia؀ڥʹ෇ଐ͢ΔCI/CDπʔϧ For Acquia Customer Developer Studio ͷػೳ
  6. ։ൃ BLT Cloud IDE ςʔϚ։ൃ Ϟδϡʔϧ ։ൃ ςετ όʔδϣϯ ؅ཧ

    ʢGit Hookʣ CI/CD Pipeline Ϗϧυ ςετ Ξϥʔτ Ϩϙʔτ ؀ڥߏங Developer Studio Docker ؀ڥߏங ։ൃπʔϧ
 ಋೖ (DrushɺSCSS) Drupal Πϯετʔϧ Drupal ॳظઃఆ IDEઃఆ σʔλಉظ σϦόϦ σϓϩΠ γϯϓϧɾϑϨΩγϏϦςΟɾOPEN API Developer Studio Λ࢖ͬͨ։ൃͷྲྀΕ
  7. # 1. Developer Studio CLIΛΠϯετʔϧ $ curl https://downloads.acquia.studio/install-standalone.sh | bash

    # 2. ads new ίϚϯυͰϩʔΧϧ؀ڥΛߏங $ ads new ? Project name: testadsproj ? What distribution do you want to use? Lightning (recommended) https://www.drupal.org/project/lightning ? Environment: Lando ? What installation profile do you want to use? lightning ? Do you want to link this project with an existing Acquia Cloud project now? Yes To continue, please select the Acquia Cloud application that you want to link with this project. Fetching your applications from Acquia Cloud... done ? Application: hikaru-no-test-app (s5f15e01697492) ✔ Create a Drupal project ✔ Create a Drupal environment ✔ Install the Drupal project in the environment ✔ Open Drupal in your browser Your new project has been created in /Users/hikaru.maruyama/src/github.com/hmaruyama/testadsproj. You can now start working on your project in that directory. We generated a one-time login link for you to use right away http://testadsproj.lndo.site/user/reset/1/1595318440/- T2ti1IjQo4CF1cyGxxxxxx/login You may use ads browse inside the directory to get a link to your site or ads api --help to get the available Acquia Cloud API command. Go build something amazing! # 3. http://testadsproj.lndo.site/user/reset/1/1595318440/-T2ti1IjQo4CF1cyGxxxxxx/login ʹΞΫηεʂ Developer Studio ͷ࢝Ίํ
  8. Acquia Cloud Trigger ϩʔΧϧ
 ։ൃ؀ڥ 
 Windows/
 Mac/Linux BLT
 


    Acquia Cloud༻
 ։ൃπʔϧ Acquia Pipelines CI/CD tool Git Server Acquia Cloud CD
 CD؀ڥ
 ϒϥϯν໊: pipelines-build-
 feature/* Staging
 ʢݕূ؀ڥʣ ϒϥϯν໊ɿbuild- master Dev ʢ։ൃ؀ڥʣ ϒϥϯν໊ɿbuild- develop Prod
 ʢຊ൪؀ڥʣ λά (v1, v2౳) git push origin feature/* ҎԼΛࣗಈԽ: 
 - Ϗϧυ - ୯ମςετ - ػೳςετ - ౷߹ςετ ։ൃऀ͕ςετͰ͖Δ؀ڥɻ ֬ೝͷ্ɺ໰୊ͳ͚Ε͹ɺ
 ϚʔδͷϑϩʔʹҠΔ git push origin develop Deploy Deploy Trigger ։ൃऀ͕֬ೝ ͓٬༷͕֬ೝ ҎԼΛอ༗: - Ծ૝؀ڥ
 (VM/ίϯςφ)
 - ୯ମςετ - ػೳςετ - ͦͷଞ։ൃπʔϧ ৽ػೳ௥Ճͷ৔߹ ʢfeatureϒϥϯνΛ࡞ͬ ͨ৔߹ʣ featureϒϥϯνΛdevelop ϒϥϯνʹϚʔδ͢Δ৔߹
 ʢGithub/BitbucketͷUIͰ ΋Մೳʣ Acquia Cloud಺Git Github / Bitbucket ຢ͸ BLT ΦʔϓϯιʔεͰར༻Ͱ͖ΔςετɺϏϧυɺσϓ ϩΠ։ൃπʔϧɻAcquia LightningͷଞʹɺPHP Unit, BehatͳͲͷςετπʔϧؚ͕·Ε͓ͯΓɺ Acquia Cloud ্ͷϑΝΠϧ΍DBͱͷಉظ͕؆୯ʹ ઃఆͰ͖·͢ɻ
 ⾣υΩϡϝϯτ Git Server Acquia Pipelines͸ɺGithub·ͨ͸BitbucketͷGit Serverͱͷ࿈ܞ͠ɺϚʔδ΍ϓϧϦΫΤετͷλΠ ϛϯάͰࣗಈతʹϏϧυͱςετΛߦ͏͜ͱ͕Մೳ Ͱ͕͢ɺ͜ΕΒͷαʔϏεΛར༻͍ͯ͠ͳ͍৔߹ʹ ΋ɺAcquia Cloud্ͷGit΁ͷίϛοτ͔ΒPipeline Λൃಈͤ͞Δ͜ͱ͕ՄೳͰ͢ɻ⾣υΩϡϝϯτ Acquia Pipelines Jenkins΍TravisͷΑ͏ͳCI/CDπʔϧͰ͢ɻίϛο τ΍ϓϧϦΫΤετΛτϦΨʔʹɺϏϧυɺςε τɺσϓϩΠΛߦ͍·͢ɻ಺෦ͷॲཧ͸BLT಺ͷઃ ఆϑΝΠϧʹهࡌ͢Δ͜ͱͰ௥Ճ͢Δ͜ͱ΋Ͱ͖ɺ ॲཧதͷϩάͱςετ݁Ռ͸Acquia CloudͷUI͔Β ֬ೝͰ͖·͢ɻ⾣υΩϡϝϯτ Acquia Cloud CD ։ൃऀ΍ςετ୲౰ऀ͕ίʔυɾઃఆͷ֬ೝʹ࢖Θ ΕΔ؀ڥͰ͢ɻίϯςφͷར༻Ͱɺຊ൪؀ڥʹྨࣅ ͨ͠؀ڥΛਝ଎ʹ࡞੒͠ɺPipeline͔ΒBuild͞Εͨ ৽ػೳͷϒϥϯνɺ͍ΘΏΔfeatureϒϥϯνͷػ ೳ֬ೝʹओʹ࢖༻͞Ε·͢ɻ
 ⾣υΩϡϝϯτ Cloud Platform ։ൃϑϩʔ Ϣʔβʔ͕ར༻
  9. Dev StudioͷCLI͸ɺ Drupalͷ8Ҏ্ͷΈޓ׵ੑ͕͋Γ·͢ɻ Α͋͘Δ࣭͝໰ Developer Studio͸Drupal 7Ͱ΋ར༻Ͱ͖·͔͢ʁ Dev Desktopͱͷҧ͍͸ͳΜͰ͔͢ʁ Dev

    Studio CLI͸ɺDev DesktopʹΑ࣮ͬͯߦ͞ΕΔଟ͘ͷΞΫγϣϯΛ࣮ߦͰ͖·͕͢ ɺAcquia Dev Desktopͷ׬શͳ୅ସ඼Ͱ͸͋Γ·ͤΜɻ Dev Studio CLI͸ɺDrupalɺComposerɺ͓ΑͼDockerͱͷޓ׵ੑΛఏڙͯ͠ɺAcquia Dev Desktopͷଟ͘ͷ։ൃΞΫγϣϯΛஔ͖׵͑·͢ɻ CLIͷΠϯετʔϧཁ݅Λڭ͍͑ͯͩ͘͞ Dev StudioΛΠϯετʔϧ͢Δલʹɺίϯϐϡʔλʔʹ࣍ͷΞΠςϜ͕Πϯετʔϧ͞Ε͍ͯΔ͔ɺར༻Ͱ͖Δ͜ͱΛ֬ೝ͍ͯͩ͘͠͞ɻ • Drupal 8 or greater based website • Git • Composer • PHP 7.2 or greater • Lando or Drupal VM • Drush version 9 • (Optional) Acquia BLT version 10 (required if using Drupal VM)