“All of our applications and our primary database now run on Google Container Engine. Container Engine gives us elasticity and scalable performance for our Kubernetes clusters. It’s fully supported and managed by Google, which makes it more attractive to us than elastic container services from other cloud providers,” says Arya Asemanfar, Engineering Manager at Mixpanel.
“What it comes down to for us is speed-to-market and cost. With Google Cloud Platform, we can confidently release services multiple times a day and launch new markets in a day. We’ve also reduced our cloud hosting costs by 50% by moving to microservices on Google Container Engine,” says Jason Vertrees, CTO at RealMassive.
apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: test-network-policy spec: podSelector: matchLabels: role: db ingress: - from: - namespaceSelector: matchLabels: project: myproject - podSelector: matchLabels: role: frontend ports: - protocol: TCP port: 6379
# Create a cluster with Network Policy Enabled gcloud beta container clusters create <CLUSTER> --project=<PROJECT_ID> --zone=<ZONE> --enable-network-policy --cluster-version=1.7.6
# Create a cluster with Network Policy Enabled # Enable the addon gcloud beta container clusters update <CLUSTER> --project=<PROJECT_ID> --zone=<ZONE>--update-addons=NetworkPolicy=ENABLE # Enable on nodes (This re-creates the node pools) gcloud beta container clusters update <CLUSTER> --project=<PROJECT_ID> --zone=<ZONE> --enable-network-policy
composer require "ext-gd:*" --ignore-platform-reqs
{ "require": { "ext-gd": "*" } }
composer require google/cloud
enable_stackdriver_integration
runtime_config
app.yaml
runtime_config: enable_stackdriver_integration: true
use Google\Cloud\Logging\LoggingClient; use Psr\Log\LogLevel; $batchLogger = LoggingClient::psrBatchLogger('app'); // logName `app` // You now have a PSR-3 compliant logger! $batchLogger->log(LogLevel::DEBUG, 'This is a debug log'); $batchLogger->debug('This is a debug log'); // The same thing
throw new \Exception('Uncaught exceptions are logged to Stackdriver!');
$obj->thisDoesNotExist(); // Fatal errors are also logged to Stackdriver!
composer require google/cloud-logging google/cloud-error-reporting \ "ext-grpc:*" --ignore-platform-reqs
bootstrap/app.php
// Add `Use` for logging libs use Google\Cloud\Logging\LoggingClient; use Monolog\Handler\PsrHandler; // ... other code // Just before returning $app if (isset($_SERVER['GAE_SERVICE'])) { $app->configureMonologUsing(function ($monolog) { $logger = LoggingClient::psrBatchLogger('app'); $handler = new PsrHandler($logger); $monolog->pushHandler($handler); }); } return $app;
use Google\Cloud\ErrorReporting\Bootstrap; // .. other code public function report(Exception $exception) { if (isset($_SERVER['GAE_SERVICE'])) { Bootstrap::exceptionHandler($exception);< } else { parent::report($exception); } }
composer require "ext-grpc:*" google/cloud-spanner --ignore-platform-reqs
<?php // index.php require __DIR__ . '/vendor/autoload.php'; $spanner = new Google\Cloud\Spanner\SpannerClient(); $instance = $spanner->instance('YOUR_INSTANCE_ID'); $database = $instance->database('YOUR_DATABASE_ID'); # Execute a simple SQL statement. echo $database->execute('SELECT "Hello Spanner" as test');
"This is a huge win for QA and development teams who need native mobile systems, such as Android, for testing/validating mobile apps. Using Google’s new hardware-accelerated nested virtualization, Functionize now enables QA teams to dramatically reduce costs, time-to-test, and the pain of maintaining a complex device inventory." -- Tamas Cser, Founder and CEO, Functionize
“Our devices are heavily used and constantly send us a huge volume of data. By connecting these devices to Cloud IoT Core, we have a secure and reliable way to not only ingest that data but then also use it to gain valuable insights. We know exactly how our systems are performing and can push updates to devices to ensure we deliver the best products and services as cost effectively as possible.” John Heard, Group CTO, Smart Parking Limited
“Our disruptive approach to automated embedded artificial intelligence is ideally suited for deployment using Google Cloud IoT Core. This integration enables our predictive models to not only run inside Google Cloud Platform but also inside the objects themselves, whether they are connected or not, with a single point of control and a unified management console. We are proud to have been selected by Google to help extend the value of AI in their IoT ecosystem.” Benoit Gourdon, CEO, Tellmeplus
"The new Java 8 runtime brings performance enhancements to our application, leading to cost savings. Running on Java 8 also means increased developer happiness and efficiency, thanks to the removal of the class white list, and to the new features the language provides. Last but not least, upgrading from the Java 7 to the Java 8 runtime was a breeze."
— Jerome Mouton, Co-founder and CTO, SnapEngage
"Our fleet is constantly changing with the evolving needs of our students and teachers. Even as we rapidly change instance types and Compute Engine zones, committed use discounts automatically apply to our aggregate usage, making it simple and straightforward to optimize our costs. The results speak for themselves: 60% of our total usage is now covered by committed use discounts, saving us thousands of dollars every month. Google really got the model right."
— Peter Bakkum, Platform Lead, Quizlet
"We see great financial benefits by using committed use discounts for predictable workloads. With committed use discounts, there are no upfront costs, unlike other platforms we have used. It’s also possible to change machine types as committed use discounts work on both vCPU and memory. We have been very happy with committed use discounts."
— Gizem Terzi Türkoğlu, Project Coordinator, MetGlobal
$ npm install --save @google-cloud/debug-agent
require('@google-cloud/debug-agent') .start({ allowExpressions: true });
“For certain tasks, [NVIDIA] GPUs are a cost-effective and high-performance alternative to traditional CPUs. They work great with Shazam’s core music recognition workload, in which we match snippets of user-recorded audio fingerprints against our catalog of over 40 million songs. We do that by taking the audio signatures of each and every song, compiling them into a custom database format and loading them into GPU memory. Whenever a user Shazams a song, our algorithm uses GPUs to search that database until it finds a match. This happens successfully over 20 million times per day.”
— Ben Belchak, Head of Site Reliability Engineering, Shazam
"On the front-end, we use the Layer 7 load balancer with a single global IP that intelligently routes customer requests to the closest location. Global load balancing will allow us to easily add another region in the future without any DNS record changes, or for that matter, doing anything besides adding VMs in the right location."
— Ravi Yeddula, Senior Director Platform Architecture and Application Development, The Home Depot
Demonstrate your proficiency to design, build and manage solutions on Google Cloud Platform.