Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Opensearch Playground] Add searchapps to playground #126

Merged
merged 1 commit into from
Dec 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions .github/workflows/deployment-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- uses: actions/checkout@v3

- name: Step 1 - Replace Tokens for helm chart configuration
if: ${{ inputs.deploy-env == 'preview' }}
if: ${{ (inputs.deploy-env == 'preview') || (inputs.deploy-env == 'searchapps') }}
uses: cschleiden/replace-tokens@v1
with:
files: '["${{ github.workspace }}/config/playground/helm/${{inputs.deploy-env}}/helm-opensearch-dashboards.yaml"]'
Expand All @@ -71,21 +71,21 @@ jobs:
KIBANASERVER: ${{ secrets.kibanaserver }}

- name: Step 3 - Replace Tokens for logstash configuration
if: ${{ inputs.deploy-env == 'preview' }}
if: ${{ (inputs.deploy-env == 'preview') || (inputs.deploy-env == 'searchapps') }}
uses: cschleiden/replace-tokens@v1
with:
files: '["${{ github.workspace }}/config/playground/metrics/logstash/${{inputs.deploy-env}}/logstash.yaml"]'
files: '["${{ github.workspace }}/config/playground/metrics/logstash/preview/logstash.yaml"]'
tokenPrefix: '${'
tokenSuffix: '}'
env:
OSD_USER: ${{ secrets.osd_user }}
OSD_USER_PASSWORD: ${{ secrets.osd_user_password }}

- name: Step 4 - Replace Tokens for tracing configuration
if: ${{ inputs.deploy-env == 'preview' }}
if: ${{ (inputs.deploy-env == 'preview') || (inputs.deploy-env == 'searchapps') }}
uses: cschleiden/replace-tokens@v1
with:
files: '["${{ github.workspace }}/config/playground/metrics/tracing/${{inputs.deploy-env}}/otel-config.yaml"]'
files: '["${{ github.workspace }}/config/playground/metrics/tracing/preview/otel-config.yaml"]'
tokenPrefix: '${'
tokenSuffix: '}'
env:
Expand All @@ -102,7 +102,7 @@ jobs:
aws-region: ${{ secrets.region }}

- name: Step 6 - Delete Logstash
if: ${{ inputs.deploy-env == 'preview' }}
if: ${{ (inputs.deploy-env == 'preview') || (inputs.deploy-env == 'searchapps') }}
uses: elastic-analytics/dashboards-action@main
env:
KUBE_CONFIG_DATA: ${{ secrets.kube-config }}
Expand All @@ -112,17 +112,17 @@ jobs:
kubectl delete ns logstash

- name: Step 7 - Delete Tracing
if: ${{ inputs.deploy-env == 'preview' }}
if: ${{ (inputs.deploy-env == 'preview') || (inputs.deploy-env == 'searchapps') }}
uses: elastic-analytics/dashboards-action@main
env:
KUBE_CONFIG_DATA: ${{ secrets.kube-config }}
with:
plugins: ""
command: |
kubectl delete -f config/playground/metrics/tracing/${{inputs.deploy-env}}/jaeger-agent.yaml
kubectl delete -f config/playground/metrics/tracing/${{inputs.deploy-env}}/otel-config.yaml
kubectl delete -f config/playground/metrics/tracing/${{inputs.deploy-env}}/otel-collector.yaml
kubectl delete -f config/playground/metrics/tracing/${{inputs.deploy-env}}/data-prepper.yaml
kubectl delete -f config/playground/metrics/tracing/preview/jaeger-agent.yaml
kubectl delete -f config/playground/metrics/tracing/preview/otel-config.yaml
kubectl delete -f config/playground/metrics/tracing/preview/otel-collector.yaml
kubectl delete -f config/playground/metrics/tracing/preview/data-prepper.yaml

- name: Step 8 - Deploy OpenSearch and OpenSearch Dashboards By Helm Chart
uses: elastic-analytics/dashboards-action@main
Expand All @@ -145,26 +145,26 @@ jobs:
helm install dashboards opensearch/opensearch-dashboards -f config/playground/helm/${{inputs.deploy-env}}/helm-opensearch-dashboards.yaml

