Coder Social home page Coder Social logo

tutorial-vpc-3tier-networking's Introduction

Use GUI, CLI or API to run a Web App in VPC network

Purpose

Build a load balanced 3-tier web application that separates the web, application, and data tiers by placing them in separate subnetworks.

Based on Solution Tutorials - Highly Available & Scalable Web App

This document illustrates the deployment of WordPress on top of a LAMP stack (software_bundle) hosted on IBM Cloud Virtual Private Cloud (VPC). The main objective is to highlight the features of IBM VPC but at the end of this tutorial, a tested and working application environment will be deployed.

Features:

  1. Application
  • A load balanced application - WordPress
  • Using multiple databases - HyperDB
  • With source/replica data replication - MySQL
  1. Infrastructure
  • Public isolation - VPC
  • Where application and data layers are deployed on separate subnets
  • With separate network security groups
  • Using bring-your-own-IP

Below is the IBM Virtual Private Cloud (VPC) architecture of the solution showing public isolation for both Application (through an Application Load Balancer) and data.

VPC Architecture

3tier Web App

Assumptions and Limitations

  • This document expects the reader to have a basic level of understanding of network infrastructure and application deployment on a Linux environment.
  • The solution will use HTTP.
  • The LAMP stack will use Nginx Web Application Server and MySQL will be deployed on a separate server.
  • Fixes to issues found during the deployment of the environment have been provided. However, these fixes are as of the time of this writing and other issues may occur with new deployments or versions of the stack.
  • Not shown in the architecture diagram is the use a public IP addresses in order to deploy the application. IBM VPC uses a floating IP and a Public Gateway to allow internet traffic. We will use these to access the VSIs and pull the software from public repositories. Once the images are deployed, floating IPs will be removed for improved system isolation.
  • Bring-Your-Own-Image (BYOI) is not included.
  • Network storage is not included.

VPC Functional Coverage

Function Result Notes
VPC
Subnets
Private IP (BYOIP)
Virtual Server Instance (VSI)
Multiple Network Interfaces in VSI
Application Load Balancer
Floating IPv4 ⚠️ Temporary use to deploy application images
Public Gateway ⚠️ Temporary use to deploy application images

System Requirements

Operating system

Tier Operating system
Web Server & Application Ubuntu 20.04
Data Ubuntu 20.04

Hardware

Tier Type Profile
Web Server and Application VSI bx2-4x16
Data VSI bx2-4x16

Documented Steps

To build this scenario we will first deploy the VPC infrastructure followed by the deployment and configuration of the application. Then, we will build and configure an HA application cluster to enable scalability of the application when higher traffic requires new nodes added to the application load balancer.

Prerequisites

The following needs to be executed before starting with the deployment:

  1. Have access to a public SSH key as described in SSH Keys.
  2. Create a new resource group called VPC1 as described in Managing resource groups
  3. Once the VPC1 resource group has been created, update user permissions and provide the required access as described in Managing user permissions for VPC resources

Deploy VPC Infrastructure

IBM Cloud provides four methods to deploy the VPC infrastructure and three of them are documented here. The reader may follow the instructions using one of these to set up the environment for this scenario.

Deploy using CLI

Deploy using API

Deploy using UI

Install Web Application

Deploy the application once the VPC infrastructure has been deployed.

Install Application Layer

Error Scenarios

Application layer failures are included during the deployment and test of the software stack. No infrastructure failures were introduced.

Documentation Provided

Useful links for VPC documentation.

Getting started with IBM Cloud Virtual Private Cloud

Assigning role-based access to VPC resources

IBM Cloud CLI for VPC Reference

VPC API

tutorial-vpc-3tier-networking's People

Contributors

jaywarfield avatar pbahrs avatar xallarap avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

tutorial-vpc-3tier-networking's Issues

Modify the description of "Create Two VPC Subnets"

In Create Two VPC Subnets, the name of menu has been changed on the current version of IBM Cloud so that the description needs be modified to apply the changes.

Before

  • On the VPC Infrastructure menu, select "Subnets" and then "New subnet". Create each subnet and attach the VPC's public gateway.

After

  • On the VPC Infrastructure menu, select "Subnets" and then click "Create +". Create each subnet and attach the VPC's public gateway.

Modify the description of "Create a VPC"

In Create a VPC, the description needs to be modified since the menu on the UI was changed.

Before

  • On the VPC Infrastructure menu, select "VPCs" under "Network.". Then select "New virtual private cloud".

After

  • On the VPC Infrastructure menu, select "VPCs" under "Network.". Then select "Create +"

Before

  • Use subnet0 for subnet and attach a Public Gateway. The public gateway will be needed to access the application software from the public repositories.

After

  • Use subnet0 for subnet and attach a Public Gateway. The public gateway will be needed to access the application software from the public repositories.

The following description also needs to be modified since IBM Cloud no longer support the special character (_) as a part of the name of VPC.

Before

  • Create a VPC named wp_vpc.

After

  • Create a VPC named wp-vpc.

image

Modify the description of "Security Groups and Access Control Lists"

In Security Groups and Access Control Lists, the description needs to be modified since the menu on the UI was changed.

Before

  • On the VPC Infrastructure menu, select "Security groups" and then "New security group".

After

  • On the VPC Infrastructure menu, select "Security groups" and then "Create +".

The following description also needs to be modified since IBM Cloud no longer support the special character (_) as a part of the name of Security Group.

Before

  • Application Security Group - app_sg

After

  • Application Security Group - app-sg

image

Before

  • Application Security Group - data_sg

After

  • Application Security Group - data-sg

image

Modify the description of "Create Addresses Prefixes"

In Create Addresses Prefixes, the description needs to be modified since the menu on the UI was changed.

Before

  • On the VPC Infrastructure menu, select "VPCs" under "Network.". Select VPC wp_vpc to get the details, then select "Address prefixes" and "New prefix."

After

  • On the VPC Infrastructure menu, select "VPCs" under "Network.". Select VPC wp_vpc to get the details, then select "Address prefixes" and "Create."

Modify the description of "Prepare to Load Application Software"

In Prepare to Load Application Software, the description needs to be modified since the menu on the UI was changed.

Before

  • Add Public IP to each Data and Application servers
  • On the VPC Infrastructure menu, select "Virtual server instances" and then select one server to drill down to the details. Under "Network interfaces" select "Reserve" on eth0 to add a Floating IP.

After

  • Add Public IP to each Data and Application servers
  • On the VPC Infrastructure menu, select "Virtual server instances" and then select one server to drill down to the details. Under "Network interfaces" click the pencil icon to edit it on eth0 and select "Reserve a new floating IP" at Floating IP address.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.