updates teardown
This commit is contained in:
Родитель
2d5e9eddb7
Коммит
0ebf284d54
|
@ -1,128 +1,100 @@
|
||||||
{
|
{
|
||||||
"cells": [
|
"cells": [
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": "# Tear it all down\nOnce you are done with your cluster you can use the following two commands to destroy it all."
|
||||||
"# Tear it all down\n",
|
},
|
||||||
"Once you are done with your cluster you can use the following two commands to destroy it all."
|
{
|
||||||
]
|
"cell_type": "code",
|
||||||
},
|
"execution_count": 4,
|
||||||
{
|
"metadata": {},
|
||||||
"cell_type": "code",
|
"outputs": [],
|
||||||
"execution_count": 1,
|
"source": "from dotenv import get_key, find_dotenv"
|
||||||
"metadata": {},
|
},
|
||||||
"outputs": [],
|
{
|
||||||
"source": [
|
"cell_type": "code",
|
||||||
"from dotenv import get_key, find_dotenv"
|
"execution_count": 5,
|
||||||
]
|
"metadata": {},
|
||||||
},
|
"outputs": [],
|
||||||
{
|
"source": "env_path = find_dotenv(raise_error_if_not_found=True)"
|
||||||
"cell_type": "code",
|
},
|
||||||
"execution_count": 2,
|
{
|
||||||
"metadata": {},
|
"cell_type": "markdown",
|
||||||
"outputs": [],
|
"metadata": {},
|
||||||
"source": [
|
"source": "Once you are done with your cluster you can use the following two commands to destroy it all. First, delete the application."
|
||||||
"env_path = find_dotenv(raise_error_if_not_found=True)"
|
},
|
||||||
]
|
{
|
||||||
},
|
"cell_type": "code",
|
||||||
{
|
"execution_count": 6,
|
||||||
"cell_type": "markdown",
|
"metadata": {},
|
||||||
"metadata": {},
|
"outputs": [
|
||||||
"source": [
|
{
|
||||||
"Once you are done with your cluster you can use the following two commands to destroy it all. First, delete the application."
|
"name": "stdout",
|
||||||
]
|
"output_type": "stream",
|
||||||
},
|
"text": "deployment.apps \"azure-dl\" deleted\nservice \"azure-dl\" deleted\n"
|
||||||
{
|
}
|
||||||
"cell_type": "code",
|
],
|
||||||
"execution_count": 3,
|
"source": "!kubectl delete -f az-dl.json"
|
||||||
"metadata": {},
|
},
|
||||||
"outputs": [
|
{
|
||||||
{
|
"cell_type": "markdown",
|
||||||
"name": "stdout",
|
"metadata": {},
|
||||||
"output_type": "stream",
|
"source": "Next, you delete the AKS cluster. This step may take a few minutes."
|
||||||
"text": [
|
},
|
||||||
"deployment.apps \"azure-dl\" deleted\n",
|
{
|
||||||
"service \"azure-dl\" deleted\n"
|
"cell_type": "code",
|
||||||
]
|
"execution_count": 7,
|
||||||
}
|
"metadata": {},
|
||||||
],
|
"outputs": [
|
||||||
"source": [
|
{
|
||||||
"!kubectl delete -f az-dl.json"
|
"name": "stdout",
|
||||||
]
|
"output_type": "stream",
|
||||||
},
|
"text": "\u001b[K\u001b[0minished .."
|
||||||
{
|
}
|
||||||
"cell_type": "markdown",
|
],
|
||||||
"metadata": {},
|
"source": "!az aks delete -n {get_key(env_path, 'aks_name')} \\\n -g {get_key(env_path, 'resource_group')} \\\n -y"
|
||||||
"source": [
|
},
|
||||||
"Next, you delete the AKS cluster. This step may take a few minutes."
|
{
|
||||||
]
|
"cell_type": "markdown",
|
||||||
},
|
"metadata": {},
|
||||||
{
|
"source": "Finally, you should delete the resource group. This also deletes the AKS cluster and can be used instead of the above command if the resource group is only used for this purpose."
|
||||||
"cell_type": "code",
|
},
|
||||||
"execution_count": 4,
|
{
|
||||||
"metadata": {},
|
"cell_type": "code",
|
||||||
"outputs": [
|
"execution_count": 8,
|
||||||
{
|
"metadata": {},
|
||||||
"name": "stdout",
|
"outputs": [
|
||||||
"output_type": "stream",
|
{
|
||||||
"text": [
|
"name": "stdout",
|
||||||
"\u001b[K\u001b[0minished .."
|
"output_type": "stream",
|
||||||
]
|
"text": "\u001b[K\u001b[0minished .."
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": "!az group delete --name {get_key(env_path, 'resource_group')} -y"
|
||||||
"!az aks delete -n {get_key(env_path, 'aks_name')} \\\n",
|
}
|
||||||
" -g {get_key(env_path, 'resource_group')} \\\n",
|
],
|
||||||
" -y"
|
"metadata": {
|
||||||
]
|
"jupytext_format_version": "1.3",
|
||||||
},
|
"jupytext_formats": "py:light",
|
||||||
{
|
"kernelspec": {
|
||||||
"cell_type": "markdown",
|
"display_name": "Python 3",
|
||||||
"metadata": {},
|
"language": "python",
|
||||||
"source": [
|
"name": "python3"
|
||||||
"Finally, you should delete the resource group. This also deletes the AKS cluster and can be used instead of the above command if the resource group is only used for this purpose."
|
},
|
||||||
]
|
"language_info": {
|
||||||
},
|
"codemirror_mode": {
|
||||||
{
|
"name": "ipython",
|
||||||
"cell_type": "code",
|
"version": 3
|
||||||
"execution_count": 5,
|
},
|
||||||
"metadata": {},
|
"file_extension": ".py",
|
||||||
"outputs": [
|
"mimetype": "text/x-python",
|
||||||
{
|
"name": "python",
|
||||||
"name": "stdout",
|
"nbconvert_exporter": "python",
|
||||||
"output_type": "stream",
|
"pygments_lexer": "ipython3",
|
||||||
"text": [
|
"version": "3.6.6"
|
||||||
"\u001b[K\u001b[0minished .."
|
}
|
||||||
]
|
},
|
||||||
}
|
"nbformat": 4,
|
||||||
],
|
"nbformat_minor": 2
|
||||||
"source": [
|
|
||||||
"!az group delete --name {get_key(env_path, 'resource_group')} -y"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"metadata": {
|
|
||||||
"jupytext_format_version": "1.3",
|
|
||||||
"jupytext_formats": "py:light",
|
|
||||||
"kernelspec": {
|
|
||||||
"display_name": "Python [conda env:AKSDeploymentPytorch]",
|
|
||||||
"language": "python",
|
|
||||||
"name": "conda-env-AKSDeploymentPytorch-py"
|
|
||||||
},
|
|
||||||
"language_info": {
|
|
||||||
"codemirror_mode": {
|
|
||||||
"name": "ipython",
|
|
||||||
"version": 3
|
|
||||||
},
|
|
||||||
"file_extension": ".py",
|
|
||||||
"mimetype": "text/x-python",
|
|
||||||
"name": "python",
|
|
||||||
"nbconvert_exporter": "python",
|
|
||||||
"pygments_lexer": "ipython3",
|
|
||||||
"version": "3.6.6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nbformat": 4,
|
|
||||||
"nbformat_minor": 2
|
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче