Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DevOps Engineering Nowadays

DevOps Engineering Nowadays

Ananda Dwi Ae

October 02, 2021
Tweet

More Decks by Ananda Dwi Ae

Other Decks in Technology

Transcript

  1. - Cloud Engineer at Btech | 2019 - Present -

    Software Engineering Student at UGM | 2019 - Present - FLOSS Enthusiast
  2. - DevOps - CI/CD - DevOps Learning Path - Lab(s)

    1 - Travis CI - Lab(s) 2 - Gitlab Agenda
  3. A long time ago, on a computer not so far,

    far away. A single entity arose to serve the resistance against boring, tedious, and slow software builds.
  4. DevOps - A Cultural - Development and Operations - Automate,

    collaboration, and integration - Build, test, and release - More efficient, faster and reliable
  5. Lab(s) 1 - Travis CI - Place your code on

    GitHub - Create a travis-ci.org account which is connected to GitHub - Create a Docker Hub account - Create a file a .travis.yml - Enable repo on travis-ci.org - Try to commit!
  6. Lab(s) 2 - Gitlab - Deploy Gitlab Server (alternate https://gitlab.com)

    - Install Gitlab Runner and create a user - Create a .gitlab-ci.yml file in the repository - Create a Dockerfile in the repository - Install docker and docker-compose - Make sure you already have a hub.docker.com account - Activate runner - Try changing the code, create a tag and watch!
  7. Lab(s) 2 - Gitlab #1 Install docker - sudo apt-get

    remove docker docker-engine docker.io containerd runc - sudo apt-get update - sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - sudo apt-key fingerprint 0EBFCD88
  8. Lab(s) 2 - Gitlab - sudo add-apt-repository \ "deb [arch=amd64]

    https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" - sudo apt-get update - sudo apt-get install docker-ce docker-ce-cli containerd.io #2 Install Docker-compose - sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-comp ose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose - sudo chmod +x /usr/local/bin/docker-compose
  9. Lab(s) 2 - Gitlab #3 Install Package(s) requirements gitlab -

    sudo apt-get update - sudo apt-get install ca-certificates curl openssh-server postfix -y #4 Install Gitlab Server - sudo curl -LO https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh - sudo bash /tmp/script.deb.sh - sudo apt install gitlab-ce - user: root
  10. Lab(s) 2 - Gitlab #5 Install Gitlab Runner - sudo

    wget -O /usr/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-run ner-linux-amd64 - sudo chmod +x /usr/bin/gitlab-runner #6 Add User and Run Service - sudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash - sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner
  11. Lab(s) 2 - Gitlab #7 Enable Runner gitlab-runner register -n

    \ --url {url_gitlab} \ --registration-token {token_name} \ --executor {define_exec} \ --description "your app description" \ --tag-list "{your tag list}"
  12. Lab(s) 2 - Gitlab #8 Lets Try! Repo: https://gitlab.com/misskecupbung/virtualpiano -

    Push to master branch -> verify - MR to prod branch -> verify
  13. Keep In Touch! • t.me/misskecupbung • linkedin.com/in/anandadwir • facebook.com/misskecupbung •

    twitter.com/misskecupbung • misskecupbung.wordpress.com • youtube.com/c/AnandaDwiAe