- name: Step 9 - Install Logstash
if: ${{ inputs.deploy-env == 'preview' }}
if: ${{ (inputs.deploy-env == 'preview') || (inputs.deploy-env == 'searchapps') }}
uses: elastic-analytics/dashboards-action@main
env:
KUBE_CONFIG_DATA: ${{ secrets.kube-config }}
with:
plugins: ""
command: |
kubectl create ns logstash
kubectl create -f config/playground/metrics/logstash/${{inputs.deploy-env}}/logstash-configmap.yaml
kubectl apply -f config/playground/metrics/logstash/${{inputs.deploy-env}}/logstash.yaml
kubectl create -f config/playground/metrics/logstash/preview/logstash-configmap.yaml
kubectl apply -f config/playground/metrics/logstash/preview/logstash.yaml

- name: Step 10 - Install Tracing
if: ${{ inputs.deploy-env == 'preview' }}
if: ${{ (inputs.deploy-env == 'preview') || (inputs.deploy-env == 'searchapps') }}
uses: elastic-analytics/dashboards-action@main
env:
KUBE_CONFIG_DATA: ${{ secrets.kube-config }}
with:
plugins: ""
command: |
kubectl apply -f config/playground/metrics/tracing/${{inputs.deploy-env}}/jaeger-agent.yaml
kubectl create -f config/playground/metrics/tracing/${{inputs.deploy-env}}/otel-config.yaml
kubectl apply -f config/playground/metrics/tracing/${{inputs.deploy-env}}/otel-collector.yaml
kubectl apply -f config/playground/metrics/tracing/${{inputs.deploy-env}}/data-prepper.yaml
kubectl apply -f config/playground/metrics/tracing/preview/jaeger-agent.yaml
kubectl create -f config/playground/metrics/tracing/preview/otel-config.yaml
kubectl apply -f config/playground/metrics/tracing/preview/otel-collector.yaml
kubectl apply -f config/playground/metrics/tracing/preview/data-prepper.yaml
30 changes: 30 additions & 0 deletions .github/workflows/os-osd-deployment-scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,41 @@ jobs:
otel_data_prepper_cert: ${{ secrets.OTEL_DATA_PREPPER_CERT }}
kibanaserver: ${{ secrets.KIBANASERVER }}

OS-OSD-SearchApps-Scheduled-Deployment:
uses: opensearch-project/dashboards-anywhere/.github/workflows/deployment-template.yml@searchapps
with:
helm-repo: https://opensearch-project.github.io/helm-charts/
deploy-env: searchapps
secrets:
access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_SEARCHAPPS }}
secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_SEARCHAPPS }}
region: ${{ secrets.AWS_REGION_SEARCHAPPS }}
kube-config: ${{ secrets.KUBE_CONFIG_DATA_SEARCHAPPS }}
openid_client_id: ${{ secrets.OPENID_CLIENT_ID_SEARCHAPPS }}
openid_client_secret: ${{ secrets.OPENID_CLIENT_SECRET_SEARCHAPPS }}
openid_base_redirect_url: ${{ secrets.OPENID_LOGOUT_URL_SEARCHAPPS }}
openid_logout_url: ${{ secrets.OPENID_BASE_REDIRECT_URL_SEARCHAPPS }}
ga-tracking-id: ${{ secrets.GA_TRACKING_ID }}
osd_user: ${{ secrets.OSD_USER }}
osd_user_password: ${{ secrets.OSD_USER_PASSWORD }}
otel_root_ca: ${{ secrets.OTEL_ROOT_CA }}
otel_data_prepper_cert: ${{ secrets.OTEL_DATA_PREPPER_CERT }}
kibanaserver: ${{ secrets.KIBANASERVER }}

OSD-Functional-Test-Preview:
needs: OS-OSD-Preview-Scheduled-Deployment
uses: opensearch-project/dashboards-anywhere/.github/workflows/functional-test-template.yml@previewchangefeature
with:
endpoint: https://reinvent.playground.opensearch.org
secrets:
osd-user: ${{ secrets.OSD_USER }}
osd-user-password: ${{ secrets.OSD_USER_PASSWORD }}

OSD-Functional-Test-SearchApps:
needs: OS-OSD-SearchApps-Scheduled-Deployment
uses: opensearch-project/dashboards-anywhere/.github/workflows/functional-test-template.yml@searchapps
with:
endpoint: https://searchapps.playground.opensearch.org
secrets:
osd-user: ${{ secrets.OSD_USER }}
osd-user-password: ${{ secrets.OSD_USER_PASSWORD }}
170 changes: 170 additions & 0 deletions config/playground/helm/searchapps/helm-opensearch-dashboards.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
# Copyright OpenSearch Contributors
# SPDX-License-Identifier: Apache-2.0

