Quick tip: Review the prerequisites before you run the lab
Use an Incognito or private browser window to run this lab. This prevents any conflicts between your personal account and the student account, which may cause extra charges incurred to your personal account.
Services to deploy:
descriptor: [/home/gcpstaging8140_student/helloworld/app.yaml]
source: [/home/gcpstaging8140_student/helloworld]
target project: [qwiklabs-gcp-e6160e374e92ffbf]
target service: [default]
target version: [20171117t091157]
target url: [https://qwiklabs-gcp-e6160e374e92ffbf.appspot.com]
Do you want to continue (Y/n)?
サービスのデプロイを確認するメッセージが表示されたら、「Y」を入力します。
出力例:
Beginning deployment of service [default]...
Some files were skipped. Pass `--verbosity=info` to see which ones.
You may also view the gcloud log file, found at
[/tmp/tmp.YZRoP4bCoj/logs/2017.11.17/09.08.37.201396.log].
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 5 files to Google Cloud Storage ═╣
╚════════════════════════════════════════════════════════════════════════╝
File upload done.
Updating service [default]...done.
Updating service [default]...Waiting for operation [apps/qwiklabs-gcp-e6160e374e92ffbf/operat
ions/bf540c31-338f-4532-bcdc
-e47768040d0c] to complete...done.
Updating service [default]...done.
Deployed service [default] to [https://qwiklabs-gcp-e6160e374e92ffbf.appspot.com]
You can stream logs from the command line by running:
$ gcloud app logs tail -s default
To view your application in the web browser run:
$ gcloud app browse
タスク 4. アプリケーションを表示する
次のコマンドを入力し、ブラウザを起動します。
gcloud app browse
サンプル出力です。実際のリンクは異なります。
Did not detect your browser. Go to this link to view your app:
https://qwiklabs-gcp-e6160e374e92ffbf.appspot.com
リンクをクリックして、アプリケーションを表示します。
アプリケーションがデプロイされ、ブラウザで短いメッセージを読むことができます。
[進行状況を確認] をクリックして、目標に沿って進行していることを確認します。
アプリをデプロイする
タスク 5. コードに変更を加える
次に、サンプルアプリに変更を加えます。
nano エディタを使ってファイル index.php を開きます。
nano index.php
「hello world!」を「goodbye world!」に書き換えます。
CTRL + X > Y > Enter の順にキーを押します。
Cloud Shell で次のコマンドを実行して、アプリケーションを再デプロイします。
gcloud app deploy
サービスのデプロイを確認するメッセージが表示されたら、「Y」を入力します。
すぐに次の出力が表示されます。
To view your application in the web browser run:
$ gcloud app browse
ブラウザタブを更新して App Engine のデプロイを反映させます。次の結果が表示されます。
タスク 6. 理解度テスト
クイズに挑戦して Google Cloud Platform に関するご自分の知識をチェックしましょう。
Labs create a Google Cloud project and resources for a fixed time
Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
On the top left of your screen, click Start lab to begin
Use private browsing
Copy the provided Username and Password for the lab
Click Open console in private mode
Sign in to the Console
Sign in using your lab credentials. Using other credentials might cause errors or incur charges.
Accept the terms, and skip the recovery resource page
Don't click End lab unless you've finished the lab or want to restart it, as it will clear your work and remove the project
このコンテンツは現在ご利用いただけません
利用可能になりましたら、メールでお知らせいたします
ありがとうございます。
利用可能になりましたら、メールでご連絡いたします
One lab at a time
Confirm to end all existing labs and start this one
Use private browsing to run the lab
Use an Incognito or private browser window to run this lab. This
prevents any conflicts between your personal account and the Student
account, which may cause extra charges incurred to your personal account.