-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 28b567f
Showing
18 changed files
with
468 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
# Contributor Covenant Code of Conduct | ||
## Our Pledge | ||
|
||
We as members, contributors, and leaders pledge to make participation in our | ||
community a harassment-free experience for everyone, regardless of age, body | ||
size, visible or invisible disability, ethnicity, sex characteristics, gender | ||
identity and expression, level of experience, education, socio-economic status, | ||
nationality, personal appearance, race, religion, or sexual identity | ||
and orientation. | ||
|
||
We pledge to act and interact in ways that contribute to an open, welcoming, | ||
diverse, inclusive, and healthy community. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to a positive environment for our | ||
community include: | ||
|
||
- Demonstrating empathy and kindness toward other people | ||
- Being respectful of differing opinions, viewpoints, and experiences | ||
- Giving and gracefully accepting constructive feedback | ||
- Accepting responsibility and apologizing to those affected by our mistakes, | ||
and learning from the experience | ||
- Focusing on what is best not just for us as individuals, but for the | ||
overall community | ||
|
||
Examples of unacceptable behavior include: | ||
|
||
- The use of sexualized language or imagery, and sexual attention or | ||
advances of any kind | ||
- Trolling, insulting or derogatory comments, and personal or political attacks | ||
- Public or private harassment | ||
- Publishing others' private information, such as a physical or email | ||
address, without their explicit permission | ||
- Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Enforcement Responsibilities | ||
|
||
Community leaders are responsible for clarifying and enforcing our standards of | ||
acceptable behavior and will take appropriate and fair corrective action in | ||
response to any behavior that they deem inappropriate, threatening, offensive, | ||
or harmful. | ||
|
||
Community leaders have the right and responsibility to remove, edit, or reject | ||
comments, commits, code, wiki edits, issues, and other contributions that are | ||
not aligned to this Code of Conduct, and will communicate reasons for moderation | ||
decisions when appropriate. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all community spaces, and also applies when | ||
an individual is officially representing the community in public spaces. | ||
Examples of representing our community include using an official e-mail address, | ||
posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported to the community leaders responsible for enforcement at | ||
[email protected]. | ||
All complaints will be reviewed and investigated promptly and fairly. | ||
|
||
All community leaders are obligated to respect the privacy and security of the | ||
reporter of any incident. | ||
|
||
## Enforcement Guidelines | ||
|
||
Community leaders will follow these Community Impact Guidelines in determining | ||
the consequences for any action they deem in violation of this Code of Conduct: | ||
|
||
### 1. Correction | ||
|
||
**Community Impact**: Use of inappropriate language or other behavior deemed | ||
unprofessional or unwelcome in the community. | ||
|
||
**Consequence**: A private, written warning from community leaders, providing | ||
clarity around the nature of the violation and an explanation of why the | ||
behavior was inappropriate. A public apology may be requested. | ||
|
||
### 2. Warning | ||
|
||
**Community Impact**: A violation through a single incident or series | ||
of actions. | ||
|
||
**Consequence**: A warning with consequences for continued behavior. No | ||
interaction with the people involved, including unsolicited interaction with | ||
those enforcing the Code of Conduct, for a specified period of time. This | ||
includes avoiding interactions in community spaces as well as external channels | ||
like social media. Violating these terms may lead to a temporary or | ||
permanent ban. | ||
|
||
### 3. Temporary Ban | ||
|
||
**Community Impact**: A serious violation of community standards, including | ||
sustained inappropriate behavior. | ||
|
||
**Consequence**: A temporary ban from any sort of interaction or public | ||
communication with the community for a specified period of time. No public or | ||
private interaction with the people involved, including unsolicited interaction | ||
with those enforcing the Code of Conduct, is allowed during this period. | ||
Violating these terms may lead to a permanent ban. | ||
|
||
### 4. Permanent Ban | ||
|
||
**Community Impact**: Demonstrating a pattern of violation of community | ||
standards, including sustained inappropriate behavior, harassment of an | ||
individual, or aggression toward or disparagement of classes of individuals. | ||
|
||
**Consequence**: A permanent ban from any sort of public interaction within | ||
the community. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], | ||
version 2.0, available at | ||
<https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>. | ||
|
||
Community Impact Guidelines were inspired by [Mozilla's code of conduct | ||
enforcement ladder](https://github.com/mozilla/diversity). | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
||
For answers to common questions about this code of conduct, see the FAQ at | ||
<https://www.contributor-covenant.org/faq>. Translations are available at | ||
<https://www.contributor-covenant.org/translations>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
# Contributing Guidelines | ||
|
||
Before submitting contributions to this repository, please reach out to [Deepgram Support](https://deepgram.com/contact-us/) for more details on self-hosting Deepgram. | ||
|
||
## How To | ||
|
||
1. Fork this repository on GitHub. | ||
1. Clone/fetch your fork to your local development machine. | ||
1. Create a new branch (e.g. `issue-12`, `feat.add_foo`, etc) and check it out. | ||
1. Make your changes and commit them. (Did the tests pass? No linting errors?) | ||
1. Push your new branch to your fork. (e.g. `git push myname issue-12`) | ||
1. Open a Pull Request from your new branch to the original fork's `main` branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
ISC License | ||
|
||
Copyright 2024 Deepgram, Inc. | ||
|
||
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee | ||
is hereby granted, provided that the above copyright notice and this permission notice appear in all | ||
copies. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS | ||
SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE | ||
AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE | ||
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# Deepgram Self-Hosted Google Cloud Platform Starter | ||
|
||
## Overview | ||
|
||
The Deepgram Self-Hosted Google Cloud Platform Starter is a Helm chart for running a starter Deepgram application in a self-hosted environment. It provides a simple way to get started with Deepgram's speech recognition capabilities in your own infrastructure. | ||
|
||
Key features: | ||
- Starter web application to be introduced to Deepgram's API | ||
- Deployment via Helm chart | ||
- Customizable via Helm chart values | ||
|
||
To learn more about deploying Deepgram in a self-hosted environment within GCP, please contact [Deepgram Support](https://deepgram.com/contact-us/). | ||
|
||
## One-time Setup | ||
|
||
1. Install [kubectl](https://kubernetes.io/docs/tasks/tools/) and [Helm](https://helm.sh/docs/intro/install/) on the machine where you will deploy the application. | ||
|
||
2. Install the Application CRD so your cluster can manage the Application resource: | ||
|
||
```bash | ||
kubectl apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/marketplace-k8s-app-tools/master/crd/app-crd.yaml | ||
``` | ||
|
||
## Installation | ||
|
||
Set environment variables for your app name and namespace: | ||
|
||
```bash | ||
export APP_INSTANCE_NAME=deepgram-starter-1 | ||
export NAMESPACE=default | ||
``` | ||
|
||
Retrieve the Deepgram Self-Hosted Starter image references: | ||
|
||
```bash | ||
export IMAGE_REPO=gcr.io/deepgram-public/deepgram-self-hosted-starter | ||
export IMAGE_TAG=1.0.0 | ||
``` | ||
|
||
Install the app with Helm: | ||
|
||
```bash | ||
helm upgrade --install ${APP_INSTANCE_NAME} deepgram/deepgram-self-hosted-starter \ | ||
--namespace ${NAMESPACE} \ | ||
--set deepgramSelfHostedStarter.image.repo=${IMAGE_REPO} \ | ||
--set deepgramSelfHostedStarter.image.tag=${IMAGE_TAG} | ||
``` | ||
|
||
## Basic Usage | ||
|
||
The starter application exposes a web UI. Get the external IP of the service: | ||
|
||
```bash | ||
kubectl get service ${APP_INSTANCE_NAME}-starter-svc \ | ||
--namespace ${NAMESPACE} \ | ||
--output jsonpath='{.status.loadBalancer.ingress[0].ip}' | ||
``` | ||
|
||
Open the URL `http://<EXTERNAL-IP>` in a web browser with access to the cluster network to access the starter application. | ||
|
||
## Backup and Restore | ||
|
||
The Deepgram Self-Hosted Starter does not persist any data. Backup and restore procedures are not applicable. | ||
|
||
## Image Updates | ||
|
||
To update the application with a new image version, set the new tag: | ||
|
||
```bash | ||
export NEW_IMAGE_TAG=2.0.0 | ||
``` | ||
|
||
Update the Deployment with the new image: | ||
|
||
```bash | ||
helm upgrade ${APP_INSTANCE_NAME} deepgram/deepgram-self-hosted-starter \ | ||
--namespace ${NAMESPACE} \ | ||
--set deepgramSelfHostedStarter.image.repo=${IMAGE_REPO} \ | ||
--set deepgramSelfHostedStarter.image.tag=${NEW_IMAGE_TAG} | ||
``` | ||
|
||
## Deletion | ||
|
||
To delete the Deepgram Self-Hosted Starter application: | ||
|
||
```bash | ||
helm uninstall ${APP_INSTANCE_NAME} --namespace ${NAMESPACE} | ||
``` | ||
|
||
This will remove all resources associated with the application. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Please refer to [Deepgram's security policy](https://developers.deepgram.com/docs/security-policy). |
22 changes: 22 additions & 0 deletions
22
apptest/deployer/deepgram-self-hosted-starter/templates/tester.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: "{{ .Release.Name }}-tester" | ||
labels: | ||
app.kubernetes.io/name: "{{ .Release.Name }}" | ||
annotations: | ||
marketplace.cloud.google.com/verification: test | ||
spec: | ||
serviceAccountName: {{ .Release.Name }}-deployer-sa | ||
containers: | ||
- name: tester | ||
image: "{{ .Values.testerImage }}" | ||
imagePullPolicy: Always | ||
env: | ||
- name: NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
- name: APP_INSTANCE_NAME | ||
value: {{ .Release.Name }} | ||
restartPolicy: Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
testerImage: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
properties: | ||
testerImage: | ||
type: string | ||
default: gcr.io/deepgram-public/deepgram-self-hosted-starter/deployer/tester:1.0.0 | ||
x-google-property: | ||
type: IMAGE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM gcr.io/cloud-marketplace-tools/testrunner:0.1.5 | ||
|
||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
curl | ||
|
||
COPY tests /tests | ||
COPY tester.sh /tester.sh | ||
|
||
WORKDIR / | ||
ENTRYPOINT ["/tester.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
set -xeo pipefail | ||
shopt -s nullglob | ||
|
||
for test in /tests/common/*; do | ||
testrunner -logtostderr "--test_spec=${test}" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
actions: | ||
- name: Starter application is serving content | ||
bashTest: | ||
script: curl -f "http://${APP_INSTANCE_NAME}-starter-svc.${NAMESPACE}.svc.cluster.local" | ||
expect: | ||
stdout: | ||
contains: Deepgram | ||
exitCode: | ||
equals: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v2 | ||
name: deepgram-self-hosted-starter | ||
type: application | ||
version: 1.0.0 | ||
appVersion: 1.0.0 | ||
description: A Helm chart for running a starter Deepgram application in a self-hosted environment | ||
sources: ["https://github.com/deepgram/gcp-marketplace-listing"] | ||
kubeVersion: ">=1.27.0-0" | ||
maintainers: | ||
- name: Deepgram Self-Hosted | ||
email: [email protected] | ||
icon: "https://www.dropbox.com/scl/fi/v4jtfbsrx881pbevcga3j/D-icon-black-square-250x250.png?rlkey=barv5jeuhd7t2lczz0m3nane7&dl=1" |
30 changes: 30 additions & 0 deletions
30
chart/deepgram-self-hosted-starter/templates/application.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
apiVersion: app.k8s.io/v1beta1 | ||
kind: Application | ||
metadata: | ||
name: "{{ .Release.Name }}" | ||
namespace: "{{ .Release.Namespace }}" | ||
annotations: | ||
marketplace.cloud.google.com/deploy-info: '{"partner_id": "deepgram-public", "product_id": "deepgram-self-hosted-starter", "partner_name": "Deepgram"}' | ||
labels: | ||
app.kubernetes.io/name: "{{ .Release.Name }}" | ||
spec: | ||
descriptor: | ||
type: DeepgramSelfHostedStarter | ||
version: "{{ .Values.deepgramSelfHostedStarter.image.tag }}" | ||
description: >- | ||
A Helm chart for running a starter Deepgram application in a self-hosted environment. | ||
maintainers: | ||
- name: Deepgram Self-Hosted | ||
email: [email protected] | ||
links: | ||
- description: Deepgram Developer Documentation | ||
url: https://developers.deepgram.com | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: "{{ .Release.Name }}" | ||
componentKinds: | ||
- group: apps | ||
kind: Deployment | ||
- group: core | ||
kind: Service |
28 changes: 28 additions & 0 deletions
28
chart/deepgram-self-hosted-starter/templates/deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Release.Name }}-starter-app | ||
labels: &DeploymentLabels | ||
name: "{{ .Release.Name }}" | ||
app: deepgram-self-hosted-starter | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: deepgram-self-hosted-starter | ||
template: | ||
metadata: | ||
labels: *DeploymentLabels | ||
spec: | ||
containers: | ||
- name: {{ .Release.Name }}-starter-app | ||
image: "{{ .Values.deepgramSelfHostedStarter.image.repo }}:{{ .Values.deepgramSelfHostedStarter.image.tag }}" | ||
ports: | ||
- name: http | ||
containerPort: 80 | ||
livenessProbe: | ||
tcpSocket: | ||
port: 80 | ||
readinessProbe: | ||
tcpSocket: | ||
port: 80 |
Oops, something went wrong.