Trying to open the Google App Engine Shell with MobaXterm - google-app-engine

I have a configuration running via Google App Engine. Google gives me the option on the website to open a cloud shell.
How can I open that shell on MobaXterm? There is no IP address or ssh that I can find on google.
Thanks

You can use gcloud cloud-shell ssh.
You can open a local terminal in MobaXterm and execute that command. Keep in mind you should have authenticated before using gcloud init or the way you may want to authenticate. You can check this article for more info about this approach and here's the details about the command.

Related

Is there a way to upload a image to a file in a already deployed app from app engine?

So I have to separate apps hosted at google cloud and I would like to know if it's possible from the app1 to send a file to a specific folder in app2. I tried to ssh into an instance but I can find anything.I'm new to google cloud so if anyone knows anything please let me know.
You can use gcloud app instances scp command. For more information about the command and how to use it, please see the link below:
[https://cloud.google.com/sdk/gcloud/reference/app/instances/scp][1]

Google App Engine CLI - list project directory

Is there a way to print the contents of my project directory using the google app engine cloud shell?
In my local terminal that would look like typing 'ls'
What command would I use in the shell?
The cloud shell is fundamentally just a shell running on a generic virtual machine in the cloud.
That machine does NOT have any special attributes (compared to your local machine) except maybe that it comes with some tools (like the google cloud SDK) already installed. It has no implicit knowledge about or access to your cloud products/projects themselves.
So, by default, the cloud shell doesn't know which/where your GAE project is. You'd have to pull a copy of your project repository/code on that instance and, when in that project's directory, you could list the project's content using ls, just like on your local machine. See also the somehow related Google Cloud: How to deploy mirrored Repository
The machine on which the cloud shell runs is also unrelated to the instances on which GAE apps are running, so you can't directly list on it the directory content of the actually deployed GAE project. If that's what you're after see Where are appengine projects located normally in the file system of the server via ssh?

Google Cloud Shell unable to display files present in Google Storage

Image1 available clearly shows that the bucket contains a folder namely cloudml-samples-master and a file namely setup.py
However on entering the command ls in Google Cloud Shell, it is giving no output. I am stuck at this problem and I have tried almost everything but I am unable to find the reason behind this.
Also when I am trying to access these files through my API, I get an error displaying that these files could not be found.
Both the files present in the directory were uploaded using WebUI.
To add my opinion, what I understood till now is that the files being uploaded using WebUI and those uploaded using command line are acting independently. Because I have seen that the files which I am uploading using command line are not showing in UI. Is there some error from my side or is it an issue related with Cloud Google Storage?
As you can see below from https://cloud.google.com/shell/docs/features, Google Cloud Shell is not connected directly with Google Cloud Storage. It gives you possibility to connect with that storage eg. via gsutil
When you start Cloud Shell, it provisions a g1-small Google Compute
Engine virtual machine running a Debian-based Linux operating system.
Cloud Shell instances are provisioned on a per-user, per-session
basis.
Also:
Cloud Shell provides the following:
A temporary Compute Engine virtual machine instance Command-line
access to the instance from a web browser Built-in code editor BETA
5 GB of persistent disk storage Pre-installed Google Cloud SDK and other tools Language support for Java, Go, Python, Node.js, PHP, Ruby
and .NET Web preview functionality Built-in authorization for access
to GCP Console projects and resources

Application Default Credentials not working locally with App Engine

Having a tough time getting the Default Application Credentials to load in the dataflow SDK when running locally in a java app engine project developing on OS X. Runs fine when deployed.
According to this the dev app server doesn't support them, and you're meant to use the gcloud command line tool's command: gcloud preview app run - but according to the official Google Group for the SDK here that command was deprecated in Jan 2016.
So I seem to be stuck between a rock and a hard place... Does anyone know how to get the Application Default Credentials to work locally with an App Engine app?
I'm trying to use the Dataflow API and it just throws up when it starts making use of the cloud storage api which is the first thing the Pipeline does because it can't seem to load the correct credentials from the environment variables ( that are definitely set on the ENV and in the appengine-web.xml <env-variables> element ) or from the ~/.config/cloud/default_application_credentials.json file.
Cheers!
Can you try running the following command and see if it solves it?
gcloud auth application-default login
This is fully supported (but poorly documented) within the dev appserver. There is a very well answered question that gives you step by step instructions here: Unable to access BigQuery from local App Engine development server

Google App Engine Launcher delete datastore

I am developing a web application using Google AppEngine (GAE).
I have make some examples using dataStore (free, non-relational) using Google AppEngine Launcher (GAEL). All is correct. However I'd like delete the datastore before to deploy an application.
I have read that I have to use the command
--clear_datastore
I don't know like running the server to delete the data store when I deploy or re-deploy the application.
I have chech some ways, for example I have write in the Application Settings(Edit==>Application Settings) in the GAEL some commands:
--clear_datastore
--clear_datastore /<ApplicationName>
--clear_datastore <ApplicationName>/
--clear_datastore <ApplicationName>
any idea?
Thank you.
Jose
The clear_datastore flag is only used to clear the development datastore which is running on your local machine with the dev_appserver. If you want to clear this development datastore, then when you run the dev appserver you can use the flags:
dev_appserver.sh --clear_datastore=yes <ApplicationName>
An important thing to note is that this only clears the development datastore. The development datastore does not get uploaded when you deploy the application. So you shouldn't be worried about clearing the local datastore before deploying the application.
If you want to delete entities that are already in your production server (running on App Engine), then you cannot do this from the command line using dev_appserver.sh. You can do this using the Datastore Admin tool in the AppEngine console. You can follow the instructions here to bulk delete data. An important note is that you have to enable the Datastore Admin tool first by following these instructions.

Resources