De Wiki inetshell
Saltar a: navegación, buscar
(Exportar zona)
(Generar SHA256)
 
(No se muestra una edición intermedia del mismo usuario)
Línea 53: Línea 53:
 
gcloud dns --project=host-example-com record-sets transaction add ns-cloud-d1.googledomains.com. ns-cloud-d2.googledomains.com. ns-cloud-d3.googledomains.com. ns-cloud-d4.googledomains.com. --name=zone.example.com. --ttl=60 --type=NS --zone=example-com
 
gcloud dns --project=host-example-com record-sets transaction add ns-cloud-d1.googledomains.com. ns-cloud-d2.googledomains.com. ns-cloud-d3.googledomains.com. ns-cloud-d4.googledomains.com. --name=zone.example.com. --ttl=60 --type=NS --zone=example-com
 
gcloud dns --project=host-example-com record-sets transaction execute --zone=example-com
 
gcloud dns --project=host-example-com record-sets transaction execute --zone=example-com
 +
</pre>
 +
 +
 +
== Storage ==
 +
=== Generar Encryption Key SHA256 ===
 +
https://stackoverflow.com/questions/46518657/how-is-encryption-key-sha256-computed-on-google-cloud-storage/56581188#56581188
 +
<pre>
 +
export encryption_key=yxCPz7MD1bLjcBJXiXAlu6obBAAn2leIebkTtnxtB+U=
 +
echo "${encryption_key}" | base64 -d |  openssl dgst -binary -sha256 | base64
 
</pre>
 
</pre>

Revisión actual del 13:07 13 jun 2019

Listar imagenes[editar]

https://stackoverflow.com/questions/54778825/where-would-i-get-a-listing-of-the-actual-compute-engine-image-names

gcloud compute images list

Instalar en CentOS[editar]

https://cloud.google.com/sdk/downloads#yum

Iniciar por SSH[editar]

gcloud compute ssh [email protected] --project=project-name

Desactivar google startup-scripts al arranque[editar]

CentOS 7[editar]

systemctl disable google-startup-scripts.service
systemctl disable google-shutdown-scripts.service


Google Container Registry[editar]

Enable[editar]

https://stackoverflow.com/tags/gcloud/hot?filter=year

 gcloud services enable containerregistry.googleapis.com 

https://medium.com/google-cloud/google-container-registry-4aca1fc6cf74

https://cloud.google.com/sdk/gcloud/reference/container/images/delete

Google Cloud DNS[editar]

Exportar zona[editar]

https://cloud.google.com/sdk/gcloud/reference/dns/record-sets/export

gcloud dns record-sets export records.yaml --zone zone-name --project project-id

Importar zona[editar]

https://cloud.google.com/sdk/gcloud/reference/dns/record-sets/import

gcloud dns record-sets import records.yaml --zone zone-name --project project-id

Crear zona[editar]

1. on project, create dns zone:
gcloud beta dns --project=example-id managed-zones create example-com --description="hello world" --dns-name=zone.example-com

2. get NS records:
gcloud dns record-sets list --zone=example-com --name=zone.example-com. --type=NS --format="table[no-heading](rrdatas)"

3. add DNS records on hosting zone
gcloud dns --project=host-example-com record-sets transaction start --zone=example-com
gcloud dns --project=host-example-com record-sets transaction add ns-cloud-d1.googledomains.com. ns-cloud-d2.googledomains.com. ns-cloud-d3.googledomains.com. ns-cloud-d4.googledomains.com. --name=zone.example.com. --ttl=60 --type=NS --zone=example-com
gcloud dns --project=host-example-com record-sets transaction execute --zone=example-com


Storage[editar]

Generar Encryption Key SHA256[editar]

https://stackoverflow.com/questions/46518657/how-is-encryption-key-sha256-computed-on-google-cloud-storage/56581188#56581188

export encryption_key=yxCPz7MD1bLjcBJXiXAlu6obBAAn2leIebkTtnxtB+U=
echo "${encryption_key}" | base64 -d |  openssl dgst -binary -sha256 | base64