SAMi Pre-Reqs
-
Connection to Kubernetes Cluster
-
HELM 3
Install Process
Portal Pre-requisites
Use the table below to help with data and decisions needed for installation. Gather the information below before proceeding to step 1. Postgres database is recommended however another database can be configured. If using something other than the Postgres database, lines 19-20 (JDBC URL and driver) in the Step 1 section will need to be updated for the database you choose.
Name |
Description |
Value |
---|---|---|
PORTAL_DB_USER |
Portal database username for jdbc connection |
|
PORTAL_DB_PWD |
Portal database user password for jdbc connection |
|
PORTAL_DB_HOST |
Portal database hostname for jdbc connection |
|
PORTAL_DB_PORT |
Portal database port for jdbc connection |
|
PORTAL_DB_NAME |
Portal database named for jdbc connection |
|
PORTAL_URL |
Portal url not including http:// or https:// for example: sam-portal-dev.demo.sidglobal.cloud |
|
SAMI_API_GATEWAY_URL |
SAMi REST APi’s for micro services |
|
Another decision is if you are going to enable HTTPS for the portal. The YAML file in Step 1 below does have SSL enabled set to true. you can remove SSL for initial testing by changing line 8 to false; however, SSL in recommended for production use.
Step 1 – Create SAMi Portal Configuration file
Create the Environment Configuration file using the template below replacing the values from the above chart.
1global:
2 portaldb:
3 enable: true
4 user: "PORTAL_DB_USER"
5 password: "PORTAL_DB_PWD+"
6 url: "jdbc:postgresql://PORTAL_DB_HOST:PORTAL_DB_PORT/PORTAL_DB_NAME?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false"
7 driver: "org.postgresql.Driver"
8 nginx:
9 protocol: "HTTP"
10 port:
11 number : "80"
12 secure:
13 enabled: false
14 credentialName: sam-portal-tls
15 domain:
16 use: true
17 name: PORTAL_URL
18 pgadmin:
19 enabled: false
20 liferay:
21 https:
22 enabled: false
23 elasticsearch:
24 imagePullSecrets:
25 - name: sam-regcred
26liferay:
27 java:
28 opts: -Xms4g -Xmx4g
29 osgi:
30 elastic:
31 enabled: true
Save the configuration in a file called sam-portal-values.yaml
Step 2 – Configure AWS
** AWS CLI needs to be installed on the SAM workstation
Create a K8 Secret for the K8 Cluster to Connect to the SIDGS Docker Registry
Configure AWS
The SAM Product team will provision and provide an AWS Client ID and Secret that need to be used for the below
1aws configure --region us-east-1
Name |
Value |
---|---|
AWS Access Key ID |
Ref Provided Info |
AWS Secret Access Key |
Ref Provided Info |
Default Region Name |
us-east-1 |
Default Output format |
json |
Configure Secret
Use the script below to setup the secret
The below script sets the namespace environment variable followed by creating the namespace and setting the secrets with ECR creds to pull the images.
1namespace=${K8_NAMESPACE:-sam-portal-system}
2kubectl create ns $namespace
3kubectl delete secret sam-regcred -n $namespace
4kubectl create secret docker-registry sam-regcred \
5 --docker-server=865615422972.dkr.ecr.us-east-1.amazonaws.com \
6 --docker-username=AWS \
7 --docker-password=`aws ecr get-login-password` \
8 -n $namespace
9
10
Step 3a – Install
** HELM Version 3.7 or above is required**
-
Download the HELM Chart
The below sets the creds to download helm charts.
1aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/sidgs
2export HELM_EXPERIMENTAL_OCI=1
3helm pull oci://public.ecr.aws/sidgs/sam-portal-chart --version 2.2.3
4
5
-
Validate that Kubectl is available and connected to the SAM K8s Cluster
-
Validate that the namespace ‘sam-portal-system’ is available and reachable
-
Validate the sam-portal-values.yaml using the steps below
1helm install sam-portal ./sam-portal-chart-2.2.3.tgz \
2 -f sam-portal-values.yaml \
3 -n $namespace \
4 --dry-run
5
Upon successful interpretation, the complete Manifest is printed
-
Install the sam-portal as shown below
1helm install sam-portal ./sam-portal-chart-2.2.3.tgz \
2 -f sam-portal-values.yaml \
3 -n $namespace --create-namespace
4
Step 3b – Upgrade ( Optional – For Upgrade/Patches to version 2.2.3)
Make you are using the latest charts and the latest copy of the values file, then you can upgrade using the commands below:
1namespace=${K8_NAMESPACE:-sam-portal-system}
2aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/sidgs
3export HELM_EXPERIMENTAL_OCI=1
4helm pull oci://public.ecr.aws/sidgs/sam-portal-chart --version VERSION
5helm upgrade sam-portal ./sam-portal-chart-2.2.3.tgz -n $namespace -f sam-portal-values.yaml
Step 4 – Check AWS EKS and restart the portal
Using the PORTAL_URL, bring up the portal in a browser. Once the portal comes up, If you see a basic site like what is shown below, one more restart is required, which is described below.
Once the above screenshot is visible, continue to the next step.
Step 5 – Continue to post-install configuration
Follow the Steps in the link below to configure the SAMi Portal.