Workshop
What does your user need to understand about your project in order to use it - or potentially contribute to it?
Workshop is the place where I will store more meaningful journey of making something.
At the end of each workshop, there will be something meaningful.
AWS Amplify:
https://www.youtube.com/watch?v=g4qKydnd0vU&list=PLmexTtcbIn_hvPcUm3oAufCtH7dwNAC-g
Google Firebase:
Azure Webpage
2 - Static Web Site
GitLab static Page with custom domain is not working consistently.
There are few other options, AWS or GCP. Let’s start with AWS.
3 - Google Sheet Python
This is workshop is based on:
In this workshop, I will explain how can we manipulate google sheets using Python.
- Step 1: Sign up for a google account
- Step 2: Create a Google Service Account
- 2.1 Create a new project on Google Cloud Platform
- 2.2 Enable the required APIs
- 2.3 Manage Google Sheets API credentials
- Step 3: Share your Google Sheet with your Service Account
- Step 4: Manipulate your Google Sheet with Python
3.1 - Create Google Service Account
Step 1: Create a Google Service Account
First, we will have to create a Service Account. This account will be used to make authorized API calls to Google Cloud Services. It is important to mention that to create a Service Account it is required to have a Google account first.
4 - Go-Workshop
The goal of this workshop is to create step by step application in go.
The workshop will start with basic functionality of go language.
Gradually, it will get more intermediate and then advanced.
6.1 - Google sheet grafana
Configuring the Google Sheets data source
The Google Sheets data source is using the Google Sheet API to access spreadsheets. The data source supports two ways of authenticating against the Google Sheets API. API Key auth is used to access public spreadsheets, and Google JWT File auth using a service account is used to access private files.
API Key
If a spreadsheet is shared publicly on the Internet, it can be accessed in the Google Sheets data source using API Key auth. When accessing public spreadsheets using the Google Sheets API, the request doesn’t need to be authorized, but does need to be accompanied by an identifier, such as an API key.
To generate an API Key, follow the steps in the Google Sheets data source configuration page.
If you want to know how to share a file or folder, read about that in the official Google drive documentation.
Google JWT File
Whenever access to private spreadsheets is necessary, service account auth using a Google JWT File should be used. A Google service account is an account that belongs to a project within an account or organization instead of to an individual end user. Your application calls Google APIs on behalf of the service account, so users aren’t directly involved.
The project that the service account is associated with needs to be granted access to the Google Sheets API and the Google Drive API.
The Google Sheets data source uses the scope https://www.googleapis.com/auth/spreadsheets.readonly
to get read-only access to spreadsheets. It also uses the scope https://www.googleapis.com/auth/drive.metadata.readonly
to list all spreadsheets that the service account has access to in Google Drive.
To create a service account, generate a Google JWT file and enable the APIs. For more detailed instructions, refer to the steps documented for the Google Sheets data source in the “Add a data source” page in Grafana.
Sharing
By default, the service account doesn’t have access to any spreadsheets within the account/organization that it is associated with. To grant the service account access to files and/or folders in Google Drive, you need to share the file/folder with the service account’s email address. The email is specified in the Google JWT File. If you want to know how to share a file or folder, please refer to the official Google drive documentation.
:warning: Beware that once a file/folder is shared with the service account, all users in Grafana will be able to see the spreadsheet/spreadsheets.
When Grafana is running on a Google Compute Engine (GCE) virtual machine, Grafana can automatically retrieve default credentials from the metadata server. As a result, there is no need to generate a private key file for the service account. You also do not need to upload the file to Grafana. The following preconditions must be met before Grafana can retrieve default credentials.
- You must create a Service Account for use by the GCE virtual machine. For more information, refer to Create new service account.
- Verify that the GCE virtual machine instance is running as the service account that you created. For more information, refer to setting up an instance to run as a service account.
- Allow access to the specified API scope (
"https://www.googleapis.com/auth/spreadsheets.readonly"
).
For more information about creating and enabling service accounts for GCE instances, refer to enabling service accounts for instances in Google documentation.
6.2 - Setup
In this workshop we will explorer grafan.
The first step is to setup a grafana instance and create a dashboard with some data.
Let’s start very simple:
Apparently, we neeed to have a good project setup in GCP to use in in grafan. Let’s set that up:
https://www.youtube.com/watch?v=GnWZsHjM5To
TODO: