I want to use Firebase Auth UI with a Google AppEngine app written in Go. I installed Firebase and used the Firebase console to add my app. It appears that Firebase took control of the local dev. datastore file (something keeps making the directory it's in read only so Python can't open it when I issue a new data_path instruction).
If I delete the Firebase app, a warning message indicates: "You lose access to your entire project, including your project's apps"
Does this mean that the resources of my original GAE Go app will be deleted too?
For now I just want to restore my Golang datastore connectivity in my development environment - is it safe to delete this Firebase project? Should I remove the Firebase tools ?
thanks!
Related
I am deploying a Telegram BOT using Python Telegram Bot library on Google App Engine flexible environment and have enabled bot and conversation persistence on this.
The challenge I am facing is, if I update the app and deploy again the conversation has to be restarted since I am unable to copy the persistence file from the previous version of the app.
How do I ensure that the same persistence files are used whenever I deploy a new version of the APP?
Any help is appreciated.
Thank you
If you are writing to the /tmp directory or storing that file inside App Engine's file system, that is expected to happen.
The docs for the standard environment explain this as well, and when you're doing a new deploy the instance you were using gets deleted and then you lose your persistence file with the logs of the chat.
You should consider moving the file to Cloud Storage or using any other storage system to save the changes and upload/downlaod the file on a regular basis in order to avoid that.
In my previous App Engine projects I used the Cloud Datastore, and during development I could debug my app on the local server and it would use a local database, stored in a file I could wipe out if I wanted to start from scratch.
With Cloud Firestore, even when I'm running locally it's talking to my real cloud database. Is there still a local option? Note that I'm not talking about client-side persistence, I'm talking about a mock development DB.
Google recommends setting up multiple projects if you want dev/staging/production, and I'm guessing that's the answer, but I'd like to know before adjusting my workflow.
I think (now only a few months later) that this is supported. When I run my app, using dev_appserver.py, I see a message
INFO 2019-02-14 00:08:56,030 admin_server.py:150] Starting admin server at: http://localhost:8000
Going to that URL shows me all the instances I have been seeing. These seem to persist even when the dev_appserver is restarted. Reading this and other posts I was convinced that my development was using my actual cloud database, but going to https://console.firebase.google.com/project/myproject was showing completely different content.
Just to be sure (because google is google and everything is named the same) I'm using an appengine app and a gcloud project, storing things to Firestore using ndb.Models...
Oh, but careful. My app I was also using the cloudstorage (blobstore?) and even though the localhost:8000 showed these, THESE WERE THE REMOTE INSTANCES.
There is a local emulator for Firestore when using the Firebase CLI:
https://firebase.google.com/docs/rules/emulator-setup
I am getting very confused with the whole cloud console api console thing.
I just created a new Cloud Console project in order to setup some GCE instances. It seems to have auto-created an App Engine app. That is fine, but when I go to enable billing, it tells me that it cannot enable billing for app engine apps and that I need to do that in App Engine Console.
Earlier this week, I tried to setup a project to include both an existing App Engine app and Compute Engine. I was asked to got through the request access process like before GCE was available.
I created a project in the Cloud Console by starting in the App Engine console and choosing Cloud Integration. I said there was an error creating the project, but it seems like it created it. However, when I go to that project in Cloud Console, there is no option to even add Compute Engine.
Two questions:
(1) Is there something outlining the differences between Cloud Console and API Console and when it is most appropriate to use one over the other?
(2) How do I get a project (in either one I suppose) that includes an existing App Engine app and Compute Engine resources that I want to create in this project?
Thanks for your help.
-- Jay
Cloud Console is essentially a planned replacement for the API console,
however it may not have all functionality yet
Try going to appengine admin console application settings, and at the bottom of
the page cloud integration. Click on create project. Once it succeeds go to the cloud
console and enable billing for Compute Engine
When I create a new Application from App Engine Console https://appengine.google.com/,
the application also appears on Cloud Console https://cloud.google.com/console#c=l
However, clicking into the project shows that only these features are included:
App Engine
BigQuery
Cloud Datastore
Compared with Project created directly from Cloud Console:
App Engine
Compute Engine
Cloud Storage
BigQuery
APIs
Cloud Datastore
Cloud SQL
That leads to problem that App Engine project is missing access to many features and there seems no obvious way to add them back later.
Any idea what's wrong here?
1,This only implies that when you create an application from app engine console, it directly creates 3 types of projects: app engine app, datastore instance and big query(i think you need to enable the api first) with the same project id. This does not mean you cannot use the other features. It only means you need to separately enable them and give project ids.
2, If you create a project from cloud console, then it will automatically create projects under all the 7 different categories with the same project ID
Finally I found how to do this:
Go to https://appengine.google.com/
Open your app
Open Administration / Application Settings
Click the button in the "Cloud Integration" section
While I've been busy finishing my Google App Engine solution during the last several months, I now find Google has me painted me into a corner due to changes and differences between the local dev_server and appspot.
The scenario: My app is deployed on appspot with Federated OpenID authentication.
The problem: Google does not support data uploads while apps are configured to use OpenID. (They are aware of this problem and do not consider it a bug.)
Several years ago Nick Johnson posted a remote_api and OpenID workaround on his blog, but several people report it no longer works.
In addition, the latest (2nd) edition of Dan Sanderson's book "Programming Google App Engine" no longer contains a chapter on data uploads. There is a chapter on Backup and Restore, but I can not restore data until I back it up, and I can not back it up until the data exists!
I can not believe I'm the only one in this predicament -- it seems it should be a very common need -- I simply need to upload data while my app uses OpenID.
Keep in mind that everything about my local dev_server Python app works great (appcfg.py, upload_data, remote_api, CSV yaml configs, etc.), but this problem on appspot prevents me from releasing my app!
Does anyone have a simple, up-to-date, and documented recipe to upload thousands of records to app engine? Custom upload handler endpoint? Bundle the data file(s) with new app verions, then read them somehow? Post CSV files to Google Drive and read them from a task queue?
Any ideas?
You can try this as a work around:
Create a new application with "normal" Google account authentication.
Upload the data into that application.
Backup the data into Google Cloud Storage.
Restore the date from Google Cloud Storage into the original application.
As of SDK 1.7.3 google says you can change the authentication method http://code.google.com/p/googleappengine/wiki/SdkReleaseNotes . You could always revert to "google accounts api" whilst doing you initial data load via remote api, then set auth back to Federated Login once your done.