Private Logs Viewer
「Google Cloud Audit Logging は本当に使いやすく、BigQuery と統合すれば、すべてのアプリケーションを 1 か所で監視できる強力なツールになります」 — Darren Cibis, Shine Solutions
SetIamPolicy
Copyright 2017 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 'use strict'; exports.processFirewallAuditLogs = (event) => { const msg = JSON.parse(Buffer.from(event.data.data, 'base64').toString()); const logEntry = msg.protoPayload; if (logEntry && logEntry.request && logEntry.methodName === 'v1.compute.firewalls.insert') { let cancelFirewall = false; const allowed = logEntry.request.alloweds; if (allowed) { for (let key in allowed) { const entry = allowed[key]; for (let port in entry.ports) { if (parseInt(entry.ports[port], 10) !== 22) { cancelFirewall = true; break; } } } } if (cancelFirewall) { const resourceArray = logEntry.resourceName.split('/'); const resourceName = resourceArray[resourceArray.length - 1]; const compute = require('@google-cloud/compute')(); return compute.firewall(resourceName).delete(); } } return true; };
index.js
package.json
{ "name" : "audit-log-monitoring", "version" : "1.0.0", "description" : "monitor my audit logs", "main" : "index.js", "dependencies" : { "@google-cloud/compute" : "^0.4.1" } }
「Google Cloud のこうした新しい GPU インスタンスは、比較可能な CPU ベース システムと比べてパフォーマンスが断然優れており、現在のコンピューティングにおける大きな転換を浮き彫りにしています。米国ニューヨーク市のタクシーに関する 12 億行のデータセットに対して標準的な分析クエリを行ったところ、Google のシングル n1-highmem-32 インスタンスに 8 個の K80 を搭載したダイを接続したシステムは、それぞれ 32 vCPU の 6 ノード クラスタで動作する Impala よりも、平均処理速度が 85 倍高速でした。さらに、革新的な NVMe 接続 SSD ストレージを採用した構成では、コールド データのロード時間が 5 分の 1 に短縮されました。数十億行以上のデータをミリ秒で検索したいと考えている企業にとって、このパフォーマンスは素晴らしい柔軟性を提供してくれます」
- Todd Mostak 氏、MapD の創業者兼 CEO
「私たち The Foundry にとって、クラウド上での VFX 処理は非常にエキサイティングです。Google Cloud Platform での GPU の提供により、私たちは最先端の可視化技術にオンデマンドでアクセスできるようになり、料金は分単位で支払うことになるでしょう。私たちの業界にとって恩恵は絶大です」
- Simon Pickles 氏、The Foundry の Pipeline-in-the-Cloud 担当主席エンジニア
$ mkdir HelloWorldAspNetCore $ cd HelloWorldAspNetCore
$ dotnet new -t web Created new C# project in /home/atameldev/HelloWorldAspNetCore.
public static void Main(string[] args) { var host = new WebHostBuilder() .UseKestrel() .UseContentRoot(Directory.GetCurrentDirectory()) .UseIISIntegration() .UseStartup() .UseUrls("http://*:8080") .Build(); host.Run(); }
$ dotnet restore … log : Restore completed in 16298ms.
$ dotnet run … Now listening on: http://*:8080 Application started. Press Ctrl+C to shut down.