fuckup.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
|
||||
## Instance deletion 👋
|
||||
|
||||
`python3 secdep.py -a delete`
|
||||
|
||||

|
||||
|
||||
## Instance deletion of all gce nodes 💣
|
||||
|
||||
@@ -13,7 +13,7 @@ For the Google Compute Engine we firstly need to create a new project.
|
||||

|
||||

|
||||
|
||||
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
|
||||
|
||||

|
||||

|
||||
@@ -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)
|
||||
|
||||
@@ -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 <ip>`
|
||||
|
||||
## 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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user