SAMi - Smart API Marketplace Documentation
Portal Installation User Guide
Installation Steps
Gather all the information mentioned below before proceeding to step 1.
Name | Description |
---|---|
PORTAL_DB_USER | Specifies the username for accessing the portal's database. |
PORTAL_DB_PWD | Defines the password associated with the username for database access in the portal. |
PORTAL_DB_HOST | Identifies the host address or server location of the portal's database. |
PORTAL_DB_PORT | Designates the port number used for connecting to the portal's database. |
PORTAL_DB_NAME | Specifies the name of the database within the portal to which connections are made. |
PORTAL_URL | Represents the URL endpoint or web address for accessing the portal interface. |
INTEGRATION_HOST_ALIAS | Host alias used for installing the Integration services. Please refer to the Integration services installation for more details. |
Table 1.1 Configuration Property Reference
Step 1 - Create SAMi Portal Configuration file
Create a directory on your system to serve as the base directory for SAMi-platform installation
mkdir sami-platform
Change to the directory using the following command:
cd sami-platform
Create the Environment Configuration file using the template below:
# Default values for liferay-umbrella.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
global:
settings:
integrationUrl: "https://<INTEGRATION_HOST_ALIAS>/vsp/api" # (refer table 1.1)
pv:
create: false
liferay:
enabled: true
https:
enabled: true # "By default HTTPS connection is enabled to disable HTTPS the value should be set: false"
portaldb:
enable: true
user: "<PORTAL_DB_USER>" # (refer table 1.1)
password: "<PORTAL_DB_PWD>" # (refer table 1.1)
# Postgres
url: "jdbc:postgresql://<PORTAL_DB_HOST>:<PORTAL_DB_PORT>/<PORTAL_DB_NAME>?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false" # PORTAL_DB_HOST & Others refer table 1.1
driver: "org.postgresql.Driver"
nginx:
istio: <ISTIO_NAME> # PLease provide the name of the Istio ingress. The default value is "ingressgateway"
image:
tag: "3.0.1" # Please provide the docker image tag
protocol: "HTTP"
port:
number : "80"
securePort:
number: "443"
protocol: "HTTP"
secure:
enabled: true
credentialName: <sami-portal-tls> # Refers to the Kubernetes secret name for holding the SAMi Alias/hostname full chain certificate & key
integration:
enabled: false
domain:
use: true
name:
- "<portal_url>" # Enter the SAMi Alias/Hostname which is used for accessing the portal
mysql:
enabled: false # Enable the value to true in case mysql is being used
pgadmin:
enabled: false
tags:
portal: true
mysql: false
liferay:
community:
enabled: true
dxp:
enabled: false
# requires modification
osgi:
s3:
enabled: false
accessKey: ""
bucketName: "<name-of-s3-bucket>"
s3Endpoint: "s3.us-east-1.amazonaws.com"
s3Region: "us-east-1"
secretKey: ""
elastic:
enabled: true
Save the configuration in a file called sam-portal-values.yaml
Sample Reference
Please find a sample reference for the above configuration file:
global:
settings:
integrationUrl: "https://sam-gateway.global.cloud/vsp/api"
pv:
create: false
liferay:
enabled: true
https:
enabled: true # By Default the value is set to "false". To enable the HTTPS based url set it to "true"
portaldb:
enable: true
user: "postgres"
password: "test123+"
# Postgres
url: "jdbc:postgresql://xxxxxxx.cjip1jjvpzht.xxxxx.rds.amazonaws.com:5432/sami-portal-db?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false"
driver: "org.postgresql.Driver"
nginx:
istio:ingress
image:
tag: "3.0.1"
protocol: "HTTP"
port:
number : "80"
securePort:
number: "443"
protocol: "HTTP"
secure:
enabled: false
credentialName: portal-creds
domain:
use: true
name:
- samportal.global.cloud
mysql:
enabled: false
integration:
enabled: false
pgadmin:
enabled: false
tags:
portal: true
mysql: false
nginx:
image:
tag: "3.0.1" # check on it
pullPolicy: Always
liferay:
community:
enabled: true
dxp:
enabled: false
osgi:
s3:
enabled: false
accessKey: ""
bucketName: "sam-bucket"
s3Endpoint: "s3.us-east-1.amazonaws.com"
s3Region: "us-east-1"
secretKey: ""
elastic:
enabled: true
Step 2 - Install the SAMi Portal
Chart download and installation
Download the HELM Chart to the base directory of
sami-platform
helm pull oci://registry-1.docker.io/mysami/sam-portal-chart --version 3.0.0
upon successfully running the above command sam-portal-chart-3.0.0.tgz should be downloaded.
The outlined process above represents the anticipated future methodology for downloading Helm charts. However, as of the present moment, acquiring Helm charts and establishing the secret for image retrieval necessitates the execution of steps 7, 8, and 9 detailed in the subsequent section.
Validate the Download of Helm Chart
ls -ltr
-rw-r--r-- 1 staff staff 42188 Sep 29 18:10 sam-portal-chart-3.0.0.tgz
Validate that Kubectl is installed on the local workstation with the supported version and is compatible with the k8s server
kubectl version
Check the current context and ensure you are connected to the intended cluster
kubectl config current-context
Validate that the namespace intended for deployment is available. If not present go to 6.
kubectl get ns | grep "sami-platform"
If the namespace is not present run the below commands to create the namespace
namespace=${K8_NAMESPACE:-sami-platform}
kubectl create ns $namespace
Reference for steps 5 & 6
A. Please refer to the below example for more details.
kubectl get ns | grep "sami-platform"
kubectl get pods -n sami-platform
B. The output should look like below:
kubectl get ns | grep "sami-platfrom"
sam-portal-system
kubectl get pods -n sami-platform
No resources found in test namespace.
Configure AWS by running the below command and the details will be provided by the product team.
aws configure --region us-east-1
The below table provides all the required details for the above command.
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 |
To configure the secret use the below command:
kubectl create secret docker-registry sam-regcred \
--docker-server=865615422972.dkr.ecr.us-east-1.amazonaws.com \
--docker-username=AWS \
--docker-password=`aws ecr get-login-password` \
-n $namespace
Verify the secret creation by running the below:
kubectl get secret -n $namespace | grep "sam-regcred"
Download the HELM Chart by running below to set the credentials and to download helm charts:
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/sidgs
export HELM_EXPERIMENTAL_OCI=1
helm pull oci://public.ecr.aws/sidgs/sam-portal-chart --version 3.0.1
Install Chart
Validate the sam-portal-values.yaml using the steps given below:
helm install sam-portal ./sam-portal-chart-3.0.1.tgz \
-f sam-portal-values.yaml \
-n $namespace \
--dry-run
Note: The complete SAMi portal Kubernetes Manifest is printed upon successful interpretation.
Install the sami-portal by running step 1 without the dry-run flag
helm install sam-portal ./sam-portal-chart-3.0.1.tgz \
-f sam-portal-values.yaml \
-n $namespace
The output should look something similar to below:
NAME: sam-portal
NAMESPACE: sami-platform
STATUS: deployed
REVISION: 1
Helm install will fail if you are trying to rerun the setup due to any sort of wrong environment configuration being passed in the sam-portal-values.yaml . Please run the below Helm upgrade command for upgrading the deployment.
Validate the helm upgrade by passing the dry-run flag.
helm upgrade sam-portal ./sam-portal-chart-3.0.1.tgz \
-f sam-portal-values.yaml \
-n $namespace \
--dry-run
The complete SAMi portal Kubernetes Manifest is printed upon successful interpretation. Then run the above command without the dry-run flag for upgrading.
helm upgrade sam-portal ./sam-portal-chart-3.0.1.tgz \
-f sam-portal-values.yaml \
-n $namespace
Step 3 - Validate the Installation
Please navigate to the designated
PORTAL_URL
using your preferred web browser. The expected appearance is illustrated below. If the portal does not match the basic site layout depicted, an additional restart is advised. Detailed instructions for this can be found in the troubleshooting section below
Verify the pod status by listing all the pods in the current namespace using the command:
kubectl get pods -n $namespace
NAME READY STATUS RESTARTS AGE
sam-app-server-547987c7b-d47kt 1/1 Running 0 6d
sam-web-server-7bf994d976-p5bmk 1/1 Running 0 6d
sami-master-0 1/1 Running 0 6d
After confirming that the aforementioned screen is displayed as shown in Figure 1, and ensuring that all pods are operational, you may proceed to the subsequent step.
Troubleshooting the Installation
In case the portal doesn’t load up properly, please follow the below steps:
Scale down the sam-app-server to 0, then scale back to 1 which takes the app server about 3-5 minutes to start.
Scale down the sam-app-server to 0 by running the below command:
kubectl scale deployment sam-app-server --replicas=0 -n sami-platform
b. Verify whether scale down was successful before scaling up.
kubectl get deployment sam-app-server -n sami-platform
NAME READY UP-TO-DATE AVAILABLE AGE
sam-app-server 0/0 0 0 7d21h
c. Scale up the deployment to 1.
kubectl scale deployment sam-app-server --replicas=1 -n sami-platform
NAME READY UP-TO-DATE AVAILABLE AGE
sam-app-server 1/1 1 1 7d21h
Once the above figure 1 is visible, continue to the next step.
Related content
© 2024 SID Global Solutions | https://www.mysami.io | https://www.sidgs.com | +1 484-218-0021