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

Acquia CLIを使ってみよう

Acquia CLIを使ってみよう

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

Other Decks in Programming

Transcript

  1. Acquia CLIͰͰ͖Δ͜ͱ – ΞΫΠΞ؀ڥʹର͢ΔDrushίϚϯυͷ࣮ߦ – ΞΫΠΞ؀ڥ΁ͷSSHΞΫηε – ΞΫΠΞ؀ڥͷϩάӾཡ – Acquia

    Cloud IDEͷ؅ཧ – Cloud Platform APIͷΞΫηε – Site Factory APIͷΞΫηε – etc…
  2. Acquia CLIͱྨࣅ͢Δπʔϧ ͍͔ͭ͘ͷπʔϧ͸Acquia CLIͷػೳΛิ׬ or ෳ੡͠·͢ɻAcquia CLI͸͜ΕΒͷπʔϧͷ͍ͣΕͱ΋҆શʹ࢖ ༻Ͱ͖·͕͢ɺҰ෦ͷػೳ͕ॏෳ͍ͯ͠Δ৔߹͕͋Γ·͢ɻ – Acquia

    BLTɿDrupalΞϓϦέʔγϣϯͷηοτΞοϓ؅ཧͷͨΊͷࣗಈԽϑϨʔϜϫʔΫΛఏڙ͠·͢ɻ DrupalΞϓϦέʔγϣϯ͝ͱʹAcquia BLTΛΠϯετʔϧͯ͠࢖༻͠·͕͢ɺAcquia CLI͸άϩʔόϧʹΠ ϯετʔϧͯ͠࢖༻͠·͢ɻAcquia CLI͸ɺAcquia BLTͷΑ͏ͳࣗಈԽϑϨʔϜϫʔΫͰ͸͋Γ·ͤΜɻ – Pipeline CLIɿAcquia PipelinesͷδϣϒΛ؅ཧ͢ΔͨΊͷCLIͰ͢ɻ2023೥3݄ݱࡏɺAcquia CLIͰ͸ PipelinesͷδϣϒΛ؅ཧͰ͖·ͤΜɻ – Typhonius Acquia CLIɿCloud APIͷΠϯλʔϑΣʔεͷΈΛఏڙ͠·͢ɻAcquia CLI͸Cloud APIҎ֎ͷΞ ΫΠΞͷαʔϏεʹ΋ΞΫηεͰ͖·͢ɻ – ACSF ToolsɿAcquia Cloud Site Factoryͱର࿩͢ΔͨΊͷDrushίϚϯυΛఏڙ͠·͢ɻҰ෦ͷػೳ͕ Acquia CLIͱॏෳ͍ͯ͠·͕͢ɺελϯυΞϩϯCLIͰ͸ͳ͘DrushίϚϯυͷܗࣜͰఏڙ͞Ε͍ͯ·͢ɻ
  3. Acquia CLIͷΠϯετʔϧ ͜͜Ͱ͸MacOS/LinuxͰͷΠϯετʔϧํ๏Λ͝঺հ͠·͢ɻ 1. CurlίϚϯυͰAcquia CLIΛμ΢ϯϩʔυ͠·͢ɻ˞PHP 7.4؀ڥͷ৔߹͸μ΢ϯϩʔυURL͕ҟͳΓ ·͢ɻυΩϡϝϯτΛࢀߟʹ͍ͯͩ͘͠͞ɻ 
 


    
 2. μ΢ϯϩʔυͨ͠ϑΝΠϧΛ࣮ߦՄೳʹ͠·͢ɻ 
 
 
 3. ϑΝΠϧͷ໊લΛมߋͯ͠άϩʔόϧʹΞΫηεͰ͖Δ৔ॴʹҠಈ͠·͢ɻ 
 
 $ curl -OL https://github.com/acquia/cli/releases/latest/download/acli.phar $ chmod +x acli.phar $ mv acli.phar /usr/local/bin/acli
  4. ίϚϯυҰཡ $ acli list ...লུ... Available commands: completion Dump the

    shell completion script docs Open Acquia product documentation in a web browser help Display help for a command acsf acsf:api List all API commands for the api resource acsf:cron List all API commands for the cron resource acsf:crons List all API commands for the crons resource acsf:domains List all API commands for the domains resource ...লུ... acli listίϚϯυͰɺAcquia CLIͰར༻ՄೳͳίϚϯυҰཡΛऔಘͰ͖·͢ɻ ྫɿશͯͷίϚϯυҰཡΛग़ྗ
  5. ࢀߟ) Acquia CLIΛѻ͏ࡍʹศརͳ֎෦πʔϧ Acquia CLIͷҰ෦ͷίϚϯυʢओʹCloud Platform APIؔ࿈ʣ͸ɺJSONܗࣜͰ৘ใ͕ ग़ྗ͞Ε·͢ɻฦ٫͞ΕͨJSONσʔλΛਓ͕ಡΈ΍͘͢͢Δͷʹ໾ཱͭΦʔϓϯιʔ εͷπʔϧ͕͍͔ͭ͋͘ΔͷͰ঺հ͠·͢ɻ –

    jqɿJSONͷ੔ܗ΍நग़ʹ໾ཱͭίϚϯυϥΠϯͷJSONϓϩηοαπʔϧ – jidɿjqͷΑ͏ͳΫΤϦͰJSONΛର࿩తʹυϦϧμ΢ϯͰ͖Δπʔϧ – jtblɿදͷܗࣜͰJSONσʔλΛग़ྗ͢Δπʔϧ
  6. Acquia CLIͰ։ൃΛՃ଎͢Δ DrupalαΠτͷ։ൃɺσϓϩΠɺσόοάʹ໾ཱͭίϚϯυ͕਺ଟ͋͘Γ·͢ɻ – σόοά – acli remote:aliases:list – acli

    remote:drush – acli api:environments:clear-caches – acli app:log:tail – acli remote:ssh – ϩʔΧϧ؀ڥͰDrupalαΠτΛىಈ – acli new 
 – αΠτΛΞΫΠΞ؀ڥʹσϓϩΠ – acli push:artifact – acli push:files – acli push:database
  7. ·ͱΊ – Acquia CLIͱ͸ɺAcquia Cloud Platformͷૢ࡞ΛίϚϯυϥΠϯ͔Βߦ͑ΔΦʔϓϯ ιʔεͷCLIπʔϧͰ͢ɻΞΫΠΞͷϗεςΟϯά؀ڥʹରͯ͠ͷDrushίϚϯυͷ࣮ߦ ΍SSH઀ଓɺAcquia Cloud IDEͷ؅ཧɺCloud

    Platform APIͷ࣮ߦͳͲ͕ߦ͑·͢ɻ – Acquia CLIͷΠϯετʔϧ͸Windows, MacOS, LinuxɺPHP 7.4ʙͷ؀ڥͰߦ͑·͢ɻCLI ͷೝূͱSSHΩʔͷઃఆ͸࠷ॳʹ΍͓͖ͬͯ·͠ΐ͏ɻ – ίϚϯυҰཡ͸acli listɺ֤ίϚϯυͷ࢖͍ํ͸--helpΦϓγϣϯͰਵ࣌֬ೝͯ͠͝ར༻ ͍ͩ͘͞ɻ – Acquia CLI͸ϦϦʔεස౓͕ૣ͍Ͱ͢ʂacli self-updateͰৗʹ࠷৽όʔδϣϯΛ͝ར༻ ͍ͩ͘͞ɻ
  8. ࢀߟࢿྉ – Acquia CLI υΩϡϝϯτ | Acquia Docs 
 https://docs.acquia.com/acquia-cli/

    
 – Acquia CLI ϦϙδτϦ | GitHub 
 https://github.com/acquia/cli 
 – Harnessing the power of Acquia CLI to accelerate Drupal development on Acquia Cloud Platformʢϒϩάهࣄʣ| Developer portal 
 https://dev.acquia.com/blog/harnessing-power-acquia-cli-accelerate-drupal-development-acquia-cloud-platform 
 – Getting Started with Acquia CLIʢ5෼ղઆಈըʣ| Acquia Academy 
 https://www.acquiaacademy.com/learn/course/550/getting-started-with-acquia-cli? generated_by=16849&hash=0123ef8999a0cc6a29c68c0fcb32f695d324dd94