This commit is contained in:
msalvaris 2018-11-12 16:54:02 +00:00
Родитель 2d5e9eddb7
Коммит 0ebf284d54
1 изменённых файлов: 98 добавлений и 126 удалений

Просмотреть файл

@ -3,112 +3,84 @@
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 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": 1,
"metadata": {},
"outputs": [],
"source": [
"from dotenv import get_key, find_dotenv"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"env_path = find_dotenv(raise_error_if_not_found=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Once you are done with your cluster you can use the following two commands to destroy it all. First, delete the application."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"deployment.apps \"azure-dl\" deleted\n",
"service \"azure-dl\" deleted\n"
]
}
],
"source": [
"!kubectl delete -f az-dl.json"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Next, you delete the AKS cluster. This step may take a few minutes."
]
"source": "# Tear it all down\nOnce you are done with your cluster you can use the following two commands to destroy it all."
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[K\u001b[0minished .."
]
}
],
"source": [
"!az aks delete -n {get_key(env_path, 'aks_name')} \\\n",
" -g {get_key(env_path, 'resource_group')} \\\n",
" -y"
]
},
{
"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."
]
"outputs": [],
"source": "from dotenv import get_key, find_dotenv"
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": "env_path = find_dotenv(raise_error_if_not_found=True)"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "Once you are done with your cluster you can use the following two commands to destroy it all. First, delete the application."
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[K\u001b[0minished .."
]
"text": "deployment.apps \"azure-dl\" deleted\nservice \"azure-dl\" deleted\n"
}
],
"source": [
"!az group delete --name {get_key(env_path, 'resource_group')} -y"
]
"source": "!kubectl delete -f az-dl.json"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "Next, you delete the AKS cluster. This step may take a few minutes."
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": "\u001b[K\u001b[0minished .."
}
],
"source": "!az aks delete -n {get_key(env_path, 'aks_name')} \\\n -g {get_key(env_path, 'resource_group')} \\\n -y"
},
{
"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": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": "\u001b[K\u001b[0minished .."
}
],
"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]",
"display_name": "Python 3",
"language": "python",
"name": "conda-env-AKSDeploymentPytorch-py"
"name": "python3"
},
"language_info": {
"codemirror_mode": {