Database & client setup
Overview
Options for running Weaviate
Weaviate Cloud (WCD) is a managed service that runs Weaviate for you. You can also manage your own Weaviate instances using Docker, Kubernetes, or Embedded Weaviate.
No matter how you run Weaviate, the underlying code is identical. However, there are some operational differences to be aware of.
WCD (Recommended)
Weaviate Cloud (WCD), is a managed SaaS service that requires no maintenance at your end.
As it is managed by Weaviate (the company - the software is not sentient... yet). WCD is the fastest way to create a new instance of Weaviate and requires the least amount of effort for users.
WCD has Weaviate instances that are pre-configured for your convenience. They include a number of Weaviate modules by default. They also have built-in support for user authentication.
WCD includes a free "sandbox" tier. The WCD sandbox is our recommended method of running Weaviate in this course.
Docker and Kubernetes
You can run Weaviate instances using containerization solutions such as Docker and Kubernetes.
Running your own instance provides you with the same Weaviate code base as a WCD instance, but you have to manage configuration and deployment yourself.
This course doesn't cover self-managed instances. We will cover Docker and Kubernetes in separate course units in the future.
If you are familiar with either solution and want to use them to install Weaviate now, see the documentation for Docker-Compose or Kubernetes.
Embedded Weaviate
We also have an experimental feature called Embedded Weaviate, where you can directly instantiate a Weaviate database from a client library.
Currently, Embedded Weaviate is only recommended for evaluation purposes.
Get started with WCD
Sign in to WCD
To access WCD, go to the Weaviate Cloud Console
If you don't have a WCD account, click on the "Register" button to create a new account.
Click on "Sign in with the Weaviate Cloud" and sign in with your WCD username and password.
Create a Weaviate Cluster
To create a new Weaviate Cluster, click the "Create cluster" button.
On the Create a Cluster page:
- Select the Free sandbox plan tier.
- Provide a cluster name. The sandbox URL is based on the cluster-name. WCD adds a suffix to ensure uniqueness.
- Set the
Enable Authentication?
option toYES
. - Press Create to create your sandbox instance. Note that the sandbox will expire after a set number of days.
This starts the process to create a new instance. WCD displays a progress indicator while the sandbox builds.
Instance creation takes a minute or two. WCD displays a checkmark (✔️) next to your sandbox when the instance is ready.
Sandbox expiration & options
The sandbox is free for 14 days. After 14 days, the sandbox expires and all data is deleted.
To retrieve a copy of your sandbox data before it is deleted, use the cursor API.
To preserve your data and upgrade to a paid instance, contact us for help.
There are several ways to work with your sandbox.
Install Weaviate client
For the initial release of Weaviate Academy units, our materials are written around Python examples.
We are working to add examples for other client languages, starting with TypeScript. We appreciate your patience as we build up our educational material.
Available clients
Currently, Weaviate clients are available in:
- Python
- TypeScript
- Java
- Go
Client capabilities
You can perform all Weaviate requests with any of these clients. For the most seamless and language-native experience, we recommend using the client for your preferred programming language.
Installation
Install your preferred client by following the relevant instructions below:
- Python Client v4
- Python Client v3
- JS/TS Client v3
- JS/TS Client v2
- Go
- Java
Add weaviate-client
to your Python environment with pip
. The v4 client requires Weaviate 1.23 or higher.
pip install -U weaviate-client
Add weaviate-client
to your Python environment with pip
:
pip install "weaviate-client==3.*"
Add weaviate-client
to your project with npm
:
npm install weaviate-client
Add weaviate-ts-client
to your project with npm
:
npm install weaviate-ts-client
Add weaviate-go-client
to your project with go get
:
go get github.com/weaviate/weaviate-go-client/v4
Add this dependency to your project:
<dependency>
<groupId>io.weaviate</groupId>
<artifactId>client</artifactId>
<version>4.0.0</version> <!-- Check latest version -->
</dependency>
Review
Review exercise
Key takeaways
- There are multiple ways to run Weaviate.
- The recommended, easiest way to run a Weaviate instance is with WCD.
- Weaviate clients are available in multiple languages.
- Currently, the Academy material is available in Python only.
Questions and feedback
If you have any questions or feedback, let us know in the user forum.