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

Google Cloud Runを試してみた

Google Cloud Runを試してみた

Google Cloud Runを試してみた

Takayuki

May 07, 2019
Tweet

More Decks by Takayuki

Other Decks in Programming

Transcript

  1. Copyright Re:Build.inc All Rights Reserved. 1.ձࣾ঺հ ◆ձ໊ࣾ גࣜձࣾRe:Build ◆ॅॴ ԭೄݝԭೄࢢதԝ̍ஸ໨̍̒−̕

    ◆ࣄۀ಺༰ ɾࣗࣾWEBαʔϏεͷاըɾ։ൃɻ ɾडୗ։ൃ ◆ࣾһ 5໊ ◆ΤϯδχΞͷಇ͖ํ ϦϞʔτϫʔΫՄೳͳࣗ༝ͳಇ͖ํΛਪ঑ͯ͠·͢ʂ
  2. 7 Cloud Runͱ͸ Google Cloud Next 2019 in San Francisco

    ʢ2019೥ 4݄9~11೔ʣͰൃද Kubernetes ্ͰαʔόʔϨε؀ڥΛ࣮ݱ͢Δ Knative Λϕʔεʹͨ͠ɺ৽͍͠αʔόʔϨεͷαʔϏε
  3. 11 ࣄલ४උ - GCPͷ؅ཧը໘ͰϓϩδΣΫτΛ࡞੒͢Δ - ϓϩδΣΫτͷࢧ෷͍Λ༗ޮʹ͢Δ - Cloud Run APIΛ༗ޮʹ͢Δ

    - CloudSDKͷΠϯετʔϧࡁΈ/ઃఆࡁΈͰ͋Δ͜ͱ - componentsͷupdateͱɺbeta componentsͷinstall Λ࣮ߦ
  4. 1 9 ϏϧυͱσϓϩΠ ᶅGoϑΝΠϧΛ࡞੒ ᶆDockerϑΝΠϧͷ࡞੒ ᶇίϯςφΛBuild͠ɺGCRʹupload͢Δ DockerfileΛ഑ஔͨ͠σΟϨΫτϦͰҎԼͷίϚϯυΛ࣮ߦ͠ɺίϯςφΛBuild͠·͢ɻ $ gcloud builds

    submit --project ${PROJECT_ID} --tag gcr.io/${PROJECT_ID}/helloworld ੒ޭ͢ΔͱGCRʹupload͞Ε·͢ ᶈCloud RunʹσϓϩΠ͠·͢ $ gcloud beta run deploy --project ${PROJECT_ID} --image gcr.io/${PROJECT_ID}/ helloworld
  5. 2 3 ࢀߟจݙ h t t p s : /

    / m e d i u m . c o m / g o o g l e - c l o u d - j p / c l o u d - r u n - %E3%82%92%E6%9C%80%E9%80%9F%E3%81%A7%E8%A7%A6 %E3%81%A3%E3%81%A6%E3%81%BF%E3%82%8B-6e42021307d4