Changeset 38594 for gs3-extensions
- Timestamp:
- 2024-01-22T14:15:10+13:00 (5 months ago)
- Location:
- gs3-extensions/selfcontained-gcloud/trunk/spin-up-gce-vm
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-extensions/selfcontained-gcloud/trunk/spin-up-gce-vm/create-vm-with-static-ip-example.sh
r38591 r38594 1 1 #!/bin/bash 2 2 3 # Edit the following to the name of the VM you want to create 4 export GSVM_INSTANCE=greenstone3-debian-ansible-test 3 . ./_local_config.bash 5 4 6 gsvm_instance_disk=$GSVM_INSTANCE-disk 7 gsvm_instance_nic=$GSVM_INSTANCE-nic 8 9 gsvm_project=atea-storage 10 gsvm_subproject=bluff 11 gsvm_region=australia-southeast1 12 gsvm_zone=australia-southeast1-b 13 14 if [ ! -f $gsvm_project--$gsvm_subproject ] ; then 5 if [ ! -f $gsvm_project--$gsvm_subproj ] ; then 15 6 echo "" 16 7 echo "----" 17 8 echo "- Generating RSA key-pair for ssh access" 18 9 echo "- [Press enter twice to set with an empty passphrase]" 19 ssh-keygen -t rsa -f $gsvm_project--$gsvm_subproj ect -C $gsvm_project--$gsvm_subproject10 ssh-keygen -t rsa -f $gsvm_project--$gsvm_subproj -C $gsvm_project--$gsvm_subproj 20 11 echo "----" 21 12 echo "" … … 25 16 #ssh_rsa_pubkey=$(cat $gsvm_project--$gsvm_subproject.pub | sed 's/ [a-z-]\+$//i') 26 17 27 ssh_rsa_pubkey=$(cat $gsvm_project--$gsvm_subproj ect.pub | awk '{ print $2 }')18 ssh_rsa_pubkey=$(cat $gsvm_project--$gsvm_subproj.pub | awk '{ print $2 }') 28 19 #ssh_rsa_esc_pubkey=$(echo $ssh_rsa_pubkey | sed 's/+/\\+/g') 29 20 … … 40 31 echo " than the default 10GB]" 41 32 33 #--metadata="^%^ssh-keys=ateaspace:ssh-rsa $ssh_rsa_pubkey google-ssh {\"userName\":\"[email protected]\",\"expireOn\":\"2024-02-21T02:40:49+0000\"}" \ 34 42 35 43 36 gcloud compute instances create $GSVM_INSTANCE \ … … 46 39 --machine-type=e2-medium \ 47 40 --network-interface=network-tier=STANDARD,stack-type=IPV4_ONLY,subnet=default,no-address \ 48 --metadata="^%^ssh-keys= ateaspace:ssh-rsa $ssh_rsa_pubkey google-ssh {\"userName\":\"ateaspace@gmail.com\",\"expireOn\":\"2024-02-21T02:40:49+0000\"}" \41 --metadata="^%^ssh-keys=$GSVM_USER:ssh-rsa $ssh_rsa_pubkey ssh-$gsvm_project--$gsvm_subproj {\"userName\":\"$GSVM_USER@gmail.com\",\"expireOn\":\"2024-02-21T02:40:49+0000\"}" \ 49 42 --maintenance-policy=MIGRATE \ 50 43 --provisioning-model=STANDARD \ -
gs3-extensions/selfcontained-gcloud/trunk/spin-up-gce-vm/ssh-login.sh
r38591 r38594 1 ssh -i atea-storage--bluff [email protected] 1 #!/bin/bash 2 3 . ./_local_config.bash 4 5 #ssh -i atea-storage--bluff [email protected] 6 7 ssh -i $gsvm_project--$gsvm_subproj [email protected]
Note:
See TracChangeset
for help on using the changeset viewer.