gcloud

Cannot connect to mongodb after app deploys on google app engine

流过昼夜 提交于 2019-12-08 05:41:54
问题 I'm using Bitnami mongodb instance deployed on Google Compute Engine. I can connect to that mongodb instance through MongoDB clients from my personal computer using the External IP of MongoDB instance. My app is an Angular2 app with Node.js backend. Following is the connection string format used in server.js mongoose.connect('mongodb://<username>:<password>@<External IP>:27017/<dbname>'); When I host my app on localhost it can connect to mongodb instance on the cloud and access data without

How to run/deploy Google AppEngine Managed vms using Gradle

ぃ、小莉子 提交于 2019-12-08 04:13:23
问题 I've pushed, run and tested a managed VM with custom runtime as an AppEngine application. Now I want to make it multi-module, with the default module being a Google Cloud Endpoint configured to work with Android. Hence, I'm using Gradle as my build system. Now, I noticed that Google has made some initial commits for gcloud preview app run/deploy into the gradle-appengine-plugin: https://github.com/GoogleCloudPlatform/gradle-appengine-plugin/commit/2e4a2b8abb7ec7905012f1f9c12adea7010a41b7 How

GCE/GKE Kubectl: the server doesn't have a resource type “services”

空扰寡人 提交于 2019-12-08 03:54:40
问题 I have two kubernetes clusters on google container engine but on seperate google accounts (one using my company's email and another using my personal email). I attempted to switch from one cluster to another. I did this by: Logging in with my other email address $ gcloud init Getting new kubectl credentials gcloud container cluster get-credentials Test to see if connected to new cluster $ kubectl get po However, I was still not able to get the kubernetes resources in the cluster. The error I

What's the recommended way to stop the current version of app engine using gcloud?

馋奶兔 提交于 2019-12-07 19:26:33
问题 I want to automatically start/stop our app engine services by running a bash script. I know it's easy to run gcloud app versions start/stop , but I don't want to manually check the version number. I want to dynamically pass the version that is serving 100% traffic to gcloud and tell it to stop. On the flip side, I also want to tell gcloud to start the most recently deployed version. What's the recommended way to do this? Thanks! 回答1: One way to do that is to use gcloud 's keys and flags:

After an OOM how can I detect the pod that caused it?

落花浮王杯 提交于 2019-12-07 11:47:11
问题 I had some issues running some pods on a cluster, I want to know the way to detect which pod (and rc) is causing OOM on my nodes after the exception is thrown. I cannot access the node to check logs and kubectl describe node doesn't give me much information about this. Thanks :) 回答1: Have you try running kubectl get events --watch to monitor the events on k8s and monitor the pod as well with kubectl logs -f podname 回答2: The only way I found to track what is happening is waiting before an OOM

Compute Engine SSH: You do not have sufficient permissions to SSH into this instance

ぐ巨炮叔叔 提交于 2019-12-07 11:37:38
问题 I can't access my google cloud compute engine instance using ssh through browser or gcloud. My user account has the required compute.instances.osLogin permission (in fact it has the Owner role) and I've set enable-oslogin to TRUE . The error in browser: You do not have sufficient permissions to SSH into this instance. You need one of compute.instances.setMetadata, compute.projects.setCommonInstanceMetadata or compute.instances.osLogin (with OsLogin enabled) and iam.serviceAccounts.actAs. The

Can I use gsutil with my local development server?

馋奶兔 提交于 2019-12-07 09:36:37
问题 I'm developing a google app engine application that uses cloud storage. I want to have a base set of files on the cloud storage that are shared by each user of the application. I know I can use gsutil to copy these files to the production server. But I would like to test my application on my local development server, so I need these files in the dev cloud storage as well. I can't find any way to copy the files. Is there a way to use gsutil to copy files to the development server's cloud

Google App Engine Deploy Error Code 9

吃可爱长大的小学妹 提交于 2019-12-07 09:23:07
问题 All, I'm attempting to deploy a Google App Engine. I've gotten as far as this, but I'm not sure how to proceed. Updating service [default]... ......failed. ERROR: (gcloud.app.deploy) Error Response: [9] The App Engine service account does not exist for "[my-project]". It appears that I need to create a service account for the app engine, but I'm not sure what variables it needs. Thanks! 回答1: The problem is that I had deleted the "App Engine default service account". I was able to re-add the

How do I Configure Google Compute Engine to use HTTPS for nodejs server?

老子叫甜甜 提交于 2019-12-07 06:27:27
问题 I want to run nodejs & socket.io server in google compute engine with https / SSL. I installed self-signed certificate from https://cloud.google.com/compute/docs/load-balancing/http/ssl-certificates. Now, How Do I enable nodejs server to use https protocol? Thanks, 回答1: Below is the code, which I used for HTTPS in nodejs, var app = require('express')(); var https = require('https'); var fs = require('fs'); var PORT = 443; var options = { key: fs.readFileSync('XYZ.key'), cert: fs.readFileSync(

How can I cleanly remove a container image from the Google Container Registry?

▼魔方 西西 提交于 2019-12-07 04:44:18
问题 I have pushed container images using gcloud docker push to the Google Container Registry. Two questions: How do I cleanly remove a pushed container image from the registry? (I know I can remove a tag to an image and make it not accessible anymore.) There are a bunch of Docker layers that an image brings with it. I want to remove all the unused layers with an image deletion. 回答1: UPDATE: You can now delete individual container images straight from the UI. Go to the Container Registry page. You