<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Kevin Blanco</title>
    <description>The latest articles on Forem by Kevin Blanco (@kevinblanco).</description>
    <link>https://forem.com/kevinblanco</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1133917%2Fb628aab1-1057-41a7-8160-33129547ac50.png</url>
      <title>Forem: Kevin Blanco</title>
      <link>https://forem.com/kevinblanco</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/kevinblanco"/>
    <language>en</language>
    <item>
      <title>Appsmith On Google Cloud Run - Secure Static Outbound IP Address</title>
      <dc:creator>Kevin Blanco</dc:creator>
      <pubDate>Wed, 13 Dec 2023 22:11:12 +0000</pubDate>
      <link>https://forem.com/appsmith/appsmith-on-google-cloud-run-secure-static-outbound-ip-address-4poh</link>
      <guid>https://forem.com/appsmith/appsmith-on-google-cloud-run-secure-static-outbound-ip-address-4poh</guid>
      <description>&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;By default, a Cloud Run, a serverless product, connects to external endpoints on the internet using a dynamic IP address pool. This default is unsuitable if the Cloud Run service connects to an external endpoint that requires connections originating from a static IP address, such as a database or API using an IP address-based firewall. You must configure your Cloud Run service to route requests through a static IP address for those connections.&lt;/p&gt;

&lt;p&gt;This guide describes enabling a Cloud Run service to send requests using a static IP address. In my test scenario, I have an &lt;strong&gt;Appsmith&lt;/strong&gt; application (the best low-code opensource platform) running in &lt;strong&gt;Google Run&lt;/strong&gt;. I need a static IP address to connect it to a MongoDB Database running in &lt;strong&gt;MongoDB Atlas&lt;/strong&gt;. Any secure application should block any connection that is not from a trusted origin, in this case, only our Cloud Run app should access the database. &lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;A Google Cloud Run working application. &lt;/li&gt;
&lt;li&gt;The gcloud command line interface installed on your machine&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's review the following diagram of the implementation: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oO_umixN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x9rvovw6f2ddjlhicnbc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oO_umixN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x9rvovw6f2ddjlhicnbc.png" alt="Image description" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can notice, the mechanisms to securely outbound the Cloud Run requests to the Database is using, first of all, a Serverless VPC connector, then, Cloud NAT, and lastly, Cloud Router, let's elaborate on these. &lt;/p&gt;

&lt;h3&gt;
  
  
  Configuring a Serverless VPC Connector
&lt;/h3&gt;

&lt;p&gt;A Serverless VPC is a feature that allows you to connect serverless applications, such as Cloud Run, to your Virtual Private Cloud (VPC) network without needing a dedicated IP address or a public IP. This enables serverless applications to access resources within your VPC securely.&lt;/p&gt;

&lt;p&gt;First, enable the API by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud services enable vpcaccess.googleapis.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we can create the VPC Connector using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud compute networks vpc-access connectors create CONNECTOR_NAME \
  --region=REGION \
  --subnet-project=PROJECT_ID \
  --subnet=SUBNET_NAME
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace the following values in this command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CONNECTOR with a name you want to give to this resource.&lt;/li&gt;
&lt;li&gt;PROJECT_ID with a name that hosts the subnetwork.&lt;/li&gt;
&lt;li&gt;SUBNET_NAME with the name of the subnetwork you created.&lt;/li&gt;
&lt;li&gt;REGION with the region where you want to create a VPC Access.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Remember always to use the same region for all these commands, this is key for the networking interfaces to function correctly.&lt;/p&gt;

&lt;p&gt;In my case, the command looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud compute networks vpc-access connectors create appsmith \
--region=us-central1 \
--network=default \
--range=10.8.0.0/28 \
--min-instances=2 \
--max-instances=10 \
--machine-type=e2-micro
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also do this the browser by going to &lt;a href="https://console.cloud.google.com/networking/connectors/add"&gt;https://console.cloud.google.com/networking/connectors/add&lt;/a&gt; and entering the same information. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XQrN6Xb0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y94zukluqd7u4b2886jt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XQrN6Xb0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y94zukluqd7u4b2886jt.png" alt="Image description" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Configuring Cloud Router
&lt;/h3&gt;

&lt;p&gt;Google Cloud Router is a networking service that enables dynamic exchange of routes between your on-premises network and your Virtual Private Cloud (VPC) network in the Google Cloud. It facilitates the creation of a dynamic and scalable hybrid cloud network architecture, in our case it will be the one connecting the Serverless VPC to the Cloud NAT to allow the Outbound Static IP address for MongoDB Atlas. &lt;/p&gt;

&lt;p&gt;Before setting up the Cloud Router, we need to reserve a new Static IP:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud compute addresses create appsmith-static-ip \
    --region=us-central1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, validate it was successfully created by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud compute addresses list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And you will see something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NAME: appsmith-static-ip
ADDRESS/RANGE: 34.67.254.239
TYPE: EXTERNAL
PURPOSE: 
NETWORK: 
REGION: us-central1
SUBNET: 
STATUS: IN_USE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, the Static IP Address assigned has been 34.67.254.239, hurray! this is the one that we will attach Cloud Router and Cloud NAT&lt;/p&gt;

