Use Bitnami Cloud Tools for Google Cloud

Use Bitnami Cloud Tools for Google Cloud

The Bitnami Cloud Tools for Google Cloud is a set of tools packaged together with preconfigured Python language runtime to work out of the box. To use them, follow the steps below:

Bitnami Cloud Tools usage

Step 1: Load the environment

Linux and Mac OS X

Execute the google-shell.sh script from the installation directory, as shown below:

$ ./google-shell.sh

Windows

Execute the google-cmd.bat script from the installation directory, as shown below:

$ google-cmd.bat

Here is an example of what you should see:

WARNING: Your Google account was not authorized yet.
Please run the 'gcloud auth login' command to authorize your account.

To link your Google Account with the installed Bitnami Cloud Tools for Google Cloud, run the command below:

$ gcloud auth login

Your browser will now open and you will be prompted to grant access to the Bitnami Cloud Tools, as shown below:

Bitnami Cloud Tools usage

Step 3: Update the Google Cloud SDK

Update the installed components of the Google Cloud SDK by typing the following command:

$ gcloud components update

You should see a list of components that will be updated and a prompt asking whether to continue. Enter "Y" to proceed, as shown below:

The following components will be updated:
    ----------------------------------------------------------------
    | Cloud SDK Core Libraries               | 2014.02.20 | < 1 MB |
    | Cloud SQL Admin Command Line Interface | 2014.02.20 | < 1 MB |
    ----------------------------------------------------------------
Do you want to continue (Y/n)? Y

Step 4: Create an instance

Create a new server instance in the project example with the gcutil command as shown below:

$ gcutil addinstance my-first-instance --project example

You will be prompted to select a zone, machine type, image and SSH passphrase, and you will then be logged in to the server console, as shown below:

Select a zone:
1: europe-west1-a  (maintenance starts in 108 days)
2: europe-west1-b  (maintenance starts in 17 days)
3: us-central1-a
4: us-central1-b
5: us-central2-a (DEPRECATED)
>>> 3
Select a machine type:
1: n1-standard-1    1 vCPU, 3.75 GB RAM
2: n1-standard-2    2 vCPUs, 7.5 GB RAM
3: n1-standard-4    4 vCPUs, 15 GB RAM
4: n1-standard-8    8 vCPUs, 30 GB RAM
5: n1-highcpu-2    2 vCPUs, 1.8 GB RAM
6: n1-highcpu-4    4 vCPUs, 3.6 GB RAM
7: n1-highcpu-8    8 vCPUs, 7.2 GB RAM
8: n1-highmem-2    2 vCPUs, 13 GB RAM
9: n1-highmem-4    4 vCPUs, 26 GB RAM
10: n1-highmem-8    8 vCPUs, 52 GB RAM
11: f1-micro    1 vCPU (shared physical core) and 0.6 GB RAM
12: g1-small    1 vCPU (shared physical core) and 1.7 GB RAM
>>> 11
Select an image:
1: bitnami-wordpress-380-0
>>> 1
INFO: Preparing boot disk [my-first-instance] for instance
[my-first-instance] from disk image
[https://www.googleapis.com/compute/v1/projects/example/global/images/bitnami-wordpress-380-0].
INFO: Waiting for insert of disk my-first-instance. Sleeping for 3s.
INFO: Waiting for insert of disk my-first-instance. Sleeping for 3s.
WARNING: You don't have an ssh key for Google Compute Engine. Creating
one now...
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
INFO: Waiting for insert of instance my-first-instance. Sleeping for 3s.
INFO: Waiting for insert of instance my-first-instance. Sleeping for 3s.

Table of resources:

+-------------------+-------------+-------------+------------------------------------+---------+
| name              | network-ip  | external-ip | zone                               | status  |
+-------------------+-------------+-------------+------------------------------------+---------+
| my-first-instance | xx.yy.zz.bb | xx.yy.zz.aa | projects/example/zones/us-central1 | RUNNING |
+-------------------+-------------+-------------+------------------------------------+---------+

Table of operations:

+------------------------------------------------+--------+----------------+
| name                                           | status | operation-type |
+------------------------------------------------+--------+----------------+
| operation-0000000000000-4f32a5819e659-b04c6a20 | DONE   | insert         |
+------------------------------------------------+--------+----------------+

$ gcutil --project example ssh my-first-instance
INFO: Zone for my-first-instance detected as us-central1-a.
INFO: Running command line: ssh -o UserKnownHostsFile=/dev/null -o
CheckHostIP=no -o StrictHostKeyChecking=no -i
/home/bitnami/.ssh/google_compute_engine -A -p 22 bitnami@xx.yy.zz.aa --
Warning: Permanently added 'xx.yy.zz.aa' (ECDSA) to the list of known
hosts.
Linux my-first-instance 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

bitnami@my-first-instance:~$

Bitnami Cloud Tools usage

To find out more, visit the Google Cloud website and the Google Cloud SDK website.