Giter Club home page Giter Club logo

iti-project's Introduction

ITI final Project

Project Info.

This project contains:

  • Infrastructure as code using Terraform that builds an environment on the AWS cloud platform
  • Kubernetes Jenkins-Deployment_Manifests YAML files for deploying jenkins
  • Demo app with Dockerfile
  • Kubernetes Using the demo app from My_Connect-4_repo

Task Over view

image

image

Tools Used

Get Started

Get The Code

  • Using Git, clone the project.

    git clone https://github.com/AmrTarek17/iti-project.git
    

Setup Infra

  • First setup your aws account with cli.

  • Second build the infrastructure by run

    cd iti-project/terraform
    terraform init
    terraform apply
    

    that will build:

    • VPC named "prod-vpc"
    • 2 public Subnets
    • 2 private Subnets
    • 2 nat gateway
    • EKS private Kubernetes cluster
    • 1 ec2 used as bastion and slave for jenkins

    configure config map on ec2 and add your role

    - groups:
      - system:masters
      rolearn: arn:aws:iam::<change all arn with yours>:role/ec2-eks
      username: basion-admin
    
      ```bash
      # NOTE
      You need to get attached to cluster using.
      aws eks --region <region> update-kubeconfig --name <clusterName> 
      ```
    

deploy jenkins with ansible playbook

image

image

ansible code

---
- name: deploy jenkins
  hosts: k8s
  become: true
  tasks:
    - name: Copy jenkins files
      copy:
        src: "./Jenkins-Deployment_Manifests"
        dest: "/home/ansadmin"

    - name: configure cluster
      shell: aws eks --region us-west-2 update-kubeconfig --name prod_eks_cluster

    - name: deploy jenkins
      shell: kubectl apply -f /home/ansadmin/Jenkins-Deployment_Manifests/

or deploy jenkins from /Jenkins-Deployment_Manifests using Readme.md there then

kubect exec -it <jenkins_pod_name> bash
  • cat the admin password file and use it to create your own
  • hit install recomended
  • fork my repo My_Connect-4_repo
  • edit IMG_NAME variable from Jenkinsfile there
  • configure your docker hub credintials on jenkins with credentialsId: 'Docker_Hub'
  • configure your ec2 ssh credintial with the private key that terraform created for you "You can locate it in secrets manger from console" use label:ec2-slave

image

image

  • configure your pipeline image

  • Run your pipeline image

image


You can try my deployed demo Game from here

connect4 game Game-repo with Jenkins pipline

You can try my deployed jenkins from here User:admin,Pass:admin

๐ŸŽ‰ ๐ŸŽ‰ ๐ŸŽ‰ ๐ŸŽ‰

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.