Skip to content

Commit

Permalink
Merge pull request #11 from grycap/asanchez-dev
Browse files Browse the repository at this point in the history
APRICOT v1.0.0
  • Loading branch information
AntonioSanch3z authored Oct 10, 2024
2 parents 00c6f10 + d30519b commit 1799cc4
Show file tree
Hide file tree
Showing 9 changed files with 950 additions and 973 deletions.
37 changes: 23 additions & 14 deletions apricot-tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"source": [
"#### Welcome to the APRICOT extension. This plugin designed for Jupyter Notebook allows you to deploy and manage virtual infrastructures using the [Infrastructure Manager](https://imdocs.readthedocs.io/en/devel/) tool. In this notebook, we will cover the basics to help you get started with APRICOT.\n",
"\n",
"First of all, let's create a infrastructure to execute the following example notebook. To do so, click in the **Deployment menu** button in the toolbar above and follow the steps to deploy your first infrastructure. Any infrastructure should be able to execute all commands.\n",
"First of all, let's create a infrastructure to execute the following example notebook. To do so, click in the **Deployment menu** button in the toolbar above and follow the steps to deploy your first infrastructure.\n",
"\n",
"Once the infrastructure has been deployed, we can start playing with the notebook."
]
Expand Down Expand Up @@ -49,24 +49,24 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"To begin with the tutorial, please paste the infrastructure ID inside the **infrastructure_id** variable:"
"To begin with the tutorial, please paste the infrastructure ID inside the **infrastructure_id** variable once the infrastructure gets it:"
]
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"infrastructure_id = \"dc678ce2-7eff-11ef-9af1-968d5abd162c\"\n",
"infrastructure_id = \"3eb5235a-86cb-11ef-8a9b-e6c8d43d93e3\"\n",
"vm_id = \"0\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Using the ID of our new infrastructure, we can get more information about it:"
"Using the ID of our new infrastructure, we can check the logs of our new infrastructure while it is being created:"
]
},
{
Expand All @@ -75,14 +75,14 @@
"metadata": {},
"outputs": [],
"source": [
"%apricot_vmls $infrastructure_id"
"%apricot_log $infrastructure_id"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can execute different Linux commands on the virtual machines using the infrastructure ID and the ID of one of its nodes. Let's practice it by creating a file named \"test123.txt\" on the first node:"
"Or check the different nodes of our infrastructure:"
]
},
{
Expand All @@ -91,14 +91,25 @@
"metadata": {},
"outputs": [],
"source": [
"%apricot exec $infrastructure_id $vm_id touch \"test123.txt\""
"%apricot_vmls $infrastructure_id"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can check the new file in the VM:"
"We can execute different command line commands on the virtual machines using the infrastructure ID and the ID of one of its nodes.\n",
"\n",
"Let's practice it by creating a file named \"test.txt\" on the first node with the _touch_ Linux command and check if it worked (if you deployed an infrastructure with a different OS, change the _touch_ Linux command):"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%apricot exec $infrastructure_id $vm_id touch \"test.txt\""
]
},
{
Expand All @@ -114,7 +125,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's download the file to our local storage:"
"Now let's download the file to our local storage:"
]
},
{
Expand All @@ -123,7 +134,7 @@
"metadata": {},
"outputs": [],
"source": [
"%apricot_download $infrastructure_id $vm_id test123.txt ."
"%apricot_download $infrastructure_id $vm_id test2.txt ."
]
},
{
Expand Down Expand Up @@ -156,9 +167,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Congratulations! You finished the tutorial and now you are free to keep exploring and exploiting the APRICOT extension!\n",
"\n",
"All the magics implemented are available in README.md."
"Congratulations! You finished the tutorial and now you are free to keep exploring the APRICOT extension!"
]
}
],
Expand Down
Loading

0 comments on commit 1799cc4

Please sign in to comment.