Skip to content

Instantly share code, notes, and snippets.

View sharifsalah's full-sized avatar

Sharif Salah sharifsalah

  • Google UK
  • United Kingdom
View GitHub Profile

Google Container Engine Guestbook Codelab

This codelab walks you through creating a container cluster on Google Container Engine. It is based on a tutorial published by Google and updated here to make use of some of the newest features in the Google Developers Console. You manage your cluster and Kubernetes (k8s) from Google Cloud Shell. You store and review your k8s configuration files in Google Cloud Source Repositories. You complete the entire codelab from your browser without installing any software locally.

Pre-requisites

1 - Sign up for a Google Cloud Platform free trial here: https://cloud.google.com/free-trial/
2 - Create a Google Cloud Platform project here: https://console.developers.google.com/project

$ dev_appserver.py .
INFO 2014-05-19 20:39:04,797 devappserver2.py:765] Skipping SDK update check.
WARNING 2014-05-19 20:39:04,807 api_server.py:374] Could not initialize images API; you are likely missing the Python "PIL" module.
INFO 2014-05-19 20:39:04,814 api_server.py:171] Starting API server at: http://localhost:65372
INFO 2014-05-19 20:39:04,819 dispatcher.py:182] Starting module "default" running at: http://localhost:8080
INFO 2014-05-19 20:39:04,828 admin_server.py:117] Starting admin server at: http://localhost:8000
INFO 2014-05-19 20:39:12,227 module.py:639] default: "POST /_ah/gcs/app_default_bucket/demo-testfile HTTP/1.1" 201 -
INFO 2014-05-19 20:39:12,265 module.py:639] default: "PUT /_ah/gcs/app_default_bucket/demo-testfile?upload_id=encoded_gs_file%3AYXBwX2RlZmF1bHRfYnVja2V0L2RlbW8tdGVzdGZpbGU%3D HTTP/1.1" 200 -
INFO 2014-05-19 20:39:12,283 module.py:639] default: "GET /_ah/gcs/app_default_bucket/demo-testfile HTTP/1.1" 200 4103
INFO 2014-05-19 20:39:12,294 mod
#! /bin/bash
# enables PasswordAuthentication
# creates a user
# You can query a metadata server only from its associated instance.
# You cannot query an instance's metadata from another instance or
# directly from your local computer.
# For example, you would send a curl or wget command from the
# instance to its metadata server.
# see https://developers.google.com/compute/docs/metadata
@sharifsalah
sharifsalah / S3toBigQuery
Created January 13, 2014 14:50
Sample command that converts the format for an S3 log file into something compatible for importing into Google Big Query.
# Copyright (c) 2014 Sharif Salah - Released under The MIT License.
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:
@sharifsalah
sharifsalah / .bash_profile
Last active January 3, 2016 03:09
bash profile for running Ansible on a Google Compute Engine instance under CentoOS 6
# Copyright (c) 2014 Sharif Salah - Released under The MIT License.
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:
@sharifsalah
sharifsalah / list-group-sample.py
Last active September 14, 2018 03:59
Demo script to retrieve a list of Google Groups in a Google Apps domain based on the Directory API / Admin SDK. Requires access to an account with read access to groups and as well as a project with access to the the Admin SDK service.
#
# Copyright 2013 Sharif Salah
#
# 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