diff --git a/docs/sphinx/source/authenticating-to-vespa-cloud.ipynb b/docs/sphinx/source/authenticating-to-vespa-cloud.ipynb index d775866b..ce5e1c56 100644 --- a/docs/sphinx/source/authenticating-to-vespa-cloud.ipynb +++ b/docs/sphinx/source/authenticating-to-vespa-cloud.ipynb @@ -57,7 +57,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "136750de", "metadata": {}, "outputs": [], @@ -198,7 +198,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "id": "9ca4da83", "metadata": {}, "outputs": [], @@ -228,7 +228,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "id": "c405f35c", "metadata": {}, "outputs": [], @@ -318,10 +318,23 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "id": "136b884e", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Setting application...\n", + "Running: vespa config set application vespa-team.authnotebook\n", + "Setting target cloud...\n", + "Running: vespa config set target cloud\n", + "\n", + "Api-key found for control plane access. Using api-key.\n" + ] + } + ], "source": [ "from vespa.deployment import VespaCloud\n", "from vespa.application import Vespa\n", @@ -380,10 +393,99 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "id": "337d9b05", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Deployment started in run 1 of dev-aws-us-east-1c for vespa-team.authnotebook. This may take a few minutes the first time.\n", + "INFO [06:35:26] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:35:27] Using CA signed certificate version 1\n", + "INFO [06:35:27] Using 1 nodes in container cluster 'authnotebook_container'\n", + "INFO [06:35:30] Session 309490 for tenant 'vespa-team' prepared, but activation failed: 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:35:33] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:35:33] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:35:42] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:35:42] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:35:52] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:35:52] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:36:03] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:36:03] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:36:14] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:36:14] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:36:22] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:36:22] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:36:33] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:36:33] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:36:42] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:36:42] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:36:52] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:36:53] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:37:03] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:37:03] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:37:12] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:37:12] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:37:22] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:37:22] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:37:33] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:37:33] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:37:43] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:37:43] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:37:53] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:37:54] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:38:03] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:38:03] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:38:12] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:38:12] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:38:22] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:38:22] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:38:33] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:38:34] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:38:42] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:38:43] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:38:52] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:38:53] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:39:02] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:39:03] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:39:12] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:39:13] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:39:22] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:39:22] 1/2 application hosts and 2/2 admin hosts for vespa-team.authnotebook have completed provisioning and bootstrapping, still waiting for h98840.dev.us-east-1c.aws.vespa-cloud.net\n", + "INFO [06:39:34] Deploying platform version 8.408.12 and application dev build 1 for dev-aws-us-east-1c of default ...\n", + "INFO [06:39:35] Session 309490 for vespa-team.authnotebook.default activated\n", + "INFO [06:39:56] ######## Details for all nodes ########\n", + "INFO [06:39:56] h98612b.dev.us-east-1c.aws.vespa-cloud.net: expected to be UP\n", + "INFO [06:39:56] --- platform vespa/cloud-tenant-rhel8:8.408.12\n", + "INFO [06:39:56] --- storagenode on port 19102 has not started \n", + "INFO [06:39:56] --- searchnode on port 19107 has not started \n", + "INFO [06:39:56] --- distributor on port 19111 has not started \n", + "INFO [06:39:56] --- metricsproxy-container on port 19092 has not started \n", + "INFO [06:39:56] h97566a.dev.us-east-1c.aws.vespa-cloud.net: expected to be UP\n", + "INFO [06:39:56] --- platform vespa/cloud-tenant-rhel8:8.408.12\n", + "INFO [06:39:56] --- logserver-container on port 4080 has not started \n", + "INFO [06:39:56] --- metricsproxy-container on port 19092 has not started \n", + "INFO [06:39:56] h98840a.dev.us-east-1c.aws.vespa-cloud.net: expected to be UP\n", + "INFO [06:39:56] --- platform vespa/cloud-tenant-rhel8:8.408.12\n", + "INFO [06:39:56] --- container on port 4080 has not started \n", + "INFO [06:39:56] --- metricsproxy-container on port 19092 has not started \n", + "INFO [06:39:56] h98621d.dev.us-east-1c.aws.vespa-cloud.net: expected to be UP\n", + "INFO [06:39:56] --- platform vespa/cloud-tenant-rhel8:8.408.12\n", + "INFO [06:39:56] --- container-clustercontroller on port 19050 has not started \n", + "INFO [06:39:56] --- metricsproxy-container on port 19092 has not started \n", + "INFO [06:40:33] Found endpoints:\n", + "INFO [06:40:33] - dev.aws-us-east-1c\n", + "INFO [06:40:33] |-- https://ea8555a9.c6970ada.z.vespa-app.cloud/ (cluster 'authnotebook_container')\n", + "INFO [06:40:33] Deployment complete!\n", + "Only region: aws-us-east-1c available in dev environment.\n", + "Found mtls endpoint for authnotebook_container\n", + "URL: https://ea8555a9.c6970ada.z.vespa-app.cloud/\n", + "Application is up!\n" + ] + } + ], "source": [ "app: Vespa = vespa_cloud.deploy()" ] @@ -410,10 +512,29 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "id": "98ff13f6", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Found mtls endpoint for authnotebook_container\n", + "URL: https://ea8555a9.c6970ada.z.vespa-app.cloud/\n" + ] + }, + { + "data": { + "text/plain": [ + "'https://ea8555a9.c6970ada.z.vespa-app.cloud/'" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "mtls_endpoint = vespa_cloud.get_mtls_endpoint()\n", "mtls_endpoint" @@ -491,7 +612,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "id": "1934d87c", "metadata": {}, "outputs": [], @@ -537,10 +658,56 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 8, "id": "9e7bdcc5", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Setting application...\n", + "Running: vespa config set application vespa-team.authnotebook\n", + "Setting target cloud...\n", + "Running: vespa config set target cloud\n", + "\n", + "Api-key found for control plane access. Using api-key.\n", + "Deployment started in run 60 of dev-aws-us-east-1c for vespa-team.authnotebook.token. This may take a few minutes the first time.\n", + "INFO [06:40:38] Deploying platform version 8.408.12 and application dev build 54 for dev-aws-us-east-1c of token ...\n", + "INFO [06:40:39] Using CA signed certificate version 1\n", + "INFO [06:40:39] Using 1 nodes in container cluster 'authnotebook_container'\n", + "WARNING [06:40:41] Auto-overriding validation which would be disallowed in production: certificate-removal: Data plane certificate(s) from cluster 'authnotebook_container' is removed (removed certificates: [CN=cloud.vespa.example]) This can cause client connection issues.. To allow this add certificate-removal to validation-overrides.xml, see https://docs.vespa.ai/en/reference/validation-overrides.html\n", + "INFO [06:40:42] Session 309492 for tenant 'vespa-team' prepared and activated.\n", + "INFO [06:40:43] ######## Details for all nodes ########\n", + "INFO [06:40:43] h97526a.dev.us-east-1c.aws.vespa-cloud.net: expected to be UP\n", + "INFO [06:40:43] --- platform vespa/cloud-tenant-rhel8:8.408.12\n", + "INFO [06:40:43] --- storagenode on port 19102 has config generation 309488, wanted is 309492\n", + "INFO [06:40:43] --- searchnode on port 19107 has config generation 309488, wanted is 309492\n", + "INFO [06:40:43] --- distributor on port 19111 has config generation 309488, wanted is 309492\n", + "INFO [06:40:43] --- metricsproxy-container on port 19092 has config generation 309488, wanted is 309492\n", + "INFO [06:40:43] h97566b.dev.us-east-1c.aws.vespa-cloud.net: expected to be UP\n", + "INFO [06:40:43] --- platform vespa/cloud-tenant-rhel8:8.408.12\n", + "INFO [06:40:43] --- logserver-container on port 4080 has config generation 309488, wanted is 309492\n", + "INFO [06:40:43] --- metricsproxy-container on port 19092 has config generation 309488, wanted is 309492\n", + "INFO [06:40:43] h97538e.dev.us-east-1c.aws.vespa-cloud.net: expected to be UP\n", + "INFO [06:40:43] --- platform vespa/cloud-tenant-rhel8:8.408.12\n", + "INFO [06:40:43] --- container-clustercontroller on port 19050 has config generation 309492, wanted is 309492\n", + "INFO [06:40:43] --- metricsproxy-container on port 19092 has config generation 309488, wanted is 309492\n", + "INFO [06:40:43] h97567a.dev.us-east-1c.aws.vespa-cloud.net: expected to be UP\n", + "INFO [06:40:43] --- platform vespa/cloud-tenant-rhel8:8.408.12\n", + "INFO [06:40:43] --- container on port 4080 has config generation 309488, wanted is 309492\n", + "INFO [06:40:43] --- metricsproxy-container on port 19092 has config generation 309488, wanted is 309492\n", + "INFO [06:40:53] Found endpoints:\n", + "INFO [06:40:53] - dev.aws-us-east-1c\n", + "INFO [06:40:53] |-- https://ab50e0c2.c6970ada.z.vespa-app.cloud/ (cluster 'authnotebook_container')\n", + "INFO [06:40:53] Deployment of new application complete!\n", + "Only region: aws-us-east-1c available in dev environment.\n", + "Found mtls endpoint for authnotebook_container\n", + "URL: https://ab50e0c2.c6970ada.z.vespa-app.cloud/\n", + "Application is up!\n" + ] + } + ], "source": [ "instance = \"token\"\n", "\n", @@ -563,10 +730,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "id": "26332ba5", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Only region: aws-us-east-1c available in dev environment.\n", + "Found token endpoint for authnotebook_container\n", + "URL: https://c7f94a93.c6970ada.z.vespa-app.cloud/\n", + "Application is up!\n" + ] + } + ], "source": [ "token_app = vespa_cloud.get_application(\n", " instance=instance,\n", @@ -577,10 +755,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 10, "id": "4be0bf7d", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "token_app.get_application_status()" ] @@ -596,10 +785,29 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 11, "id": "dc48fe2d", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Found token endpoint for authnotebook_container\n", + "URL: https://c7f94a93.c6970ada.z.vespa-app.cloud/\n" + ] + }, + { + "data": { + "text/plain": [ + "'https://c7f94a93.c6970ada.z.vespa-app.cloud/'" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "token_endpoint = vespa_cloud.get_token_endpoint(instance=instance)\n", "token_endpoint" @@ -628,7 +836,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 12, "id": "518e41db", "metadata": {}, "outputs": [], @@ -646,10 +854,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 13, "id": "e107e9f7", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "from vespa.application import Vespa\n", "\n", @@ -671,10 +890,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 14, "id": "63130058", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "{'pathId': '/document/v1/doc/doc/docid/1', 'id': 'id:doc:doc::1'}" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "import requests\n", "\n", @@ -704,10 +934,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 15, "id": "b9fb5501", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "app = Vespa(\n", " url=token_endpoint, vespa_cloud_secret_token=os.getenv(\"VESPA_CLOUD_SECRET_TOKEN\")\n", @@ -764,10 +1005,19 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 16, "id": "66354a53", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Deactivated vespa-team.authnotebook in dev.aws-us-east-1c\n", + "Deleted instance vespa-team.authnotebook.default\n" + ] + } + ], "source": [ "vespa_cloud.delete()" ] @@ -802,4 +1052,4 @@ }, "nbformat": 4, "nbformat_minor": 5 -} \ No newline at end of file +}