&lt;p&gt;Now, to create the Cloud Router, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud compute routers create appsmith-router \
    --network default \
    --region us-central1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's it! Easy right?, now let's create the last portion of this setup:&lt;/p&gt;

&lt;h3&gt;
  
  
  Configuring Network Address Translation (NAT)
&lt;/h3&gt;

&lt;p&gt;When using a Serverless VPC Access connector, requests from your Cloud Run service are directed to your VPC network. To ensure outbound requests to external endpoints are routed through a static IP, it is necessary to configure a Cloud NAT gateway. This gateway will allow you to manage the egress traffic from your Cloud Run service, providing a secure and reliable connection to external resources.&lt;/p&gt;

&lt;p&gt;Now, here's where we glue it all together,in the following command, we will tell Google Cloud to create a new NAT using the Router and the IP Address we previously created&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud compute routers nats create appsmith-cloud-nat-config \
    --router=appsmith-router \
    --nat-external-ip-pool=appsmith-static-ip \
    --nat-all-subnet-ip-ranges \
    --enable-logging
    --router-region=us-central1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's it, this is all we need to have this setup in place, now we can use Cloud Logger to validate this is actually working&lt;/p&gt;

&lt;h3&gt;
  
  
  Validate Outbound Requests go through the Router/NAT
&lt;/h3&gt;

&lt;p&gt;Now we can validate this is working by going to Cloud Logs &lt;a href="https://console.cloud.google.com/logs/query"&gt;https://console.cloud.google.com/logs/query&lt;/a&gt; and create a new query filtering the logs by those created by the NAT Gateway:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;resource.type="nat_gateway"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will see a lot of network results after filtering, you can expand any of those results and see how your Cloud Run application is using the gateway, the Static IP Address, and the Router we defined in the previous steps&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Xpqzwai1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x8sh4720puxkjick5r7a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Xpqzwai1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x8sh4720puxkjick5r7a.png" alt="Image description" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sucess&lt;/strong&gt;!! Now, you can securely use the Static IP Address to allow requests coming from Cloud Run! In my example, I'm going to only allow requests from that IP in MongoDB Atlas&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--x88J0869--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/clva6tew0ipfuu6p5ock.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--x88J0869--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/clva6tew0ipfuu6p5ock.png" alt="Image description" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;We explained how Cloud Run outbounds the network requests to the VPC using the Serverless VPC Connector, which, will use the Cloud Router to route the requests to the outside world using the static IP Address and the Cloud NAT! Easy right?&lt;/p&gt;

</description>
      <category>googlecloud</category>
      <category>cloudrun</category>
      <category>network</category>
      <category>security</category>
    </item>
    <item>
      <title>Fostering a Product-First Mindset 🚀</title>
      <dc:creator>Kevin Blanco</dc:creator>
      <pubDate>Thu, 24 Aug 2023 17:58:24 +0000</pubDate>
      <link>https://forem.com/kevinblanco/fostering-a-product-first-mindset-5aa3</link>
      <guid>https://forem.com/kevinblanco/fostering-a-product-first-mindset-5aa3</guid>
      <description>&lt;p&gt;In the realm of software development, from my personal journey and experience, there exists a fundamental distinction between two types of programmers/developers/engineers: the "code-first" engineers and the "product-first" engineers. This dichotomy is more than just a matter of coding preference; it reflects a profound difference in approach and perspective.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code-first vs. Product-first
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Code-First Engineers:&lt;/strong&gt; Often characterized by their obsession with architectural perfection, cutting-edge tools, and impeccable test coverage, code-first engineers derive immense satisfaction from crafting intricate abstractions and utilizing the latest language features. They thrive in discussions about technical minutiae and are quick to point out areas for code improvement. To them, the code itself is the zenith of their work—the ultimate goal to be pursued relentlessly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qhwT0XA8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y32s17d1ohaz1qi87wlw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qhwT0XA8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y32s17d1ohaz1qi87wlw.png" alt="Image description" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Product-First Engineers:&lt;/strong&gt; Conversely, product-first engineers view code as a means to an end, a means to create an exceptional product that solves tangible problems for users. While they appreciate the significance of well-structured code, their primary focus lies on the end result—the product's functionality, user experience, and effectiveness in addressing real-world issues. The success of the product, rather than the elegance of the code, is what drives their passion.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--erzE_HeI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fvw2bl0ayoiyj3s0a434.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--erzE_HeI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fvw2bl0ayoiyj3s0a434.png" alt="Image description" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The divide between these two approaches often leads to debates on priorities, with each side advocating for their perspective. The code-first proponents champion maintainability, while the product-first advocates rally behind user satisfaction. While both viewpoints have their merits, it's crucial to understand that software development is, at its core, a pursuit of creating impactful solutions for users.&lt;/p&gt;

&lt;h2&gt;
  
  
  Context: What is Appsmith and Why it Matters
&lt;/h2&gt;

