Google Appengine Deployment with SSH keys - google-app-engine

I'm trying to find a way to use SSH Keys instead of OAuth authentication for Google AppEngine Deployment, but as of now couldn't find a way yet.
Just to explain a bit more, I use appcfg.py update PROJECT to deploy on Appengine with OAuth that was set on the first run. However I want to switch it to use SSH keys, preferably Hardware SSH keys e.g Yubikeys.

SSH is not involved in deploying to App Engine, so SSH keys will be of no use.

Related

How to manually manage keys in Memorystore Redis in GAE?

I have setup a Memorystore Redis with my Nodejs in Google App Engine. I wonder though how would I access my redis instance so I can manually manage(like del) keys?
There is this doc accessing from Compute Engine but what about from GAE?
There is a similar tutorial on how to connect your App Engine to Cloud Memorystore that you could find here.
Basically the steps consist in setting up Serverless VPC Access and afterwards using the standard nodejs Redis library to interact with your Memorystore instance. Apart from this there are no more Cloud specific steps to follow, just write your code and have fun.
Separately, as filip26 pointed out you also have the Google Cloud Memorystore library, this is meant to manage Memorystore instances and configurations as you would do through the Cloud SDK or the Console. However they don'tserve to interact with the database in the sense of adding or deleting entries.
As a side note be aware that some Redis commands available in on-premises Redis servers are not allowed in Memorystore, you could find more about these limitations here.

Steps to setup angular app in Google Cloud App Engine and Go Daddy

I want to deploy an angular app is n Google Cloud Platform App Engine, and link to my domain in Go Daddy.
I have done the domain verification in Google, and able to do npm start in cloud shell and web preview it, however need help with below:
1. How to persist the deployment even if I close the shell? Adding & to make it a background process enough?
2. What should be the values in Go Daddy DNS configurations
3. If I deploy on another port, such as 4200, how to forward http, https, and www to that port?
Any help us much appreciated, thanks in advance.
When you do npm start in the Cloud Shell to web preview it you’re only running the app “locally” in Cloud Shell, you’re not actually deploying it to App Engine. To deploy your app you should use the gcloud app deploy command.
The general steps on how to deploy the app in App Engine are documented here
Regarding the DNS values to map your custom domain please follow the steps 4, 5 and 6 in this documentation
In order to understand how Port forwarding works in App Engine I recommend checking this document.
If you are interested there's also a codelab where you can go through all the steps on deploying an Angular app to App Engine.

Can I build a golang command-line tool that talks to a localhost appengine datastore?

I have a standard appengine + datastore app (not flex) built in golang using these APIs:
google.golang.org/appengine
google.golang.org/appengine/datastore
I'm trying to write a command-line tool in golang to do various batch things with the datastore, such as migrating data, running consistency checks and so forth. The cli tool uses this API:
cloud.google.com/go/datastore
I can get the cli tool to talk to my hosted appengine datastore, but I can't figure out how to get it to talk to the localhost dev_appserver.py datastore. The 1st call to datastore datastoreClient.GetAll(ctx, q, nil) always hangs.
I read some of the API code, and it looks like I need to set DATASTORE_EMULATOR_HOST to point to http://localhost:some_port, but I can't get this to work w/ any of the 3 servers that are started up by dev_appserver.py (ports 8000, 8080, 53536).
Am I on the right track? I've read a lot of posts & help, but they're either too old, or talk about appengine flex and so forth.
Thanks.
You could always use the standalone Datastore emulator.
Install it:
gcloud components install cloud-datastore-emulator
Start the emulator (do this in a background shell, the command runs in the foreground):
gcloud beta emulators datastore start
And then setup the environment for your application by running:
$(gcloud beta emulators datastore env-init)
Then run your app, and it should pick up and connect to the Datastore emulator automatically.

Google Cloud Platform - Compute Engine/App Engine - SSL/HTTPS

goal: make my google cloud app ssl
used a prebuilt solution to launch an instance on google's compute engine. i need to upload ssl cert to accept credit cards & more or less do anything. i cannot find a ui or any way to ssl my app/domain with compute engine.
google's app engine has a ui to upload certs but no way to launch prebuilt solutions or transfer apps from compute engine.
also, of course, the domain is registered using google domains and the app is registered to google cloud platform under same account.
thanks -- matt
You can setup an HTTPS Load Balancer in front of your GCE instances and install an SSL certificate and key there.
https://cloud.google.com/compute/docs/load-balancing/http/
A solution which is built for Google Compute Engine likely won't work as-is on Google App Engine (App Etfite expects that you supply code written as a set of HTTP request handlers, but does not support background tasks, running your own database, etc). Since you're already fairly happy with the pre-built solution you installed, it probably makes more sense to customize that rather than replace your solution with one running on App Engine.
You have two options for getting SSL running:
You could use Layer 3 load-balancing, and install and configure the SSL certificates on your server hosts. For example, you could get a certificate from Let's Encrypt, and use their tool to install the cert if you're running nginx or apache. For other software, you'd need to install the cert manually. This is probably the most portable (to other clouds/local machine) solution, but requires that you secure your SSL certs and maintain that software.
You could create a SslCertificate resource and attach it a Layer-7 load balancer provided by Compute Engine (TargetHttpsProxy). To do this, you would set up HTTP load balancing after uploading your public and private certificate to Google. This solution can take advantage of Google's caching and scaling infrastructure and can support health checks to verify that your application is up, but the details will vary more across different service providers.

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