전자책 출간 알림 [마이크로서비스패턴 쉽게 개발하기]

티스토리 뷰

Open Sources

Gitea 설치

Happy@Cloud 2023. 11. 23. 13:09

Helm chart를 이용하여 Gitea를 설치합니다. 

Gitea helm chart repository 주소: https://gitea.com/gitea/helm-chart

 

helm-chart

Helm chart for gitea

gitea.com

 

1. helm chart download

#작업디렉토리로 이동
> mkdir -p ~/install && cd ~/install

# add chart 
> helm repo add gitea-charts https://dl.gitea.com/charts/
> helm repo update

# download chart
> helm pull gitea-charts/gitea
> tar xvf gitea-9.6.0.tgz 
> cd gitea

 

2. 설치 manifest 파일 생성

아래 예제를 참고하여 설치 manifest파일을 만듭니다. 

- storage class 변경 필요

- ingress.hosts.host 변경 

- gitea.admin.username 변경 시 'admin'과 'gitea'는 이미 사용중이라 다른 값을 사용해야 함

global:
  storageClass: "nfs-retain"

replicaCount: 1

podSecurityContext:
  fsGroup:

ingress:
  enabled: true
  className: nginx
  hosts:
    - host: mygitea.io
      paths:
        - path: /
          pathType: Prefix
persistence:
  enabled: true
  claimName: gitea-shared-storage
  size: 10Gi
  accessModes:
    - ReadWriteOnce
  storageClass: nfs-retain
#
gitea:
  admin:
    username: administrator
    password: P@ssw0rd

 

3. gitea 설치 

> helm install gitea -f gitea.yaml .

 

4. 접속 확인

접속하는 PC의 hosts파일에 ingress host를 등록합니다. 

IP값은 k8s cluster의 node IP 아무거나 등록합니다. 

만약 proxy서버를 통해 k8s cluster를 접속하는 경우는 proxy서버의 주소를 입력합니다. 

165.192.105.51 mygitea.io

 

웹브라우저에서 ingress host주소로 접근한 후 지정한 id/pw로 로그인 되는지 확인합니다. 

댓글

전자책 출간 알림 [마이크로서비스패턴 쉽게 개발하기]