summaryrefslogtreecommitdiffstats
path: root/kubernetes/aai/charts/aai-gizmo/templates/NOTES.txt
blob: 24371d08abe5caf35b52d3c506536fd57d44c20a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
  http://{{ . }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }})
  export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
  echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
           You can watch the status of by running 'kubectl get svc -w {{ include "common.fullname" . }}'
  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
  echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
{{- else if contains "ClusterIP" .Values.service.type }}
  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "so.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
  echo "Visit http://127.0.0.1:8080 to use your application"
  kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }}
{{- end }}
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
# Copyright © 2017 Amdocs, Bell Canada
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: {{ include "common.fullname" . }}
  namespace: {{ include "common.namespace" . }}
  labels:
    app: {{ include "common.name" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
  replicas: {{ .Values.replicaCount }}
  template:
    metadata:
      labels:
        app: {{ include "common.name" . }}
        release: {{ .Release.Name }}
    spec:
      initContainers:
      - command:
        - /root/job_complete.py
        args:
        - --job-name
        - vid-config-galera
        env:
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
        name: {{ include "common.name" . }}-readiness
      containers:
        - name: {{ include "common.name" . }}
          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
          lifecycle:
            postStart:
              exec:
                command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/usr/local/tomcat/webapps/vid/WEB-INF/classes/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
          ports:
          - containerPort: {{ .Values.service.internalPort }}
          # disable liveness probe when breakpoints set in debugger
          # so K8s doesn't restart unresponsive container
          {{- if eq .Values.liveness.enabled true }}
          livenessProbe:
            tcpSocket:
              port: {{ .Values.service.internalPort }}
            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
            periodSeconds: {{ .Values.liveness.periodSeconds }}
          {{ end -}}
          readinessProbe:
            tcpSocket:
              port: {{ .Values.service.internalPort }}
            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
            periodSeconds: {{ .Values.readiness.periodSeconds }}
          env:
            - name: ASDC_CLIENT_REST_HOST
              value: sdc-be.{{ include "common.namespace" . }}
            - name: ASDC_CLIENT_REST_AUTH
              value: "{{ .Values.config.asdcclientrestauth }}"
            - name: ASDC_CLIENT_REST_PORT
              value: "{{ .Values.config.asdcclientrestport }}"
            - name: VID_AAI_HOST
              value: aai.{{ include "common.namespace" . }}
            - name: VID_AAI_PORT
              value: "{{ .Values.config.vidaaiport }}"
            - name: VID_ECOMP_SHARED_CONTEXT_REST_URL
              value: http://portal-app.{{ include "common.namespace" . }}:{{ .Values.config.onapport }}/ONAPPORTAL/context
            - name: VID_MSO_SERVER_URL
              value: http://so.{{ include "common.namespace" . }}:{{ .Values.config.msoport }}
            - name: VID_MSO_PASS
              value: "{{ .Values.config.vidmsopass }}"
            - name: MSO_DME2_SERVER_URL
              value: "{{ .Values.config.msodme2serverurl }}"
            - name: MSO_DME2_ENABLED
              value: {{ .Values.global.debugEnabled | default .Values.debugEnabled | quote }}
            - name: VID_ECOMP_REDIRECT_URL
              value: http://portal-app.{{ include "common.namespace" . }}:{{ .Values.config.onapport }}/ONAPPORTAL/login.htm
            - name: VID_ECOMP_REST_URL
              value: http://portal-app.{{ include "common.namespace" . }}:{{ .Values.config.onapport }}/ONAPPORTAL/auxapi
            - name: VID_CONTACT_US_LINK
              value: "{{ .Values.config.vidcontactuslink }}"
            - name: VID_UEB_URL_LIST
              value: message-router.{{ include "common.namespace" . }}
            - name: VID_MYSQL_HOST
              value: "{{ .Values.config.vidmysqlhost }}"
            - name: VID_MYSQL_PORT
              value: "{{ .Values.config.vidmysqlport }}"
            - name: VID_MYSQL_DBNAME
              value: "{{ .Values.config.vidmysqldbname }}"
            - name: VID_MYSQL_USER
              value: "{{ .Values.config.vidmysqluser }}"
            - name: VID_MYSQL_PASS
              value: "{{ .Values.config.vidmysqlpassword }}"
              #valueFrom:
              #  secretKeyRef: {name: {{ include "common.fullname" . }}, key: vid-password}
            - name: VID_MYSQL_MAXCONNECTIONS
              value: "{{ .Values.config.vidmysqlmaxconnections }}"
          volumeMounts:
          - mountPath: /etc/localtime
            name: localtime
            readOnly: true
          - mountPath: /var/log/onap
            name: vid-logs
          - mountPath: /tmp/logback.xml
            name: vid-logback
            subPath: logback.xml
          resources:
{{ toYaml .Values.resources | indent 12 }}
        {{- if .Values.nodeSelector }}
        nodeSelector:
{{ toYaml .Values.nodeSelector | indent 10 }}
        {{- end -}}
        {{- if .Values.affinity }}
        affinity:
{{ toYaml .Values.affinity | indent 10 }}
        {{- end }}
      # side car containers
        - name: filebeat-onap
          image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
          volumeMounts:
          - mountPath: /usr/share/filebeat/filebeat.yml
            name: filebeat-conf
            subPath: filebeat.yml
          - mountPath: /var/log/onap
            name: vid-logs
          - mountPath: /usr/share/filebeat/data
            name: vid-data-filebeat
      volumes:
        - name: localtime
          hostPath:
            path: /etc/localtime
        - name: filebeat-conf
          configMap:
            name: {{ include "common.fullname" . }}-filebeat-configmap
        - name: vid-logs
          emptyDir: {}
        - name: vid-data-filebeat
          emptyDir: {}
        - name: vid-logback
          configMap:
            name: {{ include "common.fullname" . }}-log-configmap
      imagePullSecrets:
      - name: "{{ include "common.namespace" . }}-docker-registry-key"