底辺無能IT系社畜の末路

根暗話をしたい訳ではありませんが、明るい話をするとしたら風俗行った事しか喋れないので、こんなブログになりました。<br>あと、互助会には入っていません

【勉強日誌2日目】GoogleCloudPlatformでPythonやらPostgresql入れてお勉強しようと思ったのに積んだ。

Compute Engine のクイックスタート
インスタンスに接続する
When the VM instance is created, you'll run a web server on the virtual machine.

The SSH buttons in the table will open up an SSH session to your instance in a separate window. However, for this tutorial you will connect using Cloud Shell.

Cloud Shell is a built-in command line tool for the console. You're going to use Cloud Shell to run the example app.

Cloud Shell を開く
上部にあるナビゲーション バーで  をクリックして、Cloud Shell を開きます。 手順を見る

Wait for the instance creation to finish
The instance creation needs to finish before the tutorial can proceed. The activity can be tracked by clicking from the navigation bar at the top. Now waiting for the creation to finish.

ここまでは上手くいった。

こっからダメだった。

Connect to the instance
Enter the following command to SSH into the VM. If this is your first time using SSH from Cloud Shell, you will need to create a private key:

gcloud compute --project "crack-mix-191215" ssh --zone "asia-northeast1-c" "instance-1"

Run a simple web server
Create a simple index.html file with the following command:

echo "<h1>Hello, world</h1>" > index.html

Enter these commands to run a simple Python webserver:

sudo python -m SimpleHTTPServer 80

Visit your application
Visit your server at: http://隠します

After you are done, press the Done button to close the SSH browser window.

Connect to the instanceした時のログ。

WARNING: The public SSH key file for gcloud does not exist.
WARNING: The private SSH key file for gcloud does not exist.
WARNING: You do not have an SSH key for gcloud.
WARNING: SSH keygen will be executed to generate a key.
This tool needs to create the directory [/home/俺のユーザ名/.ssh]
before being able to generate SSH keys.

Do you want to continue (Y/n)?  y

Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/俺のユーザ名/.ssh/google_compute_engine.
Your public key has been saved in /home/俺のユーザ名/.ssh/google_compute_engine.pub.
The key fingerprint is:
SHA256:ながい文字列
The key's randomart image is:
+---[RSA 2048]----+
省略
+----[SHA256]-----+
Updating project ssh metadata.../Updated [https://www.googleapis.com/compute/v1/projects/俺のなんか].
Updating project ssh metadata...done.
Waiting for SSH key to propagate.
Warning: Permanently added 'compute.こんぴゅーた名 (ECDSA) to the list of known hosts.
Enter passphrase for key '/home/俺のユーザ名/.ssh/google_compute_engine':
Authentication failed.
ERROR: (gcloud.compute.ssh) Could not SSH into the instance.  It is possible that your SSH key has not propagated to the instance yet. Try running this command again.  If you still cannot connect, verify that the firewall and instance are set to accept ssh traffic.

・echoコマンド打っても、何も表示されずのただプロンプトが戻ってくる。
・visit your serverにつないでも、「このサイトにアクセスできません」って表示される。

【今日の成果】
よくわかんないから寝ます。
モンスターホテル面白かった。
f:id:twinkey:20180213002822j:plain
↑自動色塗り ↓手動バケツツール
f:id:twinkey:20180213003921j:plain