Final Practical No 02 2022
Final Practical No 02 2022
PRACTICAL NO : 02
Title : Assignment to install and configure Google App Engine
1. Create a Google Cloud Platform project, if you don't have one already.
system: python -V
Note: As of Cloud SDK version 206.0.0, the gcloud CLI has experimental support for
running using a Python 3.4+ interpreter (run gcloud topic startup for exclusions and more
information on configuring your Python interpreter). All other Cloud SDK tools still
requirea Python 2.7 interpreter.
3. Download the archive file best suited to your operating system. Most machines will
run the 64-bit package. If you'd like to check, run uname -m to verify if you're running a
64-bit system.
Linux
For 64-bit
google-cloud-sdk-
25.6 b1c87fc9451598a76cf66978dd8aa06482bfced639b56cf31559dc2c7f8b7b90
229.0.0-linux-
MB
For 32-bit
google-cloud-sdk-
25.2 ee8c45f8018d0fee92b07c32cc6d8c891241da0b88bfe289d4e58e6746c3f668
229.0.0-linux-
MB
(x86) x86.tar.gz
Alternatively, to download the Linux 64-bit archive file from your command-line, run:
curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-
sdk- 229.0.0-linux-x86_64.tar.gz
curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-
sdk- 229.0.0-linux-x86.tar.gz
4. Extract the archive to any location on your file system; preferably, your Home folder. On
Linux, you can extract the archive file by running this command:
5. If you're having trouble getting the gcloud command to work, ensure your $PATH is
defined appropriately. Use the install script to add Cloud SDK tools to your path. You
will also be able to opt-in to command-completion for your bash shell and usage
statistics collection during the installation process. Run the script using this command:
./google-cloud-sdk/install.sh
Alternatively, you can call Cloud SDK after extracting the downloaded archive by
invoking its executables via the full path.
Use the gcloud init command to perform several common SDK setup tasks. These include
authorizing the SDK tools to access Google Cloud Platform using your user account credentials
and setting up the default SDK configuration.
Note: To prevent the command from launching a web browser, use gcloud init --
console- only instead. To authorize without a web browser and non-interactively, create a
service account with the appropriate scopes using the Google Cloud Platform Console
and use gcloud auth activate-service-account with the corresponding JSON key file.
To continue, you must log in. Would you like to log in (Y/n)? Y
3. In your browser, log in to your Google user account when prompted and click Allow to
grant permission to access Google Cloud Platform resources.
4. At the command prompt, select a Cloud Platform project from the list of those where
you have Owner, Editor or Viewer permissions:
If you only have one project, gcloud init selects it for you.
5. If you have the Google Compute Engine API enabled, gcloud init allows you to
choose adefault Compute Engine zone:
gcloud init confirms that you have complete the setup steps successfully:gcloud
Run these gcloud commands to view information about your SDK installation:
Credentialed
Accounts ACTIVE
ACCO
UNT
* example-user-
[email protected] example-
[email protected]
[core]
account = example-user-
[email protected]
disable_usage_reporting = False
project = example-project
3. To view information about your Cloud SDK installation and the active SDK
gcloud displays a summary of information about your Cloud SDK installation. This
includes information about your system, the installed SDK components, the active user
account and current project, and the properties in the active SDK configuration.
4. To view information about gcloud commands and other topics from the command
For example, to view the help for gcloud compute instances create:
gcloud displays a help topic that contains a description of the command, a list of
commandflags and arguments, and examples of how to use it.
3. dev_appserver.py app.yaml
It will run and give you the url of default and admin. If you go to the link of default
you see the text hello world like this.
Output :
OR
MET’s BKC Institute of Engineering, Nashik Prepared by : Prof. Anand Gharu
Laboratory Practice-II(Cloud Computing) TE Computer Engineering
1. Make sure you have python installed in your ubuntu system. run
the command “python -V” and most probably you will get
“Python 2.7.6” or above.
7. Choose the account you want to use for google app engine.
8. Choose the project with numeric choice (don’t use textual, you
might make mistake). If you do not already have a google app
engine project create a app engine project by following this
link. https://console.cloud.google.com/start
clone https://github.com/GoogleCloudPlatform/python-docs-
samples”.
This is how you run the python app in your local server. But
what we have to do is hosting the app in google app engine. To
do so Now let’s follow the following instructions.
3. Select the project you want to deploy the app , press Y and enter
to continue. after that you will get the console output “Deployed
service[default] to [Your web url for appengine] ”
4. If you copy and paste the url, you will see the hello world in the
browser too.