Quick Start Guide#
In this guide, we will;
- Create a kubernetes cluster and set it up as an Ametnes Data Service Location.
- Create a simple MageAI service.
- 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
- If you do not have docker installed on your local computer, download and install it as instructured here.
- Then if you do not have KinD install on your local computer, install it by following these instructions.
- Save this file on your local computer
- Get your local IP address e.g. for the mac, use
ipconfig getifaddr en0
- Replace the text
<your-ip-address>
in saved file from 3. above with the IP address from 4. - Create the cluster with
kind create cluster --config=/path/to/kind.yml
Create an Ametnes Data Service location using an AWS EKS cluster
- Ensure that you have setup the AWS CLI on your local workstation
-
Save the following file to your local work station
-
Create the cluster
-
Ensure kubeconfig has been updated
Install the Ametnes Cloud Agent#
-
Add the helm repository.
-
Generate a UUID on your command line with
uuidgen
. -
Install the Ametnes Cloud Agent and set the
agent.config.location
. -
In your Ametnes Cloud console account, create a Data Service Location with
- Login into your Ametnes Cloud account here.
- Nagivate to the Service Locations menu on the left
- Click New Location
- Enter the following
- User Supplied Id:
26F522B3-E412-44D0-9992-F47F03F3192B
- Name:
Demo
- Code:
DSL1
- Click
Create
- User Supplied Id:
-
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.#
- Using the Services left menu, navigate to the service management dashboard.
- Click New Service.
- Enter the Mage to filter from the list and select Create
- In the displayed form, enter the following info.
- Enter the Name:
Mage-Service-DSL1
and Description:Mage-Service-DSL1
. - Select a Version from the list.
- Select the Location:
Demo/DSL1
. - Enter an email and password that will be used to authenticate into the Mage service.
- Click
Create
. - Wait a short while and your data service will be
ready
.
- Enter the Name:
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.
- Navigate to Users.
- Click Edit on your user.
- Click Get User Token and a user token will be generated for you.
- 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#
Add your API key secrets#
Define your resources#
Deploy your terraform resources#
- Run
terraform init
. - Once terraform has been initialized, then
terraform plan
to see what resources will be created. - Then lastly run
terraform apply -auto-approve
. - Once terraform is done creating your resources, the output will be the
service_connections
object containing the endpoint of your data service e.g.your.instance.host.name
.
Test connectivity#
- In your browser, paste the URL
https://<your.instance.host.name>/
. - You should get a prompt to login.
Cleaning up resources#
- Delete the data services you created above with
terraform destroy -auto-approve
. - Delete the kubernetes cluster with
eksctl delete cluster -f eks-1-24.yml --disable-nodegroup-eviction
.