diff --git a/README.md b/README.md index d00b4e1..3a90f09 100644 --- a/README.md +++ b/README.md @@ -40,9 +40,10 @@ Even though we want to avoid using the tools or the web portals we actually have ## GCE -First and foremost, you need to have a Google account. If you don't have one, you can create one 👉 [here](https://accounts.google.com/SignUp?hl=en). +First and foremost, you need to have a Google account. If you don't have one, you can create one [here](https://accounts.google.com/SignUp?hl=en). + +Then follow the instructions 👉 [here](assets/pages/gce/GCE_setup.md) to set up your GCE account. -Then follow the instructions [here](assets/pages/gce/GCE_setup.md) to set up your GCE account. Instructions based on [libcloud's](https://libcloud.readthedocs.io/en/stable/compute/drivers/gce.html#service-account) documentation. ## Azure @@ -50,11 +51,12 @@ Instructions based on [libcloud's](https://libcloud.readthedocs.io/en/stable/com For Azure you need to be a part of an organization that has an Azure subscription 🏢. Then follow the instructions [here](assets/pages/azure/Azure_setup.md) to set up your Azure account. + Instructions based on [libcloud's](https://libcloud.readthedocs.io/en/stable/compute/drivers/azure_arm.html#connecting-to-azure) documentation. ## AWS -For AWS you firstly need an account and then to follow the instructions [here](assets/pages/aws/AWS_setup.md) 👈. +For AWS you firstly need an [account](https://aws.amazon.com/account/) and then to follow the instructions [here](assets/pages/aws/AWS_setup.md) 👈. # Dependencies 📦 @@ -88,7 +90,8 @@ For other systems you can check [here](https://pip.pypa.io/en/stable/installatio Assuming you have set up your accounts and have the dependencies installed, you can now start using SecDep. -Further instructions [here](assets/pages/usage/usage.md) +Check this [page](assets/pages/usage/usage.md) to get more familiar with the program. + # Some program outputs 📊 Images and videos of common tasks will reside [here](assets/pages/demo/demo.md) @@ -97,6 +100,8 @@ Images and videos of common tasks will reside [here](assets/pages/demo/demo.md) If you want to connect using your ssh client you will be able to run `ssh -i ~/Path/To/SecDep/secdep secdep@`. +On instance creation the actual ssh command will be outputted once to be able to just copy and paste to connect 😎 + To use PuTTY you will need to probably add the key to the program. The ip will be outputted after the creation of the virtual machine. diff --git a/assets/pages/azure/Azure_setup.md b/assets/pages/azure/Azure_setup.md index 13163fb..3063e69 100644 --- a/assets/pages/azure/Azure_setup.md +++ b/assets/pages/azure/Azure_setup.md @@ -37,5 +37,4 @@ The values we need translate to the following: * AZURE_APP_ID ➡️ appId * AZURE_PASSWORD ➡️ value of the secret we added -Note: Make sure your subscription is registered to use at least Microsoft.Compute and Microsoft.Network. -From the subscriptions page and resource providers tab. +Note: Make sure your subscription is registered to use at least Microsoft.Compute and Microsoft.Network. (from the subscriptions page and resource providers tab) diff --git a/assets/pages/demo/demo.md b/assets/pages/demo/demo.md index 74286ae..68be8ac 100644 --- a/assets/pages/demo/demo.md +++ b/assets/pages/demo/demo.md @@ -24,6 +24,8 @@ ## Instance deletion 👋 +`python3 secdep.py -a delete` + ![Deletion](../../images/demo/instance-deletion.png) ## Instance deletion of all gce nodes 💣 diff --git a/assets/pages/gce/GCE_setup.md b/assets/pages/gce/GCE_setup.md index 86df4c0..0d62edc 100644 --- a/assets/pages/gce/GCE_setup.md +++ b/assets/pages/gce/GCE_setup.md @@ -13,7 +13,7 @@ For the Google Compute Engine we firstly need to create a new project. ![Service Account Access 1](../../images/gce/gce-4.png) ![Service Account Access 2](../../images/gce/gce-5.png) -3. Then while being on the service accounts section click on the service account you just created and then on the [Add Key](https://console.cloud.google.com/apis/credentials/serviceaccountkey) button and choose the JSON option for Key type. Download it to the same location as the project's source files +3. Then while being on the service account we created, click on the manage keys you and then on the [Add Key](https://console.cloud.google.com/apis/credentials/serviceaccountkey) button and choose the JSON option for Key type. Download it to the same location as the project's source files ![Service Account Key 1](../../images/gce/gce-6.png) ![Service Account Key 2](../../images/gce/gce-7.png) @@ -24,7 +24,7 @@ For the Google Compute Engine we firstly need to create a new project. 6. Keep in mind you need to have billing information associated and enabled for your project. -In as few words as possible, here are the steps to follow: +In as few words as possible, here are the steps we followed: * [Create Project](https://console.cloud.google.com/projectcreate) * [Create Service Account](https://console.cloud.google.com/iam-admin/serviceaccounts) diff --git a/assets/pages/tips_tricks/tips_n_tricks.md b/assets/pages/tips_tricks/tips_n_tricks.md index 7eddd8a..db95ac9 100644 --- a/assets/pages/tips_tricks/tips_n_tricks.md +++ b/assets/pages/tips_tricks/tips_n_tricks.md @@ -18,21 +18,21 @@ For zsh, you could run something like this: For bash -`alias secdep='python3 /path/to/SecDep/secdep.py' >> ~/.bashrc` +`echo "alias secdep='python3 /path/to/SecDep/secdep.py'" >> ~/.bashrc` For zsh -`alias secdep='python3 /path/to/SecDep/secdep.py' >> ~/.zshrc` +`echo "alias secdep='python3 /path/to/SecDep/secdep.py'" >> ~/.zshrc` Or if it is in the path: For bash -`alias secdep='secdep.py' >> ~/.bashrc` +`echo "alias secdep='secdep.py'" >> ~/.bashrc` For zsh -`alias secdep='secdep.py' >> ~/.zshrc` +`echo "alias secdep='secdep.py'" >> ~/.zshrc` ## Usage after those steps 📖 @@ -40,6 +40,20 @@ We can now use the tool by running `secdep` in the terminal. For example `secdep -h` will show the help menu. +## Easier ssh command 💪 + +If the repository is in the path, you can make a zsh or bash function in your .zshrc or .bashrc respectively as: + +```bash +function secdepssh { +ssh -i $(whereis secdep) secdep@$1 +} +``` + +Where $1 will be the instance's ip address. + +Then it is only a matter of `secdepssh ` + ## Specific aws use case When using aws as provider value, you can use the `--awsregion` flag to specify the region on which we operate. That decreases the speed of some actions because it no longer needs to go through all of the regions to check if there are any nodes there. diff --git a/assets/pages/usage/usage.md b/assets/pages/usage/usage.md index ef21cb8..506f19a 100644 --- a/assets/pages/usage/usage.md +++ b/assets/pages/usage/usage.md @@ -155,10 +155,14 @@ or `python3 secdep.py -a delete` -If you want to delete them all in either case you can use the deleteall action instead of the delete +If you want to delete them all in either case you can use the `deleteall` action instead of the delete Same goes for stop, start and reboot. # SSHing into a virtual machine 🚀 +* Interactive TUI programs such as `vim` and similar will not work. + +If you can, prefer a better ssh client. + To SSH into a virtual machine you get the choice from `python3 secdep.py -ssh` or `python3 secdep.py -P gce -ssh` to only choose from the gce instances.