gcloud

Can I use gsutil with my local development server?

大城市里の小女人 提交于 2019-12-05 16:06:52
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 storage simuation? We don't currently support the full GCS API in the local dev server. Your best bet is to

Why is this gcloud compute copy-files producing an error message?

女生的网名这么多〃 提交于 2019-12-05 12:51:51
问题 When I execute the command gcloud compute copy-files "C:\Users\fName lName\Desktop\testtext.txt" instancename:test.txt --zone europe-west1-a I receive the error: "All sources must be local files when the destination is remote." . Can anyone help me figure out what is wrong? 回答1: Thanks asking this! This appears to be a bug in gcloud that we're now tracking. The issue is that gcloud compute copy-files is interpreting the colon in C:\Users\fNam... as a part of a remote path. As suggested by

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

无人久伴 提交于 2019-12-05 10:49:25
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. Sandeep Dinesh UPDATE: You can now delete individual container images straight from the UI. Go to the Container Registry page . You should see a list of container images. Click the one you want to delete. Select one or more

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

為{幸葍}努か 提交于 2019-12-05 10:32:36
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, 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('ABC.crt') }; var server = https.createServer(options, app).listen(PORT, function () { console.log("Express

Docker build failing when using gcsfuse to mount google storage

那年仲夏 提交于 2019-12-05 06:39:57
I have been trying to mount SQL and a storage bucket to my docker WordPress container. It appears to succeeding in mounting SQL, but failing mounting the bucket. The instance is based of of this post . I have attached the Docker file and error below, as well as my build command. Build command: docker build -t ic/spm . Dockerfile: FROM wordpress MAINTAINER Gareth Williams <gareth@itinerateconsulting.com> # Move login creds locally ADD ./creds.json /creds.json # install sudo, wget and gcsfuse ENV GCSFUSE_REPO=gcsfuse-jessie RUN apt-get update && \ apt-get -y install sudo && \ apt-get install -y

how to get error if starting compute engine instance fails

泪湿孤枕 提交于 2019-12-05 05:56:08
I am starting an instance using PHP using this code: function startInstance($g_project,$g_instance, $g_zone){ $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); $response = $service->instances->start($g_project, $g_zone, $g_instance); echo json_encode($response); } Today I was lucky enough to realize that for unknown reason the instance I wanted to start failed to do so. I tried starting it using

not able to access kubernetes dashboard in gcloud

三世轮回 提交于 2019-12-05 04:51:46
问题 I am following the instructions as given here I used the command to get a running cluster, in gcloud console I typed: curl -sS https://get.k8s.io | bash as described in the link, after that I ran the command kubectl cluster-info from that I got: kubernetes-dashboard is running at https://35.188.109.36/api/v1/proxy/namespaces/kube- system/services/kubernetes-dashboard but when I go to that url from firefox, the message that comes is: User "system:anonymous" cannot proxy services in the

Gcloud - How to automate installation of gcloud on a server?

泪湿孤枕 提交于 2019-12-05 02:57:17
问题 I want to write a shell script which basically goes through all the installation steps for gcloud, as outlined at: https://cloud.google.com/sdk/?hl=en However, when you are run install.sh, you will be asked to enter an authorization code, your project-id, whether you want to help improve Google Cloud or not and so on. Basically user-inputs are required. But if I want to automate the installation process on a machine where there will not be any user, how can I do this? 回答1: There are two

How to list the published container images in the Google Container Registry using gcloud or another CLI

人走茶凉 提交于 2019-12-05 02:25:37
Is there a gcloud API or other command line interface (CLI) to access the list of published container images in the private Google Container Registry? (That is the container registry inside a Google Cloud Platform project) gcloud container does not seem to help: $ gcloud container Usage: gcloud container [optional flags] <group | command> group may be clusters | operations command may be get-server-config Deploy and manage clusters of machines for running containers. flags: --zone ZONE, -z ZONE The compute zone (e.g. us-central1-a) for the cluster global flags: Run `gcloud -h` for a

Can I authenticate gcloud cli using both service account and user credentials?

穿精又带淫゛_ 提交于 2019-12-05 02:19:02
问题 Google API clients typically recognise the GOOGLE_APPLICATION_CREDENTIALS environment variable. If found, it's expected to point to a JSON file with credentials for either a service account or a user. Service account credentials can be downloaded from the GCP web console and look like this: { "type": "service_account", "project_id": "...", "private_key_id": "...", "private_key": "...", "client_email": "...", "client_id": "...", "auth_uri": "...", "token_uri": "...", "auth_provider_x509_cert