diff --git a/app/backend/chatbot.py b/app/backend/chatbot.py index c9ac3702..21c36eda 100644 --- a/app/backend/chatbot.py +++ b/app/backend/chatbot.py @@ -77,14 +77,15 @@ def __init__(self, config, logger): def format_sources(self, input_list): sources = "" if len(input_list) != 0: - sources += input_list[0].metadata["source"] + ', page: ' + str(input_list[0].metadata["page"]) - page_list = [input_list[0].metadata["page"]] + sources += input_list[0].metadata["metadata"]["source"] + ', page: ' + str(input_list[0].metadata["metadata"]["page"]) + page_list = [input_list[0].metadata["metadata"]["page"]] for item in input_list: - if item.metadata["page"] not in page_list: # Avoid duplicates - page_list.append(item.metadata["page"]) - sources += ', ' + str(item.metadata["page"]) + if item.metadata["metadata"]["page"] not in page_list: # Avoid duplicates + page_list.append(item.metadata["metadata"]["page"]) + sources += ', ' + str(item.metadata["metadata"]["page"]) return sources + def stream(self, query, claim) -> Generator: # A Queue is needed for Streaming implementation q = Queue() diff --git a/bootstrap/ic-rhoai-configuration/job-patch-code-server.yaml b/bootstrap/ic-rhoai-configuration/job-patch-code-server.yaml deleted file mode 100644 index e3fd8a21..00000000 --- a/bootstrap/ic-rhoai-configuration/job-patch-code-server.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: patch-code-server - annotations: - argocd.argoproj.io/sync-wave: "2" -spec: - template: - spec: \ No newline at end of file diff --git a/bootstrap/ic-shared-app/deployment-app.yaml b/bootstrap/ic-shared-app/deployment-app.yaml index 68fe39fb..fdbb4260 100644 --- a/bootstrap/ic-shared-app/deployment-app.yaml +++ b/bootstrap/ic-shared-app/deployment-app.yaml @@ -19,7 +19,7 @@ spec: spec: containers: - name: insurance-claim-app - image: quay.io/rh-aiservices-bu/rhoai-lab-insurance-claim-app:2.2.0 + image: quay.io/rh-aiservices-bu/rhoai-lab-insurance-claim-app:2.2.1 ports: - containerPort: 5000 protocol: TCP diff --git a/bootstrap/ic-shared-database/populate-images.yaml b/bootstrap/ic-shared-database/populate-images.yaml index 924abad4..a7bb13a3 100644 --- a/bootstrap/ic-shared-database/populate-images.yaml +++ b/bootstrap/ic-shared-database/populate-images.yaml @@ -24,7 +24,8 @@ spec: args: - -ec - |- - git clone https://github.com/rh-aiservices-bu/parasol-insurance.git + BRANCH_NAME="dev" + git clone https://github.com/rh-aiservices-bu/parasol-insurance.git && cd parasol-insurance && git checkout $BRANCH_NAME cat << 'EOF' | python3 import boto3, os, botocore @@ -43,13 +44,13 @@ spec: s3.create_bucket(Bucket=bucket_name) # Upload original images to minio - for filename in os.listdir("parasol-insurance/bootstrap/ic-shared-database/images/original_images"): - with open(f"parasol-insurance/bootstrap/ic-shared-database/images/original_images/{filename}", "rb") as f: + for filename in os.listdir("/opt/app-root/src/parasol-insurance/bootstrap/ic-shared-database/images/original_images"): + with open(f"/opt/app-root/src/parasol-insurance/bootstrap/ic-shared-database/images/original_images/{filename}", "rb") as f: s3.upload_fileobj(f, bucket_name, f"original_images/{filename}") # Upload processed images to minio - for filename in os.listdir("parasol-insurance/bootstrap/ic-shared-database/images/processed_images"): - with open(f"parasol-insurance/bootstrap/ic-shared-database/images/processed_images/{filename}", "rb") as f: + for filename in os.listdir("/opt/app-root/src/parasol-insurance/bootstrap/ic-shared-database/images/processed_images"): + with open(f"/opt/app-root/src/parasol-insurance/bootstrap/ic-shared-database/images/processed_images/{filename}", "rb") as f: s3.upload_fileobj(f, bucket_name, f"processed_images/{filename}") EOF diff --git a/bootstrap/ic-user-projects/create-projects-and-resources-job.yaml b/bootstrap/ic-user-projects/create-projects-and-resources-job.yaml index 43837c44..017a5f47 100644 --- a/bootstrap/ic-user-projects/create-projects-and-resources-job.yaml +++ b/bootstrap/ic-user-projects/create-projects-and-resources-job.yaml @@ -558,6 +558,30 @@ spec: volumeMode: Filesystem EOF + # Create the ArgoCD Project + cat << EOF | oc apply -f- + apiVersion: argoproj.io/v1alpha1 + kind: AppProject + metadata: + name: project-$USER_PROJECT + namespace: openshift-gitops + spec: + description: Application project for $USER_PROJECT + destinations: + - name: in-cluster + namespace: $USER_PROJECT + server: 'https://kubernetes.default.svc' + roles: + - description: Sync privileges for any application + groups: + - $USER_PROJECT + name: ci-role + policies: + - 'p, proj:project-$USER_PROJECT:ci-role, applications, *, project-$USER_PROJECT/*, allow' + sourceRepos: + - 'https://github.com/rh-aiservices-bu/parasol-insurance.git' + EOF + sleep 20 done diff --git a/content/modules/ROOT/assets/images/05/01-openshift-console.png b/content/modules/ROOT/assets/images/05/01-openshift-console.png deleted file mode 100644 index f37bd408..00000000 Binary files a/content/modules/ROOT/assets/images/05/01-openshift-console.png and /dev/null differ diff --git a/content/modules/ROOT/assets/images/05/05-application-creation.png b/content/modules/ROOT/assets/images/05/05-application-creation.png new file mode 100644 index 00000000..db0afe14 Binary files /dev/null and b/content/modules/ROOT/assets/images/05/05-application-creation.png differ diff --git a/content/modules/ROOT/assets/images/05/05-application-deployed.png b/content/modules/ROOT/assets/images/05/05-application-deployed.png new file mode 100644 index 00000000..3ab53501 Binary files /dev/null and b/content/modules/ROOT/assets/images/05/05-application-deployed.png differ diff --git a/content/modules/ROOT/assets/images/05/05-application-yaml-save.png b/content/modules/ROOT/assets/images/05/05-application-yaml-save.png new file mode 100644 index 00000000..bea2994c Binary files /dev/null and b/content/modules/ROOT/assets/images/05/05-application-yaml-save.png differ diff --git a/content/modules/ROOT/assets/images/05/05-create-application-validation.png b/content/modules/ROOT/assets/images/05/05-create-application-validation.png new file mode 100644 index 00000000..6ab1525f Binary files /dev/null and b/content/modules/ROOT/assets/images/05/05-create-application-validation.png differ diff --git a/content/modules/ROOT/assets/images/05/05-create-application.png b/content/modules/ROOT/assets/images/05/05-create-application.png new file mode 100644 index 00000000..341dd8dd Binary files /dev/null and b/content/modules/ROOT/assets/images/05/05-create-application.png differ diff --git a/content/modules/ROOT/assets/images/05/05-edit-as-yaml.png b/content/modules/ROOT/assets/images/05/05-edit-as-yaml.png new file mode 100644 index 00000000..65816339 Binary files /dev/null and b/content/modules/ROOT/assets/images/05/05-edit-as-yaml.png differ diff --git a/content/modules/ROOT/assets/images/05/05-login-argocd-openshift.png b/content/modules/ROOT/assets/images/05/05-login-argocd-openshift.png new file mode 100644 index 00000000..850d0421 Binary files /dev/null and b/content/modules/ROOT/assets/images/05/05-login-argocd-openshift.png differ diff --git a/content/modules/ROOT/assets/images/05/05-open-argocd.png b/content/modules/ROOT/assets/images/05/05-open-argocd.png new file mode 100644 index 00000000..31321bc5 Binary files /dev/null and b/content/modules/ROOT/assets/images/05/05-open-argocd.png differ diff --git a/content/modules/ROOT/assets/images/05/05-open-url.jpg b/content/modules/ROOT/assets/images/05/05-open-url.jpg deleted file mode 100644 index f7903a7a..00000000 Binary files a/content/modules/ROOT/assets/images/05/05-open-url.jpg and /dev/null differ diff --git a/content/modules/ROOT/assets/images/05/05-openshift-login.png b/content/modules/ROOT/assets/images/05/05-openshift-login.png new file mode 100644 index 00000000..c7f12e80 Binary files /dev/null and b/content/modules/ROOT/assets/images/05/05-openshift-login.png differ diff --git a/content/modules/ROOT/assets/images/05/05-switch-to-admin-view.jpg b/content/modules/ROOT/assets/images/05/05-switch-to-admin-view.jpg deleted file mode 100644 index 67f453bf..00000000 Binary files a/content/modules/ROOT/assets/images/05/05-switch-to-admin-view.jpg and /dev/null differ diff --git a/content/modules/ROOT/assets/images/05/argocd-rollout.png b/content/modules/ROOT/assets/images/05/argocd-rollout.png deleted file mode 100644 index be2d575c..00000000 Binary files a/content/modules/ROOT/assets/images/05/argocd-rollout.png and /dev/null differ diff --git a/content/modules/ROOT/assets/images/05/argocd-route.png b/content/modules/ROOT/assets/images/05/argocd-route.png deleted file mode 100644 index a8ca7717..00000000 Binary files a/content/modules/ROOT/assets/images/05/argocd-route.png and /dev/null differ diff --git a/content/modules/ROOT/assets/images/05/jobs-completed.png b/content/modules/ROOT/assets/images/05/jobs-completed.png deleted file mode 100644 index b21612da..00000000 Binary files a/content/modules/ROOT/assets/images/05/jobs-completed.png and /dev/null differ diff --git a/content/modules/ROOT/assets/images/05/web-term-1.png b/content/modules/ROOT/assets/images/05/web-term-1.png deleted file mode 100644 index 36a21a06..00000000 Binary files a/content/modules/ROOT/assets/images/05/web-term-1.png and /dev/null differ diff --git a/content/modules/ROOT/assets/images/05/web-term-2.png b/content/modules/ROOT/assets/images/05/web-term-2.png deleted file mode 100644 index 92ca6cca..00000000 Binary files a/content/modules/ROOT/assets/images/05/web-term-2.png and /dev/null differ diff --git a/content/modules/ROOT/nav.adoc b/content/modules/ROOT/nav.adoc index 2128b594..54325b36 100644 --- a/content/modules/ROOT/nav.adoc +++ b/content/modules/ROOT/nav.adoc @@ -32,7 +32,6 @@ * 5. Web App Deployment ** xref:05-01-application.adoc[5.1 Application overview] -** xref:05-02-openshift-terminal.adoc[5.2 OpenShift Terminal] ** xref:05-03-web-app-deploy-application.adoc[5.3 Deploying the application via GitOps] ** xref:05-04-web-app-validating.adoc[5.4 Validating the application] ** xref:05-05-process-claims.adoc[5.5 Process claims with a pipeline] diff --git a/content/modules/ROOT/pages/05-02-openshift-terminal.adoc b/content/modules/ROOT/pages/05-02-openshift-terminal.adoc deleted file mode 100644 index 16600ca2..00000000 --- a/content/modules/ROOT/pages/05-02-openshift-terminal.adoc +++ /dev/null @@ -1,29 +0,0 @@ -= Working with the {ocp} Terminal -include::_attributes.adoc[] - -To deploy the application, you will use the {ocp} Web Terminal. + -This is a web-based terminal that allows you to execute commands on the {ocp-short} cluster from the {ocp-short} Console. - -== Opening the {ocp} Console - -- Access the {ocp-short} Console via this link: -+ -[.bordershadow] -image::05/01-openshift-console.png[] - -- When prompted, enter your credentials. - -== Open a Web Terminal - -- On the {ocp-short} Console, click on the Web Terminal icon in the top right corner: -+ -[.bordershadow] -image::05/web-term-1.png[] - -- Then, choose your existing project and click start: -+ -[.bordershadow] -image::05/web-term-2.png[] - -- After a few seconds, a Terminal interface will open. -- This is where you will execute the commands in the next steps. diff --git a/content/modules/ROOT/pages/05-03-web-app-deploy-application.adoc b/content/modules/ROOT/pages/05-03-web-app-deploy-application.adoc index afa58ef1..ed76b37c 100644 --- a/content/modules/ROOT/pages/05-03-web-app-deploy-application.adoc +++ b/content/modules/ROOT/pages/05-03-web-app-deploy-application.adoc @@ -1,90 +1,36 @@ = Deploying the application via GitOps include::_attributes.adoc[] -== Deploy your instance of {argocd} +== Deploy the application(s) via GitOps -We will start by deploying an instance of ArgoCD in your namespace. + -This will be used to deploy the application. +We are going to use OpenShift GitOps/{argocd} to deploy the application in your namespace. -- Copy the following text, and paste it in the {ocp-short} Terminal to deploy {argocd}. +- Access the {argocd} Console by clicking on the link in the top right menu. + -[.lines_space] -[.console-input] -[source, text] -cat <