Digital Playground: A Simple Guide to Understanding AWS VPC,EC2,Deploy Jenkins Application

Digital Playground: A Simple Guide to Understanding AWS VPC,EC2,Deploy Jenkins Application

ยท

6 min read

Introduction:

Hello, digital adventurers! Today, we're embarking on a journey to explore the enchanting realm of Amazon Web Services (AWS) Virtual Private Cloud (VPC). Fear not, for we'll make the tech talk disappear, breaking down AWS VPC into easily understandable components with examples, diagrams, and a touch of magic! ๐Ÿš€โœจ

What is AWS VPC? ๐ŸŒŒ

Imagine AWS VPC as your own magical kingdom in the digital universe. It's a secure and private space where you have the power to build and organize your digital wonders, just like a kingdom where you decide who enters and who stays out.

Components of AWS VPC Explained ๐Ÿฐ๐Ÿ› ๏ธ

1. Subnets - Your Digital Neighborhoods ๐ŸŒ†

  • Example: Think of subnets as different neighborhoods within your kingdom.

  • Visualization:

  • Explanation: Each subnet is like a block of land where you can place different parts of your digital infrastructure. For instance, the public subnet could host your website, while the private subnet safeguards sensitive data.

2. Route Tables - Virtual Roads in Your Kingdom ๐Ÿ›ฃ๏ธ

  • Example: Route tables are like the maps guiding traffic within your kingdom.

  • Visualization:

  • Explanation: They tell digital citizens (data packets) where to go. If you want them to visit the public square (internet), you create a route. If they need to access the secret garden (private subnet), another route is set.

3. Internet Gateway - Your Kingdomโ€™s Gateway to the World ๐ŸŒ๐Ÿฐ

  • Example: Picture an Internet Gateway as the grand entrance to your kingdom.

  • Visualization:

  • Explanation: It allows your digital citizens to travel to and from the internet. When someone outside your kingdom wants to visit, they pass through this gateway to reach your public spaces.

4. Security Groups - Your Digital Guards ๐Ÿ›ก๏ธ๐Ÿ‘ฎ

  • Example: Security groups act as vigilant guards of your digital kingdom.

  • Visualization:

  • Explanation: You decide who can enter and exit different areas. For example, your website might allow visitors from anywhere, while your database only allows trusted companions.

5. Network ACLs - Your Digital Bouncers ๐Ÿšง

  • Example: Network ACLs are like the bouncers at the entrance of your digital establishments.

  • Visualization:

  • Explanation: They decide which digital citizens can enter and which must be turned away. You set rules to allow or deny entry based on the type of traffic.

Why Do You Need a VPC?

  • Security: Just like a gated community, a VPC provides a secure environment for your resources, keeping them away from prying eyes. ๐Ÿ•ต๏ธโ€โ™‚๏ธ๐Ÿšซ

  • Isolation: Different projects or teams can have their own VPCs, preventing interference between them, just like having separate rooms in a house. ๐Ÿ ๐Ÿšง

  • Customization: You can customize your VPC to fit your needs, deciding who can enter and exit, much like personalizing your living space. ๐Ÿ›‹๏ธ๐ŸŽจ

Building Your Digital Kingdom ๐ŸŒŸ

Real-Life Scenario: The Digital Cafรฉ โ˜•๐Ÿช

Imagine your VPC as a digital cafรฉ. The public subnet hosts the cafรฉ's front where customers browse the menu (website), while the private subnet, hidden behind the scenes, securely stores customer information (database). Your Internet Gateway is the entrance, Security Groups are the guards, and Route Tables ensure smooth traffic flow.

**Part 1:**Creating VPC: Step-by-Step ๐Ÿ› ๏ธ

1.Log in to AWS Console: Think of it as entering your virtual front door. ๐Ÿšช๐Ÿ’ป

**2.**Type "VPC" into the search bar and press Enter.

3.Navigate to VPC Dashboard: Picture it as walking into the control center of your digital estate. ๐Ÿ“๐ŸŒ

4.Click on 'Create VPC': This is like picking the perfect spot for your dream home. ๐Ÿž๏ธ

  • Name Your VPC: Give it a unique name, like "MyDigitalHaven."

  • Define IP Address Range (CIDR block): Similar to marking your territory, e.g., 10.0.0.0/16.

5.Configure Subnets: Subnets are like different rooms in your house. Each serves a specific purpose.

  • Public Subnet: Think of it like your living room, accessible to guests. Ideal for web servers.

  • Private Subnet: Similar to your bedroom, private and secure. Great for databases.

6.Set Up Route Tables: Routing is like setting up GPS for your virtual roads. ๐Ÿ—บ๏ธ๐Ÿš—

  • Main Route Table: It's like the main road everyone uses by default.

  • Custom Route Table: Specific routes for certain resources, like a shortcut in your commute.

Review and Create: Double-check your plans, just like reviewing the blueprint of your dream house. ๐Ÿก๐Ÿ“

  • Create VPC: Click the magic button to bring your digital estate to life! โœจ๐Ÿš€

Part 2: Viewing VPC ๐ŸŒ๐Ÿ‘€

1. Return to the AWS VPC Dashboard ๐Ÿฐ๐ŸŒŸ

  • Find the "Your VPCs" section.

2. Behold Your Virtual Canvas ๐Ÿ‘€๐Ÿž๏ธ

  • See the details of your created VPC, much like viewing the blueprint of your project.

Part 3: Summoning Your Virtual Assistant - Creating an EC2 Instance ๐Ÿš€๐Ÿค–

1. Return to the AWS Dashboard ๐Ÿฐ๐ŸŒŸ

  • Type "EC2" into the search bar and press Enter.

  • Click on Instances

  • Click 'Launch Instance'

    ๐ŸŒŸChoose an Ubuntu Image (AMI) that aligns with your needs.

    ๐ŸŒŸSelect an instance type based on your applicationโ€™s requirements

  • Create new Key Pair

  • Configure Instance Details

    ๐ŸŒŸSpecify the number of instances and network settings.

    ๐ŸŒŸIn the "Network" dropdown, pick the VPC you created.

  • Choose a Subnet

    ๐ŸŒŸPick the appropriate subnet within your VPC.

    ๐ŸŒŸDecide the ideal spot in your digital kingdom for your application to flourish.

  • Configure Security Group

    ๐ŸŒŸSet inbound and outbound rules to allow necessary traffic.

    ๐ŸŒŸGrant your digital servant the right permissions to communicate.

  • Review and Launch

    ๐ŸŒŸDouble-check your settings and click "Launch"

    Part 4: Deploy Jenkins on AWS VPC ๐ŸŽ‰๐Ÿš€

    1. Connect to Instance:

    • Use SSH and the downloaded key pair to connect to your instance.

      Connected through SSH

    • Update the package first

      Run sudo apt -get update

  • Install Java

  • Install Jenkins

  • Check Jenkins Status

    • Open Jenkins Port:

      • Add a rule to your security group to allow inbound traffic on port 8080.

Check Network ACL Rule as well

  • Try again to access the Jenkins application

    Conclusion: Jenkins Rules the Clouds ๐ŸŒ๐Ÿš€

    Congratulations! You've successfully deployed Jenkins on your AWS VPC. Your digital empire is now equipped with a powerful automation ally. May your continuous integration and deployment adventures be seamless and victorious! ๐Ÿš€๐ŸŒŸ

    If this post was helpful, please do follow and click the like button below to show your support .

    • Thank you for reading๐Ÿ’š

Best Regards,

Sprasad ๐ŸŒโœจ

ย