-
Notifications
You must be signed in to change notification settings - Fork 4
Google Cloud dev setup notes for the team
-
install the Google Cloud SDK and the
gcloud
command line toolsSee Installing Google Cloud SDK — Installation options:
- Debian/Ubuntu: install with apt-get
- Red Hat Enterprise Linux 7/CentOS 7: install with yum
- Snap for Linux:
sudo snap install google-cloud-sdk --classic
- Other Linux: install with curl
- maOS: install with curl
- Windows: install with the Cloud SDK installer
-
add these lines to your shell
.profile
or.bash_profile
as neededThe following lines set a consistent Python 2.7 version for running
gcloud
. Without this,gcloud
can fail to start up, e.g. when thepyenv version
is set to python 3, displaying an error message such aspyenv: python2: command not found
.# Set the Python version for Cloud SDK. It has to be Python 2.7. export CLOUDSDK_PYTHON=$(pyenv shell 2.7.16; pyenv which python)
(That assumes you installed Python 2.7.16 via the command
pyenv install 2.7.16
.)The following lines add the gcloud tools to your shell path. The details vary depending on where you installed gcloud. Add these lines if the installer didn't put
gcloud
on your path one way or another:# Update PATH for the Google Cloud SDK and gcloud CLI. if [ -f '$HOME/dev/google-cloud-sdk/path.bash.inc' ]; then . '$HOME/dev/google-cloud-sdk/path.bash.inc'; fi # The next line enables shell command completion for gcloud. if [ -f '$HOME/dev/google-cloud-sdk/completion.bash.inc' ]; then . '$HOME/dev/google-cloud-sdk/completion.bash.inc'; fi
Then open a new shell or restart your shell:
exec -l $SHELL
-
run gcloud init
- When it asks for a default project, enter
allen-discovery-center-mcovert
- When it asks for a default Compute Engine zone, enter
us-west1-b
gcloud init
This will:
- initialize
gcloud
and its SDK tools - run some diagnostics
- log in using your user account credentials
- set configuration defaults
(To change settings later, you can re-run
gcloud init
or run specific commands likegcloud auth login
,gcloud config set zone us-west1-b
, andgcloud config set project allen-discovery-center-mcovert
.)(There's good documentation available via
gcloud help
and the gcloud web reference) - When it asks for a default project, enter
-
set up docker
- Create a Docker ID on their website.
- Install Docker Desktop.
- Log in to your Docker ID from the Docker client.
- Set up shell completion for Docker.
- You can exit Docker Desktop when you're not using it.
-
(Optional) Try the Cloud Code plug-in for IntelliJ.