gcloud compute instances create my-unmanaged-instance --zone asia-east1-b
gcloud compute target-pools create my-pool --region asia-east1
gcloud compute forwarding-rules create my-rule --target-pool my-pool --region asia-east1
gcloud compute target-pools add-instances my-pool --instances my-unmanaged-instance --zone asia-east1-b
gcloud compute instance-templates create my-template
gcloud compute instance-groups managed create my-group --base-instance-name mgroup --size 1 --template my-template --target-pool my-pool --zone asia-east1-b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var os = require("os"); | |
//Create function to get CPU information | |
function cpuAverage() { | |
//Initialise sum of idle and time of cores and fetch CPU info | |
var totalIdle = 0, totalTick = 0; | |
var cpus = os.cpus(); | |
//Loop through CPU cores |