We have an older application based on the AppEngine SDK (now deprecated) and the superseded Cloud Datastore.
In the process of migrating to Google Cloud SDK we also decided to move from JPA/Datanucleus to Objectify.
Given that the Cloud Datastore will be automatically upgraded to Cloud Firestore in Datastore mode sometime in the future, we decided to test our application as described at the bottom of this page:
https://cloud.google.com/datastore/docs/upgrade-to-firestore#testing_an_existing_application
1) Create a new project. In this project, create a Cloud Firestore in Datastore mode database.
2) Using the managed export service, export some of your application's data to Cloud Storage.
3) Using the managed import service, import your application's data to your new project.
4) Copy app logic you want to test to the new project or simulate app behaviour against the new project.
That's what we did and after some issues we could make a portion of our application run fine with the new datastore in a separate test project.
Now to the actual issue...
We wanted to test if the updated application could also run with the superseded Cloud Datastore, so we won't have to worry when the automatic upgrade occurs (as our app will be already ready).
So we deployed it as a new version of the existing AppEngine project (v2-dot-.....): unfortunately running the new version throws a permission error as soon as the app tries to read the datastore:
com.google.cloud.datastore.DatastoreException: Missing or insufficient permissions
So the questions are:
- could this be related to the Cloud Datastore not being upgraded to Cloud Firestore in Datastore mode for our project yet?
- is there anything we can do (add specific permissions maybe) to make it work anyway?
Our concern is that we need to have the new version of the app deployed before July 2020 (that's when the older AppEngine SDK will stop working), and we are worried that the automatic upgrade of the datastore will occur later.
Thank you for your help.
Turned out our project doesn't have the PROJECT_ID#appspot.gserviceaccount.com member in IAM.
It has a pletora of other members (for example: PROJECT_NUMBER-compute#developer.gserviceaccount.com, PROJECT_NUMBER#cloudservices.gserviceaccount.com, service-PROJECT_NUMBER#compute-system.iam.gserviceaccount.com, etc) which I guess are legacy members used in previous versions of Google App Engine.
Adding PROJECT_ID#appspot.gserviceaccount.com with the role Editor fixed the issue: now the new version can be deployed to the old projects and it works fine even if the datastore has not yet been converted to Cloud Firestore in Datastore Mode.
I just ran into this issue and spent way too much time troubleshooting it. Nine times out of ten if you're running into this issue it's because the default App Engine service account doesn't have permission to edit Cloud Datastore. The default App Engine service account is used by default if you're doing a simple gcloud app deploy and nothing else fancy. I solved the problem by giving the default App Engine service account the roles/datastore.owner role with the following:
gcloud projects add-iam-policy-binding PROJECT_ID \
--member="serviceAccount:PROJECT_ID#appspot.gserviceaccount.com" \
--role="roles/datastore.owner"
Related
I m a new user in the google cloud platform,
I followed the jhipster tutorial to deploy the jhipster web application to Google App Engine.
(https://www.jhipster.tech/gcp/)
I can deploy the original version of jhipser to GCP app engine, but when I deploy again it was not updated to the new version even my local was updated.
Does anyone know how to deploy new version to Google app engine??
I don't know much about jhipster, but if it is a classical java web application on app engine, as stated in the link you provided, you just need to re-deploy again:
./mvnw package appengine:deploy -DskipTests -Pgae,prod-gae
if you want to deploy as a new version, you should check what is the version parameter provided. You can find that in app.yaml, application-web.xml or pom.xml file depending on how the application is built.
If who built the application decided to automatically increment the version each deploy, you should have already everything set, but in App Engine > Version page in GCP you should migrate the traffic to your latest version.
I am trying to create an application in IBM Internet of Things Platform Starter and getting following message:
BXNUI0005E: The 'xxxxxx' app wasn't created because a problem occurred contacting Cloud Foundry.
Try again later. If you see this message again, go to the IBM Cloud status page to check whether a service or component has an issue. If the problem continues, go to IBM Cloud Support.
I've had exactly the same problem. It's usually because you've gone over the limit of app / database instances for your account.
In my case, I was using NodeRed. I created one instance successfully, deleted it, but then couldn't create another. It turned out that the first app had created an empty database instance and the second one was trying to do the same. Deleting the database from my dashboard resolved the problem.
Google Compute Platform
I've got an Angular (2) app and a Node.js middleware (Loopback) running as Services in an App Engine in a project.
For the database, we have a Compute Engine running PostgreSQL in that same project.
What we want
The testing has gone well, and we now want to have a test version (for ongoing upgrade testing/demo/etc) and a release deployment that is more stable for our initial internal clients.
We are going to use a different database in psql for the release version, but could use the same server for our test and deployed apps.
Should we....?
create another GCP project and another gcloud setup on my local box to deploy to that new project for our release deployment,
or is it better to deploy multiple versions of the services to the single project with different prefixes - and how do I do that?
Cost is a big concern for our little nonprofit. :)
My recommendation is the following:
Create two projects, one for each database instance. You can mess around all you want in the test project, and don't have to worry about messing up your prod deployment. You would need to store your database credentials securely somewhere. A possible solution is to use Google Cloud Project Metadata, so your code can stay the same between projects.
When you are ready to deploy to production, I would recommend deploying a new version of your App Engine app in the production project, but not promoting it to the default.
gcloud app deploy --no-promote
This means customers will still go to the old version, but the new version will be deployed so you can make sure everything is working. After that, you can slowly (or quickly) move traffic over to the new version.
At about 8:45 into this video, traffic splitting is demoed:
https://vimeo.com/180426390
Also, I would recommend aggressively shutting down unused App Engine Flexible deployments to save costs. You can read more here.
We are using a MariaDB and a MongoDB (single instance) service in the Swisscom App Cloud.
If i try to create a backup with the backup button, it starts to create one, but fails after a few minutes.
Also, if i try to delete the failed entry, the deletion fails as well.
The interface provides no further information about the reason.
This happens for MariaDB as well as for MongoDB.
What could be a possible reason and how am I able to debug this error? Where can I get further information about the error?
screenshot of Portal:
Simon here from the App Cloud Team.
There was an issue in the backend which we fixed this morning, so your backups should now work again.
Sorry for the inconvenience.
I developed a CF CLI plugin for DB backups (MariaDB) in Cloud Foundry, called "cf-mariadb-backup-plugin", that also works in the Swisscom App Cloud. Check it out here, and give it a star. ;-)
If you use such plugin it presents the error message catch directly from the Cloud Foundry API. This might provide you, at least, better reasons on why such actions are failing.
I have an old GAE application (in production since 2011) that use Cloud Storage service since it is available in beta. I have not touched this apps for almost 1 year now.
I have to do some administrative task and want to create new buckets in Cloud Storage.
I have activated
- the application in Google Cloud Console
- the billing for this application in Google Cloud Console
I see the Google Cloud Storage tab, when I click on it it is empty, and when I try to create a new bucket I see the error message:
The account for the specified project has been disabled.
How can I fix that?
Why I do not see my existing bucket? (created long time ago using the old Web interface)
Thanks!
This can happen when the Cloud Storage service isn't turned on for your project. Do the following:
Visit http://cloud.google.com/console
Select your project
Visit the APIs & Auth tab
Find Google Cloud Storage in the list of services
Turn on Google Cloud Storage
I was facing the same issue .While every API was enabled after deep diving i realized there is some problem relating to my billing.