Learn, Code, Share

👋 I’m a software engineer who loves to learn, code, and share knowledge.

  • I write about software development, programming, and technology.
  • This blog is a place where I share my thoughts, experiences, and knowledge with the world.
  • Enjoy reading and happy coding!

How to deploy Hugo Blog to Google Cloud Storage

In this tutorial, we will learn how to deploy a Hugo blog to Google Cloud Storage. And create a load balancer to serve the static content. Let’s first start with the dummy way to deploy the Hugo blog to Google Cloud Storage. After that, we will use the Google Cloud Build to automate the deployment process. Let’s get started! Prerequisites A Hugo site Google Cloud account Google Cloud SDK TL;DR Install Hugo: Follow the Hugo installation guide. Create a new site: Run hugo new site myblog. Add a theme: Choose a theme from the Hugo themes and add it to your site (I used PaperMod). Install the Google Cloud SDK: Follow the installation guide. Authenticate: Run gcloud auth login. Create a bucket: Run gsutil mb gs://your-bucket-name. Update the hugo config file: Add the following configuration to your hugo.yaml file: deployment: targets: - name: gcs url: gs://your-bucket-name Deploy your site: Run hugo deploy --target=gcs. Make the bucket public: Run gsutil iam ch allUsers:objectViewer gs://your-bucket-name. Register a domain: Register a domain name with a domain registrar. Create a load balancer: Follow the Google Cloud Load Balancer guide. Add a A, CNAME record: Add a A, CNAME record to your domain pointing to the load balancer. Test your site: Open your browser and navigate to your domain. Okay, let’s go further the details I assume you have already set up your Hugo site and have a Google Cloud account. Now, let’s deploy your Hugo site to Google Cloud Storage. ...

🚀 🚀 🐽

Learning Core Infrastructure on Google Cloud Platform (1)

In this post, we will learn about core infrastructure on Google Cloud. TL;DR Introducing google cloud ( current ) Resource and access Virtual machines and networks Storage and databases Containers and application services Big data and machine learning Okay, let’s go further the details Introduction to Google Cloud Platform 1. What is a cloud computing? Cloud computing is the way of using information technology services over the internet. On-demand self-service: Users can access the services without human interaction. Broad network access: Services are available over the network and accessed through standard mechanisms. Resource pooling: Resources are pooled to serve multiple consumers using a multi-tenant model. Rapid elasticity: Capabilities can be elastically provisioned and released. If the customer needs more resources, they can get them quickly, if not needed, they can release them. Measured service: Cloud systems automatically control and optimize resource use by leveraging a metering capability at some level of abstraction appropriate to the type of service. The customer only pays for what they use or reserve as they go. 2. IaaS, PasS, SaaS ...

🚀 🚀 🐽

Learning Core Infrastructure on Google Cloud Platform (2)

In this post, we will learn about core infrastructure on Google Cloud. TL;DR Introducing google cloud: Resource and access ( current ) Virtual machines and networks Storage and databases Containers and application services Big data and machine learning Okay, let’s go further the details Resource and access Google Cloud Resource Hierarchy: Organization: The root node in the Google Cloud resource hierarchy. Folder: A container for projects and other folders. Project: A project is the basic container for resources. Resource: A resource is a type of object that you can create and manage in Google Cloud. ...

🚀 🚀 🐽

Learning software architect (1)

In this post, we will learn about software architect. This is a note for me while I’m reading the book “Head First Software Architecture” by Raju Gandhi, Mark Richards & Neal Ford. TL;DR Software architect basics ( current ) Know your capabilities The two law of software architecture Logical components Okay, let’s go further the details Software architect basics Software architecture definition Let’s say you are building a house. You need to have a plan, a blueprint, to build the house. The blueprint is the architecture of the house. It defines how the house will be built, what materials will be used, and how the different parts of the house will be connected. The structure thing like a roof, wall, and floor are the components of the house. The architecture defines how these components will be connected and how they will work together to form the house. Those thing are hard to change once the house is built. ...

🚀 🚀 🐽

Learning software architect (2)

In this post, we will learn about software architect. This is a note for me while I’m reading the book “Head First Software Architecture” by Raju Gandhi, Mark Richards & Neal Ford. TL;DR Software architect basics Know your capabilities ( current ) The two law of software architecture Logical components Okay, let’s go further the details Know your capabilities Architectural characteristics (the capabilities of an architecture) are the fundamental building blocks of any system. ...

🚀 🚀 🐽

Learning software architect (3)

In this post, we will learn about software architect. This is a note for me while I’m reading the book “Head First Software Architecture” by Raju Gandhi, Mark Richards & Neal Ford. TL;DR Software architect basics Know your capabilities The two law of software architecture ( current ) Logical components Okay, let’s go further the details The two law of software architecture There is nothing “static” about architecture. It is constantly changing and evolving. ...

🚀 🚀 🐽

Learning software architect (4)

In this post, we will learn about software architect. This is a note for me while I’m reading the book “Head First Software Architecture” by Raju Gandhi, Mark Richards & Neal Ford. TL;DR Software architect basics Know your capabilities The two law of software architecture Logical components ( current ) Okay, let’s go further the details Logical components

🚀 🚀 🐽