&lt;p&gt;Appsmith distinguishes itself as the most powerful low-code and no-code opensource platform, enabling developers to transform innovative ideas into reality with unmatched speed and efficiency. From small startups to large enterprises, Appsmith caters to a broad range of users, empowering them, regardless of their expertise, to build sophisticated applications with ease. Seamlessly bridging the gap between complex coding requirements and the need for rapid deployment, without compromising on the quality or scalability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Embracing the Product-First Mindset with a Low-Code approach using Appsmith
&lt;/h2&gt;

&lt;p&gt;Enter Appsmith, a revolutionary opensource tool that empowers engineers to seamlessly adopt a product-first mindset without compromising on the quality of their code. Unlike traditional development environments that tend to emphasize one approach over the other, Appsmith bridges the gap between code-first and product-first ideologies, offering a unified platform where both can flourish.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_yrjKSr5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ab44xvucvzoj8y9f985e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_yrjKSr5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ab44xvucvzoj8y9f985e.png" alt="Image description" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Appsmith is Ideal for Product-First Engineers
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Rapid Prototyping&lt;/strong&gt;: Appsmith's intuitive drag-and-drop interface allows engineers to swiftly create interactive prototypes of their product ideas. This encourages iterative development, enabling product-first engineers to visualize concepts and gather valuable user feedback early in the process.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User-Centric Design&lt;/strong&gt;: With Appsmith's rich library of pre-built UI components and widgets, engineers can focus on crafting user-friendly interfaces that enhance the overall product experience. The tool's real-time preview feature empowers them to fine-tune designs to perfection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Seamless Integration&lt;/strong&gt;: Appsmith seamlessly integrates with various data sources, APIs, and databases, making it effortless for product-first engineers to connect their prototypes with real data. This facilitates realistic testing and validation of their solutions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collaboration:&lt;/strong&gt; Collaboration is at the heart of product development. Appsmith facilitates cross-functional collaboration by enabling engineers, designers, and product managers to collaborate on the same platform, fostering a holistic approach to building successful products.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Role of Code-First Engineers and Appsmith's Impact
&lt;/h2&gt;

&lt;p&gt;While code-first engineers play an indispensable role in architecting robust systems, product-first engineers armed with Appsmith can open up a world of possibilities. By utilizing Appsmith's visual interface and powerful integrations, product-first engineers can rapidly translate their innovative ideas into tangible products without getting bogged down by low-level code intricacies. This synergy between the two types of engineers leads to the creation of well-designed, user-centric products supported by a strong technical foundation.&lt;/p&gt;

&lt;p&gt;Appsmith recognizes and celebrates the invaluable role of code-first engineers in shaping the digital landscape. The platform is not just a tool for product-first engineers; it's a haven where code-first engineers can channel their expertise to construct the scaffolding upon which innovative products are built.&lt;/p&gt;

&lt;p&gt;By embracing Appsmith, code-first engineers can:&lt;/p&gt;

&lt;p&gt;1.** Architect Excellence*&lt;em&gt;: Appsmith provides code-first engineers with a canvas to architect intricate systems with precision. The platform's flexible scripting capabilities and integrations allow them to design solutions that align with their architectural vision.&lt;br&gt;
2.&lt;/em&gt;* Enhance Collaboration*&lt;em&gt;: Collaboration between code-first and product-first engineers is a synergy that powers innovation. Appsmith offers an environment where these two worlds converge seamlessly, enabling code-first engineers to work alongside their product-first counterparts, translating architectural brilliance into tangible user-centric solutions.&lt;br&gt;
3&lt;/em&gt;&lt;em&gt;. Iterative Refinement&lt;/em&gt;*: Just as a piece of art evolves over time, software systems require iterative refinement. Appsmith empowers code-first engineers to continuously enhance and optimize their creations, ensuring that the codebase remains a testament to their commitment to excellence.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hFxc8t2d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6oi6ylwwsih3ews15pkf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hFxc8t2d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6oi6ylwwsih3ews15pkf.png" alt="Image description" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Inspiring a New Generation of Engineers
&lt;/h2&gt;

&lt;p&gt;In today's fast-paced world, where user needs and expectations evolve rapidly, the harmony between code-first and product-first perspectives is pivotal. As we've explored, the true essence of software development lies in delivering exceptional products that make a meaningful impact on users' lives. Appsmith emerges as a trailblazing solution that bridges the gap between these two approaches, fostering a community of engineers who prioritize innovation, user experience, and technical excellence in equal measure.&lt;/p&gt;

&lt;p&gt;As we journey forward, let's embrace the lessons from both code-first and product-first philosophies. Let's celebrate the beauty of well-crafted code while always keeping our eyes on the ultimate goal—the creation of remarkable products that transform the way we live, work, and interact. And with Appsmith by our side, we're equipped to turn these aspirations into reality, one innovative product at a time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://community.appsmith.com/content/blog/fostering-product-first-mindset-appsmith"&gt;Originally posted on the Appsmith Community Portal&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>opensource</category>
      <category>lowcode</category>
      <category>appsmith</category>
    </item>
  </channel>
</rss>
