GoogleCloud: Difference between revisions

From DrewWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:


== Running gcloud ==
== Running gcloud ==
<pre>
<syntaxhighlight lang=bash>
# if needed $ export PATH=$PATH:~/google-cloud-sdk/bin
# if needed $ export PATH=$PATH:~/google-cloud-sdk/bin


Line 12: Line 12:
$ gcloud compute ssh
$ gcloud compute ssh
$ gcloud compute ssh drewderivative@instance-1 --zone us-central1-a
$ gcloud compute ssh drewderivative@instance-1 --zone us-central1-a
</pre>
</syntaxhighlight>


== Setup sendgrid email relay ==
== Setup sendgrid email relay ==
<pre>
<syntaxhighlight lang=bash>
https://cloud.google.com/compute/docs/tutorials/sending-mail/using-sendgrid
https://cloud.google.com/compute/docs/tutorials/sending-mail/using-sendgrid
</pre>
</syntaxhighlight>


== Install heirloom-mailx ==
== Install heirloom-mailx ==
Needed to attach files via mailx, i.e.
Needed to attach files via mailx, i.e.
<pre>
<syntaxhighlight lang=bash>
$ sudo apt-get install heirloom-mailx
$ sudo apt-get install heirloom-mailx
$ echo "sqlite db drew.invadelabs.com" | mailx -a drew_wiki.sqlite.xz -s "sqlite db drew.invadelabs.com" [email protected]
$ echo "sqlite db drew.invadelabs.com" | mailx -a drew_wiki.sqlite.xz -s "sqlite db drew.invadelabs.com" [email protected]
</pre>
</syntaxhighlight>

Revision as of 00:50, 25 January 2018

Download gcloud sdk

Running gcloud

# if needed $ export PATH=$PATH:~/google-cloud-sdk/bin

$ gcloud auth list
$ gcloud auth login
$ gcloud config set project drew-1298
$ gcloud compute instances list
$ gcloud compute ssh
$ gcloud compute ssh drewderivative@instance-1 --zone us-central1-a

Setup sendgrid email relay

https://cloud.google.com/compute/docs/tutorials/sending-mail/using-sendgrid

Install heirloom-mailx

Needed to attach files via mailx, i.e.

$ sudo apt-get install heirloom-mailx
$ echo "sqlite db drew.invadelabs.com" | mailx -a drew_wiki.sqlite.xz -s "sqlite db drew.invadelabs.com" [email protected]