cross-project | App deployment for CNCF CI Project | Continous Integration library
kandi X-RAY | cross-project Summary
kandi X-RAY | cross-project Summary
App deployment for CNCF CI Project
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of cross-project
cross-project Key Features
cross-project Examples and Code Snippets
Community Discussions
Trending Discussions on cross-project
QUESTION
We are running 2 separate Google Cloud Projects, Project A and Project B.
Project A is currently running an App Engine (AE) based API.
The API on project A needs to access the Firebase features on project B.
✅ I have setup cross projects access between the two projects using IAM and most functions are working fine.
App Engine on project A is able to access the Firebase real time db (RTDB) and Firebase Auth functions on Project B.
But we are unable to connect to Firebase Cloud Messaging on Project B
As far as I can see tracing through the Firebase admin SDK calls, we are able to obtain access tokens, and they're all valid as we can use some of the services (i.e. RTDB, Auth)
However, when we try using Firebase Cloud messaging we receive the following error: An error occurred when trying to authenticate to the FCM servers. Make sure the credential used to authenticate this SDK has the proper permissions.
Which seems to originate from a 401 unauthorized response to this service https://iid.googleapis.com/iid/v1:batchAdd
It doesn't seem to matter what amount of Roles on Project B I throw at the Project A service account.
If I use a separate Firebase service account that originated from Project B and use that json file as a credential then the issue go away, but I don't want to distribute credential files around, and everything else work fine without, except FCM.
FWIW this is how i initialise the firebase admin sdk
...ANSWER
Answered 2021-Jun-08 at 04:53So in the case of Real time database, you only need to give Firebase Realtime Database Admin role to the Project A's App Engine service account on Project B.
In Firebase Cloud Messaging you can give Firebase Cloud Messaging Admin role on Project B AND the cloudmessaging.messages.create
permission to the service account on Project A.
This will go around the initial 401 unauthorised response from messaging calls.
However, this will still result in an error, this time NOT FOUND, which indicates that the subscription token was not found.
It seems that calls to FCM don't use the projectId
setting in firebase admin initialisation and always execute against the project the service account was created in (Project A in this case).
I haven't been able to find a way for FCM calls to executed in the specified projectId
scope from another project.
QUESTION
I'm trying to connect my firebase cloud functions project to a third party pub/sub (a separate project). According to this thread this is not possible, so there's no traditional way to make this work. However, I've tried to manually subscribe to certain topics using the @google-cloud/pubsub
client on my firebase cloud functions. I need to react to pub/sub messages and write/update certain documents.
Example (minimal):
I have a pubsub subscription on sub.ts:
...ANSWER
Answered 2020-Nov-16 at 01:05What you're trying to do here (subscribe to a pubsub topic from code running in Cloud Functions) won't work for two reasons:
- Cloud Functions server instances scale up and down automatically. There could be 0 instances or 1000 instances concurrently running your triggers, depending on the current load.
- Cloud Functions shuts down running code when the function has terminated, and there is a maximum timeout of 9 minutes for any function invocation.
So, even if you manage to subscribe to a topic, that subscription doesn't have a guaranteed duration. It will eventually be destroyed, and you will lose messages.
If you want to handle messages using Cloud Functions in "project A", but the messages come from "project B", you should consider sending them from A to B, perhaps by using pubsub function in B that does nothing other that publish each message to a topic in A. You can then write another function to handle them in A.
QUESTION
I am new to GCP. My Use case involves reading(PULL) the data from multiple pub-sub subscriptions present in multiple different projects say (A, B, C) to another project say D. I read the documentation for access control in pub-sub. Following that, I tried binding service accounts of project A, B, C (which has publisher/subscriber role) to the topic that is present on project D. After this I tried to pull messages from a subscription present in project A, using "gcloud" command from project D ("gcloud pubsub subscriptions pull [SUBSCRIPTION_NAME_IN_PROJECT_A"), and I am still not able to fetch the result and getting an error as "NOT_FOUND: Resource not found".
Can somebody please help me as how to achieve cross-project communication in pub-sub.
...ANSWER
Answered 2020-Jul-15 at 07:41You need to specify the project with the flag --project
. If you do not then it looks for the subscription in the same project you are running the command. More details here
QUESTION
Gitlab's cross-project-pipeline allows me to specify a branch to run a pipeline for. I didn't find any such option to do the same with a tag?
Since my cross-project-pipeline is also being run deliberately, is it also possible to run all manual jobs in a downstream pipeline?
...ANSWER
Answered 2020-Jul-08 at 16:18This should be possible with Triggering pipelines through the API.
You just need to add the following to your CI script:
QUESTION
I am trying to access Google Cloud Storage using the AWS Java SDK. My particular scenario is that I would like to use a service account in a project "A" to list buckets in a project "B". The guide from Google doesn't cover this type of cross-project access with a service account.
I tried setting x-goog-project-id
header explicitly:
ANSWER
Answered 2020-Mar-19 at 09:02Based on the info in this thread, you have to add the service account created in project A to the the IAM page in project B. Then add the corresponding roles.
QUESTION
It seems like to be best practice (or at least one common way) to create a Django 3 based fullstack project which uses project specific Django apps (instead of standalone Django apps) with a structure like this (refer to e.g. here):
...ANSWER
Answered 2020-Jan-24 at 12:04It is possible that there will be some code in __init__.py
which is trying to access DB even before the app is registered and ready. so if you have any code in __init__.py
comment it or make sure it will access database once the app is ready.
QUESTION
I am using Gradle's eclipse plugin. For cross-project reference reasons, I need Eclipse's output directory to not be the default bin
, rather ecbuild
.
Everytime I run ./gradlew eclipse
, it overwrites this output directory setting.
How to make sure it doesn't, or how to set it within gradle build script ?
...ANSWER
Answered 2017-Jun-06 at 16:20Add this to the build.gradle
script:
QUESTION
I am new to GCP, I have done some research to understand how a service in Project A can access a resource in Project B. I have an GAE in Project A that needs to publish on Pub/Sub Topic in Project B. I have found this Cross project management using service account but I am not sure if it does the same thing. Please advice.
...ANSWER
Answered 2019-Nov-02 at 11:31The section "Sample use case: cross-project communication" describes the exact scenario https://cloud.google.com/pubsub/docs/access-control
But most importantly the IAM role defined should be restrictive/appropriate to Project B's resource access
QUESTION
Sphinx is great at linking to specific Python objects.
For example, writing
...ANSWER
Answered 2019-Oct-24 at 05:27No one replied so I made my own: https://github.com/ColinKennedy/sphinx-code-include
QUESTION
I just figured this out, so I'm sharing.
I have a gradle project (mama), and several sub-projects ("akira", "chris" , "maria", and "bo" ). If the current directory is mama, everything behaves as expected, and as documented in The gradle user guide.
...ANSWER
Answered 2019-Sep-08 at 17:09This issue is caused by sub-projects having a "settings.gradle" file in the sub-project's directory. If this file exists in the current directory, gradle configures it as a root project.
To fix the problem, move any contents of each sub-project's "settings.gradle" file into where-ever else is appropriate, and delete the file. Sub-projects do not need to define rootProject, nor include anything.
This behavior is described in the user-guide here.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install cross-project
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page