# Default values for opensearch-dashboards.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

opensearchHosts: "https://opensearch-cluster-leader:9200"
replicaCount: 3

image:
repository: "opensearchplayground/opensearch-dashboards"
# override image tag, which is .Chart.AppVersion by default
tag: "2.4.0-11282022"
pullPolicy: "Always"

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""

rbac:
create: true

# A list of secrets and their paths to mount inside the pod
# This is useful for mounting certificates for security and for mounting
# the X-Pack license
secretMounts: []

podAnnotations: {}

extraEnvs: []

envFrom: []

extraVolumes: []

extraVolumeMounts: []

extraInitContainers: ""

extraContainers: ""

podSecurityContext: {}

securityContext:
capabilities:
drop:
- ALL
# readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000

config:
# Default OpenSearch Dashboards configuration from docker image of Dashboards
opensearch_dashboards.yml:
opensearch.hosts: [https://localhost:9200]
opensearch.ssl.verificationMode: none
opensearch.username: kibanaserver
opensearch.password: ${KIBANASERVER}
opensearch.requestHeadersWhitelist: [authorization, securitytenant]
opensearch_security.auth.anonymous_auth_enabled: true
opensearch_security.multitenancy.enabled: true
opensearch_security.multitenancy.tenants.enable_global: true
opensearch_security.multitenancy.tenants.enable_private: true
opensearch_security.multitenancy.tenants.preferred: [Global, Private]
opensearch_security.readonly_mode.roles: [kibana_read_only]
# Use this setting if you are running opensearch-dashboards without https
opensearch_security.cookie.secure: false
server.host: '0.0.0.0'
# Use the consolidated menu and global header bar
opensearchDashboards.branding.useExpandedHeader: false
# Enable multiple datasource
data_source.enabled: true

# security plugin for openid
opensearch_security.auth.type: ['Basicauth','openid']
opensearch_security.auth.multiple_auth_enabled: true
opensearch_security.ui.openid.login.buttonname: "Log in with Google account"
opensearch_security.ui.openid.login.brandimage: "https://opensearch.org/assets/brand/PNG/Mark/opensearch_mark_default.png"
opensearch_security.ui.openid.login.showbrandimage: true
opensearch_security.openid.base_redirect_url: ${OPENID_BASE_REDIRECT_URL}
opensearch_security.openid.scope: 'openid profile email'
opensearch_security.openid.verify_hostnames: false
opensearch_security.openid.refresh_tokens: false

opensearch_security.openid.connect_url: "https://accounts.google.com/.well-known/openid-configuration"
opensearch_security.openid.client_id: ${OPENID_CLIENT_ID}
opensearch_security.openid.client_secret: ${OPENID_CLIENT_SECRET}
opensearch_security.openid.logout_url: ${OPENID_LOGOUT_URL}

# Content security policy(csp) settings
csp.rules: ["connect-src 'self' www.google-analytics.com maps.opensearch.org;"]
csp.warnLegacyBrowsers: false
google_analytics_plugin.trackingID: ${GA_TRACKING_ID}

priorityClassName: ""

opensearchAccount:
secret: ""
keyPassphrase:
enabled: false

labels: {}

hostAliases: []

serverHost: "0.0.0.0"

service:
type: ClusterIP
port: 5601
loadBalancerIP: ""
nodePort: ""
labels: {}
annotations: {}
loadBalancerSourceRanges: []
# 0.0.0.0/0
httpPortName: http

ingress:
enabled: false
# For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName
# See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress
# ingressClassName: nginx
annotations: {}
hosts:
- host: chart-example.local
paths:
- path: /
backend:
serviceName: chart-example.local
servicePort: 80
tls: []

resources:
requests:
cpu: "1"
memory: "8G"
limits:
cpu: "3"
memory: "24G"

autoscaling:
# This requires metrics server to be installed, to install use kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
# See https://github.com/kubernetes-sigs/metrics-server
enabled: false
minReplicas: 1
maxReplicas: 10
targetCPUUtilizationPercentage: 80

updateStrategy:
type: "Recreate"

nodeSelector: {}

tolerations: []

affinity: {}

# -- Array of extra K8s manifests to deploy
extraObjects: []
Loading