rivas-lab / nanopore

Tools for analysis of long-read sequencing data.
0 stars 0 forks source link

Google Cloud #1

Closed yk-tanigawa closed 7 years ago

yk-tanigawa commented 7 years ago
yk-tanigawa commented 7 years ago

References

yk-tanigawa commented 7 years ago
yk-tanigawa commented 7 years ago
yk-tanigawa commented 7 years ago
yk-tanigawa commented 7 years ago

How to connect to Google Cloud Computing Engine Instance

1) login to scg4 cluster system

DN52eci6:~ yosuke$ ssh scg4
Last login: Tue Oct  4 15:21:59 2016 from dnab421d98.stanford.edu
Rocks 6.2 (SideWinder)
Profile built 15:21 22-Sep-2016

Kickstarted 15:27 22-Sep-2016
[ytanigaw@scg4-ln03 login_node ~]$ qlogin
Your job 1860384 ("QLOGIN") has been submitted
waiting for interactive job to be scheduled ...
Your interactive job 1860384 has been successfully scheduled.
Establishing /srv/gsfs0/admin_stuff/soge-8.1.8/scg4-feb2016/common/qlogin_wrapper.sh session to host scg3-2-4.local ...
Rocks Compute Node
Rocks 6.2 (SideWinder)
Profile built 16:10 27-Jun-2016

Kickstarted 16:16 27-Jun-2016

2) add module

-bash-4.1$ module add google-cloud-sdk

3) Go to console.cloud.google.com and obtain a command

4) Use that command to connect to the server

-bash-4.1$ gcloud compute --project "gbsc-gcp-lab-rivas" ssh --zone "us-east1-b" "instance-1"
ERROR: (gcloud.compute.ssh) You do not currently have an active account selected.
Please run:

  $ gcloud auth login

to obtain new credentials, or if you have already logged in with a
different account:

  $ gcloud config set account ACCOUNT

to select an already authenticated account to use.

5) If this is the first time, we need to get a credential

-bash-4.1$ gcloud auth login
Go to the following link in your browser:

    https://accounts.google.com/o/oauth2/auth?redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&prompt=select_account&response_type=code&client_id=32555940559.apps.googleusercontent.com&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcompute&access_type=offline

Enter verification code: <<DELETED>>
WARNING: `gcloud auth login` no longer writes application default credentials.
If you need to use ADC, see:
  gcloud auth application-default --help

You are now logged in as [ytanigaw@stanford.edu].
Your current project is [None].  You can change this setting by running:
  $ gcloud config set project PROJECT_ID

6) try to connect again

-bash-4.1$ gcloud compute --project "gbsc-gcp-lab-rivas" ssh --zone "us-east1-b" "instance-1"
WARNING: The private SSH key file for Google Compute Engine does not exist.
WARNING: You do not have an SSH key for Google Compute Engine.
WARNING: [/usr/bin/ssh-keygen] will be executed to generate a key.
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/ytanigaw/.ssh/google_compute_engine.
Your public key has been saved in /home/ytanigaw/.ssh/google_compute_engine.pub.
The key fingerprint is:
b6:52:a5:fe:51:69:b0:06:b0:b2:49:b4:60:f8:aa:d9 ytanigaw@scg3-2-4.local
The key's randomart image is:
+--[ RSA 2048]----+
| .o . .          |
|.. o . o         |
| .  + . . o      |
|  .. +   + o .   |
| .  o   S o +    |
|.      + o o     |
|.o    . o .      |
|o E    . . .     |
|          .      |
+-----------------+
Updating project ssh metadata...failed.                                                                           
Updating instance ssh metadata...\Updated [https://www.googleapis.com/compute/v1/projects/gbsc-gcp-lab-rivas/zones/us-east1-b/instances/instance-1].
Updating instance ssh metadata...done.                                                                            
Warning: Permanently added 'compute.7101772672992962627' (RSA) to the list of known hosts.

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.
ytanigaw@instance-1:~$ 

7) connected

yk-tanigawa commented 7 years ago

It is still not possible to connect from Sherlock, but now be able to install minoTour on the Google Cloud Computing Engine.

yk-tanigawa commented 7 years ago