Deployment of a Web Application to automate talent onboarding using HTML / CSS / JS / BS (Front-end) + Python Flask (Back-end) with Cloud Storage and Cloud Functions 100% Serverless — Part 2

Jeann Paul Anjos
4 min readNov 14, 2022

--

In this project based on a real-world scenario, I acted as a Cloud Expert in the deployment of a Web Application to automate the HR onboarding process. By filling out a form, the user is created in the Training Portal in a fully automated way.

To deploy this solution, I used a Moodle image available on GCP Marketplace, where the REST API had been enabled, running on Compute Engine, front-end on Cloud Storage, and the back-end on Cloud Run.

I deployed the back-end using Python Flask using Cloud Functions, 100% Serverless. Then, I deployed the front-end using HTML/CSS/JS/BS on Cloud Storage to store the static files of the Web Application. See below the solution architecture for this project:

For the first part of this project, was enabled the API in Moodle.

Moodle API

In the following, I validated if the API it’s working.

For the test, it’s necessary to have the information of the Moodle IP and Token generated of the previous to obtain the result.

API validated

I loaded the project files inside Google Cloud, these files have the Backend and Frontend files that were used in the deployment.

Loaded files

Already with the unzip files, I used the Cloud Functions resource of Google and loaded the codes inside the Main and Requirements files to then provision the Backend.

Backend code

With the deploy finished, I accessed the moodleCriaUsuario function and did a copy the trigger URL to be used in the next step.

Function created
Trigger URL

In the Cloud Shell, I verified if the function is functioning correctly, inserting new input data.

Input data test

At this point, I started the Frontend deployment.

In the frontend files, I accessed the index.html file and edited the action parameter, replacing the previous URL with the Trigger URL created by the Cloud Function.

Frontend code

With the Cloud Shell, I created a bucket in the Cloud Storage of Google.

Bucket created
Bucket in Google Cloud

I uploaded all the files of the Frontend to the bucket.

Uploaded files to the bucket
Bucket details

Finally, I configured the bucket, where was set the index.html file to the homepage and the 404.html file in case of failure. Also, I changed the permission so that everyone can view all objects in the bucket.

Frontend deploy

To make the web page test, I used the authenticated URL of the Frontend, then I inserted the user input data on Onboarding page, these were stored in Google Storage and available on the iLearn page.

Frontend URL
Input data registered
Cloud Functions logs
Data registed on page

As a conclusion, this project exposed me to a real Cloud scenario where I implemented in a practical way a scenario that will help me the implement a web application using Serverless, Backend, Frontend resources for automation of talents onboarding where the talent’s analyst can perform the creation of user in the Training Portal of form totally automated.

--

--

Jeann Paul Anjos
Jeann Paul Anjos

Written by Jeann Paul Anjos

Jeann Paul, ITIL, Cobit, Avaya, Cisco

No responses yet