Commit 7f925b18 authored by Audrey Hamelers's avatar Audrey Hamelers

Merge branch 'dev' of gitlab.coko.foundation:xpub/xpub-epmc into dev

* 'dev' of gitlab.coko.foundation:xpub/xpub-epmc:
  Configuration files for deployment to AWS EKS
parents a6383edc ee035639
Pipeline #13422 failed with stages
in 26 seconds
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ftp-pv-claim
labels:
app: ftp-storage-claim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: gp2
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: gp2
annotations:
storageclass.kubernetes.io/is-default-class: 'true'
provisioner: kubernetes.io/aws-ebs
parameters:
type: gp2
fsType: ext4
reclaimPolicy: Retain
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: xpub-epmc-cluster
region: eu-west-2
nodeGroups:
- name: ng-1
instanceType: t2.small # 1 vCPU and 2.0 GiB RAM (https://aws.amazon.com/ec2/instance-types/t2/)
desiredCapacity: 3
ssh: # use existing EC2 key
publicKeyName: literature-service
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: xpub-epmc-deployment
labels:
app: xpub-epmc
spec:
replicas: 1
selector:
matchLabels:
app: xpub-epmc
template:
metadata:
labels:
app: xpub-epmc
spec:
restartPolicy: Always
volumes:
- name: ftp-storage
persistentVolumeClaim:
claimName: ftp-pv-claim
- name: samba-tmpfs
emptyDir:
medium: Memory
containers:
- name: xpub-epmc
image: 871979166454.dkr.ecr.eu-west-2.amazonaws.com/xpub-epmc:1.0.5
command: ['/bin/sh']
args: ['-c', './wrapperScript.sh']
ports:
- containerPort: 80
volumeMounts:
- name: ftp-storage
mountPath: /home/xpub/ftpdata
subPath: ftpdata
env:
- name: MINIO_ACCESS_KEY
valueFrom:
secretKeyRef:
name: s3secret
key: S3AccessKey
- name: MINIO_SECRET_KEY
valueFrom:
secretKeyRef:
name: s3secret
key: S3SecretKey
- name: MINIO_ENDPOINT
value: 's3.eu-west-2.amazonaws.com'
- name: MINIO_PORT
value: '443'
- name: MINIO_SECURITY
value: 'true'
- name: MINIO_BUCKET
value: 'xpub-epmc-test'
- name: MINIO_UPLOADS_FOLDER_NAME
value: 'uploads'
- name: MINIO_REGION
value: 'eu-west-2'
- name: PGHOST
valueFrom:
secretKeyRef:
name: pgsecret
key: PGHOST
- name: PGPORT
value: '5432'
- name: PGDATABASE
value: postgres
- name: PGUSER
valueFrom:
secretKeyRef:
name: pgsecret
key: PGUSER
- name: PGPASSWORD
valueFrom:
secretKeyRef:
name: pgsecret
key: PGPASSWORD
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: pgsecret
key: PGUSER
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: pgsecret
key: PGPASSWORD
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: pgsecret
key: DATABASE_URL
- name: PUBSWEET_URL
valueFrom:
configMapKeyRef:
name: xpub-epmc-config
key: PUBSWEET_URL
- name: PUBSWEET_HOST
valueFrom:
configMapKeyRef:
name: xpub-epmc-config
key: PUBSWEET_HOST
- name: PUBSWEET_EMAIL_URL
valueFrom:
configMapKeyRef:
name: xpub-epmc-config
key: PUBSWEET_EMAIL_URL
- name: PAGE_SIZE
value: '25'
- name: EMAIL_USR
valueFrom:
secretKeyRef:
name: emailsecret
key: User
- name: EMAIL_PWD
valueFrom:
secretKeyRef:
name: emailsecret
key: PWD
- name: APP_SERVER_PORT
value: '80'
- name: NODE_ENV
value: production
- name: ftpd-server
image: stilliard/pure-ftpd:hardened
ports:
- containerPort: 21
- containerPort: 30000
- containerPort: 30001
- containerPort: 30002
- containerPort: 30003
- containerPort: 30004
- containerPort: 30005
- containerPort: 30006
- containerPort: 30007
- containerPort: 30008
- containerPort: 30009
env:
- name: PUBLICHOST
valueFrom:
configMapKeyRef:
name: xpub-epmc-config
key: PUBLICHOST
volumeMounts:
- name: ftp-storage
mountPath: /home/ftpusers
subPath: ftpdata
- name: ftp-storage
mountPath: /etc/pure-ftpd
subPath: ftpconfig
- name: ftp-storage
mountPath: /etc/ssl/private
subPath: ftptls
- name: samba
image: dperson/samba
args:
- -s
- Data;/mnt
env:
- name: TZ
value: 'EST5EDT'
volumeMounts:
- name: ftp-storage
mountPath: /mnt:z
subPath: ftpdata
- name: samba-tmpfs
mountPath: /tmp
ports:
- containerPort: 137
protocol: UDP
- containerPort: 138
protocol: UDP
- containerPort: 139
- containerPort: 445
stdin: true
tty: true
apiVersion: v1
kind: Service
metadata:
name: xpub-epmc-ftp-service
labels:
app: xpub-epmc
spec:
type: LoadBalancer
ports:
- name: '21'
port: 21
targetPort: 21
- name: '30000'
port: 30000
targetPort: 30000
- name: '30001'
port: 30001
targetPort: 30001
- name: '30002'
port: 30002
targetPort: 30002
- name: '30003'
port: 30003
targetPort: 30003
- name: '30004'
port: 30004
targetPort: 30004
- name: '30005'
port: 30005
targetPort: 30005
- name: '30006'
port: 30006
targetPort: 30006
- name: '30007'
port: 30007
targetPort: 30007
- name: '30008'
port: 30008
targetPort: 30008
- name: '30009'
port: 30009
targetPort: 30009
selector:
app: xpub-epmc
apiVersion: v1
kind: Service
metadata:
name: xpub-epmc-samba-service
labels:
app: xpub-epmc
spec:
type: LoadBalancer
ports:
- name: '139'
port: 139
targetPort: 139
- name: '445'
port: 445
targetPort: 445
loadBalancerSourceRanges:
- 193.62.194.244/32
selector:
app: xpub-epmc
apiVersion: v1
kind: Service
metadata:
name: xpub-epmc-service
labels:
app: xpub-epmc
spec:
type: LoadBalancer
ports:
- name: '3000'
port: 80
targetPort: 80
protocol: TCP
selector:
app: xpub-epmc
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: xpub-xsweet-deployment
labels:
app: xpub-xsweet
spec:
replicas: 1
selector:
matchLabels:
app: xpub-xsweet
template:
metadata:
labels:
app: xpub-xsweet
spec:
containers:
- name: xpub-xsweet
image: pubsweet/job-xsweet:1.3.3
command: ['/bin/sh']
args: ['-c', 'node src/xsweet.js']
env:
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: pgsecret
key: PGUSER
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: pgsecret
key: PGPASSWORD
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: pgsecret
key: DATABASE_URL
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment