question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deployment of v0.2.0 on local microk8s : emailservice looking for GCP project ID

See original GitHub issue

Hi there,

After successfully deploying on GKE, now trying to deploy v0.2.0 on a laptop microk8s instance (independent of GKE / GCP)

All services / deployments come up properly except emailservice going to CrashLoopBackOff.

Its logs say:

microk8s kubectl logs emailservice-8848674-kcrm7 

{"timestamp": 1607061532.1000514, "severity": "INFO", "name": "emailservice-server", "message": "starting the email service in dummy mode."}
{"timestamp": 1607061532.100424, "severity": "INFO", "name": "emailservice-server", "message": "Profiler disabled."}
{"timestamp": 1607061532.1006563, "severity": "INFO", "name": "emailservice-server", "message": "Tracing enabled."}
WARNING:google.auth._default:No project ID could be determined. Consider running `gcloud config set project` or setting the GOOGLE_CLOUD_PROJECT environment variable
Traceback (most recent call last):
  File "email_server.py", line 191, in <module>
    transport=AsyncTransport)
  File "/usr/local/lib/python3.7/site-packages/opencensus/trace/exporters/stackdriver_exporter.py", line 199, in __init__
    client = Client(project=project_id)
  File "/usr/local/lib/python3.7/site-packages/google/cloud/trace/client.py", line 43, in __init__
    super(Client, self).__init__(project=project, credentials=credentials)
  File "/usr/local/lib/python3.7/site-packages/google/cloud/client.py", line 223, in __init__
    _ClientProjectMixin.__init__(self, project=project)
  File "/usr/local/lib/python3.7/site-packages/google/cloud/client.py", line 178, in __init__
    "Project was not passed and could not be "
OSError: Project was not passed and could not be determined from the environment.

What should I do? Create a dummy GOOGLE_CLOUD_PROJECT env var with no value in the yaml for emailservice ? Other workaround?

Thanks!

Didier

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
didier-durandcommented, Dec 5, 2020

@mathieu-benoit : thanks for those details! That’s exactly what I was looking for.

I tried. Now, Online Boutique works fine with Microk8s on my laptop:

microk8s kubectl get pods

NAME                                     READY   STATUS    RESTARTS   AGE
emailservice-6dc6c5c78f-twdf8            1/1     Running   0          87s
recommendationservice-69b4b47f59-2hs75   1/1     Running   0          86s
checkoutservice-8bddb89db-sffjx          1/1     Running   0          86s
frontend-58594bf684-w9qc5                1/1     Running   0          86s
productcatalogservice-7d5f94d858-btkxc   1/1     Running   0          84s
paymentservice-77979f5c66-h4zwm          1/1     Running   0          85s
shippingservice-589dc45c5d-pmc99         1/1     Running   0          81s
currencyservice-7978fb77d8-d72kc         1/1     Running   0          82s
cartservice-65c987d449-ctxkt             0/1     Running   1          83s
loadgenerator-78dc8587f8-srls2           1/1     Running   1          82s
adservice-7659d48d84-cdw56               0/1     Running   0          80s
redis-cart-74594bd569-bvwzl              0/1     Running   0          81s

I am happy to prepare a small PR for the doc to detail it if you want.

0reactions
didier-durandcommented, Dec 9, 2020

@mathieu-benoit : Looks good to me! Thanks for the feedback. Didier

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating and managing projects - Documentation
A project ID is a unique string used to differentiate your project from all others in Google Cloud. You can use the Google...
Read more >
End-to-end Kubeflow on GCP
To deploy your code to Kubernetes, you must first build your local project into a Docker container image and push the image to...
Read more >
MicroK8s on Google Cloud Platform | by Daz Wilkin - Medium
Follow-up. Securely accessing the remote cluster locally. The API server is available on :16443 . If we can create a local kubernetes config ......
Read more >
Deploy to Kubernetes in Google Cloud: Challenge Lab
Solution. Now we will push the Docker image. docker tag valkyrie-app:v0.0.1 gcr.io/{put your project id here}/ ...
Read more >
Deploying a Node App to Google Cloud with Kubernetes
Spin up a Node-based microservice locally with Docker Compose; Configure a Kubernetes cluster to run on Google Cloud Platform (GCP); Set up a ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found