<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Deepikarachala on Medium]]></title>
        <description><![CDATA[Stories by Deepikarachala on Medium]]></description>
        <link>https://medium.com/@deepikarachala92?source=rss-1e10a1c96bdd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*SHHw32bzEUbMCIw1</url>
            <title>Stories by Deepikarachala on Medium</title>
            <link>https://medium.com/@deepikarachala92?source=rss-1e10a1c96bdd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 00:55:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@deepikarachala92/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Google Cloud Resume challenge]]></title>
            <link>https://medium.com/@deepikarachala92/google-cloud-resume-challenge-8ea3faae45f5?source=rss-1e10a1c96bdd------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ea3faae45f5</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[gcp]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[cloud-resume-challenge]]></category>
            <dc:creator><![CDATA[Deepikarachala]]></dc:creator>
            <pubDate>Sat, 10 Aug 2024 20:16:47 GMT</pubDate>
            <atom:updated>2024-08-10T20:16:47.001Z</atom:updated>
            <content:encoded><![CDATA[<p>After achieving my GCP Associate certification, like everyone else, I was thrilled to showcase my skills through my cloud resume projects. Before you dive into my post, I must say that completing this project wasn’t an easy task. Each mistake led me to shuffle through countless documentation pages. However, in the end, my lifesaver, ChatGPT-4, was immensely helpful in understanding the cause of the errors and providing troubleshooting steps.</p><h4>Step 0: Introduction</h4><p>Originally, this challenge was given by Forrest Brazeal, but since I opted for the GCP platform for my project, I followed <a href="https://medium.com/@kevinp11/cloud-resume-challenge-gcp-version-c1bab65c6fbc">Kevin</a>’s guide. Kevin implemented this challenge using a declarative method — Deployment Manager. I could have completed this challenge in two days with a simple website template and hosting in GCP using the console. However, I challenged myself and learned two major topics from this project: using Cloud Build and setting up Deployment Manager.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lUQ9Uo9cgagpTuE-ArQUnw.png" /></figure><h4>1: Certification</h4><p>I passed the <a href="https://www.credly.com/badges/aa54e114-7316-4642-837d-3078e0a0eb7d/public_url">Google Cloud Associate Cloud Engineer</a> exam last month through the Google free certification program. The journey was fantastic, and I had the opportunity to meet new people online, share resources, and help each other along the way.</p><h4>2: HTML</h4><p>I always loved web designing, I could spend hours correcting media queries and adjusting CSS design. But this time, I opted for a simple profile static site made from scratch using HTML and Tailwind CSS framework.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gvmck_94M8w2xylHp3WjiQ.png" /></figure><h4>3. CSS</h4><p>It&#39;s my first time trying the <a href="https://tailwindcss.com/">Tailwind</a> framework, and I like its simplicity and clear documentation. I followed this <a href="https://www.youtube.com/watch?v=arftp8kFBBg">link</a> for setup.</p><h4>4. Static storage website</h4><p>I used Google Cloud Storage (GCS) to host my static site because GCS is designed to serve static content, such as HTML, CSS, and JavaScript files. It automatically handles scaling and availability for static content, making it an ideal choice for simple websites without the need to manage infrastructure.</p><p>Most of the resource implementation was done using Cloud Deployment Manager. Below, you can find snippets of the configuration file for bucket creation. I assigned the IAM role (Storage Object Viewer) for “allUsers” using the console.</p><p>Deployment Manager uses the APIs of each Google Cloud service to deploy the required resources. For example, to create a bucket in GCS, I used the storage.v1.bucket resource type.</p><pre>Resources:<br>#Create bucket<br>- name: cloud-resume-website-bucket<br>  type: storage.v1.bucket<br>  properties:<br>    name: gcp-resume-bucket<br>    storageClass: REGIONAL<br>    location: {{properties[&#39;region&#39;]}}<br>    website:<br>      mainPageSuffix: index.html<br>      notFoundPage: index.html<br>    iamConfiguration:<br>      uniformBucketLevelAccess:<br>        enabled: true<br>    labels:<br>      app: gcpresume</pre><p>The first question that popped into my mind was how to decide which properties to add to my script. An easy trick I found was to look for the equivalent REST code, which displays the properties and values used to create the resource.</p><p>In Google Cloud Deployment Manager, you can use Jinja templates to generate YAML configuration files dynamically, allowing for more flexible and scalable infrastructure management. The code mentioned above is stored as resume.jinja.</p><p>You can deploy the configuration using the command:</p><pre>gcloud deployment-manager deployments create my-resume-deploy --template resume.jinja --properties region:us-central1</pre><p>Make sure to check for errors during deployment.</p><h4>5. HTTPS</h4><p>To ensure secure hosting for the site, I implemented several key services. I configured a Global External Load Balancer with a Backend Bucket and a Frontend Static External IP, with CDN enabled for optimal performance. Additionally, I added a Google-managed HTTPS certificate along with an SSL policy to enforce secure connections.</p><pre>#Create a public IP address<br>- name: cloud-resume-public-ip<br>  type: compute.v1.globalAddress<br>  properties:<br>    labels:<br>      app: gcpresume<br><br>#Put the bucket as backend bucket<br>- name: cloud-resume-backend-bucket<br>  type: compute.beta.backendBucket<br>  properties:<br>    bucketName: $(ref.cloud-resume-website-bucket.name)<br>    description: Backend Bucket <br>    enableCdn: true<br><br>#Create HTTPS certificate:<br>- name: cloud-resume-https-certificate<br>  type: compute.v1.sslCertificate<br>  properties:<br>    type: MANAGED <br>    managed:<br>      domains:<br>        - $(ref.my-domain-builder.dnsName)<br>  <br>#create the loadbalancer(URL MAP)<br>- name: cloud-resume-loadbalancer<br>  type: compute.v1.urlMap<br>  properties:<br>    defaultService: $(ref.cloud-resume-backend-bucket.selfLink)<br>    labels:<br>      app: gcpresume<br><br>#Add TargetHTTPsProxies<br>- name: cloud-resume-target-proxy<br>  type: compute.v1.targetHttpsProxy<br>  properties:<br>    urlMap: $(ref.cloud-resume-loadbalancer.selfLink)<br>    sslCertificates:<br>      - $(ref.cloud-resume-https-certificate.selfLink)<br><br>#Add the global forwarding rule<br>- name: cloud-resume-forwarding-rule<br>  type: compute.v1.globalForwardingRule<br>  properties:<br>    loadBalancingScheme: EXTERNAL<br>    IPAddress: $(ref.cloud-resume-public-ip.address)<br>    IPProtocol: TCP<br>    portRange: 443<br>    target: $(ref.cloud-resume-target-proxy.selfLink)<br>    labels:<br>      app: gcpresume</pre><h4>6. DNS</h4><p>Initially, I purchased a domain for my resume site, “deepikarachala.com,” from Squarespace. Since the domain was obtained through a third party, I added the static External IP address generated in GCP to the DNS settings in Squarespace. Be sure to delete the default DNS settings assigned by Squarespace.</p><figure><img alt="Squarespace DNS setting" src="https://cdn-images-1.medium.com/max/857/1*QQee_J1GuC7sQfgI8o0jSw.png" /><figcaption>Squarespace DNS settings</figcaption></figure><p><strong>Note:</strong> Don’t be surprised if your site doesn’t show up immediately after hosting. In my experience, the HTTPS certificate provisioning in GCP took about 3–4 hours to complete. Additionally, DNS propagation also took some time, so a delay is normal.</p><pre>#Create DNS zone<br>- name: my-domain-builder<br>  type: dns.v1.managedZone<br>  properties:<br>    name: my-domain-zone<br>    dnsName: deepikarachala.com.<br>    description: Personal blog<br>    labels:<br>      app: gcpresume</pre><figure><img alt="Domain A record" src="https://cdn-images-1.medium.com/max/857/1*Od048n_sDWQH6zXP7Emr7A.png" /><figcaption>GCP Domain A record</figcaption></figure><p>The reason I added the A record using the console was that I couldn’t find proper documentation for creating an A record within Deployment Manager resources.</p><h4>7. Javascript</h4><p>To avoid dealing with numerous HTML tags when editing data, I created a JSON file for my resume and used JavaScript to dynamically append text to the respective sections. Additionally, I implemented a simple JSON extraction code from an HTTPS endpoint to retrieve the Visitor Count from the Firestore collection.</p><pre>jQuery(document).ready(function(){<br>    jQuery.getJSON(&quot;add-function-generated-url-here&quot;,function(data){<br>        jQuery(&#39;#visitor-count&#39;).text(data.currentVisitor);<br><br>    }).fail(function(){<br>        console.log(&quot;Error has occurred while retrieving the visitor-count data &quot;)<br>    });<br>});<br><br></pre><p>8. Database</p><p>My site includes a simple Visitor Count section connected to Firestore in Google Cloud. Firestore is a scalable, flexible NoSQL database designed for mobile, web, and server development. Firestore Collection is automatically created when it receives its first request.</p><pre>def save_visitor_data(visitor_nb):<br>    &quot;&quot;&quot;<br>    Save the number of visitors to Firestore<br><br>    :param visitor_nb: number of visitor<br>    &quot;&quot;&quot;<br>    database = firestore.Client()<br>    visitor_ref = database.collection(&quot;counts&quot;).document(&quot;visitor_count&quot;)<br><br>    # Write the new number of visitors<br>    visitor_ref.set({&#39;count&#39;: visitor_nb})</pre><h4>9. API</h4><p>We use Google Cloud Functions, a serverless service, to listen for HTTPS requests from the site. It connects to our Firestore database to update the visitor count and retrieve the latest value.</p><p>Google Cloud Functions is a serverless execution environment that allows you to run code in response to various events without managing servers. It supports a wide range of event sources, including HTTP triggers, Pub/Sub messages, Cloud Storage changes, and more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*0OJRIIy7PgldBgAuJqO18g.png" /><figcaption>Creation of Function</figcaption></figure><p>You can find the Function code <a href="https://github.com/DeepikaRachala/gcp-resume-project">here</a>.</p><p>After creating the function, assign permissions to allow `allUsers` to invoke the function without any issues. This can be done by setting the appropriate IAM policy binding to ensure that the function is accessible publicly if needed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*2OiUuwWAaKGlweBgO1d-Gw.png" /><figcaption>Assign roles</figcaption></figure><h4>10. Python</h4><p>A simple Python code is used to connect to the Firestore database, update the visitor count, and store the latest value. I used Python 3.10 for this task and made sure to update the `requirements.txt` file for dependencies.</p><h4>11. Infrastructure as Code</h4><p>Though it’s my first time implementing Infrastructure as Code (IaC) using Deployment Manager, I have learned a lot through this project. Deployment Manager is a proprietary GCP product designed to automate the deployment and management of cloud resources using configuration files. It supports both YAML and Jinja2 templates, allowing for flexible and scalable infrastructure management.</p><h4>12. Source Control</h4><p>I have created a single repository on my GitHub account to store my complete project.</p><p><a href="https://github.com/DeepikaRachala/gcp-resume-project">Link to the repository</a></p><h4>13. CI/CD Implementation</h4><p>Cloud Build supports push triggers that automatically initiate builds in response to changes in your source code repositories. This enables continuous integration and deployment by automatically building and deploying code whenever updates are pushed to the repository.</p><p>I have created a Cloud Build trigger service and connected it to my repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*_usZU8wUWrf9QX8sUE0lhg.png" /></figure><p>Cloud Build looks for a build YAML file and executes the configurations specified within it. Since CDN caching is enabled and stores static data for an hour, updated site versions may not be visible until the cached data is cleared. To prevent this, update the code only after invalidating the CDN. I haven’t included this step in Cloud Build due to the time-consuming nature of CDN invalidation and associated costs. Instead, I executed it via Cloud Shell. Apply the following command after pushing an update to the repository:</p><pre>gcloud compute url-maps invalidate-cdn-cache cloud-resume-loadbalancer --path &quot;/*&quot;</pre><h4>14. Blog post</h4><p>This is my first project after achieving the certification and I am proud to complete it. Here is the final result of my site: <a href="http://www.deepikarachala.com./">www.deepikarachala.com.</a></p><p>To anyone who has read this post up to this point, I humbly thank you. I know I have much to improve in both my writing skills and in creating more hands-on projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ea3faae45f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>