aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/portal/docker/init/mariadb-client/Dockerfile
blob: e64b1e2d87ce5bde6be6a45ec2680d9e1310b030 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM boxfuse/flyway:5.0.7-alpine

ARG branch=2.0.0-ONAP
ENV no_proxy "localhost,127.0.0.1,.cluster.local,$KUBERNETES_SERVICE_HOST"
# Setup Corporate proxy
ENV https_proxy ${HTTP_PROXY}
ENV http_proxy ${HTTPS_PROXY}

RUN apk add --update \
    mariadb-client=10.1.28-r1 \
    git \
  && rm -rf /var/cache/apk/*

ENV so_branch=$branch
#ENV policy_branch: $branch
ENV portal_branch=$branch
#ENV sdnc_branch: $branch
#ENV vid_branch: $branch
#ENV clamp_branch: $branch

#ENV appc_repo: http://gerrit.onap.org/r/appc/deployment.git
ENV so_repo=http://gerrit.onap.org/r/so/docker-config.git
#ENV policy_repo: http://gerrit.onap.org/r/policy/docker.git
ENV portal_repo=http://gerrit.onap.org/r/portal.git
#ENV sdnc_repo: http://gerrit.onap.org/r/sdnc/oam.git
#ENV vid_repo: http://gerrit.onap.org/r/vid.git
#ENV clamp_repo: http://gerrit.onap.org/r/clamp.git

RUN mkdir -p /onap-sources
WORKDIR /onap-sources

RUN git clone -b $branch $portal_repo && cd portal && git checkout HEAD
RUN git clone -b $branch $so_repo && cd docker-config && git checkout HEAD

VOLUME /onap-sources

COPY db_migrate.sh /root

RUN chmod a+x /root/db_migrate.sh
ENTRYPOINT /root/db_migrate.sh
ndicator">{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} spec: backoffLimit: 20 template: metadata: labels: app: {{ include "common.name" . }}-job release: {{ .Release.Name }} spec: restartPolicy: Never initContainers: - name: {{ include "common.name" . }}-job-completion image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}" command: - /root/job_complete.py args: - --job-name - {{ .Release.Name }}-sdc-cs-config-cassandra env: - name: NAMESPACE valueFrom: fieldRef: apiVersion: v1 fieldPath: metadata.namespace containers: - name: {{ include "common.name" . }}-job image: "{{ include "common.repository" . }}/{{ .Values.onboardingInitImage }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} volumeMounts: - name: {{ include "common.fullname" . }}-environments mountPath: /root/chef-solo/environments/ - name: {{ include "common.fullname" . }}-data mountPath: /var/lib/cassandra/ env: - name: ENVNAME value: {{ .Values.global.env.name }} - name: HOST_IP valueFrom: fieldRef: fieldPath: status.podIP - name: SDC_USER valueFrom: secretKeyRef: {name: {{ .Release.Name }}-sdc-cs-secrets, key: sdc_user} - name: SDC_PASSWORD valueFrom: secretKeyRef: {name: {{ .Release.Name }}-sdc-cs-secrets, key: sdc_password} - name: CS_PASSWORD valueFrom: secretKeyRef: {name: {{ .Release.Name }}-sdc-cs-secrets, key: cs_password} - name: CS_HOST_IP value: "sdc-cs" volumes: - name: {{ include "common.fullname" . }}-environments configMap: name: {{ .Release.Name }}-sdc-environments-configmap defaultMode: 0755 - name: {{ include "common.fullname" . }}-data {{- if .Values.persistence.enabled }} persistentVolumeClaim: claimName: {{ include "common.fullname" . }} {{- else }} emptyDir: {} {{- end }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" restartPolicy: Never