Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Make 'apt-get install google-cloud-sdk' just work #50

Open
duggelz opened this issue Nov 2, 2016 · 13 comments
Open

Make 'apt-get install google-cloud-sdk' just work #50

duggelz opened this issue Nov 2, 2016 · 13 comments

Comments

@duggelz
Copy link
Contributor

duggelz commented Nov 2, 2016

This page has a six-step process for installing 'gcloud', including one that doesn't work on this image (The step with lsb_release).

https://cloud.google.com/sdk/downloads

This image should already have the apt database setup with the correct paths, repositories, and keys.

@dlorenc
Copy link
Contributor

dlorenc commented Aug 29, 2017

Installing lsb_release would add around 20MB:

The following extra packages will be installed:
  libexpat1 libffi6 libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libsqlite3-0 mime-support python python-minimal python2.7 python2.7-minimal
Suggested packages:
  lsb python-doc python-tk python2.7-doc binutils binfmt-support
Recommended packages:
  file
The following NEW packages will be installed:
  libexpat1 libffi6 libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libsqlite3-0 lsb-release mime-support python python-minimal python2.7 python2.7-minimal
0 upgraded, 12 newly installed, 0 to remove and 14 not upgraded.
Need to get 4690 kB of archives.
After this operation, 18.1 MB of additional disk space will be used.

I'm inclined to leave it out, but making "apt-get install google-cloud-sdk" work should just work.

@duggelz
Copy link
Contributor Author

duggelz commented Aug 29, 2017

Doh. I agree it's not worth 30% increase in base image size. However, in this case, we can replace the 20MB with $(echo jessie).

In the debian-docker repo, it looks like there is already a $VERSION set to jessie or stretch, so a little fiddling with envsubst seems like it would do the job.

@duggelz
Copy link
Contributor Author

duggelz commented Aug 30, 2017

The next problem after lsb_release is curl, there is no curl or wget equivalent that I see to fetch the key file via https. So maybe we bake that into the image at build time. Since you have some sweeping build changes going on (+1 to reproducible builds BTW), I'll let this go for now.

@dlorenc
Copy link
Contributor

dlorenc commented Oct 10, 2017

So thinking about this again, we can make "apt-get install google-cloud-sdk" just work by adding the apt repo by default, but that still won't fix things for users that follow the docs (and hit a missing lsb_release, among other things).

Any thoughts?

@duggelz
Copy link
Contributor Author

duggelz commented Nov 8, 2017

If we bake steps 1-3 of the install process into the image, I think we just update the installation docs to say "if using App Engine/GKE/GCF/Prime, skip to step 4". There's already a note about GCE, we just make that note longer.

dlorenc pushed a commit that referenced this issue Nov 21, 2017
…y overlap (#50)

* create new StructureTest instance for every file parse to avoid memory overlap

* add --no-pull and -h flags. gofmt

* fix --no-pull doc
@dedeco
Copy link

dedeco commented Jan 17, 2018

Is it solved?

@duggelz
Copy link
Contributor Author

duggelz commented Jan 17, 2018

Unfortunately no.

@YaguraStation
Copy link

@duggelz @dedeco Does the following maybe help you out? https://github.com/GoogleCloudPlatform/cloud-sdk-docker

@dedeco
Copy link

dedeco commented May 26, 2018

@YaguraStation Thank you for you advice, but I decided run my models locally.

@xingao267
Copy link
Contributor

xingao267 commented Jul 31, 2018

It looks like installing "google-cloud-sdk" is working. Maybe I'm not installing the full suite of it. But basic usage of gcloud and gsutil, etc works fine. You just need to add the additional deb repo and gpg key. There is a experimental version of using rules_docker here (https://github.com/bazelbuild/bazel-toolchains/blob/master/container/ubuntu16_04/layers/gcloud/BUILD#L32
) and a version that uses Dockerfile here (https://github.com/bazelbuild/rules_k8s/blob/master/images/gcloud-bazel/Dockerfile#L46).

@MansoorMajeed
Copy link

I ran into this issue and the issue was that the doc was wrong. According to the google's documentation, the /etc/apt/sources.list.d/google-cloud-sdk.list should contain deb http://packages.cloud.google.com/apt stretch main. ( I am using debian stretch )
But this is throwing 404. However, I looked through their repository and the correct name is cloud-sdk-<distro name> or in my case cloud-sdk-stretch.

So, right now this is what I do for stretch and works fine for me

echo "deb http://packages.cloud.google.com/apt cloud-sdk-stretch main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
    curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \
    apt-get update -y && apt-get install google-cloud-sdk -y

@thesayyn
Copy link

Absolutely Debian based google cloud sdk image would do a lot. +1

@MonicaPC1
Copy link

The official documentation - Installing with apt-get (Debian and Ubuntu only) is available now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants