Google automation framework defines the process of spinning up environments on Google cloud for different business units. The goal is to give a solid foundational platform and eco-system to accelerate adoption of Cloud by different business units/teams in an agile, secure, and cost effective way.
- Prerequisite
- Development Environment Prerequisite
- Software Installation on Developer Workstations
- Google Automation Framework
- Google AI Project
- Ensure following access are in place before you start:
- Google Cloud Console
- Source Code Repository / Git-Hub / BitBucket
- Google Documents
- Development VM (Linux/Windows)
Once the Prerequisites(#prerequisite) are in place, below softwares needs to be installed on development VM assigned to developer. Google Automation framework will be executed and deployed through a different Server, (to seggregate the duties). Ensure any codes are tested on Windows and on Linux Servers.
- Developer Studio
- RHEL and Windows VM
- Google gcloud SDK 242.0.0 (https://cloud.google.com/sdk/docs/)
- Python 3.5+
- Vaults for securing Credentials (This is a question to Google Subject Matter Experts, as of now its not enabled)
- SourceTree or git bash for source control management.
- gcloud sdk:
1. https://cloud.google.com/appengine/docs/standard/go/download
- Python3.5+:
1. Install python on linux machines
- Git Client:
1. Install git client
2. Important steps to clone repo, since there had been issues with linux VM.
a) git config --global http.sslverify false
b) git config --global user.email "abc@arun.com"
c) git clone "repo url"
3. Do not modify or directly use master branch on bitbucket. Create branches from master and follow instruction while merging to master.
4. Important note to avoid conflict when merging the code and before sending Pull Request
a) Push the code from your current branch to remote
b) Switch to the master
c) git pull
d) Switch back to your branch
e) Git merge master
f) Resolve conflicts
g) Push the code
h) Send a PR
Framework consist of environments, parameters and logs as described below: This is one kind of sample to show the power and richness of the google cloud automation, the intention behind this code is to demonstrate provisioning of the resources on cloud through gcloud.
- Environments Environments folder consist of environment build templates and scripts used for spinning up environments for projects residing on google cloud. Following environment structures defined and used based on the releases and requirements.
google projects
google folders
google network
google rule-set
google rbac
google security
service account
google storage
This approach will provide prescriptive guidance on automated provisioning of infrastructure and applications.
- Allows each Business Unit/Products to create it's own Variable file
- build_google_cloud.py - reads the input json variable file and calls the right resource provisioning modules.
- This approach will help to handle different BUs or Products and able to keep the state file separate for maintaining.
- More Development required to keep the credentials to keep it on the KeyVault etc. (have to check with Google Cloud Subject Matter Expert on the details)
Google Image Vision API can detect and extract text from images.TEXT_DETECTION detects and extracts text from any image. For example, a photograph might contain a Ingrediants/Nutrition details. The JSON includes the entire extracted string, as well as individual words, and their bounding boxes.
Google Cloud Platform resources must belong to a project. Project consists of the settings, permissions and other metadata that describes the applications. Each Project has:
1. A project name, which we provide.
2. A project ID, which we can provide or Google Cloud Platform can provide for us (have to check with Google Subject Matter Expert).
3. A project number, which Google Cloud Platform provides.
This project is about Nutrition Fact Checking Application, it detects an image, and read through the ingrediants or nutritions, identifies the Calories, fats, proteins, sugar, sodium carbs etc. Once we get the information we can send the data back to the user stating the nutrition facts, like if sugar is greater than 24grams, its not good for the health in the long run, like how much sodium should take, (data collection is not fully completed) Currently am using the credentials in a json file, which is not the right way to go for it, (will be checking with Google Subject Matter Experts to understand this.)
Check the resources folder, where you can see a cocacola.jpg, the application reads throguh the image and identifies the nutrition facts, this shows the richness of the google AI apis and its usages.
(https://github.com/way2arun/googlecloud/blob/master/google-ai/resources/cocacola.jpg)
Note:: I cannot able to commit the authorization json, as it contains most protected confidential informations.
Happy Coding