Skip to content

Commit 235a4c0

Browse files
Merge pull request #53 from TIBCOSoftware/EFS-Setup
Efs setup
2 parents dd9cce5 + a315033 commit 235a4c0

File tree

2 files changed

+85
-2
lines changed

2 files changed

+85
-2
lines changed

platforms/aws/eks/README.md

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
1. [Introduction](#introduction)
55
1. [Prerequisites](#prerequisites)
66
1. [EKS Cluster setup](#eks-cluster-setup)
7-
7+
1. [EFS Configuration for applying the customization](#efs-setup-for-customization)
88
# Introduction
99
These EKS configuration files help to create a EKS cluster setup.
1010

@@ -26,10 +26,54 @@ The following software's are required
2626

2727
To verify the cluste setup run `kubectl get svc` and it will list the ClusterIP and it will confirm that the cluster is ready.
2828

29-
Once Cluster is ready and see the [Js-Docker/Kubernets](https://github.com/TIBCOSoftware/js-docker/tree/ENGINFRA-8743-K8s-Fix/kubernetes) for JRS deployment in EKS.
29+
Once Cluster is ready and see the [Js-Docker/Kubernets](https://github.com/TIBCOSoftware/js-docker/tree/master/kubernetes) for JRS deployment in EKS.
3030

3131
Note: It is a basic cluster setup and for advanced security features and some other configuration , refer the [Official AWS Docs](https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html)
3232

33+
# EFS Configuration for applying the customization
34+
For large amount of files for customizations in kubernetes deployment , kubernetes secrets may not work. To avoid such type of issues ,
35+
we can use AWS EFS CSI driver for mounting the larger amount of data and same data can be deployed in Jaspersoft.
36+
To Setup EFS Storage for EKS cluster follow below steps.
37+
38+
- To install EFS CSI driver in EKS cluster and creating EFS in aws follow this [AWS-CSI-DRIVER](https://docs.aws.amazon.com/eks/latest/userguide/efs-csi.html)
39+
Make sure EFS should be created in same VPC where EKS cluster is created and allow NFS port for EKS cluster CIDR range
40+
- Once everything setup run `aws efs describe-file-systems --query "FileSystems[*].FileSystemId" --output text` to get the EFS file system ID or get the ID from aws console
41+
- modify the `eks-efs-setup.yaml` and replace the volumeHandle with EFS file system ID
42+
````
43+
csi:
44+
driver: efs.csi.aws.com
45+
volumeHandle: fs-xxxxx`
46+
````
47+
- Create jaspersoft name space in kubernetes cluster by running `kubectl apply -f namespace-rbac.yaml` , find the namespace-rbac-yaml file [js-docker/kubernetes](https://github.com/TIBCOSoftware/js-docker/tree/master/kubernetes)
48+
- Create Kubernets storage , persistent volume and persistent volume claim in EKS cluster by running `kubectl apply -f eks-efs-setup.yaml`
49+
- Remove the jasperserver-pro-volume in [Kubernetes-deployment-yaml-file](https://github.com/TIBCOSoftware/js-docker/blob/master/kubernetes/jasperreports-server-service-deployment.yaml) in volumes sections .
50+
````
51+
volumes:
52+
- name: license
53+
secret:
54+
secretName: jasperserver-pro-license
55+
- name: jasperserver-pro-keystore-files-secret
56+
secret:
57+
secretName: jasperserver-pro-jrsks
58+
- name: jasperserver-pro-volume
59+
hostPath:
60+
path: /mnt/jasperser-pro-customization
61+
````
62+
Add jasperserver-pro-volume with below code
63+
64+
````
65+
- name: jasperserver-pro-volume
66+
persistentVolumeClaim:
67+
claimName: jaspersoft-efs-claim
68+
````
69+
- To mount the data from on-premises to EFS , first create ec2 instance on same VPC where eks cluster is created and allow SSH port to copy the data
70+
- Connect to ec2 instance , switch to root user and create efs directory `mkdir efs`
71+
- Mount EFS on ec2 machine bu running EFS mount point similar to like this `sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport fs-XXXX.efs.us-east-1.amazonaws.com:/ efs`.
72+
- To get the EFS mount point , click in EFS which is created and click on attach button and then will see EFS mounting options, copy the EFS mount point from `Using the NFS client:` and run it on ec2 machine.
73+
- For more information see [Mount EFS on EC2 machine](https://docs.aws.amazon.com/efs/latest/ug/wt1-test.html)
74+
- Copy all your customizations in proper volumes , see [JS-Docker-volumes](https://github.com/TIBCOSoftware/js-docker#jasperreports-server-volumes)
75+
76+
Once Everything is setup then see the [Js-Docker/Kubernets](https://github.com/TIBCOSoftware/js-docker/tree/master/kubernetes) for JRS deployment in EKS.
3377

3478
# Copyright
3579
Copyright © 2020. TIBCO Software Inc.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
kind: StorageClass
2+
apiVersion: storage.k8s.io/v1
3+
metadata:
4+
name: efs-sc
5+
namespace: jaspersoft
6+
provisioner: efs.csi.aws.com
7+
8+
---
9+
10+
apiVersion: v1
11+
kind: PersistentVolume
12+
metadata:
13+
name: jaspersfor-efs-pv
14+
namespace: jaspersoft
15+
spec:
16+
capacity:
17+
storage: 5Gi
18+
volumeMode: Filesystem
19+
accessModes:
20+
- ReadWriteMany
21+
persistentVolumeReclaimPolicy: Retain
22+
storageClassName: efs-sc
23+
csi:
24+
driver: efs.csi.aws.com
25+
volumeHandle: fs-xxxxx
26+
---
27+
28+
apiVersion: v1
29+
kind: PersistentVolumeClaim
30+
metadata:
31+
name: jaspersoft-efs-claim
32+
namespace: jaspersoft
33+
spec:
34+
accessModes:
35+
- ReadWriteMany
36+
storageClassName: efs-sc
37+
resources:
38+
requests:
39+
storage: 5Gi

0 commit comments

Comments
 (0)