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

티스토리 뷰

Nexus 설치 및 설정

k8s 설치 yaml 입니다. 설치 후 ingress 주소로 접근하시고 admin / admin123으로 로그인하십시오. 

apiVersion: v1
kind: ServiceAccount
metadata:
  name: nexus-sonatype
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: nexus-sonatype
  labels:
    app: nexus-sonatype
spec:
  accessModes:
    - "ReadWriteOnce"
  resources:
    requests:
      storage: "8Gi"
---
apiVersion: v1
kind: Service
metadata:
  name: nexus-sonatype
  labels:
    app: nexus-sonatype
spec:
  ports:
    - port: 8080
      name: nexus-sonatype
      protocol: TCP
      targetPort: 8081
  selector:
    app: nexus-sonatype
  type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nexus-sonatype
  labels:
    app: nexus-sonatype
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nexus-sonatype
  template:
    metadata:
      labels:
        app: nexus-sonatype
    spec:
      serviceAccountName: nexus-sonatype
      containers:
        - name: nexus
          image: sonatype/nexus3:latest
          imagePullPolicy: IfNotPresent
          env:
            - name: install4jAddVmParams
              value: -Xms1200M -Xmx1200M -XX:MaxDirectMemorySize=2G -XX:+UnlockExperimentalVMOptions
                -XX:+UseCGroupMemoryLimitForHeap
            - name: NEXUS_SECURITY_RANDOMPASSWORD
              value: "false"
          resources:
            {}
          ports:
            - containerPort: 5003
              name: nexus-docker-g
            - containerPort: 8081
              name: nexus-http
          livenessProbe:
            httpGet:
              path: /
              port: 8081
            initialDelaySeconds: 30
            periodSeconds: 30
            failureThreshold: 6
          readinessProbe:
            httpGet:
              path: /
              port: 8081
            initialDelaySeconds: 30
            periodSeconds: 30
            failureThreshold: 6
          volumeMounts:
            - mountPath: /nexus-data
              name: nexus-sonatype
            - mountPath: /nexus-data/backup
              name: nexus-sonatype-backup
      securityContext:
        fsGroup: 2000
      volumes:
        - name: nexus-sonatype
          persistentVolumeClaim:
            claimName: nexus-sonatype
        - name: nexus-sonatype-backup
          emptyDir: {}


---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: nexus-sonatype
  labels:
    app: nexus-sonatype
spec:
  ingressClassName: nginx
  rules:
    - host: nexus.165.192.105.60.nip.io
      http:
        paths:
        - path: /
          pathType: Prefix
          backend:
            service:
              name: nexus-sonatype
              port:
                number: 8080

 

VM에 설치: https://devopscube.com/how-to-install-latest-sonatype-nexus-3-on-linux/

설정: https://drive.google.com/file/d/1rIHW3BzsbwCPabrAVG_Lzn36wR_TmbXW/view?usp=sharing

npm, maven 설정 화면은 아래도 참고하십시오.

happycloud-lee.tistory.com/116?category=832250

'Agile&DevOps > CI, CD 툴 설치' 카테고리의 다른 글

Private image registry 설치  (0) 2019.09.12
sonarqube 설치  (0) 2019.09.12
Jenkins 설치  (0) 2019.09.12
gitlab 설치  (0) 2019.09.12
NFS서버 만들기  (0) 2019.09.12
댓글

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