Skip to content

Quick Start Guide#

In this guide, we will;

  1. Create a kubernetes cluster and set it up as an Ametnes Data Service Location.
  2. Create a simple MageAI service.
  3. Connect to the MageAI service.

Setting up an Ametnes Data Services Location#

Create a kubernetes cluster.#

Create an Ametnes Data Service location on your local computer

  1. If you do not have docker installed on your local computer, download and install it as instructured here.
  2. Then if you do not have KinD install on your local computer, install it by following these instructions.
  3. Save this file on your local computer
    kind: Cluster
    # 1 control plane node and 1 worker
    # the control plane node config
    # For image, see
    - role: control-plane
      image: kindest/node:v1.25.2@sha256:9be91e9e9cdf116809841fc77ebdb8845443c4c72fe5218f3ae9eb57fdb4bace
      - |
        kind: InitConfiguration
            node-labels: ",<your-ip-address>"
      - containerPort: 80
        hostPort: 80
        protocol: TCP
      - containerPort: 443
        hostPort: 443
        protocol: TCP
    # the workers
    - role: worker
      image: kindest/node:v1.25.2@sha256:9be91e9e9cdf116809841fc77ebdb8845443c4c72fe5218f3ae9eb57fdb4bace
  4. Get your local IP address e.g. for the mac, use ipconfig getifaddr en0
  5. Replace the text <your-ip-address> in saved file from 3. above with the IP address from 4.
  6. Create the cluster with kind create cluster --config=/path/to/kind.yml

Create an Ametnes Data Service location using an AWS EKS cluster

  1. Ensure that you have setup the AWS CLI on your local workstation
  2. Save the following file to your local work station

    kind: ClusterConfig
    name: &cluster_name ametnes-data-location-1-24
    region: us-east-2
    version: "1.24"
    - name: aws-ebs-csi-driver
    - us-east-2b
    - us-east-2c
    - name: *cluster_name
    amiFamily: AmazonLinux2
    desiredCapacity: 3
    disableIMDSv1: false
    disablePodIMDS: false
        autoScaler: false
        awsLoadBalancerController: false
        ebs: true
        efs: false
    - c4.2xlarge
    - c5.2xlarge
    labels: *cluster_name *cluster_name
    maxSize: 4
    minSize: 3
    spot: true
      allow: false
    tags: *cluster_name managed
    volumeType: gp3
  3. Create the cluster

    eksctl create cluster -f eks-1-24.yml

  4. Ensure kubeconfig has been updated

    aws eks update-kubeconfig --name ametnes-data-location-1-24 --region us-east-2

Install the Ametnes Cloud Agent#

  1. Add the helm repository.

    helm repo add ametnes && helm repo update
  2. Generate a UUID on your command line with uuidgen.

  3. Install the Ametnes Cloud Agent and set the agent.config.location.

    helm upgrade --install --create-namespace --namespace ametnes-system ametnes-cloud-agent ametnes/cloud-agent --set agent.config.location=26F522B3-E412-44D0-9992-F47F03F3192B
  4. In your Ametnes Cloud console account, create a Data Service Location with

    1. Login into your Ametnes Cloud account here.
    2. Nagivate to the Service Locations menu on the left
    3. Click New Location
    4. Enter the following
      1. User Supplied Id: 26F522B3-E412-44D0-9992-F47F03F3192B
      2. Name: Demo
      3. Code: DSL1
      4. Click Create
  5. After a short while, the data service location should come online.

Create the service#

Sign into your Ametnes Cloud console at here.#

Create a MageAI data service.#

  1. Using the Services left menu, navigate to the service management dashboard.
  2. Click New Service.
  3. Enter the Mage to filter from the list and select Create
  4. In the displayed form, enter the following info.
    1. Enter the Name: Mage-Service-DSL1 and Description: Mage-Service-DSL1.
    2. Select a Version from the list.
    3. Select the Location: Demo/DSL1.
    4. Enter an email and password that will be used to authenticate into the Mage service.
    5. Click Create.
    6. Wait a short while and your data service will be ready.

Deploying data services at scale is easier with the Ametnes Cloud terraform provider. We will create a data service in the location Demo that we created above using terraform.

Create an API token#

In your Ametnes Cloud account.

  1. Navigate to Users.
  2. Click Edit on your user.
  3. Click Get User Token and a user token will be generated for you.
  4. Ensure the generated user token is kept in a secure place as it will not be visible again.

Install terraform#

Follow instructions here to install terraform on your computer.

Create your project#

Add these files to an empty folder on your workstation.

Set up the variables#
variable "token" {
  type = string
  description = "The Ametnes cloud api doken to use. You'd need to create one in the ametnes cloud console corresponding to your regsitered email"

variable "username" {
  type = string
  description = "This is your ametnes cloud registered email address"

variable "project" {
  type = string
  description = "The project you'd like to create your resources in"
   default = "Default"
Add your API key secrets#
username = ""
token = "YourApiToken"
Define your resources#
terraform {
  required_providers {
    ametnes = {
      source  = ""

# Init and create the provider
provider "ametnes" {
  token = var.token
  username = var.username

# Read location.
data "ametnes_location" "location" {
  name = "Demo"
  code = "DSL1"

# Read the project that will host all your resources.
data "ametnes_project" "project" {
  name = var.project

# Create a service resource.
resource "ametnes_service" "service" {
  name = "Weaviate-Demo-Instance"
  project =
  location =
  kind = "weaviate:1.19"
  description = "Weaviate Demo Instance"
  capacity {
    storage = 10
    memory = 1
    cpu = 1
   config = {
     "admin.user" = "adminuser"
     "admin.password" = "fo9ruk3kee7uJe1vi>sh&ei0thoogh0Oogh[u4Ci3shaethoi:Ng2oh"
  nodes = 1

output "service_connections" {
  value = ametnes_service.service.connections

Deploy your terraform resources#

  1. Run terraform init.
  2. Once terraform has been initialized, then terraform plan to see what resources will be created.
  3. Then lastly run terraform apply -auto-approve.
  4. Once terraform is done creating your resources, the output will be the service_connections object containing the endpoint of your data service e.g.

Test connectivity#

  1. In your browser, paste the URL https://<>/.
  2. You should get a prompt to login.

Cleaning up resources#

  1. Delete the data services you created above with terraform destroy -auto-approve.
  2. Delete the kubernetes cluster with eksctl delete cluster -f eks-1-24.yml --disable-nodegroup-eviction.