{ "cells": [ { "cell_type": "markdown", "id": "e13084db-c69f-4e70-aa79-acfd2159093a", "metadata": {}, "source": [ "# List Clusters" ] }, { "cell_type": "code", "execution_count": 1, "id": "3698017d-42ed-4280-afa1-723f19ae398c", "metadata": { "tags": [] }, "outputs": [], "source": [ "import os\n", "import boto3\n", "import json\n", "import datetime\n", "\n", "from managed_kx import *\n", "from env_2 import *\n" ] }, { "cell_type": "code", "execution_count": 2, "id": "ed241efe-523e-4d2f-8e1b-94a09adf42e7", "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Using variables ...\n" ] } ], "source": [ "# triggers credential get\n", "session=None\n", "\n", "try:\n", " # aws: use ada for credentials\n", " subprocess.call([\"which\", \"ada\"])\n", " os.system(f\"ada credentials update --account={ACCOUNT_ID} --provider=isengard --role=Admin --once\")\n", "except: \n", " None\n", "\n", "if AWS_ACCESS_KEY_ID is None:\n", " print(\"Using Defaults ...\")\n", " # create AWS session: using access variables\n", " session = boto3.Session()\n", "else:\n", " print(\"Using variables ...\")\n", " session = boto3.Session(\n", " aws_access_key_id=AWS_ACCESS_KEY_ID,\n", " aws_secret_access_key=AWS_SECRET_ACCESS_KEY,\n", " aws_session_token=AWS_SESSION_TOKEN\n", " )\n", "\n", "# create finspace client\n", "client = session.client(service_name='finspace', endpoint_url=ENDPOINT_URL)" ] }, { "cell_type": "markdown", "id": "6b7294c7-d9a3-4fb2-b671-12ead3e17e83", "metadata": {}, "source": [ "# Clusters" ] }, { "cell_type": "code", "execution_count": 3, "id": "ccb6b824-4af8-447a-8b0a-ecd4d8136081", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
clusterName | \n", "status | \n", "clusterType | \n", "capacityConfiguration | \n", "commandLineArguments | \n", "clusterDescription | \n", "lastModifiedTimestamp | \n", "createdTimestamp | \n", "databaseName | \n", "cacheConfigurations | \n", "
---|---|---|---|---|---|---|---|---|---|
HDB_TAQ_2021H1 | \n", "CREATING | \n", "HDB | \n", "{'nodeType': 'kx.s.32xlarge', 'nodeCount': 2} | \n", "[{'key': 's', 'value': '32'}, {'key': 'dbname', 'value': 'TAQ_2021H1'}, {'key': 'codebase', 'value': 'taqcode'}] | \n", "Created with create_cluster_TAQ_H1 notebook | \n", "2023-05-30 23:11:36.953000+00:00 | \n", "2023-05-30 23:11:20.394000+00:00 | \n", "TAQ_2021H1 | \n", "[{'cacheType': 'CACHE_1000', 'dbPaths': ['/2021.01.04/', '/2021.01.05/', '/2021.01.06/', '/2021.01.07/', '/2021.01.08/', '/2021.01.11/', '/2021.01.12/', '/2021.01.13/', '/2021.01.14/', '/2021.01.15/', '/2021.01.19/', '/2021.01.20/', '/2021.01.21/', '/2021.01.22/', '/2021.01.25/', '/2021.01.26/', '/2021.01.27/', '/2021.01.28/', '/2021.01.29/', '/2021.02.01/', '/2021.02.02/', '/2021.02.03/', '/2021.02.04/', '/2021.02.05/']}] | \n", "
HDB_TAQ_2021_2D | \n", "CREATING | \n", "HDB | \n", "{'nodeType': 'kx.s.32xlarge', 'nodeCount': 2} | \n", "[{'key': 's', 'value': '8'}, {'key': 'dbname', 'value': 'TAQ_2021_2D'}, {'key': 'codebase', 'value': 'taqcode'}] | \n", "Created with create_cluster_TAQ_2D notebook | \n", "2023-05-30 23:09:47.415000+00:00 | \n", "2023-05-30 23:09:30.508000+00:00 | \n", "TAQ_2021_2D | \n", "[{'cacheType': 'CACHE_1000', 'dbPaths': ['/2021.01.04/', '/2021.01.05/']}] | \n", "
HDB_welcomedb | \n", "RUNNING | \n", "HDB | \n", "{'nodeType': 'kx.s.2xlarge', 'nodeCount': 3} | \n", "[{'key': 's', 'value': '4'}, {'key': 'dbname', 'value': 'welcomedb'}, {'key': 'codebase', 'value': 'code'}] | \n", "Created with create_cluster_HDB notebook | \n", "2023-05-30 23:13:20.948000+00:00 | \n", "2023-05-30 22:56:11.773000+00:00 | \n", "welcomedb | \n", "[{'cacheType': 'CACHE_1000', 'dbPaths': ['/']}] | \n", "
RDB_welcomedb | \n", "RUNNING | \n", "RDB | \n", "{'nodeType': 'kx.s.2xlarge', 'nodeCount': 1} | \n", "[{'key': 's', 'value': '8'}, {'key': 'dbname', 'value': 'welcomedb'}, {'key': 'codebase', 'value': 'code'}] | \n", "Created with create_cluster_RDB notebook | \n", "2023-05-30 23:10:28.477000+00:00 | \n", "2023-05-30 22:56:52.812000+00:00 | \n", "welcomedb | \n", "[] | \n", "
cluster_welcomedb | \n", "RUNNING | \n", "HDB | \n", "{'nodeType': 'kx.s.xlarge', 'nodeCount': 3} | \n", "[{'key': 's', 'value': '4'}, {'key': 'dbname', 'value': 'welcomedb'}, {'key': 'codebase', 'value': 'welcomedb'}] | \n", "Demo Cluster for database welcomedb | \n", "2023-05-30 23:10:58.551000+00:00 | \n", "2023-05-30 22:53:31.356000+00:00 | \n", "welcomedb | \n", "[{'cacheType': 'CACHE_1000', 'dbPaths': ['/']}] | \n", "