Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
D docker-containers
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Public
  • docker-containers
  • Wiki
  • devops practical

Last edited by Yogesh Hegde Nov 05, 2020
Page history

devops practical

DevOps Practical

Introduction to DevOps

DevOps is a set of practices that companies/startups follow for writing software.

  • The practice is to build, test and deploy each change in the software as soon as the changes are submitted.
  • It increases speed of software development and make sure that the software quality is high.

DevOps stages

Devops has these stages

  1. Plan
  2. Code
  3. Build
  4. Test
  5. Release
  6. Deploy

Steps to run DevOps using gitlab

Gitlab provides ready-to-use templates to run DevOps on sample programs.

For Example:

We will use a simple CPP program which adds and substracts 2 numbers.

  1. Get the workspace for devops trial

    • Download the ready to use workspace for devops trial - https://gitlab.iotiot.in/newbies/pre-office-office/refactoring-workspace/-/archive/master/refactoring-workspace-master.zip

    • Unzip the refactoring-workspace-master.zip

    • Open VScode.

    • Press Ctrl + Shift + p in VScode. A bar will open up at the top.

    • Search for Remote-Containers remote-containers

    • Click on "Remote-Containers: Open Folder in Containers".

    • In the pop up Window, Navigate to Downloads --> refactoring-workspace-master

    • Click on Open.

    • Vscode will take some time to start up the container, once done

    • Open up terminal by Pressing Ctrl + j. remote-containers

    • That is it done you have successfully opened up the workspace.

  2. Fork the repository.

    • Go to link - https://gitlab.iotiot.in/newbies/pre-office-office/devops-trial
    • Click on Fork. fork
    • Select your username in the next window.
    • The repo will fork and you should be directed to your own copy of the original.
  3. Clone the repository.

    • Copy Repository URL from the

      clone

    • Open VSCode, Go to File --> Open Folder (open any empty folder)

    • Press Ctrl + J

    • Type git clone {your-repository URL here}

      clone2

  4. Make changes to the code.

    • Add another line printing addition of 100 + 80. change-code
  5. Submit the changes.

    • Press Ctrl + J

    • Run commands

      cd devops-trial
      git config --global user.name "{Your-name}"
      git config --global user.email "{your-email-id}"
      git add .
      git commit -m "Added add 10 + 80"
      git push

      submit-cmd

  6. See your code Build, Test and Deploy.

    • Go to your repository, CI/CD --> Pipelines.

    pipleines

    • You can see Build, Test and Deploy devOps stages passing.

    stages

    • Click on the passed to see all the individual stage summary. stages-1
  7. Thats is it done, you have successfully seen your code Build, Test and Deployed.

Clone repository
  • Installing tools
  • Readme doc format
  • code refactoring
  • code style container
  • day0
  • devops practical
  • docusaurus
  • Home
  • install on mac
  • install tools ubuntu 16.04
  • install tools windows