https://www.vladan.fr/how-to-upgrade-esxi-6-0-to-6-5-via-cli-on-line/
https://gist.github.com/ob1-sc/0616141120b23223eaa3d0aa1da17a09
| FROM ubuntu:20.04 | |
| RUN set -xe \ | |
| && echo "Update the list of packages" \ | |
| && apt-get update \ | |
| && echo "Install pre-requisite packages." \ | |
| && apt-get install -y wget apt-transport-https software-properties-common \ | |
| && echo "Download the Microsoft repository GPG keys" \ | |
| && wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb \ | |
| && echo "Register the Microsoft repository GPG keys" \ |
| apiVersion: rbac.authorization.k8s.io/v1 | |
| kind: ClusterRoleBinding | |
| metadata: | |
| name: wcp:administrators:override | |
| roleRef: | |
| apiGroup: rbac.authorization.k8s.io | |
| kind: ClusterRole | |
| name: cluster-admin | |
| subjects: | |
| - apiGroup: rbac.authorization.k8s.io |
Install VSCode - https://code.visualstudio.com/download Install Remote-SSH plugin inside VSCode from the extensions page
Run the following
gcloud compute config-ssh
Record the hostname it provides as an the SSH example.
E.g. $ ssh jumpbox.us-central1-a.pal4pe-1109-mproud
| #!/usr/bin/python | |
| from __future__ import absolute_import, division, print_function | |
| __metaclass__ = type | |
| from com.vmware.cis.tagging_client import CategoryModel | |
| from vmware.vapi.vsphere.client import create_vsphere_client | |
| from pprint import pprint | |
| import requests |
| cert_request=$(cat <<END | |
| { | |
| "name": "tkgi-nsx-t-superuser", | |
| "node_id": "node-1", | |
| "role": "enterprise_admin", | |
| "is_protected": "true", | |
| "certificate_pem" : "$(awk '{printf "%s\\n", $0}' tkgi-nsx-t-superuser.crt)" | |
| } | |
| END | |
| ) |
| import requests, urllib3 | |
| from pprint import pprint | |
| urllib3.disable_warnings() | |
| s = requests.Session() | |
| s.auth = ('admin', 'password') | |
| s.verify = False | |
| pprint(s.get('https://192.168.0.193/api/v1/node/services/http').json()) |
| #!/bin/bash | |
| instance_profile=`curl http://169.254.169.254/latest/meta-data/iam/security-credentials/` | |
| aws_token_response=`curl --silent http://169.254.169.254/latest/meta-data/iam/security-credentials/${instance_profile}` | |
| aws_access_key_id=`echo "${aws_token_response}" | grep AccessKeyId | cut -d':' -f2 | sed 's/[^0-9A-Z]*//g'` | |
| aws_secret_access_key=`echo "${aws_token_response}" | grep SecretAccessKey | cut -d':' -f2 | sed 's/[^0-9A-Za-z/+=]*//g'` | |
| token=`echo "${aws_token_response}" | sed -n '/Token/{p;}' | cut -f4 -d'"'` | |
| echo "${aws_token_response}" | sed -n '/Expiration/{p;}' | |
| file=$2 |
| # 1 liner to check if var is set | |
| : ${VAR_NAME:?"You must st VAR_NAME"} |