Skip to content

Latest commit

 

History

History
145 lines (100 loc) · 6.4 KB

README.md

File metadata and controls

145 lines (100 loc) · 6.4 KB

Agile Continous Delivery Web Application

E2E test tools (Possible to replace test tool with Selenium and etc)

AWS Region and Endpoints

https://docs.aws.amazon.com/general/latest/gr/rande.html

Spin off AWS EC2 Jenkins instance

IMAGE ALT TEXT HERE

Configure Jenkins - Bitnami Server (EC2)

IMAGE ALT TEXT HERE

  • Login to the bitnami server (EC2 ipv4 address) using bitnami as the userid

  • Once login to bitnami server install the following dependencies

sudo apt-get update
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash
sudo apt-get install -y nodejs
sudo apt install gdebi-core
cd ~
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo gdebi google-chrome-stable_current_amd64.deb

Create AWS user for Jenkins Code Deploy

IMAGE ALT TEXT HERE

Configure AWS Code Deploy Role for EC2 instance

IMAGE ALT TEXT HERE

Spin off a AWS EC2 Deployment instance

IMAGE ALT TEXT HERE

Install Code Deploy Agent on the EC2 deployment instance

IMAGE ALT TEXT HERE

Create AWS role for AWS Code Deploy Service

IMAGE ALT TEXT HERE

Configure AWS Code Deploy on AWS Management Console

IMAGE ALT TEXT HERE

Install Jenkins Code Deploy Plugin

IMAGE ALT TEXT HERE

Create Jenkins Job integrate with Code Deploy & Testing

IMAGE ALT TEXT HERE

Test ACD Sample App

  • Working on the acd sample app Github repo. Checkout the source codes from github
git clone https://github.com/kenken64/acd-sample-app 

or use the copy on this repo

./cdci/NodeJS/
  • Install Node JS dependencies
npm install
  • Run the server starting the port on 3000
npm start
  • Run test cases against the started server
npm test
  • Make some changes on the index.html, commit the changes to the github repo
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
    <title>ACD Sample App</title>
</head>
<body>
    
    <div class="jumbotron">
        <h1 class="display-4">Welcome, PopQuiz Management System !</h1>
        <p class="lead">This is a simple pop quiz management system. Able to add new quiz, edit and delete</p>
        <hr class="my-4">
        <p>Technology behind this app is simple and outdated -  bootstrap 4, node js , mongodb and handlebar.</p>
        <a href="/list-quizes" class="btn btn-primary btn-lg active" role="button" aria-pressed="true">Manage Pop Quizes</a>
        <a href="/list-quizes" class="btn btn-primary btn-lg active" role="button" aria-pressed="true">Manage Pop Quizes 2</a>
        <a href="/list-quizes" class="btn btn-primary btn-lg active" role="button" aria-pressed="true">Manage Pop Quizes 3</a>
      
        </div>
    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
</body>
</html>
git add .
git commit -m "test cdci"
git push origin master -u

View E2E test result within screenshot folder

IMAGE ALT TEXT HERE