LOCAL FILE REPOSITORY (LFR) SERVICE INSTALLATION
Local File Repository (LFR) service installation is the first step. This section describes the setup process in detail.
LFR SERVICE INSTALLATION
-
Create virsec Namespace using the below command:
-
kubectl create namespace virsec
-
-
Create a secret for Virsec Container Registry using the below command:
-
Method 1: Using kubectl command:
kubectl create secret docker-registry regcred --docker-server="artifacts.virsec.work" --docker-username="<Virsec_Artifactory_username>" --docker-password="<Virsec_Artifactory_password>" -n virsec
-
Method 2:
-
Log in to the Artifactory site using Virsec-provided credentials from the local machine
-
Navigate to the directory vsp > releases > public > 2 > 2.10 > <Patch_Version> > Helm
-
Right-click on the file vsp_create_secret.sh, listed on the page and download it to the local system
-
Log in to the Management Node
-
Copy the downloaded file vsp_create_secret.sh
-
Modify the Permission using the command
-
chmod +x vsp_create_secret.sh
-
-
Execute the script using the below command and provide the artifactory credentials when prompted
-
./vsp_create_secret.sh
-
Provide the artifactory credentials when prompted
-
-
-
-
Log in to the Artifactory site using Virsec-provided credentials from the local machine
-
Navigate to the directory vsp > releases > public > 2 > 2.10 > <Patch_Version> > Helm
-
Right-click on the file vsp-lfr-<version>.tgz, listed on the page and download it to the local system
-
Log in to the Management Node
-
Copy the downloaded file vsp-lfr-<version>.tgz
-
-
Execute the below command to display the configurable parameters:
-
helm inspect values vsp-lfr-<version>.tgz
-
-
Execute the below commands to install LFR and display the LFR URL (using either Method 1 or 2)
-
Method 1: Using helm install command
-
For On-Premise environments:
-
Helm 3:
helm install vsp-lfr ./vsp-lfr-<RELEASE_VERSION>.tgz --set artifactory.username="<ARTIFACTORY_USERNAME>" --set artifactory.password='<ARTIFACTORY_PASSWORD>' --set artifactory.token="<ARTIFACTORY_TOKEN>" --namespace virsec
-
Helm 2:
helm install --name vsp-lfr ./vsp-lfr-<RELEASE_VERSION>.tgz --set artifactory.username="<ARTIFACTORY_USERNAME>" --set artifactory.password='<ARTIFACTORY_PASSWORD>' --set artifactory.token="<ARTIFACTORY_TOKEN>" --namespace virsec
-
-
For AWS EKS/ GOOGLE GKE environments:
-
Helm 3:
helm install vsp-lfr ./vsp-lfr-<RELEASE_VERSION>.tgz --set cloudProvider=eks --set artifactory.username="<ARTIFACTORY_USERNAME>" --set artifactory.password='<ARTIFACTORY_PASSWORD>' --set artifactory.token="<ARTIFACTORY_TOKEN>" --namespace virsec
-
Helm 2:
helm install --name vsp-lfr ./vsp-lfr-<RELEASE_VERSION>.tgz --set cloudProvider=eks --set artifactory.username="<ARTIFACTORY_USERNAME>" --set artifactory.password='<ARTIFACTORY_PASSWORD>' --set artifactory.token="<ARTIFACTORY_TOKEN>" --namespace virsec
-
-
A sample output of the command is provided below
-
Execute the provided commands to retrieve LFR URL:
(kubectl -n virsec get pods -o wide -l run=vsp-lfr | grep vsp-lfr | awk '{print $7}' | xargs -I {} kubectl -n virsec get node -o wide {} | tail -n 1 | awk '{print $6}') | xargs -I {} kubectl patch service vsp-lfr -n virsec -p '{"spec":{"externalIPs": [ "{}" ]}}'
export SERVICE_IP=$(kubectl get svc --namespace virsec vsp-lfr -o jsonpath='{.spec.externalIPs[0]}')
echo https://$SERVICE_IP:8443/vsp
-
-
Method 2: Using kubectl command
-
For On-Premise environments:
-
Helm 3:
helm template vsp-lfr ./vsp-lfr-<RELEASE_VERSION>.tgz --set artifactory.username="<ARTIFACTORY_USERNAME>" --set artifactory.password='<ARTIFACTORY_PASSWORD>' --set artifactory.token="<ARTIFACTORY_TOKEN>" --namespace virsec > vsp-lfr.yaml
-
Helm 2:
helm template --name vsp-lfr ./vsp-lfr-<RELEASE_VERSION>.tgz --set artifactory.username="<ARTIFACTORY_USERNAME>" --set artifactory.password='<ARTIFACTORY_PASSWORD>' --set artifactory.token="<ARTIFACTORY_TOKEN>" --namespace virsec > vsp-lfr.yaml
-
-
For AWS EKS/ GOOGLE GKE environments:
-
Helm 3:
helm template vsp-lfr ./vsp-lfr-<RELEASE_VERSION>.tgz --set cloudProvider=eks --set artifactory.username="<ARTIFACTORY_USERNAME>" --set artifactory.password='<ARTIFACTORY_PASSWORD>' --set artifactory.token="<ARTIFACTORY_TOKEN>" --namespace virsec > vsp-lfr.yaml
-
Helm 2:
helm template --name vsp-lfr ./vsp-lfr-<RELEASE_VERSION>.tgz --set cloudProvider=eks --set artifactory.username="<ARTIFACTORY_USERNAME>" --set artifactory.password='<ARTIFACTORY_PASSWORD>' --set artifactory.token="<ARTIFACTORY_TOKEN>" --namespace virsec > vsp-lfr.yaml
-
-
Execute the below commands to deploy LFR URL:
kubectl apply -f vsp-lfr.yaml
-
Execute the below commands to retrieve LFR URL:
(kubectl -n virsec get pods -o wide -l run=vsp-lfr | grep vsp-lfr | awk '{print $7}' | xargs -I {} kubectl -n virsec get node -o wide {} | tail -n 1 | awk '{print $6}') | xargs -I {} kubectl patch service vsp-lfr -n virsec -p '{"spec":{"externalIPs": [ "{}" ]}}'
export SERVICE_IP=$(kubectl get svc --namespace virsec vsp-lfr -o jsonpath='{.spec.externalIPs[0]}')
echo https://$SERVICE_IP:8443/vsp
-
-