If you want to control severity at LoggingWinston.
https://stackoverflow.com/questions/58055551/structured-logs-in-google-cloud-run-not-being-parsed-using-winston-for-logging
const winston = require('winston'); const useFormat = winston.format.combine( winston.format((info, opts) => { let level = info.level.toUpperCase(); if(level === 'VERBOSE') { level = 'DEBUG'; } info['severity'] = level; delete info.level; return info; })(), winston.format.json()); const { LoggingWinston } = require('@google-cloud/logging-winston'); const loggingWinston = new LoggingWinston(); const logger = winston.createLogger({ level: 'debug', format: useFormat, transports: [ new winston.transports.Console(), loggingWinston ] });
gcloud tools docker
Create directory “gcloud” at `pwd` first.
1. normal cli command
docker run -it -e CLOUDSDK_CONFIG=/config/mygcloud -v `pwd`/gcloud:/config/mygcloud -v `pwd`/gcloud/certs:/certs gcr.io/google.com/cloudsdktool/cloud-sdk ```2\. Put Projects docker run -it -e CLOUDSDK_CONFIG=/config/mygcloud \
-v pwd/gcloud:/config/mygcloud \
-v pwd/gcloud/certs:/certs \
-v pwd/Documents/Projects:/home \
gcr.io/google.com/cloudsdktool/cloud-sdk
oooxxxoooxxx: vpc Connector name
aaabbbaaabbb: your firebase project
Firebase deploy default vpcConnector vpc-Connector
node_modules\firebase-tools\lib\gcp\cloudfunctions.js
_createFunction
const data ADD
vpcConnector: ‘oooxxxoooxxx’,
Failed gcloud VPC
VPC_CONNECTOR=dosportsapi-redis01
projects/aaabbbaaabbb/locations/us-central1/connectors/oooxxxoooxxx
gcloud beta functions deploy api \
--runtime nodejs10 \
--trigger-http \
--region us-central1 \
--vpc-connector $VPC_CONNECTOR \
--egress-settings private-ranges-only \
--memory 2048MB
https://www.luoow.com/dc_tw/104458719
https://www.datayang.com/article/78
https://stackoverflow.com/questions/784929/what-is-the-not-not-operator-in-javascript
https://stackoverflow.com/questions/29312123/how-does-the-double-exclamation-work-in-javascript
value
!value
!!value
false
true
false true
false true
null
true false undefined
true false 0
true false -0
true false 1
false
true -5
false true NaN
true false ''
true false ‘hello’
true false
1. aws https://www.fortinet.com/content/dam/fortinet/assets/solutions/aws/FortiGate-AWS-Engineering-Reference-Document-Q4-2015.pdf 2. https://geekdudes.wordpress.com/2018/07/18/install-fortigate-amazon-ec2-instance/ 3. https://geekdudes.wordpress.com/2018/08/19/creating-static-route-in-aws-ec2-fortigate-instance/ Many documents forget SG(security group) 1. FortiGate VM SG need Inbound rules:
All traffic All All 10.0.0.0/16
2. Private VM SG need Inbound rules:
All traffic All All 10.0.0.0/16
Setting finish.
First fortigate cmd:
execute ping Private VM private ip. Need success.
Second in private vm cmd:
ping FortiGate Lan ip. Need success. Don’t forgate Check “Ping” option.
ping 10.0.1.1. Need success.
Now ping 8.