쿠버네티스 교육/강의 내용 정리

220704_1_젠킨스_vagrant를 이용한 젠킨스 설치

kimhope 2022. 7. 4. 15:08
728x90

젠킨스 설치


젠킨스와 zsh 쉘 설치

젠킨스 설치

  • vagrant를 이용한 젠킨스 설치
vagrant up
# Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  # jenkins
  config.vm.define "jenkins" do |config|
    config.vm.box = "ubuntu/focal64"
    config.vm.provider "virtualbox" do |vb|
      vb.name = "jenkins"
      vb.cpus = 2
      vb.memory = 3000
    end
    config.vm.hostname = "jenkins"
    config.vm.network "private_network", ip: "192.168.57.10", nic_type: "virtio"
  end

  # Enable SSH Password Authentication
  config.vm.provision "shell", inline: <<-SHELL
    sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
    sed -i 's/archive.ubuntu.com/mirror.kakao.com/g' /etc/apt/sources.list
    sed -i 's/security.ubuntu.com/mirror.kakao.com/g' /etc/apt/sources.list
    systemctl restart ssh
  SHELL
end

 

  • 젠킨스 접속
vagrant ssh jenkins

 

  • 데비안 계열 OS 패키지 목록 가져오기 => 추후 패키지 다운로드 시 오류 발생 방지
sudo apt update

 

zsh 쉘 설치 및 환경 설정

  • CMD 또는 Powershell 사용은 권장하지 않음
  • Windows Terminal 사용을 권장
  • zsh 쉘 설치
$ sudo apt install zsh

$ which zsh
/usr/bin/zsh

 

  • zsh 쉘 프레임워크 설치
$ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

 

 

GitHub - romkatv/powerlevel10k: A Zsh theme

A Zsh theme. Contribute to romkatv/powerlevel10k development by creating an account on GitHub.

github.com

# 윈도우 터미널을 열고 'ctrl + shfit + ,'를 눌러 settings.json 파일 수정
"profiles": 
    {
         "defaults": 
        {
            "closeOnExit": "always",
            "colorScheme": "Tango Dark",
            "fontFace": "MesloLGS NF",
            "fontSize": 12
        },

 

  • git 설치
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

 

  • 테마 변경 및 플러그인 추가
vi ~/.zshrc
 
 11 ZSH_THEME="powerlevel10k/powerlevel10k"
 
 80 plugins=(git
 81          zsh-syntax-highlighting
 82          zsh-autosuggestions)
 83

 

  • 변경 사항 적용
  • 윈도우 터미널의 폰트와 테마가 변경된 것을 확인할 수 있음
exec zsh

# zsh 쉘 UI 설정
p10k configure

테마 및 플러그인 적용

 

테마 재설정

728x90