Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

Latest commit

 

History

History
155 lines (82 loc) · 5.67 KB

getting-started.md

File metadata and controls

155 lines (82 loc) · 5.67 KB

Getting Started

You can deploy SpectroMate into a highly-available Kubernetes environment through Palette's Dev Engine (PDE). Palette has a free-tier offering for a fully managed Kubernetes environment that you can consume without having any prior Kubernetes knowledge and experience. PDE provides many benefits for you out-of-the-box

  • Get access to up to 12 CPUs, 20 GB of Memory, and 20 GB of storage at no cost through the free tier.
  • Simplified Kubernetes configurations, allowing developers to focus on what matters
  • Complementary managed Kubernetes clusters for easy deployment and management of applications
  • Out-of-the-box support for several 3rd party services such as Postgres, Vault, Kafka and more.

In this guide, you will learn how to deploy SpectroMate to Palette's Dev Engine environment and get started with SpectroMate in less than five minutes.

If you want to deploy SpectroMate to an existing Kubernetes cluster, check out the Generic Kubernetes guide.

Prerequisites

  • A Mendable API key.

  • A Spectro Cloud account. You can sign up for a free account here at no cost; no credit card is required.

  • Git v2.30.0+ or greater.

Deployment

  1. Log in to Spectro Cloud.

  2. Click on the user User Menu and select My API Keys. View of the user clicking on My API Key

  3. Next, click on Add New API Key. Fill out the required input field, API Key Name, and the Expiration Date. Click on Confirm to create the API key. Copy the key value to your clipboard, as you will use it shortly.

  4. Open up a local terminal window.

  5. Clone the repository.

    git clone [email protected]:spectrocloud/spectromate.git
  6. Navigate to the deployment/terraform/ folder.

    cd deployment/terraform/
  7. Export your credentials as environment variables. Replace ... with your respective value.

    export TF_VAR_slack_signing_secret=
    export TF_VAR_mendable_api_key=
    export SPECTROCLOUD_APIKEY=
  8. Initialize Terraform.

    terraform init
  9. Preview the terraform plan.

    terraform plan
  10. Deploy the infrastructure.

    terraform apply -auto-approve
  11. Get the load balancer URL by issuing the command provided in the terraform output.

    terraform output -raw kubeconfig > c1.config && export KUBECONFIG=$(pwd)/c1.config && \
        kubectl get svc -n spectromate-app-spectromate-ns spectromate-app-spectromate-svc -o jsonpath='{.status.loadBalancer.ingress[0].hostname}'
  12. [Optional] Create a CNAME record for the load balancer URL and assign it as the record value. In the following steps, use your custom domain as the base URL.

  13. Use the output URL in your Slack App. Navigate to https://api.slack.com/apps to access your Slack apps.

  14. You will access both elements highlighted in the image. Start with the first element by clicking on the left Main Menu and selecting Slash Command.

    A view of the slack app details view

  15. Create a new slash command titled docs and provide your custom domain name or the exposed load balancer URL in the Request URL input field. Append /api/v1/slack to the end of the URL.

    View of the Slack slash command page

  16. Save your changes and navigate back to the main details page.

  17. From the left Main Menu, select Interactivity & Shortcuts.

  18. Toggle the Interactivity button to On.

  19. Use your load balancer URL OR custom domain name and paste the URL into the text input box. Append /api/v1/slack/actions to the end of the URL and save your changes.

    View of the interactivity options view

  20. The last step is for you to review your resources in Palette. Navigate to your browser and open Palette.

  21. Navigate to the left Main Menu and click on Clusters.

  22. Click on cluster-1 to access the cluster details view. From the cluster details page, you can review the status of your virtual cluster, monitor workloads, download the kubeconfig file, and more.

    View of the cluster details page

You have now deployed SpectroMate successfully into your Slack workspace.

Validation

  1. Open up Slack and navigate to a Slack channel.

  2. Issue the following Slack command.

    /docs help

    You should receive an output similar to the following.

View of the Slack command in use

Next Steps

You can now use SpectroMate in your Slack workspace. Palette's Dev Engine reduces the overhead and challenge in deploying containerized applications into a Kubernetes environment.

SpectroMate comes with Mendable support out-of-the-box. Use SpectroMate to help your organization access information more efficiently by using natural language models trained on your information.

If you wish to add new Slack commands and features, you can fork the repository and start adding your own endpoints and commands. We also welcome contributions 🫶