3

Probably a stupid question.

I'm new to google app engine. So I followed the tutorial and successfully deployed their HelloWorld app, where the final steps are done on the cloud shell.

Then I built my own app in flask on my local machine, tested it (pushed the repo to the project's cloud repo) and deployed it from the command line (gcloud app deploy) and it works fine, anyone can use the app on their browser and I can also see the source code in the console website.

But I don't see any directories when I use the cloud shell. I get the prompt username@project-id:~$ but when I ls, there's just one README file and no other directories, therefore I can't use the devapp_sever.py, gcloud app deploy or any other shell function on this project.

But when I choose the hello world project that was created initially, the shell shows an src directory which contains the app's code and I can use the shell and deploy the app from there.

What's happening here and what am I supposed to do.?

user2559578
  • 143
  • 1
  • 10

1 Answers1

1

Think of your Cloud Shell as just another workstation with local disk similar to your local machine. To deploy code to an app engine app, Google will create a Cloud Source Repository. Having said that, this is not related to your Cloud Shell. You can of course git clone any Git repo into your Cloud Shell.

Dan also wrote a nice explanation here -

https://stackoverflow.com/a/42123320/7947020

Hope this clarifies it!

Community
  • 1
  • 1
alpeware
  • 472
  • 2
  • 8
  • I read the article and my question is still not answered. According to the answer you referenced: " In the web-cached article all the ops are done inside the cloud shell, basically a local repo exists in your cloud shell "homedir". From there it is saved/uploaded to the cloud source repository:" But on my cloud shell I don't see any files. There's only one README file and no other directory. – user2559578 May 07 '17 at 16:32
  • It's only there if you specifically checked it out in your Cloud Shell. As I mentioned, think of it as the equivalent of your workstation under your desk. No repo is magically appearing in your home directory unless you specifically put it there. – alpeware May 07 '17 at 17:57