A list of steps to generate new SSH keys to a new Linux VM / machine.
$ ssh-keygen -t rsa -b 2048
Enter file in which to save the key (/home//.ssh/id_rsa): ~/.ssh/**azure_key**
import os | |
import base64 | |
encoded_env_file = os.environ.get("ENV_FILE") | |
if encoded_env_file != None: | |
decoded_env_file = base64.b64decode(encoded_env_file).decode('utf-8') | |
with open("./" + str(os.environ.get("FILE_NAME", ".env")), "w") as text_file: | |
text_file.write(decoded_env_file) |
(function() { | |
/** | |
* Adds moving effect on scroll to elements with the `.scrollax` class. | |
* | |
* Optional `.sx-negative` class to move in opposite direction. | |
* | |
* @param {number} [antiMagnitude=40] Amount to reduce the magnitude of the effect by | |
* @version 1.2.0 | |
* @author Pat Migliaccio <pat@patmigliaccio.com> | |
* @license MIT |
for node in $(kubectl get nodes -l cloud.google.com/gke-nodepool=default-pool -o=name); do | |
kubectl cordon "$node"; | |
done |
gcloud container node-pools create my-pool \ | |
--cluster=my-cluster \ | |
--machine-type=n1-highmem-2 \ | |
--num-nodes 1 --enable-autoscaling | |
--min-nodes 1 --max-nodes 3 |
kubectl create -f ingress-service.yml | |
# Verify exposed IP address is ready | |
kubectl get ingress |
# Adds the converted origin certficate | |
gcloud compute ssl-certificates create ingress-cert \ | |
--certificate ./certs/<DOMAIN>.pem \ | |
--private-key ./certs/<DOMAIN>.key |
# ingress-service.yaml | |
--- | |
apiVersion: "extensions/v1beta1" | |
kind: "Ingress" | |
metadata: | |
name: "ingress" | |
annotations: | |
kubernetes.io/ingress.global-static-ip-name: "my-dev-ip" | |
ingress.gcp.kubernetes.io/pre-shared-cert: "ingress-cert" | |
spec: |
gcloud compute addresses create my-dev-ip --global |
# api-service.yaml | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: api | |
labels: | |
io.kompose.service: api | |
spec: | |
type: NodePort |