Skip to content

onemarc/sdlc-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

♾️ SDLC Project - baseline project with SDLC phases

An application that implements infinite loop stages:

  1. Coding - create server

To build and start Golang server:

go build -o bin/app src/main.go
bin/app
  1. Testing - server testing
curl localhost:8080

Output:

<pre>
<a href="bin/">bin/</a>
<a href="html/">html/</a>
<a href="src/">src/</a>
</pre>
  1. Build - add index.html
  2. Coding - configuration

Again build and start Golang server after adding changes:

go build -o bin/app src/main.go
bin/app
curl localhost:8080

Output:

<!DOCTYPE html>
<html>

*** Content of our index.html file ***

</html>% 
  1. Testing - manual testing

Go to "localhost:8080" in the browser and check if everything works and index.html is displayed on the page.

  1. Delivery:

    • Create Dockerfile
    cd src
    go mod init sdlc-project
    
    • Build image
    docker build .
    
    • Run container on port 8080
    docker run -p 8080:8080 sha256:(container id)
    
    • Add image tag
    docker tag sha256:(container id) (docker hub username)/app:v1.0.0
    
    • Push to Docker Hub
    docker push (docker hub username)/app:v1.0.0
    
  2. Deployment - Kubernetes deployment

This step involves installing minikube or k3d for local Kubernetes deployment.

Create kubernetes deployment from image deployed on Docker Hub:

kubectl create deployment sdlc-project --image (docker hub username)/app:v1.0.0

Let's create port-forwarding to check if it works:

kubectl port-forward deployment/sdlc-project 8080
  1. Operations - cover this stage using Kubernetes ecosystem

  2. Coding - add new changes

  3. Delivery:

    • Build image
    docker build . -t (docker hub username)/app:v1.0.1
    
    • Push to Docker Hub
    docker push docker.io/(docker hub username)/app:v1.0.1
    
  4. Deployment - zero downtime deployment with Kubernetes

kubectl set image deployment sdlc-project app=(docker hub username)/app:v1.0.1
  1. Testing - manual testing

Go to "localhost:8080" in the browser and check if a new version exist.

Infinity_loop

About

Baseline project with full SDLC phases

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published