<?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 Cloudy Joe on Medium]]></title>
        <description><![CDATA[Stories by Cloudy Joe on Medium]]></description>
        <link>https://medium.com/@joeblas?source=rss-20627ea5c332------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*NTOnGzn-aDc16wEo4xBaqw.png</url>
            <title>Stories by Cloudy Joe on Medium</title>
            <link>https://medium.com/@joeblas?source=rss-20627ea5c332------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 06:26:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@joeblas/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[I Built a Jarvis-Style AI Assistant That Runs My Entire Dev Workflow]]></title>
            <link>https://joeblas.medium.com/i-built-a-jarvis-style-ai-assistant-that-runs-my-entire-dev-workflow-4beb725e3523?source=rss-20627ea5c332------2</link>
            <guid isPermaLink="false">https://medium.com/p/4beb725e3523</guid>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Cloudy Joe]]></dc:creator>
            <pubDate>Fri, 20 Feb 2026 02:09:54 GMT</pubDate>
            <atom:updated>2026-02-20T02:09:54.520Z</atom:updated>
            <content:encoded><![CDATA[<h4>How I trained an AI to check my email, monitor GitHub, brief me every morning, and survive my chaotic dev life — so I don’t have to.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gC5u76cE6tE4HWEGpNjiAg.jpeg" /></figure><p>This morning before I even got out of bed, my phone buzzed. Not a spam call, not another newsletter I forgot to unsubscribe from. It was a daily briefing — weather in San Diego, my schedule, inbox summary across two Gmail accounts, GitHub PR status, build health, and a voice note from a dry British dude named Roger summarizing it all.</p><p>I didn’t write any of that. I didn’t even ask for it. My AI assistant Lurkr just… did it.</p><p>Lurkr runs 24/7 on a Linux box in my house. It checks my email, watches my repos, reviews my calendar, and tells me what actually matters — every single morning, delivered to Telegram with a voice note and archived to Google Sheets. No input from me.</p><p>I built this because I was tired of being my own secretary. I’m a skateboarder, a developer, and a small business owner. I don’t have time to be an integration layer too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jktSiZGQCpbB1Y45-s11sQ.jpeg" /></figure><h3>The Problem: Too Many Tabs, Not Enough Brain</h3><p>Look, I don’t have a CS degree. I didn’t go to Stanford or MIT. I’m more of a blue collar technician guy — I learned everything on the job, hands dirty, figuring things out in production while everybody else was reading textbooks.</p><p>Spent 10 years doing systems engineering, helped build the tech behind Google’s autonomous vehicles. Everything I know, I earned the hard way.</p><p>Then I said “nah, I want to build my own stuff” and pivoted to full-stack AI development. Started Joe’s Tech Solutions, building private AI systems for small businesses. I’m also working on The Skate Workshop — a skateboarding coaching app with pro skater Willy Santos, because apparently I can’t just have one project like a normal person.</p><p>That’s a lot of hats. Way too many hats.</p><p>Every morning I’d wake up and play the same tired game. Open Gmail — check the work inbox. Check the personal inbox. Open GitHub — check PRs, CI status, Dependabot alerts. Open Google Calendar — cross-reference work and personal schedules. Check the weather because maybe I want to hit some slappies at the curb spot later.</p><p>Thirty minutes gone. Zero lines of code written. Already tired.</p><p>The tools aren’t the problem. Gmail is fine. GitHub is great. Calendar works. The problem was <strong>me</strong>. I was the glue between all of them. I was running the same mental script every morning like some kind of human cron job, and it was eating my energy before I even started working.</p><p>So I did what any reasonable developer would do — I automated myself out of the job.</p><h3>Building Lurkr: The First 48 Hours</h3><p>First thing I did was take an old Lenovo laptop, wipe it clean, and reformat it from scratch. Nothing on it — no personal files, no old configs, no exposure. Fresh install, locked down, security handled from day one. That became the dedicated machine.</p><p>Then came OpenClaw — the open-source agent framework that runs everything. I installed it, set up the Telegram bot, and started trying to get Lurkr functional. My first instinct was to use local LLM models through Ollama — Qwen, Llama, stuff running right on the machine. Free, private, no API costs. Sounded perfect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mMwsJD-aBwpKWpPO5bTDcg.png" /></figure><p>It wasn’t.</p><p>The local models just weren’t powerful enough. Lurkr would get confused, drop tools mid-task, or give me garbage responses when I asked it to do anything complex. I spent two days bouncing back and forth between the terminal and Telegram, kicking Lurkr in the butt every time it got stuck. SSH in, check logs, restart, tweak prompts, try again. Over and over.</p><p>Then I connected Claude Opus 4.6 as the main model and everything changed. Night and day difference. Lurkr went from barely functional to genuinely useful almost immediately. It started calling tools correctly, chaining tasks together, remembering context between sessions. After 48 hours of setup, I stopped needing to babysit it. Now it just runs.</p><p>The local models still have a role — they handle lightweight health checks where I don’t want to burn API credits. But for the real work, Claude Opus is the engine.</p><h3>What Lurkr Actually Does</h3><p>Lurkr is an AI assistant running on OpenClaw, an open-source agent framework. It lives on a Linux machine I named OpenYogaClaw (don’t ask) and handles all the repetitive stuff so I can focus on the parts that actually need a human brain.</p><p>Here’s what a typical day looks like:</p><p><strong>7:00 AM PT:</strong> Lurkr wakes up before I do (via cron job) and starts gathering intel. It checks both my Gmail accounts, pulls unread messages from the last 24 hours, and summarizes what’s urgent. It checks my Google Calendar for both work and personal events. It monitors GitHub repos for open PRs, failed CI checks, and Dependabot alerts. It checks the weather. It runs system health diagnostics on the server.</p><p>Then it writes a report.</p><p><strong>7:01 AM PT:</strong> My phone buzzes. The Lurk Report has arrived.</p><p>The report is structured, scannable, and dense. It tells me:</p><ul><li><strong>Weather</strong> — Current conditions and forecast</li><li><strong>Top Priority</strong> — The single most important thing I need to handle today</li><li><strong>Schedule</strong> — Meetings and events coming up in the next 48h</li><li><strong>Inbox Heat</strong> — How many unread emails, with flags for anything urgent</li><li><strong>Build Status</strong> — GitHub repo health, open PRs, failing builds</li><li><strong>One Thing</strong> — A single insight or reminder</li><li><strong>Closing Quote</strong> — A random quote to set the tone</li></ul><p>Then comes the voice note. Roger — my ElevenLabs voice that sounds like a slightly tired British butler — reads the whole thing aloud in about 90 seconds. I can listen while making coffee or just staring into space wondering why I have 47 unread emails.</p><p><strong>7:02 AM PT:</strong> Lurkr archives the report to Google Sheets. I now have a searchable history of every morning briefing, which is weirdly useful when I need to remember “what was I supposed to do last Tuesday?”</p><p>This all happens automatically. I don’t trigger it. I don’t check if it ran. It just runs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CMQFgfhGahPhEnLOtViIVw.png" /></figure><h3>The Lurk Report: How It Actually Works</h3><p>The daily brief is the centerpiece of this whole system. Let me walk you through how it actually goes down.</p><p>Every morning at 7, a cron job fires up a fresh session — clean slate, no baggage from yesterday — and Lurkr gets to work. It’s got access to 15+ skills: Gmail, Google Calendar, Google Sheets, GitHub CLI, weather APIs, TTS, web search, browser automation. The whole toolkit.</p><p><strong>First stop: email.</strong> Lurkr uses the gog CLI to authenticate and fetch messages. Setting up two separate OAuth clients for two Google accounts was annoying as hell, but it works now and I&#39;m not touching it again.</p><pre>gog gmail search &#39;newer_than:1d&#39; --account blasj408@gmail.com --client personal<br>gog gmail search &#39;newer_than:1d&#39; --account joe@joestechsolutions.com</pre><p>It parses the results, counts unread messages, flags anything with keywords like “urgent” or “invoice,” and figures out the heat level. Is my inbox a dumpster fire or just smoldering? I need to know.</p><p><strong>Next: calendar.</strong> Same deal, both accounts. It merges events and formats them into a clean schedule block. No double-booking, no “oh shit I forgot about that call” moments at noon.</p><p><strong>Then GitHub.</strong> Open PRs? Failed CI runs? Dependabot yelling at me about some ancient dependency? Lurkr sees it all.</p><p><strong>Finally, weather.</strong> I use wttr.in because it’s fast and doesn’t make me sign up for an API key just to know if it’s gonna rain.</p><p>Once it’s got all the data, Lurkr writes the report and calls the sag skill to generate the voice note. Roger reads it in that perfect &quot;I&#39;m disappointed but not surprised&quot; British butler tone, which honestly makes bad news about failed builds easier to take.</p><p>Total runtime: about 60 seconds. The whole thing just happens, no babysitting required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*1Dm_LU7kYArucAYAokYH7w.jpeg" /></figure><h3>The Tech Stack: What’s Under the Hood</h3><p>Look, I didn’t build this from scratch. I’m standing on the shoulders of giants and a whole lot of open-source code.</p><p><strong>OpenClaw</strong> is the backbone. Open-source AI agent framework that handles orchestration, tool calling, memory management, and multi-agent coordination. I run it as a systemd service on a Linux box in my house. Always on, always listening.</p><p><strong>The Brain:</strong> Lurkr’s main model is Claude Opus 4.6 from Anthropic — that’s what powers the daily reports, conversations, and decision-making. When I need to debug or update Lurkr itself, I use Claude Code from the terminal — Anthropic’s CLI coding agent. It’s like having a senior engineer on call who already knows my entire codebase.</p><p><strong>Model Fallback Chain:</strong> I don’t rely on a single model because I’ve seen too many API outages to trust just one. Lurkr uses a fallback chain:</p><ol><li><strong>Primary:</strong> claude-opus-4-6 — the main brain, handles everything</li><li><strong>Fallback #1:</strong> google/gemini-2.5-flash — fast cloud backup</li><li><strong>Fallback #2:</strong> ollama/qwen2.5:7b — local model on my machine, zero rate limits</li></ol><p>Redundancy matters when you’re depending on this every morning.</p><p><strong>Tailscale</strong> ties it all together. I’ve got my Linux box and my phone on the same Tailscale network, so I can access Lurkr from anywhere — coffee shop, skate park, wherever. SSH in from my phone if something breaks, or just check on things remotely. The machine is always reachable, no port forwarding, no VPN hassle.</p><p><strong>ElevenLabs</strong> powers the voice notes. Roger sounds professional but lowkey sarcastic, which is perfect.</p><p><strong>Telegram Bot</strong> is the primary interface. I can ask Lurkr to check email mid-day, summarize a GitHub PR, or just tell me a joke. It’s conversational — feels less like a tool and more like a coworker who actually gets stuff done.</p><p><strong>16 Cron Jobs</strong> run at various intervals. Each runs in an isolated session with its own model. The main brain stays clean. No cross-contamination. Each agent does its thing and bounces.</p><p><strong>Multi-Agent Architecture:</strong> Lurkr can spawn 12 specialized sub-agents. Need to scrape a website? Spawn a browser agent. Need to analyze a document? Spawn a research agent. Modular, clean, fast.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fVKb8RO5r8FlEJjxGgS8yQ.jpeg" /></figure><h3>What Surprised Me</h3><p>Real talk — I expected this to work. I didn’t expect it to work <em>this well</em>.</p><p><strong>The voice notes</strong> — I thought they’d be a gimmick. Nah. Listening to Roger deliver the report is way better than reading it. It feels like a briefing from an assistant who’s slightly judging my life choices but still shows up every day.</p><p><strong>The fallback chain</strong> — I’ve never had Lurkr fail because a model was down. It just works. That’s the kind of reliability you want when you depend on something every morning.</p><p><strong>The memory system</strong> — Lurkr writes daily logs and maintains long-term memory. Over time, it’s learned my preferences, my repos, my patterns. It just… knows me at this point.</p><h3>The moment I realized this wasn’t just a dev tool:</h3><p>One night I’m deep in it — setting up systemd services, configuring OAuth tokens, debugging cron jobs. Serious infrastructure work.</p><p>Then my niece’s birthday is coming up and I think, “I wonder if I can make an image of myself as Maui from Moana.”</p><p>So I pivot. Same machine, same AI stack. I generate a video of myself as Maui — standing on a tropical beach with his giant fish hook, balloons and confetti floating up, waving and saying “Happy birthday, Stevie!” to my niece. Full Polynesian demigod energy. The family group chat exploded.</p><p>Then, because I have zero self-control, I made a LooksMaxxing version of myself. Curly hair, chiseled jawline, blazer on a rooftop, blue-steel stare into the distance. Like if a tech bro became a Calvin Klein model. My friends were crying laughing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*05QbHHCbLrOTiS0NvToT1Q.jpeg" /></figure><p>Twenty minutes later I’m back to wiring up the Lurk Report pipeline like nothing happened.</p><p>That’s the part nobody talks about when they write about “AI productivity.” Yeah, it automates my email and monitors my repos. But it also lets me be a fun uncle and make my friends laugh. The same tool that runs my business also makes me Maui.</p><p><strong>That’s not a distraction — that’s the whole point.</strong> Technology should make your <em>entire</em> life better, not just the spreadsheet parts.</p><h3>The Bigger Picture: This Is for Regular People</h3><p>Here’s the thing — I built Lurkr for myself, but the problem it solves? That’s everybody’s problem.</p><p>Every small business owner I talk to is drowning in the same tools. They’re juggling Gmail, Google Calendar, Slack, Asana, Stripe, QuickBooks, and a dozen other SaaS products. They’re spending hours every week just moving information between systems.</p><p>I’m not trying to build some massive SaaS platform or raise VC money. I’m trying to help regular people — small business owners, freelancers, solo operators — take back their time.</p><p>Imagine a real estate agent who gets a morning briefing with new MLS listings and client emails flagged by urgency. A freelance designer who gets outstanding invoices and project deadlines. A construction contractor who gets weather forecasts, crew schedules, and supply order status — all delivered to their phone in 90 seconds every morning.</p><p>Same concept, different context.</p><p>What’s missing is the human layer — someone to build the integration, tune the prompts, and make it feel like <em>your</em> assistant. That’s what I’m building.</p><h3>What’s Next</h3><p>Lurkr is far from done. I’m working on better browser automation, content generation, client onboarding pipelines, deeper Notion integration, and better error handling.</p><p>The goal isn’t perfection. It’s momentum. 1% better every week. That compounds.</p><h3>Why This Matters</h3><p>I used to think productivity was about speed. Type faster, read faster, switch contexts faster. Grind harder.</p><p>But nah — the problem was never speed. The problem was that I was spending brain cycles on stuff that didn’t need a brain.</p><p>Lurkr doesn’t make me faster. It makes me <em>available</em>. Available to write code, solve hard problems, talk to clients, build products. Available to step away from the screen when the weather’s right and not feel guilty about it.</p><p>Every morning, my phone buzzes before I’m even up. By the time I grab my coffee, Roger’s already told me what I need to know. I listen, I drink my coffee, and I get to work. Later we do a standup where Lurkr and I sync on priorities — what’s done, what’s blocked, what’s next.</p><blockquote><em>If you’re drowning in context switches and thinking “I wish I had an assistant” — you don’t need to hire someone. You need to build one.</em></blockquote><p>Or just hit me up. I’ll build it for you. That’s literally my job now.</p><p><strong>Find me:</strong> <a href="https://joestechsolutions.com/">joestechsolutions.com</a> · joe@joestechsolutions.com</p><p><strong>Want to build your own Lurkr?</strong> Check out <a href="https://github.com/openclaw/openclaw">OpenClaw</a> — the open-source framework that powers all of this.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4beb725e3523" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HumanGov: Deployment Of A Reusable Saas Multi-tenant AWS Infrastructure Using Terraform Modules…]]></title>
            <link>https://joeblas.medium.com/humangov-deployment-of-a-reusable-saas-multi-tenant-aws-infrastructure-using-terraform-modules-37ff03e26e9f?source=rss-20627ea5c332------2</link>
            <guid isPermaLink="false">https://medium.com/p/37ff03e26e9f</guid>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[saas]]></category>
            <category><![CDATA[aws-codecommit]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Cloudy Joe]]></dc:creator>
            <pubDate>Sat, 09 Dec 2023 02:15:45 GMT</pubDate>
            <atom:updated>2023-12-09T02:15:45.495Z</atom:updated>
            <content:encoded><![CDATA[<h3><em>HumanGov: Deployment Of A Reusable Saas Multi-tenant AWS Infrastructure Using Terraform Modules Securely Storing Terraform Configuration Files On AWS Code Commit.</em>🚀</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z9xnKV5FyT6iIa6HCXbScg.jpeg" /></figure><p>In this immersive project grounded in real-world scenarios, I navigated the intricacies of designing and deploying a reusable, multi-tenant SaaS infrastructure on AWS, leveraging the power of Terraform modules.</p><h3>Setting the Foundation with Terraform Modules 🌐</h3><p>To kick off the project, I organized the Terraform configuration files in a well-structured manner. Here’s a glimpse of the initial steps:</p><ol><li><strong>Move to the `human-gov-infrastructure` folder.</strong></li></ol><pre>cd human-gov-infrastructure</pre><p><strong>2. Create essential directories for Terraform files.</strong></p><pre>mkdir terraform<br>cd terraform<br>mkdir -p modules/aws_humangov_infrastructure</pre><p><strong>3. Craft the fundamental Terraform files within the `modules/aws_humangov_infrastructure` directory.</strong></p><ul><li><a href="http://variables.tf/">variables.tf</a></li><li><a href="http://main.tf/">main.tf</a></li><li><a href="http://outputs.tf/">outputs.tf</a></li></ul><p><strong>4. In the project’s root directory, establish the main.tf file that will consume the Terraform modules.</strong></p><pre>provider &quot;aws&quot; {<br> region = &quot;us-east-1&quot;<br>}<br>module &quot;aws_humangov_infrastructure&quot; {<br> source = &quot;./modules/aws_humangov_infrastructure&quot;<br> for_each = toset(var.states)<br> state_name = each.value<br>}</pre><p><strong>5. Define the states and outputs in variables.tf and outputs.tf, respectively.</strong></p><pre>variable &quot;states&quot; {<br> description = &quot;A list of state names&quot;<br> default = [&quot;california&quot;]<br>}<br>output &quot;state_infrastructure_outputs&quot; {<br> value = {<br> for state, infrastructure in module.aws_humangov_infrastructure :<br> state =&gt; {<br> ec2_public_dns = infrastructure.state_ec2_public_dns<br> dynamodb_table = infrastructure.state_dynamodb_table<br> s3_bucket = infrastructure.state_s3_bucket<br> }<br> }<br>}</pre><h3>Deploying Multi-Tenant AWS Infrastructure 🏗️</h3><p>With the Terraform modules in place, I proceeded to deploy a multi-tenant AWS infrastructure for the state of California. The key components included EC2 instances, DynamoDB databases, and S3 buckets.</p><h3>Enhancing Security with Remote State Storage 🔐</h3><p>To bolster security, I opted for the secure storage of Terraform configuration files on AWS CodeCommit. Additionally, I implemented a remote state storage mechanism using an S3 bucket. Here’s a breakdown of the process:</p><p><strong>1. Created an S3 bucket for remote Terraform state storage.</strong></p><pre>aws s3api create-bucket - bucket humangov-terraform-state-x921 - region us-east-1</pre><p><strong>2. Manually created a DynamoDB table for state locking.</strong></p><pre>aws dynamodb create-table \\<br> - table-name humangov-terraform-state-lock-table \\<br> - attribute-definitions AttributeName=LockID,AttributeType=S \\<br> - key-schema AttributeName=LockID,KeyType=HASH \\<br> - provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 \\<br> - region us-east-1</pre><p><strong>3. Defined a backend.tf file in the root project directory for Terraform to use the remote state.</strong></p><pre>terraform {<br> backend &quot;s3&quot; {<br> bucket = &quot;humangov-terraform-state-x921&quot;<br> key = &quot;terraform.tfstate&quot;<br> region = &quot;us-east-1&quot;<br> encrypt = true<br> dynamodb_table = &quot;humangov-terraform-state-lock-table&quot;<br> }<br>}</pre><p><strong>4. Initialized and applied the Terraform configuration.</strong></p><pre>terraform init<br>terraform validate<br>terraform plan<br>terraform apply</pre><h3>Git Integration and Collaboration 🤝</h3><p>Ensuring seamless collaboration and version control, I integrated the project with Git. Here are the steps:</p><p><strong>1. Added a `.gitignore` file to exclude sensitive information and temporary files generated by Terraform.</strong></p><pre>.terraform/<br>*.tfstate<br>*.tfstate.backup<br>*.tfvars<br>*.tfplan<br>*.tfr<br>*.tfstate.lock.info</pre><p><strong>2. Added Terraform files to the local Git repository, committed, and pushed them to AWS CodeCommit.</strong></p><pre>git status<br>git add .<br>git status<br>git commit -m &quot;AWS Infrastructure Terraform Configuration - first commit&quot;<br>git push -u origin</pre><h3>Conclusion and Cleanup🧹</h3><p>To conclude this phase, I responsibly destroyed the infrastructure to avoid unnecessary costs until the next module.</p><pre>terraform destroy</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sza7LJiuU52_YpnMEW7-KQ.png" /></figure><p>This project showcases the power of Terraform and AWS in deploying secure, multi-tenant SaaS infrastructures. Stay tuned for the next module as the HumanGov journey unfolds! 🚀🌐</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37ff03e26e9f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HumanGov: Implementation Of Git Repositories For Application And Infrastructure Code Using AWS…]]></title>
            <link>https://joeblas.medium.com/humangov-implementation-of-git-repositories-for-application-and-infrastructure-code-using-aws-56b2d3324a60?source=rss-20627ea5c332------2</link>
            <guid isPermaLink="false">https://medium.com/p/56b2d3324a60</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-codecommit]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Cloudy Joe]]></dc:creator>
            <pubDate>Sat, 02 Dec 2023 20:46:59 GMT</pubDate>
            <atom:updated>2023-12-02T20:46:59.280Z</atom:updated>
            <content:encoded><![CDATA[<h3>HumanGov: Implementation Of Git Repositories For Application And Infrastructure Code Using AWS CodeCommit + Proof Of Concept (POC) Process Of Commit, Push And Revert Code Changes 🚀</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4_q0fVHf2x69W2RzJJaF8w.jpeg" /></figure><h3>Introduction 🌐</h3><p>Embarking on a real-world scenario, I delved into the implementation of Git repositories for application and infrastructure code using AWS CodeCommit. This exciting journey included gaining hands-on experience with the Proof of Concept (PoC) process, featuring commit, push, and revert code changes. The mission? To set up a Git repository using AWS CodeCommit for HumanGov, a hypothetical Software as a Service designed exclusively for government organizations.</p><h3>Task 1: Establishing the Foundations 🏗️</h3><p>In the inaugural steps of the HumanGov project, our mission was to forge a robust version control system using AWS CodeCommit. We crafted two pivotal Git repositories:</p><p><strong>-human-gov-application<br>-human-gov-infrastructure</strong></p><h3>Configuring AWS CLI for Seamless Integration</h3><p>To ensure a secure and seamless integration with AWS CodeCommit, we initiated the configuration of the AWS CLI credential helper on the AWS Cloud9 EC2 development environment.</p><pre># Configuring AWS CLI for DevOps Engineer 🛠️<br>git config - global user.name &quot;Jo Blas - DevOps Engineer&quot;<br>git config - global user.email &quot;joblas@humangov.com&quot;<br>git config - global credential.helper &#39;!aws codecommit credential-helper $@&#39;<br>git config - global credential.UseHttpPath true</pre><h3>Cloning Git Repositories</h3><p>With the credentials in place, we cloned the repositories into the development environment using the HTTPS clone URLs.</p><pre>git clone &lt;https://git-codecommit.us-west-1.amazonaws.com/v1/repos/human-gov-infrastructure&gt;<br>git clone &lt;https://git-codecommit.us-west-1.amazonaws.com/v1/repos/human-gov-application&gt;</pre><h3>Task 2: Unleashing the Power of AWS Cloud9 🚀</h3><h3>Software Developer 1’s Creative Prelude 💻🎨</h3><p>As Software Developer 1, our goal was to craft a captivating proof of concept (PoC) within the AWS Cloud9 environment. The creative process began with configuring the Cloud9 environment to mirror the unique workspace preferences.</p><pre># Configuring Git for Software Developer 1 🚀<br>git config - global user.name &quot;Software Developer 1&quot;<br>git config - global user.email dev1@humangov.com<br>git config - global credential.helper &#39;!aws codecommit credential-helper $@&#39;<br>git config - global credential.UseHttpPath true</pre><h3>Crafting the Inaugural Commit and Beyond 🚀</h3><p>With the environment tuned, we cloned the `human-gov-application` repository and crafted an impressive `index.html` file, symbolizing the inception of the HumanGov project.</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>    &lt;title&gt;My Website&lt;/title&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;header&gt;<br>        &lt;h1&gt;Welcome to HumanGov!&lt;/h1&gt;<br>        &lt;nav&gt;<br>            &lt;ul&gt;<br>                &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;<br>                &lt;li&gt;&lt;a href=&quot;#&quot;&gt;About&lt;/a&gt;&lt;/li&gt;<br>                &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;<br>            &lt;/ul&gt;<br>        &lt;/nav&gt;<br>    &lt;/header&gt;<br>    &lt;main&gt;<br>        &lt;p&gt;This is a PoC for HumanGov Git Repository.&lt;/p&gt;<br>    &lt;/main&gt;<br>    &lt;footer&gt;<br>        &lt;p&gt;© My Website. All rights reserved.&lt;/p&gt;<br>    &lt;/footer&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>The journey continued with the first commit, capturing the essence of the project’s initiation.</p><pre>git add .<br>git commit -m &quot;first commit&quot;<br>git push -u origin master</pre><p>Not content with perfection, we introduced a minor typo in the header, intentionally leaving room for the next developer to make their mark.</p><h3>Software Developer 2’s Corrective Symphony 🤖🎉</h3><p>Enter Software Developer 2, ready to correct and innovate. A new Cloud9 environment was configured to simulate their unique working style and preferences.</p><pre># Configuring Git for Software Developer 2 🚀<br>git config - global user.name &quot;Software Developer 2&quot;<br>git config - global user.email dev2@humangov.com<br>git config - global credential.helper &#39;!aws codecommit credential-helper $@&#39;<br>git config - global credential.UseHttpPath true</pre><h3>Reverting Mistakes and Elevating the Header Style 🔄🚀</h3><p>The `human-gov-application` repository was cloned, and the last commit’s mistake was promptly reverted.</p><pre>git log<br>git revert &lt;hash&gt;</pre><p>But the journey didn’t stop there. A header makeover ensued, transforming it into a sleek H2 style.</p><pre>git add .<br>git commit -m &quot;fixed header size&quot;<br>git push -u origin master</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U1fObhflzzOpwhYUBCd9Dg.png" /></figure><p>In this dynamic collaboration between Software Developer 1 and Software Developer 2, AWS CodeCommit and AWS Cloud9 proved to be the perfect companions, facilitating a smooth and innovative development process for HumanGov. The journey continues, shaping the future of government services in the digital realm. 🚀🔧</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56b2d3324a60" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deployment of a Web Application to automate talent onboarding using HTML / CSS / JS / BS…]]></title>
            <link>https://joeblas.medium.com/deployment-of-a-web-application-to-automate-talent-onboarding-using-html-css-js-bs-7e6057c2db93?source=rss-20627ea5c332------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e6057c2db93</guid>
            <category><![CDATA[css]]></category>
            <category><![CDATA[google-cloud-functions]]></category>
            <category><![CDATA[python-flask]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Cloudy Joe]]></dc:creator>
            <pubDate>Thu, 31 Aug 2023 19:20:29 GMT</pubDate>
            <atom:updated>2023-08-31T19:20:29.019Z</atom:updated>
            <content:encoded><![CDATA[<h3><em>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</em></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qdck7Ypo18q-tRL5DCPeng.png" /></figure><p>Hello and welcome back to part two of this project series where we delve into deploying a Web Application to automate the talent onboarding process using a variety of technologies. In this part, we will focus on the intricacies of the deployment aspect of this project.</p><h4><strong>The Challenge</strong></h4><p>Human Resources departments often face the challenge of streamlining the onboarding process for new talent. From document submission to training module completion, the entire process often requires manual intervention at multiple levels, thus consuming time and resources.</p><h4><strong>The Solution</strong></h4><p>In this project, I took on the role of a Cloud Expert and tackled this problem by developing a fully automated HR onboarding application. The solution uses a web form to collect user details, and upon submission, the user is automatically created in a training portal — making the onboarding process efficient, quick, and error-free.</p><h4><strong>Technology Stack</strong></h4><p>1. <strong>Front-end</strong>: HTML, CSS, JS, and Bootstrap (BS)<br>2. <strong>Back-end</strong>: Python Flask<br>3. <strong>Cloud Services</strong>: Google Cloud Platform (GCP)</p><h4><strong>Moodle on Compute Engine</strong></h4><p>Moodle, an open-source learning platform, was selected as the training portal. A readily available Moodle image from GCP Marketplace was used, where the REST API had already been enabled, and this was deployed on GCP’s Compute Engine.</p><h4><strong>Back-end on Cloud Functions</strong></h4><p>For the back-end, I chose Python Flask, which I deployed using GCP’s Cloud Functions. This makes the back-end operations 100% serverless, scalable, and cost-effective.</p><h4><strong>Front-end on Cloud Storage</strong></h4><p>Static files for the web application (HTML/CSS/JS/BS) were stored on GCP’s Cloud Storage, which offers high availability and global distribution.</p><h4><strong>Deployment Steps</strong></h4><p>1. <strong>Initialize the Moodle image</strong>: Start by deploying a Moodle image from the GCP Marketplace onto Compute Engine.<br> <br>2. <strong>Set up Cloud Functions</strong>: Write your Python Flask code to interact with the Moodle REST API and deploy this code using Cloud Functions. <br> <br>3. <strong>Deploy Front-end</strong>: Upload your HTML, CSS, JS, and Bootstrap files to Cloud Storage.</p><p>4. <strong>Linking the Front-end to Back-end</strong>: Finally, make API calls from your front-end code to your back-end Flask app deployed on Cloud Functions.</p><h4><strong>Conclusion</strong></h4><p>By leveraging GCP’s robust cloud services, this web application for talent onboarding has become a scalable, serverless, and efficient solution that not only automates but also significantly speeds up the HR process.</p><p>Happy Coding! 🚀</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rMqahbLBDfygmIS_0RL4Ew.png" /></figure><h3><strong>Automated Talent Onboarding: A Detailed Step-by-Step Guide</strong></h3><h3><strong>Part 1: Setting up a Web Service Plugin on Moodle 🎓</strong></h3><p><strong><em>Log in as Admin in the Moodle Web Application</em></strong></p><p>1. <strong>What to do</strong>: Open your web browser and go to your Moodle application. Log in with your admin credentials.<br> <br>2. <strong>Why it’s important</strong>: You need administrative access to install and configure new settings and plugins on Moodle.</p><h4><strong>Navigate to Site Administration &gt; Server &gt; Web Services to Enable Web Services</strong></h4><p>1. <strong>What to do</strong>: Once logged in, go to `Site Administration &gt; Server &gt; Web Services`.<br> <br>2. <strong>Why it’s important</strong>: This is where you’ll find the settings for managing web services on Moodle.</p><p>3. <strong>Detailed Steps:</strong><br> — Click the checkbox next to <strong>Enable web services</strong>.<br> — Make sure <strong>Default</strong> is set to <strong>No</strong>.<br> — Click on <strong>Save Changes</strong>.</p><h4><strong>Enable REST Protocol</strong></h4><p>1. <strong>What to do</strong>: Stay on the same page (`<strong>Site Administration &gt; Server &gt; Web Services`</strong>).</p><p>2. <strong>Why it’s important</strong>: REST Protocol allows for communication over HTTP between Moodle and other applications.</p><p>3. <strong>Detailed Steps</strong>:<br> — Scroll down to <strong>Enable protocols</strong>.<br> — Click the checkbox next to <strong>REST Protocol</strong>.<br> — Click on <strong>Save Changes</strong>.</p><h4><strong>Add a New Web Service</strong></h4><p>1. <strong>What to do:</strong> On the left sidebar, click on <strong>Web Services</strong>.</p><p>2. <strong>Why it’s important</strong>: This is where you’ll define the new web service.</p><p>3. <strong>Detailed Steps</strong>:<br> — Click on <strong>Select a service </strong>to add a new web service.<br> — Click on <strong>Add</strong>.<br> — For <strong>Name</strong> and <strong>Short name</strong>, enter “webservice”.<br> — Check the boxes for <strong>Enable</strong> and <strong>Authorized users only</strong>.<br> — Click on <strong>Add service</strong>.</p><h4><strong>Add Functions to the Web Service</strong></h4><p>1. <strong>What to do</strong>: Go back to <strong>Web Services</strong>.</p><p>2. <strong>Why it’s important</strong>: Functions specify what your new web service will do.</p><p>3. <strong>Detailed Steps</strong>:<br> — Scroll to the <strong>’Custom services’</strong> section.<br> — Click on <strong>Functions</strong> next to your newly created service.<br> — Click on <strong>Add functions</strong>.<br> — In the search bar, type <strong>core_user_create_users</strong> and select it.<br> — Click on <strong>Add functions</strong>.</p><h4><strong>Authorize the Admin User</strong></h4><p>1. <strong>What to do</strong>: Go back to <strong>Web Services</strong>.</p><p>2. <strong>Why it’s important</strong>: This gives your Admin User the permissions needed to use the new web service.</p><p>3. <strong>Detailed Steps</strong>:<br> — Under <strong>Custom Services</strong>, find <strong>webservice</strong> and click on <strong>Authorized users</strong>.<br> — Under <strong>Not Authorized</strong>, find and select <strong>Admin User</strong>, then click <strong>Add</strong>.</p><h4><strong>Generate and Save Token</strong></h4><p>1. <strong>What to do</strong>: Go back to <strong>Web Services</strong>.</p><p>2. <strong>Why it’s important</strong>: The token enables secure interactions between Moodle and external applications.</p><p>3. <strong>Detailed Steps</strong>:<br> — Click on <strong>Create a token for a user</strong>.<br> — Under <strong>Token</strong>, select <strong>Admin User</strong>.<br> — Under <strong>Service</strong>, select <strong>webservice</strong>.<br> — Click <strong>Save Changes</strong> and note down the generated token.</p><p>4. <strong>Note</strong>: Save the token and your <strong>Moodle Server IP Address</strong> in a notepad file for later use.</p><h4><strong>Test the API from Google Cloud Shell</strong></h4><p>1. <strong>What to do</strong>: Open Google Cloud Shell.</p><p>2. <strong>Why it’s important</strong>: This confirms that the Moodle web service is working correctly.</p><p>3. <strong>Detailed Steps</strong>:<br> — Run the following `<strong>curl</strong>` command. Replace `<strong>&lt;moodle-ip-server&gt;</strong>` and `<strong>&lt;token-generated&gt;</strong>` with your specific values.</p><pre>curl -g &quot;http://&lt;moodle-ip-server&gt;/webservice/rest/server.php?wstoken=&lt;token-generated&gt;&amp;moodlewsrestformat=json&amp;wsfunction=core_user_create_users&amp;users[0][username]=929316&amp;users[0][email]=you39@yourhost.org&amp;users[0][lastname]=Test1&amp;users[0][firstname]=Moodle&amp;users[0][password]=P@40ssword123&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*67GbPg2N84f-JZOhBuWoTA.png" /></figure><h3>Part 2: Deploying a Cloud Function on Google Cloud ☁️</h3><h4>Access Google Cloud Functions</h4><p>1. <strong>What to do:</strong> Log in to your Google Cloud Console and navigate to <strong>Cloud Functions</strong> under <strong>Compute</strong>.</p><p>2. <strong>Why it’s important</strong>: Google Cloud Functions is the service where you’ll deploy your serverless functions.</p><h4>Create a New Cloud Function</h4><p>1. <strong>What to do</strong>: Click on <strong>Create Function</strong>.</p><p>2. <strong>Why it’s important</strong>: This will initiate the process for setting up a new serverless function.</p><p>3. <strong>Detailed Steps</strong>:<br> — Under <strong>Basics</strong>, for <strong>Function name</strong>, type `<strong>moodleUserCreate</strong>`.<br> — Under <strong>Trigger</strong>, select<strong> HTTP</strong>.<br> — For <strong>Authentication</strong>, select <strong>Allow unauthenticated invocations</strong>.<br> — Check the box for<strong> Require HTTPS</strong>.<br> — Click on <strong>Save</strong>.</p><h4>Add Environment Variables</h4><p>1. <strong>What to do</strong>: Scroll down to <strong>Runtime, Build, Connections, and Security Settings</strong>.</p><p>2. <strong>Why it’s important</strong>: Environment variables securely store configuration settings.</p><p>3. <strong>Detailed Steps</strong>:<br> — Under <strong>Runtime environment variables</strong>, click <strong>Add Variable</strong>.<br> — For <strong>Name</strong>, type `<strong>MOODLE_TOKEN</strong>`. For <strong>Value</strong>, paste the token generated from Moodle.<br> — Click <strong>Add Variable</strong> again. For <strong>Name</strong>, type `<strong>MOODLE_SERVER</strong>`. For <strong>Value</strong>, paste the Moodle Public IP Server.<br> — Click on <strong>Next</strong>.</p><h4>Set Runtime and Entry Point</h4><p>1. <strong>What to do</strong>: In the<strong> Runtime</strong> dropdown, select <strong>Python 3.8</strong>.</p><p>2. <strong>Why it’s important</strong>: Specifies the programming language and version.</p><p>3. <strong>Detailed Steps</strong>:<br> — In <strong>Entry point</strong>, type `<strong>receive_request</strong>`.<br> — Click on <strong>Next</strong>.</p><h4>Upload Application Code</h4><p>1. <strong>What to do</strong>: Open your Google Cloud Shell.</p><p>2. <strong>Why it’s important</strong>: This is where you’ll download and extract the application code.</p><p>3. <strong>Detailed Steps</strong>:<br> — Run</p><pre>wget https://storage.googleapis.com/bootcamp-gcp-en/bootcamp-gcp-final-project.zip</pre><p>to download the zip file.</p><p>— Run</p><pre>unzip bootcamp-gcp-final-project.zip</pre><p>to extract it.</p><p>— Open the `<strong>main.py</strong>` from `<strong>bootcamp-gcp-final-project/backend/</strong>`.<br> — Copy its contents.</p><p>4. <strong>Back in Cloud Functions</strong>, replace the content in the <strong>main.py</strong> file with the code you just copied.<br> <br>5. <strong>Repeat for `requirements.txt</strong>`: Open the `<strong>requirements.txt</strong>` from `<strong>bootcamp-gcp-final-project/backend/</strong>`, copy its contents, and replace in the Cloud Function `<strong>requirements.txt</strong>` file.</p><h4>Deploy the Cloud Function</h4><p>1. <strong>What to do</strong>: Click on <strong>Deploy</strong>.</p><p>2. <strong>Why it’s important</strong>: This action will deploy your serverless function. It may take between 2–4 minutes.</p><h4>Test the Cloud Function</h4><p>1. <strong>What to do</strong>: Once deployed, click on your function name, `<strong>moodleUserCreate</strong>`.</p><p>2. <strong>Why it’s important</strong>: You need the <strong>Trigger URL</strong> to test your function.</p><p>3. <strong>Detailed Steps</strong>:<br> — Copy the <strong>Trigger URL</strong>.<br> — Open Google Cloud Shell again and run:</p><pre>curl -X POST -F &#39;inputName=Jean&#39; -F &#39;inputLastname=Rodrigues&#39; -F &#39;inputEmail=jeanrodrigues123@gmail.com&#39; &lt;insert-the-trigger-URL&gt;</pre><p>Congratulations! If you’ve followed all these steps, you should have successfully set up a Moodle web service and deployed a Google Cloud Function. 🎉</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5fKFRyVRJTRMratXDxPVWg.png" /></figure><h3>Part 3: Setting up the Frontend 🖥️</h3><h4>Edit HTML File with Cloud Editor</h4><p>1. <strong>What to do</strong>: Open <strong>Cloud Editor</strong> in Google Cloud Console.</p><p>2. <strong>Why it’s important</strong>: This is where you’ll edit the frontend HTML file.</p><p>3. <strong>Detailed Steps:</strong><br> — Navigate to the `<strong>~/bootcamp-gcp-final-project/frontend/index.html</strong>` file.<br> — Locate the <strong>action</strong> attribute in the HTML form tag.<br> — Replace its value with your <strong>Trigger URL</strong>.</p><h4>Create a Cloud Storage Bucket</h4><p>1. <strong>What to do</strong>: Open the Google <strong>Cloud Shell</strong>.</p><p>2. <strong>Why it’s important</strong>: You’ll use Cloud Shell to create a new Google Cloud Storage bucket.</p><p>3. <strong>Detailed Steps</strong>:<br> — Run</p><pre>gsutil mb gs://tcb-gl-onb-&lt;your-name&gt;</pre><p>to create the bucket.</p><h4>Upload Frontend Files to Bucket</h4><p>1. <strong>What to do</strong>: Stay in the <strong>Cloud Shell</strong>.</p><p>2. <strong>Why it’s important</strong>: Now you’ll upload the frontend files to the bucket you’ve just created.</p><p>3. <strong>Detailed Steps</strong>:<br> — Navigate to the frontend directory: `<strong>cd ~/bootcamp-gcp-final-project/frontend/</strong>`<br> — Run</p><pre>gsutil cp * gs://tcb-gl-onb-&lt;your-name&gt;</pre><p>to copy all files to the bucket.</p><h4>Set Up Bucket for Web Hosting</h4><p>1. <strong>What to do</strong>: Still in the <strong>Cloud Shell</strong>.</p><p>2. <strong>Why it’s important</strong>: To set up the bucket for website hosting.</p><p>3. <strong>Detailed Steps</strong>:<br> — Run</p><pre>gsutil web set -m index.html -e 404.html gs://tcb-gl-onb-&lt;your-name&gt;</pre><p>to specify main and error pages.</p><p>— Run</p><pre>gsutil iam ch allUsers:objectViewer gs://tcb-gl-onb-&lt;your-name&gt;</pre><p>to set permission for public viewing.</p><h4>Test Application</h4><p>1. <strong>What to do</strong>: Go back to the Google Cloud Console and navigate to <strong>Cloud Storage</strong>.</p><p>2. <strong>Why it’s important</strong>: This is where you’ll test if everything is set up properly.</p><p>3. <strong>Detailed Steps</strong>:<br> — Click on the bucket you’ve created, `<strong>tcb-gl-onb-&lt;your-name&gt;</strong>`.<br> — Locate and click on the `<strong>index.html</strong>` file.<br> — Click on <strong>Public URL</strong> to open it in a web browser. Complete the form and submit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jOybNbi7OghbkeDgFlt8sQ.png" /></figure><h4>Final Remarks 🎉</h4><p>Congratulations! If you’ve followed all the steps, you should have a fully functional application integrating Moodle with Google Cloud, complete with a serverless function and a frontend hosted on Cloud Storage.</p><p>Feel free to check logs or debug if you encounter any issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*r7ILK7zdOjzMTIbW-7IUmQ.png" /><figcaption>Thanks for Reading!!</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e6057c2db93" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deployment of Corporate Training Portal on Google Cloud Platform using Deployment Manager, Google…]]></title>
            <link>https://joeblas.medium.com/deployment-of-corporate-training-portal-on-google-cloud-platform-using-deployment-manager-google-1537869a2cf5?source=rss-20627ea5c332------2</link>
            <guid isPermaLink="false">https://medium.com/p/1537869a2cf5</guid>
            <category><![CDATA[google-compute-engine]]></category>
            <category><![CDATA[cloud-storage]]></category>
            <category><![CDATA[google-cloud-deploy]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[moodle]]></category>
            <dc:creator><![CDATA[Cloudy Joe]]></dc:creator>
            <pubDate>Wed, 30 Aug 2023 23:29:25 GMT</pubDate>
            <atom:updated>2023-08-30T23:44:18.257Z</atom:updated>
            <content:encoded><![CDATA[<h3><em>Deployment of Corporate Training Portal on Google Cloud Platform using Deployment Manager, Google Compute Engine &amp; Cloud Storage — Part 1</em></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bUz7YLnvGcdlz0XkSiRXlg.png" /></figure><p>In the ever-evolving landscape of corporate training, organizations are constantly seeking scalable and efficient solutions for employee development. In a recent real-world project, I had the opportunity to wear the hat of a Cloud Specialist, leading the implementation of a corporate training portal using Moodle. Chosen for its reputation as one of the leading e-Learning platforms, Moodle was the perfect fit for our needs. But what really sets this project apart is our strategic deployment on Google Cloud Platform (GCP) using a blend of services like Deployment Manager, Google Compute Engine, and Cloud Storage.</p><h4><strong>Why Moodle and Why Google Cloud Platform?</strong></h4><p>Moodle has long been a go-to platform for educational institutions and corporations alike, offering flexibility, a robust set of features, and ease of use. When it came to deciding the infrastructure, GCP’s robust and scalable solutions made it a natural choice. Here, I’ll delve into how we orchestrated this deployment, ensuring high availability and seamless operation.</p><h4><strong>Using Deployment Manager for Orchestrating Moodle</strong></h4><p>The GCP Marketplace offers a Moodle image that is easy to deploy. We used Google’s Deployment Manager for orchestrating this deployment, making the setup quick and the management easier. The Deployment Manager not only handles the initial setup but also assists in managing resources, templates, and configurations, thereby reducing manual errors and saving time.</p><h4><strong>Storing Training Files in Cloud Storage for High Availability</strong></h4><p>High availability is a critical concern for corporate training platforms. Downtime or data loss can be detrimental, affecting the learning experience and impeding progress. We used GCP’s Cloud Storage bucket service for storing all the training files and data. The service not only assures high availability but also provides options for easy scaling and data redundancy.</p><p>Stay tuned for Part 2, where we will dive deeper into the technical aspects, covering topics like auto-scaling, load balancing, and best practices for ongoing maintenance.</p><p>— -</p><p>By strategically leveraging Google Cloud Platform’s suite of services, we’ve built a robust, scalable, and highly available corporate training portal. The right blend of technology can indeed make all the difference!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZwAOuBMBVgXP-sNYa8ijeA.png" /></figure><h3><strong>SOLUTION: Step-by-Step Guide to Deploying a Corporate Training Portal on GCP using Deployment Manager, GCE &amp; Cloud Storage — PART 1</strong></h3><p>Hello there! Are you excited about setting up a Corporate Training Portal but find the technical details overwhelming? Worry not! In this easy-to-follow guide, I will take you through the process of deploying a Moodle-based training portal on Google Cloud Platform (GCP). Trust me; you don’t need to be a tech whiz to do this!</p><h4><strong>🚀 Moodle Deployment</strong></h4><p><strong><em>Step 1: Enable API</em></strong><br>1. <strong>Navigate to Google Cloud Console</strong>: Open your web browser and sign in to your GCP account. If you don’t have one, you’ll need to create it.<br>2. <strong>Enable APIs:</strong> Head over to the “API &amp; Services” -&gt; “Library” and search for “Cloud Deployment Manager V2” and “Runtime Configuration.” Click on each and hit the “Enable” button.</p><p><strong><em>Step 2: Access Deployment Manager</em></strong><br>1. <strong>Go to the Menu</strong>: On the top-left corner, you’ll find a hamburger menu (three horizontal lines). Click on it.<br>2. <strong>Find Deployment Manager</strong>: Scroll down and find “Cloud Deployment Manager” under the “Tools” section. Click to open it.</p><p><strong><em>Step 3: Deploy Marketplace Solution</em></strong><br>1. <strong>Click the Plus Button</strong>: You’ll see a `[ + ] Deploy Marketplace Solution` button at the top. Click it.</p><p><strong><em>Step 4: Search for Moodle</em></strong><br>1. <strong>Type Moodle</strong>: In the search bar that appears, type “Moodle” and hit Enter.</p><p><strong><em>Step 5: Choose Moodle Solution</em></strong><br>1. <strong>Select the Right One</strong>: You’ll see a few options. Click on the one that says “Moodle | Google Click to Deploy.”</p><p><strong><em>Step 6: Launch Deployment</em></strong><br>1. <strong>Click on ‘Launch’</strong>: A new window pops up. Click the “Launch” button at the bottom.<br> — D<strong>eployment Name</strong>: Just leave this as is; it’s auto-generated for you.<br> — <strong>Machine Type</strong>: From the drop down, select `e2-medium`.<br> — <strong>Admin Email:</strong> Type in the email you frequently use.<br> — <strong>Accept Terms</strong>: Read through the terms and conditions, then click “Accept” and “Deploy.”</p><h4><strong>🗃️ Cloud Storage Setup</strong></h4><p><strong><em>Step 7: Access Cloud Storage</em></strong><br>1. <strong>Navigate</strong>: Go back to the hamburger menu and find “Cloud Storage” under the “Storage” section.</p><p><strong><em>Step 8: Create a Bucket</em></strong><br>1. <strong>Click ‘Create Bucket’</strong>: A new window appears; click on the “Create Bucket” button.<br> — <strong>Name:</strong> Type `tcb-moodle-your-name` as the bucket name.<br> — <strong>Location</strong>: Select your preferred region.<br> — <strong>Storage Class</strong>: Choose “Standard.”<br> — <strong>Access Control</strong>: Select “Fine-grained.”<br> — <strong>Public Access</strong>: Uncheck the box that says “Enforce public access prevention on this bucket.”</p><p><strong><em>Step 9: Upload Files</em></strong><br>1. <strong>Drag and Drop</strong>: Drag your files `<a href="https://import.cdn.thinkific.com/282370/courses/1474093/iLearnVideo-210904-003247.mp4">iLearnIntro.mp4</a>` and `<a href="https://import.cdn.thinkific.com/282370/courses/1474093/iLearnPdf-210904-003247.pdf">iLearnPDF.pdf</a>` into the bucket to upload them. <a href="https://import.cdn.thinkific.com/282370/courses/1474093/iLearnLogo-210904-003247.jpg">iLearn.jpg</a></p><h4><strong>🔒 Editing Object Permissions</strong></h4><p><strong><em>Step 10: Make Files Public</em></strong><br>1. <strong>Select File</strong>: Click on `iLearnIntro.mp4`.<br>2. <strong>Edit Permissions</strong>: Click on the three dots (…) next to the file, and then click “Edit Permissions.”<br>3. <strong>Add Public Access</strong>: Click on “Add Entry,” set the Entity to “Public,” Name to “allUsers,” and Access to “Reader.”<br>4. <strong>Repeat for PDF</strong>: Do the same steps for the `iLearnPDF.pdf` file.</p><h4><strong>🛠️ Moodle Admin Panel Customization</strong></h4><p><strong><em>Step 11: Access Moodle Instance</em></strong><br>1. <strong>Open Moodle</strong>: Open a new browser tab and paste the Moodle instance’s Public IP. Log in using the admin credentials you set earlier.</p><p><strong><em>Step 12: Add a New Course</em></strong><br>1. <strong>Navigate to Site Home</strong>: On the Moodle dashboard, click on “Site Home.”<br>2. <strong>Add Course</strong>: Click on “Add a new course” and fill in the name as “On boarding training for new employees” and short name as “OTNE.”</p><p><strong><em>Step 13: Add Logo</em></strong><br>1. <strong>Go to Appearance</strong>: Navigate to “Site administration” -&gt; “Appearance” -&gt; “Logos.”<br>2. <strong>Upload Logo</strong>: Click on “Upload a file,” choose your `iLearnLogo.png` file and click “Upload.”</p><h4><strong>🎨 Moodle Customization for a Cozy Look</strong></h4><p><strong><em>Step 14: Update Front Page Settings</em></strong><br>1. <strong>Navigate</strong>: Go to “Site Administration” -&gt; “Front Page” -&gt; “Front page settings.”<br>2. <strong>Update Names</strong>: Change the full site name to “Corporate Training Portal” and the short name to “i Learn.”<br>3. <strong>Add Summary</strong>: In the summary box, type “i Learn — Corporate Training Portal.”</p><p><strong><em>Step 15: Validate the Customization</em></strong><br>1. <strong>Log out and log in again</strong>: This will help you see the changes.<br>2. <strong>Edit the Home Page</strong>: Turn on editing from the site home and add a welcome video and a PDF download link.</p><p>🎉 Congratulations! You’ve now successfully set up a Moodle-based Corporate Training Portal on GCP. We’ll be using this setup in the final project, so make sure not to destroy it. See you in the next part! 😎</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i-oCUA5MBBwxiwkRt-xG2w.png" /><figcaption>Thanks for Reading!!</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1537869a2cf5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migration of Standalone Application and Database from VM (Google Compute Engine) to a modern…]]></title>
            <link>https://joeblas.medium.com/migration-of-standalone-application-and-database-from-vm-google-compute-engine-to-a-modern-3ffc84cc6a0b?source=rss-20627ea5c332------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ffc84cc6a0b</guid>
            <category><![CDATA[cloud-sql]]></category>
            <category><![CDATA[google-kubernetes-engine]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[google-compute-engine]]></category>
            <category><![CDATA[google-container-registry]]></category>
            <dc:creator><![CDATA[Cloudy Joe]]></dc:creator>
            <pubDate>Wed, 23 Aug 2023 01:03:35 GMT</pubDate>
            <atom:updated>2023-08-23T01:03:35.592Z</atom:updated>
            <content:encoded><![CDATA[<h3><em>Migration of Standalone Application and Database from VM (Google Compute Engine) to a modern architecture, using Google Kubernetes Engine (APP) + Cloud SQL (DB) with HA</em></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b2KpbuzSlRXY_AEpwlaKUQ.png" /></figure><h3>Introduction</h3><p>I recently took on a dual-challenge as a Cloud Specialist: migrating an application from Google Compute Engine (VM) to the Australia region, and then modernizing it using Google Kubernetes Engine (GKE) and Cloud SQL with High Availability (HA).</p><h3>Steps Taken</h3><h3>Phase 1: Region Migration</h3><p>The first step was relocating the VM-based application and database to Australia. This was crucial for local compliance and improved latency.</p><h3>Phase 2: Modernization</h3><ul><li>Application to GKE: We containerized the application with Docker and deployed it on GKE for better scalability and management.</li><li>Database to Cloud SQL with HA: The database was migrated to Google Cloud SQL and configured for high availability, ensuring data integrity and uptime.</li></ul><h3>Conclusion</h3><p>The project was a success. We not only moved to the Australia region but also upgraded to a more robust and scalable architecture using GKE and Cloud SQL. This modern approach allows us to focus more on delivering value rather than managing infrastructure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ueQ_YWXxkYpONqzO_xYGdQ.png" /></figure><h3><strong>A Comprehensive Guide to Modernizing Your Application with Cloud SQL and Kubernetes</strong></h3><p><strong>Pre-requisites</strong></p><p>Before diving into the modernization process, ensure you’ve already set up two virtual machines: one for your frontend application and another for your database. If you haven’t done this, please refer to my previous Medium.com article,<a href="https://medium.com/@joeblas/migration-of-intercontinental-vm-usa-region-australia-region-using-storage-snapshot-through-7face6dcd038"> “Migration of Intercontinental VM (USA Region &gt; Australia Region) using Storage Snapshot through Google Cloud Internal Private Network in less than 30 minutes”</a>.</p><h3><strong>Modernization Process to Cloud SQL + Kubernetes</strong></h3><h4><strong>Step 1: Create a Cloud SQL Instance</strong></h4><p>1.<strong> Navigate to Cloud SQL Dashboard</strong>: Open your Google Cloud Console and find the Cloud SQL section.</p><p>2. <strong>Initiate Instance Creation</strong>: Click on `<strong>Create Instance</strong>`. A form will appear, asking for the details of the new instance.</p><p>3.<strong> Fill in Instance Details:</strong><br> — <strong>Instance ID</strong>: Enter `<strong>tcb-gcp-aus-db01</strong>`<br> — <strong>Password</strong>: Use `<strong>welcome1</strong>` for the root password.<br> —<strong> Version</strong>: Choose `<strong>MySQL 5.7</strong>` from the dropdown.<br> — <strong>Region</strong>: Select `<strong>australia-southest1</strong>`<br> — <strong>Enable HA</strong>: Tick the `<strong>Multiple Zones</strong>` checkbox and set:<br> — Primary zone to `<strong>australia-southest1-a</strong>`<br> — Secondary zone to `<strong>australia-southest1-b</strong>`</p><p>4.<strong> Customize Instance:</strong><br> — <strong>Machine Type</strong>: Select `<strong>Dedicated</strong>` for a less resource-intensive option.<br> — <strong>Storage</strong>: Set storage capacity to `<strong>10GB</strong>`.<br> <br>5.<strong> Network Settings:</strong><br> — Uncheck the `<strong>Public IP</strong>` box.<br> — Check the `<strong>Private IP</strong>` box and select the <strong>`default</strong>` network.<br> <br>6. <strong>Enable API and Set Up Connection</strong>: <br> — Click `<strong>Set Up Connection</strong>`.<br> — Then click `<strong>Enable API</strong>` to enable API Service Networking.<br> — For IP range, choose `<strong>Use an automatically allocated IP range</strong>`.</p><p>7. <strong>Finalize</strong>: Click on `<strong>Create Connection</strong>` and then `<strong>Create Instance</strong>`.</p><h3><strong>Create the Database and User</strong></h3><p>1.<strong> Navigate to Databases Tab</strong>: Once your instance is ready, click on the `<strong>Databases</strong>` tab.</p><p>2. <strong>Create Database</strong>: Click `<strong>Create Database</strong>` and name it <strong>`clinic`.</strong></p><p>3. <strong>Create User</strong>: Navigate to the `<strong>Users</strong>` tab.<br> — Click `<strong>Add user account</strong>`.<br> — <strong>Username</strong>: Enter<strong> `app</strong>`<br> —<strong> Password</strong>: Use `<strong>welcome1</strong>`<br> — <strong>Host Name</strong>: Set to Allow any host (`<strong>%`</strong>).</p><h4><strong>Step 2: Containerize the Application</strong></h4><p>1. <strong>Open Cloud Shell:</strong> Click the Cloud Shell icon at the top-right of the Google Cloud Console.</p><p>2. <strong>Download App Files: </strong>Execute the following commands to download and unzip the files:</p><pre>wget https://storage.googleapis.com/bootcamp-gcp-en/bootcamp-gcp-module-db.zip<br>unzip bootcamp-gcp-module-db.zip</pre><p>3. <strong>Navigate and Build Image:</strong> Move to the directory where the app files are located and build the Docker image.</p><pre>cd ~/bootcamp-gcp-module-db/app<br> docker build -t tcb-clinic-app .</pre><h4><strong>Step 3: Upload Image to Container Registry</strong></h4><ol><li><strong>Tag Your Image: </strong>Tag the built image using your project ID with this command:</li></ol><pre>docker tag tcb-clinic-app asia.gcr.io/$DEVSHELL_PROJECT_ID/tcb-clinic-app:latest</pre><p>2. <strong>Push to Container Registry</strong>: Push the tagged image to Google’s Container Registry:</p><pre>docker push asia.gcr.io/$DEVSHELL_PROJECT_ID/tcb-clinic-app:latest</pre><h4><strong>Step 4: Deploy to Kubernetes Engine</strong></h4><p>1. <strong>Go to GKE Dashboard: </strong>Navigate to the Kubernetes Engine section in Google Cloud Console.</p><p>2. <strong>Create Autopilot Cluster</strong>: Click on `[+] <strong>Create</strong>`, then `<strong>Autopilot cluster</strong>` and then `<strong>Configure</strong>`.<br> — <strong>Name:</strong> Input `<strong>autopilot-cluster-1</strong>`<br> — <strong>Region</strong>: Choose `<strong>australia-southeast1</strong>`</p><p>3. <strong>Apply Configuration</strong>: Download and edit the Kubernetes config file.</p><pre>wget https://storage.googleapis.com/bootcamp-gcp-en/tcb-clinic.yaml</pre><p>4. <strong>Deploy using `kubectl`</strong>: Deploy the configuration using the following command:</p><pre>kubectl apply -f tcb-clinic.yaml</pre><h4><strong>Step 5: Database Migration</strong></h4><p>1. <strong>Turn Off Old VM:</strong> Navigate to Compute Engine service, find your old VM (`<strong>aus-app01</strong>`), and stop it.</p><p>2. <strong>Export Database</strong>: SSH into your old database instance (`<strong>aus-db01</strong>`) and run:</p><pre>mysqldump - add-drop-table -u root -p clinic &gt; clinic.sql</pre><p>3.<strong> Import to Cloud SQL</strong>: Use the following command to import the database into your Cloud SQL instance:</p><pre>mysql -u app -p -h &lt;PRIVATE_IP_CLOUDSQL&gt; clinic &lt; clinic.sql</pre><h4><strong>Step 6: Test Everything</strong></h4><p>1. <strong>Test App Access:</strong> Use the Load Balancer’s external IP to test if the application is up and running.</p><p>2. <strong>Test Database HA</strong>: Navigate to Cloud SQL, click on your instance and then `Failover` to initiate a failover test.</p><p><strong>Congratulations, your application and database have been successfully modernized! </strong>🚀🔥</p><p>Enjoy the fruits of your meticulous planning and flawless execution. Happy modernizing!</p><h3>Additional doc:</h3><p><a href="https://nodejs.org/en/docs/guides/nodejs-docker-webapp/">Dockerizing a Node.js web app | Node.js</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*FW1VxlFbgG3le4cKxm_v9Q.png" /><figcaption>Thanks for Reading!!</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ffc84cc6a0b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deployment of Cloud Load Balancing between Regions in the USA and Europe for global high…]]></title>
            <link>https://joeblas.medium.com/deployment-of-cloud-load-balancing-between-regions-in-the-usa-and-europe-for-global-high-9723c1f1cf1d?source=rss-20627ea5c332------2</link>
            <guid isPermaLink="false">https://medium.com/p/9723c1f1cf1d</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[load-balancing]]></category>
            <category><![CDATA[google-cloud-run]]></category>
            <category><![CDATA[cloud-load-balancers]]></category>
            <dc:creator><![CDATA[Cloudy Joe]]></dc:creator>
            <pubDate>Mon, 21 Aug 2023 21:16:00 GMT</pubDate>
            <atom:updated>2023-08-21T21:16:00.102Z</atom:updated>
            <content:encoded><![CDATA[<h3><em>Deployment of Cloud Load Balancing between Regions in the USA and Europe for global high availability and intelligent traffic distribution based on user proximity and location</em></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jclI8rTzNYQiVKSXOkdusg.png" /></figure><p>In a recent practical project, I served as a Cloud Specialist and addressed a common challenge for modern businesses: guaranteeing global high availability and intelligent traffic distribution.</p><p><strong>Project Highlights:</strong></p><ol><li><strong>Objective:</strong> Direct users to the geographically closest application page in either Finland or the United States.</li><li><strong>Architecture:</strong> Leveraged 100% serverless tech, reducing overhead while maximizing scalability and reliability.</li><li><strong>Deployment</strong>: Used the Cloud Run service to host our containerized application, ensuring non-stop availability.</li><li><strong>Traffic Management</strong>: Implemented intelligent routing. Users were automatically directed to the closest server based on their location.</li></ol><blockquote>Result? Efficient, fast, and resilient user access. As the digital realm grows, such approaches are not just beneficial; they’re essential.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a1-2cU7JlEismttCWMbTug.png" /></figure><h3><strong>Pre-requisites</strong></h3><p>Before diving in, ensure you’ve activated the following APIs:<br><strong>- Compute Engine API<br>- Cloud Build API<br>- Cloud Run API</strong></p><h3><strong>Setup and Deployment</strong></h3><p><strong>Downloading and Unzipping KidsFlix Files (Finland and USA)</strong></p><ol><li><strong>Download the application files:</strong></li></ol><pre>wget https://storage.googleapis.com/bootcamp-gcp-en/bootcamp-gcp-module-lb-files-app-usa.zip<br>wget https://storage.googleapis.com/bootcamp-gcp-en/bootcamp-gcp-module-lb-files-app-finland.zip</pre><p>2. <strong>Unzip the application files:</strong></p><pre>unzip bootcamp-gcp-module-lb-files-app-finland.zip<br>unzip bootcamp-gcp-module-lb-files-app-usa.zip</pre><h3><strong>Deploying App Kids Flix: Finland</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*HPtIuUCCDWUFt1Yh3dTA2w.png" /></figure><ol><li><strong>Navigate to the Finland application folder:</strong></li></ol><pre>cd ~/bootcamp-gcp-module-lb-files-app-finland</pre><p>2. <strong>Create the container image with Cloud Build:</strong></p><pre>gcloud builds submit - tag gcr.io/$DEVSHELL_PROJECT_ID/appkidsflixfinland</pre><p>Wait for the `<strong>SUCCESS</strong>` status before proceeding.</p><p>3. <strong>Deploy via Cloud Run:</strong></p><pre>gcloud run deploy - image gcr.io/$DEVSHELL_PROJECT_ID/appkidsflixfinland - port 5000 - platform managed</pre><p>— Confirm application name as `<strong>appkidsflixfinland</strong>` by pressing `<strong>Enter</strong>`<br> — Select region `<strong>europe-north1</strong>` by entering `<strong>13</strong>`<br> — Type `<strong>y</strong>` to allow unauthenticated requests.</p><h3><strong>Deploying App Kids Flix: USA</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0_mKAp_PCSLfCa-9ie1e6g.png" /></figure><ol><li><strong>Navigate to the USA application folder:</strong></li></ol><pre>cd ~/bootcamp-gcp-module-lb-files-app-usa</pre><p>2. <strong>Create the container image with Cloud Build:</strong></p><pre>gcloud builds submit - tag gcr.io/$DEVSHELL_PROJECT_ID/appkidsflixusa</pre><p>Wait for the `<strong>SUCCESS</strong>` status before proceeding.</p><p>3. <strong>Deploy via Cloud Run:</strong></p><pre>gcloud run deploy - image gcr.io/$DEVSHELL_PROJECT_ID/appkidsflixusa - port 5000 - platform managed</pre><p>— Confirm application name as `<strong>appkidsflixusa</strong>`<br> — Select region `<strong>us-central1</strong>` by entering `<strong>30</strong>`<br> — Type `<strong>y</strong>` to allow unauthenticated requests.</p><h3><strong>Deploying External HTTP Load Balancer</strong></h3><ol><li><strong>Create 2 serverless NEGs:</strong></li></ol><pre>gcloud compute network-endpoint-groups create sneg-appkidsflixfinland - region=europe-north - network-endpoint-type=serverless - cloud-run-service=appkidsflixfinland<br>gcloud compute network-endpoint-groups create sneg-appkidsflixusa - region=us-central1 - network-endpoint-type=serverless - cloud-run-service=appkidsflixusa</pre><p>2. <strong>Create a global backend service:</strong></p><pre>gcloud compute backend-services create kidsflix-backend-global - global</pre><p>3. <strong>Add the serverless NEGs to the backend service global:</strong></p><pre>gcloud compute backend-services add-backend kidsflix-backend-global - global - network-endpoint-group=sneg-appkidsflixfinland - network-endpoint-group-region=europe-north1<br>gcloud compute backend-services add-backend kidsflix-backend-global - global - network-endpoint-group=sneg-appkidsflixusa - network-endpoint-group-region=us-central1</pre><p>4.<strong> Create a URL map:</strong></p><pre>gcloud compute url-maps create lb-kidsflix-global - default-service kidsflix-backend-global</pre><p>5. <strong>Create a target HTTP(S) proxy:</strong></p><pre>gcloud compute target-http-proxies create lb-kidsflix-httpproxy - url-map=lb-kidsflix-global</pre><p>6. <strong>Reserve an IP address:</strong></p><pre>gcloud compute addresses create kidsflix-global-ip - ip-version=IPV4 - global</pre><p>To check the IP, use and then copy the address:</p><pre>gcloud compute addresses describe kidsflix-global-ip - format=&quot;get(address)&quot; - global</pre><p>7. <strong>Create a global forwarding rule:</strong></p><pre>gcloud compute forwarding-rules create kidsflix-frontend-global - address=kidsflix-global-ip - target-http-proxy=lb-kidsflix-httpproxy - global - ports=80</pre><p>8. <strong>VPN Extension Setup</strong>: Install the ‘Free VPN for Chrome — VPN Proxy VeePN’ from <a href="https://chrome.google.com/webstore/detail/free-vpn-for-chrome-vpn-p/majdfhpaihoncoakbjgbdhglocklcgno?hl=en">here</a> and activate it for testing.</p><p><strong>Congrats!</strong> 🎉 You’ve successfully set up load balancing for KidsFlix.</p><p><strong>References:</strong><br>- <a href="https://cloud.google.com/load-balancing/docs/negs">NEG documentation</a><br>- <a href="https://cloud.google.com/load-balancing/docs/https">HTTPS load balancing</a><br>- <a href="https://cloud.google.com/load-balancing/docs/load-balancing-overview">Load balancing overview</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*g4GycF8Sekn-l-f-dMWX-w.png" /><figcaption>Thanks for Reading!!</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9723c1f1cf1d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migration of Intercontinental VM (USA Region > Australia Region) using Storage Snapshot through…]]></title>
            <link>https://joeblas.medium.com/migration-of-intercontinental-vm-usa-region-australia-region-using-storage-snapshot-through-7face6dcd038?source=rss-20627ea5c332------2</link>
            <guid isPermaLink="false">https://medium.com/p/7face6dcd038</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[cloud-storage]]></category>
            <category><![CDATA[cloud-firestore]]></category>
            <category><![CDATA[persistent-disk]]></category>
            <category><![CDATA[google-compute-engine]]></category>
            <dc:creator><![CDATA[Cloudy Joe]]></dc:creator>
            <pubDate>Sun, 20 Aug 2023 22:20:34 GMT</pubDate>
            <atom:updated>2023-08-20T22:25:05.578Z</atom:updated>
            <content:encoded><![CDATA[<h3><em>Migration of Intercontinental VM (USA Region &gt; Australia Region) using Storage Snapshot through Google Cloud Internal Private Network in less than 30 minutes</em></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xKNRFS2XvaF_x5z1Z-OFIg.png" /></figure><h3>Background:</h3><p>As a Cloud Specialist, I recently helmed a project for a sizable US clinic to transfer a MySQL database and their Registration Application from the US to Australia using Google Cloud’s infrastructure.</p><h3>The Approach:</h3><ol><li>Snapshot Creation: Captured entire data via Google Cloud Storage Snapshots.</li><li>Disk Migration: Created equivalent disks in Australia.</li><li>Instance Provisioning: Fired up new instances tailored for the migrated data.</li></ol><h3>Outcome:</h3><p>In under 30 minutes, we achieved a swift, private, and accurate migration across continents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3uJcUDnmCAKSt8i9Tioofw.png" /></figure><h3><strong>Intercontinental VM Migration using Google Cloud: A Step-by-Step Guide</strong></h3><p>🌟<strong> Phase 1: Initialization</strong></p><p><strong>Step 1</strong>: <em>Instance Creation</em></p><p>- Set up two instances with the following configurations:</p><p><strong>a</strong>. <strong>GCE — Application (app)</strong><br> — Name: usa-app01<br> — Region: us-west1 (Oregon)<br> — Zone: us-west1-b<br> — Size: e2-micro<br> — OS: Debian GNU/Linux 10 (buster)<br> <br><strong> b</strong>. <strong>GCE — Database (db)</strong><br> — (Use same settings as above, except the name should be usa-db01)</p><p>🌟<strong> Phase 2: Database Setup</strong></p><p><strong>Step 2:</strong> <em>System Updates &amp; Package Installations</em></p><p>Run the following in order:</p><pre>sudo apt-key adv - keyserver keyserver.ubuntu.com - recv-keys 467B942D3A79BD29<br>sudo apt update<br>sudo apt-get -y install wget<br>wget http://repo.mysql.com/mysql-apt-config_0.8.13-1_all.deb<br>sudo dpkg -i mysql-apt-config_0.8.13–1_all.deb</pre><p>Select OK.</p><p><strong>Step 3</strong>: <em>MySQL Server Installation</em></p><p>Run:</p><pre>sudo apt update<br>sudo apt install mysql-server -y</pre><p>Set password as “welcome1” and choose “Use Legacy Authentication Method (Retain MySQL 5.x Compatibility)”.</p><p><strong>Step 4:</strong> <em>Restarting MySQL</em></p><pre>sudo systemctl restart mysql.service</pre><p><strong>Step 5</strong>:<em>MySQL Configuration</em></p><pre>sudo mysql_secure_installation</pre><p>Enter password “welcome1” and answer ’N’ to all questions.</p><p><strong>Step 6</strong>: <em>Database File Acquisition</em></p><pre>wget https://storage.googleapis.com/bootcamp-gcp-en/bootcamp-gcp-storage-db-en.sql</pre><p><strong>Step 7:</strong> <em>Connect to Database</em></p><pre>mysql -u root -p</pre><p>Enter password: “welcome1”.</p><p><strong>Step 8:</strong> <em>Database and Tables Setup</em></p><pre>source bootcamp-gcp-storage-db-en.sql</pre><p><strong>Step 9:</strong> <em>User Creation &amp; Privilege Setup</em></p><pre>CREATE USER app@&#39;%&#39; IDENTIFIED BY &#39;welcome1&#39;;<br>GRANT ALL PRIVILEGES ON clinic.* TO app@&#39;%&#39;;<br>FLUSH PRIVILEGES;<br>exit</pre><p>🌟 <strong>Phase 3: VM Application Setup</strong></p><p><strong>Step 10: </strong><em>OS and Package Updates</em></p><pre>sudo apt-get update<br>sudo apt-get install -y npm zip wgey</pre><p><strong>Step 11</strong>:<em> App Download &amp; Unzip</em></p><pre>wget https://storage.googleapis.com/bootcamp-gcp-en/bootcamp-gcp-storage-clinic-mid-app.zip<br>unzip bootcamp-gcp-storage-clinic-mib-app.zip<br>cd bootcamp-gcp-storage-clinic-mib-app</pre><p><strong>Step 12</strong>: <em>Editing index.js</em></p><pre>nano src/index.js</pre><p>In the <strong>Middlewares</strong> section, adjust host, user, password, and database as instructed.</p><p><strong>Step 13</strong>: <em>Install NPM Package &amp; Start App</em></p><pre>npm install<br>node src/index.js</pre><p><strong>Step 14</strong>: <em>Firewall Rule Setup</em></p><p>Navigate to Firewall services → Create Firewall Rule → and follow the provided configurations.</p><p>🌟<strong> Phase 4: VM Migration using Storage Snapshot</strong></p><p><strong>Steps 15–24</strong>: Follow steps 1 to 10 provided in the “<strong>Migrating the VMs using the Storage Snapshot</strong>” section.</p><p>🎉 <strong>Congrats! You’ve successfully migrated the VM intercontinentally on Google Cloud! </strong>🚀</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*9IPxktmzeeMalv2yzYiBLQ.png" /><figcaption>Thanks for Reading!!</figcaption></figure><h3>References:</h3><ul><li><a href="https://cloud.google.com/compute/docs/instances/moving-instance-across-zones">https://cloud.google.com/compute/docs/instances/moving-instance-across-zones</a></li><li><a href="https://cloud.google.com/compute/docs/disks/create-snapshots">https://cloud.google.com/compute/docs/disks/create-snapshots</a></li><li><a href="https://cloud.google.com/compute/docs/disks/snapshot-best-practices">https://cloud.google.com/compute/docs/disks/snapshot-best-practices</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7face6dcd038" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lift & Shift + Application Modernization: Converting a legacy application to run in containers on…]]></title>
            <link>https://joeblas.medium.com/lift-shift-application-modernization-converting-a-legacy-application-to-run-in-containers-on-76cdcecbefaa?source=rss-20627ea5c332------2</link>
            <guid isPermaLink="false">https://medium.com/p/76cdcecbefaa</guid>
            <category><![CDATA[anthos]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[google-kubernetes-engine]]></category>
            <dc:creator><![CDATA[Cloudy Joe]]></dc:creator>
            <pubDate>Wed, 16 Aug 2023 00:34:47 GMT</pubDate>
            <atom:updated>2023-08-16T00:34:47.932Z</atom:updated>
            <content:encoded><![CDATA[<h3><em>Lift &amp; Shift + Application Modernization: Converting a legacy application to run in containers on Google Kubernetes Engine (GKE) using Anthos.</em></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e7OJ18VFSW67dbTLMQsElg.png" /></figure><p>In a recent project mirroring real-world complexities, I took on the role of a Cloud Specialist.</p><p>Guiding a company in its bold venture, the aim was to transition its complete Datacenter to Google Cloud, all within a tight span of 3 months.</p><p>The company wisely strategized the migration in two distinct phases.</p><p>Initially, there was the “Lift &amp; Shift”.</p><p>This was closely followed by the revamp of their Talent Management Portal.</p><p>Upon completion of the first phase, my responsibilities took a shift.</p><p>My primary focus became rejuvenating the Talent Management Portal. The goal? Optimizing it for the Google Kubernetes Engine (GKE).</p><p>And to achieve this, I leveraged the powerful capabilities of Migrate for Anthos.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NKbFJPOXUCV2cAk5t4k1Eg.png" /></figure><h3><strong>Before Starting…</strong></h3><p><strong>-Step 1:</strong> Creating a Project<br> —<strong> Name:</strong> tcb-gcp-anthos</p><p><strong>- Step 2</strong>: Ensure billing is enabled for the newly created project.</p><h3><strong>Enabling 03 APIs</strong></h3><p>Navigate to <strong>API &amp; Services | Dashboard | Enable API e Services.</strong></p><p>Activate these APIs:<br>- Cloud Resource Manager API<br>- Compute Engine API<br>- Kubernetes Engine API</p><h3><strong>Lift &amp; Shift Process</strong></h3><ul><li><strong>Step 1:</strong> Launch Cloud Shell and set project default as `tcb-gcp-anthos`.</li></ul><pre>gcloud config set project tcb-gcp-anthos</pre><p>The variable `<strong>$DEVSHELL_PROJECT_ID</strong>` now reflects the tcb-gcp-anthos project ID.</p><ul><li><strong>Step 2:</strong> Designate the compute zone `us-west1-a` as default.</li></ul><pre>gcloud config set compute/zone us-west1-a</pre><ul><li><strong>Step 3:</strong> Implement firewall rules to permit traffic on HTTP and SSH ports.</li></ul><pre>gcloud compute firewall-rules create allow-ssh - network default - allow tcp:22 - source-ranges 0.0.0.0/0<br><br>gcloud compute firewall-rules create allow-http - network default - allow tcp:80 - source-ranges 0.0.0.0/0</pre><ul><li><strong>Step 4:</strong> Execute the command below to instate the VM for Lift &amp; Shift.</li></ul><pre>gcloud compute instances create app-01 - project=$DEVSHELL_PROJECT_ID - zone=us-west1-a - machine-type=n1-standard-1 - subnet=default - scopes=&quot;cloud-platform&quot; - tags=http-server,https-server - image=ubuntu-minimal-1604-xenial-v20210119a - image-project=ubuntu-os-cloud - boot-disk-size=10GB - boot-disk-type=pd-standard - boot-disk-device-name=app-01</pre><ul><li><strong>Step 5:</strong> Generate a key pair and adjust permissions.</li></ul><pre>ssh-keygen -t rsa -f ~/.ssh/app-key -C [USERNAME]<br> chmod 400 ~/.ssh/app-key</pre><p>To confirm permissions:</p><pre>ls -l | grep app-key</pre><ul><li><strong>Step 6:</strong> Integrate the generated key pair with Google Cloud.</li></ul><pre>gcloud compute config-ssh - ssh-key-file=~/.ssh/app-key</pre><ul><li><strong>Step 7:</strong> Connect to the newly generated VM through SSH and run the subsequent commands.</li></ul><pre>sudo apt-get update &amp;&amp; sudo apt-get install apache2 unzip -ycd /var/www/html<br> sudo mv index.html index.html.bkp<br> sudo curl -O https://storage.googleapis.com/bootcamp-gcp-en/hands-on-compute-website-files-en.zip<br> sudo unzip hands-on-compute-website-files-en.zip<br> sudo chmod 644 *</pre><p><strong>- Step 8:</strong> Retrieve the External IP of the created Compute Engine and access via a browser to verify the Lift &amp; Shift operation’s success.</p><ul><li><strong>Step 9:</strong> After confirming the web application’s functionality, deactivate VM instances named `<strong>app-01</strong>`.</li></ul><h3><strong>Modernization Process — Part 2</strong></h3><p><strong>Setting Up a GKE Cluster</strong></p><ul><li><strong>Step 1: </strong>Utilize the `<strong>gcloud</strong>` command.</li></ul><pre>gcloud container clusters create app-01 - project=$DEVSHELL_PROJECT_ID - zone=us-west1-a<br> - num-nodes 1 - logging=SYSTEM - monitoring=SYSTEM - subnetwork &quot;projects/$DEVSHELL_PROJECT_ID/regions/us-west1/subnetworks/default&quot;</pre><h3>Installing the Migrate for Anthos on GKE</h3><p>Migrating legacy applications to modern environments like Kubernetes can be daunting. Google’s Migrate for Anthos offers a streamlined process for achieving this. Here’s a step-by-step guide to help you install Migrate for Anthos on the Google Kubernetes Engine (GKE).</p><p><strong>1. Create a Service Account for the Installation</strong></p><p>Before we proceed, we’ll need to set up a service account called `<strong>tcb-m4a-install</strong>` which will have the required permissions.</p><p>Command:</p><pre>gcloud iam service-accounts create tcb-m4a-install - project=$DEVSHELL_PROJECT_ID</pre><p><strong>2. Assign Storage Admin Role to the Service Account</strong></p><p>Now, it’s crucial to give our service account the necessary permissions. In this case, we’re assigning the `<strong>storage.admin</strong>` role.</p><p><strong>Important Note:</strong> Before running the following command, ensure to copy it to a notepad and remove all “\” characters. Once done, run the cleaned-up command.</p><p><strong>Command</strong>:</p><pre>gcloud projects add-iam-policy-binding $DEVSHELL_PROJECT_ID - member=&quot;serviceAccount:tcb-m4a-install@$DEVSHELL_PROJECT_ID.iam.gserviceaccount.com&quot; - role=&quot;roles/storage.admin&quot;</pre><p><strong>3. Generate and Download Service Account Key</strong></p><p>With the service account in place and properly configured, let’s generate a key for it and download the key file. This key will be essential for authenticating our actions in subsequent steps.</p><p><strong>Command:</strong></p><pre>gcloud iam service-accounts keys create tcb-m4a-install.json - iam-account=tcb-m4a-install@$DEVSHELL_PROJECT_ID.iam.gserviceaccount.com - project=$DEVSHELL_PROJECT_ID</pre><p><strong>4. Connect to the Kubernetes Cluster</strong></p><p>Before we can start our migration, it’s necessary to establish a connection to the Kubernetes cluster where our application will eventually reside.</p><p><strong>Command:</strong></p><pre>gcloud container clusters get-credentials app-01 - zone us-west1-a - project $DEVSHELL_PROJECT_ID</pre><p><strong>5. Install Migrate for Anthos Components</strong></p><p>With everything set up, we’re now ready to introduce the Migrate for Anthos components to our GKE cluster.</p><p><strong>Command:</strong></p><pre>migctl setup install - json-key=tcb-m4a-install.json</pre><p><strong>6. Validate the Installation</strong></p><p>After installing, it’s always good practice to ensure that everything was set up correctly. The following command will check and validate the installation process. If successful, you’ll receive a confirmation of the deployment step completion.</p><p>Command:</p><pre>migctl doctor</pre><blockquote><strong>Expected Output:</strong><br><br>[✓] Deployment</blockquote><h3><strong>Steps for VM Migration to Google Kubernetes Engine (GKE)</strong></h3><p>Migrating Virtual Machines (VMs) to containerized environments like Kubernetes offers scalability, resilience, and cost efficiencies. With Google Cloud’s tools, this process is simplified. In this guide, we’ll explore how to set up the prerequisites for VM migration to GKE using Google’s Migrate for Anthos.</p><p><strong>1. Create a Service Account for VM Migration</strong></p><p>The first step involves creating a service account named `<strong>tcb-m4a-ce-src</strong>`. This account is vital for the permissions and access rights required throughout the migration process.</p><p><strong>Command:</strong></p><pre>gcloud iam service-accounts create tcb-m4a-ce-src - project=$DEVSHELL_PROJECT_ID</pre><p><strong>2. Assign the Compute Viewer Role to the Service Account</strong></p><p>This step ensures that the created service account has viewing permissions on the Compute Engine.</p><p>Command:</p><pre>gcloud projects add-iam-policy-binding $DEVSHELL_PROJECT_ID - member=&quot;serviceAccount:tcb-m4a-ce-src@$DEVSHELL_PROJECT_ID.iam.gserviceaccount.com&quot; - role=&quot;roles/compute.viewer&quot;</pre><p><strong>3. Grant the Compute Storage Admin Role to the Service Account</strong></p><p>For our migration process, it’s crucial that the service account can manage storage resources on the Compute Engine.</p><p>Command:</p><pre>gcloud projects add-iam-policy-binding $DEVSHELL_PROJECT_ID - member=&quot;serviceAccount:tcb-m4a-ce-src@$DEVSHELL_PROJECT_ID.iam.gserviceaccount.com&quot; - role=&quot;roles/compute.storageAdmin&quot;</pre><p><strong>4. Generate and Download the Service Account Key</strong></p><p>To authenticate various operations, we’ll need a key for the service account. This step allows us to generate and download the necessary key.</p><p><strong>Command:</strong></p><pre>gcloud iam service-accounts keys create tcb-m4a-ce-src.json - iam-account=tcb-m4a-ce-src@$DEVSHELL_PROJECT_ID.iam.gserviceaccount.com - project=$DEVSHELL_PROJECT_ID</pre><p><strong>5. Define the Compute Engine (CE) as the Migration Source</strong></p><p>Finally, let’s specify our Compute Engine as the source of our migration. This action ensures that Migrate for Anthos knows where to fetch our VMs from.</p><p><strong>Command:</strong></p><pre>migctl source create ce app-01-source - project $DEVSHELL_PROJECT_ID - json-key=tcb-m4a-ce-src.json</pre><p>Successfully setting up these preliminary steps puts you on the right path to migrate your VMs to GKE. Once all is set, you can utilize Migrate for Anthos to streamline the process of moving your VMs to containerized environments.</p><h3><strong>Creating / Downloading and Checking a Migration Plan</strong></h3><p>Migrating VMs (Virtual Machines) to containerized environments is a critical task, and Google’s Migrate for Anthos simplifies this with an efficient plan. This guide will walk you through creating, downloading, and checking the status of your migration plan.</p><p><strong>1. Create a Migration Plan</strong></p><p>Before we begin, ensure that the source name is set to <strong>app-01-source</strong>.</p><p>a. Construct the Plan</p><p>Initiate the process by creating the migration plan, which serves as a blueprint for the migration.</p><p><strong>Command:</strong></p><pre>migctl migration create my-migration - source app-01-source - vm-id app-01 - intent Image</pre><p><strong>b. Verify the Status of the Migration</strong></p><p>It’s crucial to check the status of the migration to ensure that the plan has been created successfully.</p><p><strong>Command:</strong></p><pre>migctl migration status my-migration</pre><p><strong>2. Download the Migration Plan (Optional)</strong></p><p>In case you need to save or share the migration plan, you can download it for offline usage.</p><p><strong>Command:</strong></p><pre>migctl migration get my-migration</pre><p><strong>3. Inspect the Migration Plan Using a Text Editor (Optional)</strong></p><p>After downloading, you may want to view or modify the plan’s details. Open the downloaded YAML file using your preferred text editor.</p><p><strong>File:</strong><br>`<strong>my-migration.yaml</strong>`</p><p><strong>4. Update the Migration Plan (Optional)</strong></p><p>If there are modifications made to the migration plan, it’s essential to update the plan using Migrate for Anthos.</p><p><strong>Command:</strong></p><pre>migctl migration update my-migration - file my-migration.yaml5. Execute the VM Migration</pre><p><strong>5. Execute the VM Migration</strong></p><p><strong>a. Initiate VM Migration</strong></p><p><strong>Command:</strong></p><pre>migctl migration generate-artifacts my-migration</pre><p><strong>b. Check the Status of the Migration</strong></p><p>Migration processes can vary in duration, but it’s expected to take between 5–10 minutes. Ensure you monitor the status to know when it’s completed.</p><p><strong>Command:</strong></p><pre>migctl migration status my-migration</pre><p>Migration is a significant step to improve scalability, manageability, and cost efficiencies of applications. Using Google’s Migrate for Anthos, with its structured approach and command-line tools, makes this process more streamlined and less daunting. Always make sure to test thoroughly after migration to ensure system integrity and performance.</p><h3><strong>Steps to Deploy the Migrated Workload in Google’s Migrate for Anthos</strong></h3><p>Migrating and deploying workloads in containerized environments can be streamlined with Google’s Migrate for Anthos.</p><p><strong>1. Download the Migration Artifacts</strong></p><p>Before deploying the migrated workload, we need to fetch the necessary artifacts created during migration.</p><p><strong>Command:</strong></p><pre>migctl migration get-artifacts my-migration</pre><p><strong>2. Inspect the Deployment Specification</strong></p><p>Once the artifacts are downloaded, open the deployment specification using your preferred text editor to understand or modify the workload configuration at the very bottom after the 3 dashes.</p><p><strong>File:</strong><br><strong>`deployment_spec.yaml`</strong></p><p><strong>Content:</strong></p><pre>apiVersion: v1<br>kind: Service<br>metadata:<br> creationTimestamp: null<br> name: app-01<br>spec:<br> clusterIP: None<br> selector:<br> app: app-01<br> type: ClusterIP<br>status:<br> loadBalancer: {}<br> - -<br>apiVersion: v1<br>kind: Service<br>metadata:<br> name: talent-management-portal<br>spec:<br> selector:<br> app: app-01<br> ports:<br> - protocol: TCP<br> port: 80<br> targetPort: 80<br> type: LoadBalancer</pre><p><strong>3. Deploy the Migrated Workload</strong></p><p>Having inspected the deployment specification, it’s time to apply the changes and deploy the migrated workload on our Kubernetes cluster.</p><p><strong>Command:</strong></p><pre>kubectl apply -f deployment_spec.yaml</pre><p><strong>4. Check the External IP</strong></p><p>Once deployed, you might want to access your application. For this, you need to fetch the external IP provided to your Talent Management Portal service.</p><p><strong>Command:</strong></p><pre>kubectl get service talent-management-portal</pre><p>After running the command, you’ll notice an external IP. This is what you’ll use to access your application.</p><p><strong>5. Accessing Your Modern Application</strong></p><p>Copy the provided external IP address and paste it into your browser’s address bar. If everything has been set up correctly, you should now see the screen of your modern application, indicating it’s successfully running on Google Kubernetes Engine (GKE).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*idWi5dFTwQ43ex212UJ07Q.png" /></figure><p><strong>Congratulations!</strong> 🚀 You’ve successfully deployed your migrated workload using Google’s Migrate for Anthos.</p><h3><strong>Conclusion:</strong></h3><p>Transitioning to a containerized environment is a step towards achieving better scalability, agility, and efficiency for applications. The structure and tools provided by Google’s Migrate for Anthos make this transformation seamless. Remember always to test your application post-migration to ensure that everything functions as expected. Happy deploying!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76cdcecbefaa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deployment of a Private Communication in a MultiCloud Environment (AWS and GCP) 100% Automated…]]></title>
            <link>https://joeblas.medium.com/deployment-of-a-private-communication-in-a-multicloud-environment-aws-and-gcp-100-automated-e9594d7f9615?source=rss-20627ea5c332------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9594d7f9615</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[amazon-vpc]]></category>
            <category><![CDATA[vpc]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[terraform]]></category>
            <dc:creator><![CDATA[Cloudy Joe]]></dc:creator>
            <pubDate>Mon, 14 Aug 2023 22:17:11 GMT</pubDate>
            <atom:updated>2023-08-14T22:17:11.366Z</atom:updated>
            <content:encoded><![CDATA[<h3><em>Deployment of a Private Communication in a MultiCloud Environment (AWS and GCP) 100% Automated Using Terraform</em></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RN6rnJtP2_3rEvN1TPKPvA.png" /></figure><p>In another project based on a real-world scenario, I acted as a Cloud Specialist in a company that used Google Cloud and AWS services in separate architectures.</p><p>The company decided to interconnect the two architectures, in a completely private way, using the Virtual Private Gateway, Customer Gateway, Cloud Routers, Cloud VPN, among other services.</p><p>However, they needed it in production in a week. So, once GCP and AWS accounts were created, to save time, I decided to deploy it in a 100% automated way using Terraform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IHQse3tWNsEcw6C25kTijw.png" /></figure><h3><strong>Bridging GCP &amp; AWS Using Terraform 🌉</strong></h3><p><strong>Prerequisites</strong><br>- An AWS account. If you don’t have one, set it up.</p><p><strong>GCP Setup</strong><br><strong>Step 1:</strong>Create a GCP Project named `tcb-gcp-aws` and jot down the Project ID.<br> <br><strong>Step 2:</strong> Confirm Billing is enabled.</p><p><strong>Step 3:</strong> Activate the Compute Engine API using this <a href="https://console.cloud.google.com/apis/enableflow?apiid=compute_component,deploymentmanager&amp;_ga=2.90885017.2003023334.1613150551-112422406.1602704538&amp;project=cloud-resume-34b6d">link</a></p><p><strong>Step 4:</strong> Launch Cloud Shell.</p><p><strong>Step 5:</strong> Download necessary project files:</p><pre>curl -O https://storage.googleapis.com/bootcamp-gcp-public/hands-on-tcb-bmc-gcp.zip</pre><p><strong>Step 6:</strong> Extract the files:</p><pre>unzip hands-on-tcb-bmc-gcp.zip</pre><p><strong>Step 7:</strong> Navigate to the project directory:</p><pre>cd hands-on-tcb-bmc-gcp</pre><p>Step 8: Grant executable rights to all .sh files:</p><pre>chmod +x *.sh</pre><h3><strong>GCP Credentials</strong></h3><p><strong>Step 1:</strong> Craft a Service Account Key in <strong>JSON</strong> format using the default service account.</p><p><strong>Step 2:</strong> Upload the .json key to Cloud Shell.</p><p><strong>Step 3:</strong> Execute the credentials setup:</p><pre>./gcp_set_credentials.sh ~/file.json</pre><h3><strong>AWS Setup</strong></h3><p>* Make sure you’re in the <strong>Oregon: us-west-2</strong> region.</p><p><strong>Step 1:</strong> Navigate to AWS console &gt; IAM &gt; Users &gt; Add user &gt; Programmatic access. Attach `<strong>AdministratorAccess</strong>` and save the .csv file.</p><p><strong>Step 2:</strong> Rename the .csv file to `<strong>accessKeys.csv</strong>`.</p><p><strong>Step 3:</strong> Upload the .csv to Cloud Shell and set AWS credentials:</p><pre>./aws_set_credentials.sh ~/accessKeys.csv</pre><h3><strong>Terraform Action</strong></h3><p>In the ‘hands-on-tcb-bmc-gcp’ directory, initiate Terraform:</p><pre>./get_terraform.sh</pre><h3><strong>GCP Configuration</strong></h3><p><strong>Step 1:</strong> Set your GCP project:</p><pre>gcloud config set project [YOUR-PROJECT-ID]</pre><p>Step 2: Configure the project:</p><pre>./gcp_set_project.sh</pre><p><strong>Step 3:</strong> Verify your project’s ID:</p><pre>cat /home/[YOUR-USERNAME]/hands-on-tcb-bmc-gcp/terraform/terraform.tfvars</pre><h3><strong>Key Pair Setup</strong></h3><p><strong>Step 1:</strong> Determine your username:</p><pre>whoami</pre><p><strong>Step 2:</strong> Generate an SSH key pair:</p><pre>ssh-keygen -t rsa -f ~/.ssh/vm-ssh-key -C [YOUR-USERNAME]</pre><p><strong>Step 3:</strong> Set permissions:</p><pre>chmod 400 ~/.ssh/vm-ssh-key</pre><p><strong>Step 4:</strong> Add the SSH key to GCP:</p><pre>gcloud compute config-ssh --ssh-key-file=~/.ssh/vm-ssh-key</pre><p><strong>Step 5:</strong> Import the key to AWS:<br>- Go to AWS console &gt; EC2 &gt; Network &amp; Security &gt; Key Pairs &gt; Import key pair. Name it `<strong>vm-ssh-key</strong>`.</p><h3><strong>Terraform Execution</strong></h3><p><strong>Step 1:</strong> Be in the main project folder:</p><pre>cd hands-on-tcb-bmc-gcp</pre><p><strong>Step 2:</strong> Enter the Terraform directory:</p><pre>cd terraform</pre><p><strong>Step 3:</strong> Initialize Terraform:</p><pre>terraform init</pre><p>Step 4: Validate the setup:</p><pre>terraform validate</pre><p><strong>Step 5:</strong> Preview changes:</p><pre>terraform plan</pre><p><strong>Step 6:</strong> Deploy:</p><pre>terraform apply</pre><p>Confirm with `yes`.</p><p><strong>Step 7:</strong> Test Connectivity Between GCP and AWS:<br>1. From your Cloud Shell, retrieve the public IP address of the GCP instance:</p><pre>GCP_IP=$(terraform output gcp_instance_public_ip)</pre><p>2. Next, get the internal IP address of the AWS instance:</p><pre>AWS_INTERNAL_IP=$(terraform output aws_instance_internal_ip)</pre><p>3. Now, use `ssh` to connect to your GCP instance:</p><pre>ssh -i ~/.ssh/vm-ssh-key [YOUR-USERNAME]@$GCP_IP</pre><p>Once inside the GCP instance, ping the internal IP of the AWS instance to test connectivity:</p><pre>ping $AWS_INTERNAL_IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*bychBSmBEnOTJYRd1XJWdA.png" /></figure><p>If you see responses, it indicates successful connectivity between the two!</p><p><strong>Step 8:</strong> (Optional) View deployment variables:</p><pre>terraform output</pre><p><strong>Step 9:</strong> Once done, clean up:</p><pre>terraform destroy</pre><p>Confirm with `yes`.</p><p>Now, you’re well on your way to bridging GCP and AWS seamlessly! Happy deploying! 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9594d7f9615" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>