diff --git a/.gitignore b/.gitignore index 742f59991..af3bcd40e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ __pycache__ # Ignore temp files (build artifacts) that gets generated # for custom Actions custom/* -!custom/custom/contrib + # Ignore Temp files *.jsonx diff --git a/README_extending_docker.md b/README_extending_docker.md index a74f717b2..d8a122a1c 100644 --- a/README_extending_docker.md +++ b/README_extending_docker.md @@ -21,29 +21,30 @@ You can use our base docker to extend the functionality to fit your need. The st git clone https://github.com/unskript/Awesome-CloudOps-Automation ``` -2. Set an environment variable to point to the name of the custom directory. +2. Next, lets setup an environment variable to the custom directory. The `custom` directory is where we save your `runbooks` and `Actions`. Set an environment variable to point to the name of the custom directory. + ``` - export CUSTOM_DIR_NAME=custom + export ACA_CUSTOM_DIR_NAME=custom ``` 3. Next task is to create a custom Actions directory under Awesome-CloudOps-Automation. You could use any of the following methods to accomplish this task. - 1. Create directory under Awesome-CloudOps-Automation by name `$CUSTOM_DIR_NAME` + 1. Create directory under Awesome-CloudOps-Automation by name `$ACA_CUSTOM_DIR_NAME` ``` cd $HOME/Awesome-CloudOps-Automation - mkdir $CUSTOM_DIR_NAME + mkdir $ACA_CUSTOM_DIR_NAME ``` 2. Submodule your Git repo that has your custom Actions in it. ``` cd $HOME/Awesome-CloudOps-Automation - git submodule add https:// $CUSTOM_DIR_NAME + git submodule add https:// $ACA_CUSTOM_DIR_NAME ``` 4. Launch the Awesome Runbooks Docker. ``` docker run -it -p 8888:8888 \ -v $HOME/.unskript:/unskript \ - -v $HOME/Awesome-CloudOps-Automation/$CUSTOM_DIR_NAME:/data \ + -v $HOME/Awesome-CloudOps-Automation/$ACA_CUSTOM_DIR_NAME:/data \ --user root \ unskript/awesome-runbooks:latest ``` @@ -52,7 +53,7 @@ You can use our base docker to extend the functionality to fit your need. The st > in the above command with the tag number. You can find the tags [Here](https://hub.docker.com/r/unskript/awesome-runbooks/tags) * Here you may notice we have two `-v` mount point. The first one `$HOME/.unskript` is for storing credentials. - * The second mount point `$HOME/Awesome-CloudOps-Automation/$CUSTOM_DIR_NAME` is where we save custom Actions or custom Runbooks. + * The second mount point `$HOME/Awesome-CloudOps-Automation/$ACA_CUSTOM_DIR_NAME` is where we save custom Actions or custom Runbooks. > Note: This means any content that is created will survive Docker reboots. diff --git a/README_template.md b/README_template.md index bd4754a26..01608ad4a 100644 --- a/README_template.md +++ b/README_template.md @@ -44,9 +44,23 @@ ___ ## Get started with Docker: +* First: Clone this `Awesome-CloudOps-Automation` +In the snippet below, we are cloning the Awesome repo under $HOME directory. Please modify the command below to clone it into any other +directory. + +``` +cd $HOME +git clone https://github.com/unskript/Awesome-CloudOps-Automation +cd Awesome-CloudOps-Automation +``` + + +* Second: Lets launch the docker with the path to our CUSTOM DIRECTORY + ``` docker run -it -p 8888:8888 \ - -v $HOME/.unskript:/data \ + -v $HOME/Awesome-CloudOps-Automation/custom:/data \ + -v $HOME/.unskript:/unskript \ --user root \ docker.io/unskript/awesome-runbooks:latest ``` @@ -111,7 +125,7 @@ Any contributions you make are **greatly appreciated**. Check out our [Contribut ## Import a xRunBook - 1. xRunBooks are stored locally at ```$HOME/Awesome-CloudOps-Automatin/custom/runbooks``` . Place your existing RunBook in this directory. + 1. xRunBooks are stored locally at ```$HOME/Awesome-CloudOps-Automation/custom/runbooks``` . Place your existing RunBook in this directory. 2. Restart your Docker instance. 3. Point your browser to `http://127.0.0.1:8888/doc/tree/` to begin using your xRunBook. @@ -128,7 +142,7 @@ Any contributions you make are **greatly appreciated**. Check out our [Contribut ## Extending Docker -You can use our base docker to extend the functionality to fit your need. Follow this [document](./README_extending_docker.md)to create you own custom docker. +You can use our base docker to extend the functionality to fit your need. Follow this [document](./README_extending_docker.md) to create you own custom docker.
@@ -146,7 +160,7 @@ With `unskript-ctl.sh` (called unskript cuttle) allows you to Here are the Options that are supported by the CTL Command ``` unskript-ctl.sh -usage: unskript-client [-h] [-lr] [-rr RUN_RUNBOOK] [-rc RUN_CHECKS] [-df DISPLAY_FAILED_CHECKS] [-lc LIST_CHECKS] [-sa SHOW_AUDIT_TRAIL] +usage: unskript-ctl [-h] [-lr] [-rr RUN_RUNBOOK] [-rc RUN_CHECKS] [-df DISPLAY_FAILED_CHECKS] [-lc LIST_CHECKS] [-sa SHOW_AUDIT_TRAIL] Welcome to unSkript CLI Interface VERSION: 0.1.0 @@ -160,7 +174,7 @@ optional arguments: -df DISPLAY_FAILED_CHECKS, --display-failed-checks DISPLAY_FAILED_CHECKS Display Failed Checks [all | connector] -lc LIST_CHECKS, --list-checks LIST_CHECKS - List available checks, per connector or all + List available checks, [all | connector] -sa SHOW_AUDIT_TRAIL, --show-audit-trail SHOW_AUDIT_TRAIL Show audit trail [all | connector | execution_id] ``` diff --git a/custom/README.md b/custom/README.md new file mode 100644 index 000000000..ab5b9ecb6 --- /dev/null +++ b/custom/README.md @@ -0,0 +1,23 @@ +

+ + Logo + +

+

Awesome CloudOps Automation

+

+ CloudOps automation made simple! +
+ Explore the docs +
+ unSkript on YouTube +
+
+ Visit our blog + · + Report Bug + · + Request Feature +

+

+ +This directory will store all the changes to your runbooks and actions. Awesome docker will internally map this directory to /data. \ No newline at end of file diff --git a/unskript-ctl/unskript-client.py b/unskript-ctl/unskript-client.py index 7de2e4b7f..3206bddde 100755 --- a/unskript-ctl/unskript-client.py +++ b/unskript-ctl/unskript-client.py @@ -849,7 +849,7 @@ def create_creds_mapping(): except Exception as e: raise e - parser = argparse.ArgumentParser(prog='unskript-client') + parser = argparse.ArgumentParser(prog='unskript-ctl') version_number = "0.1.0" description="" description = description + str("\n") @@ -860,7 +860,7 @@ def create_creds_mapping(): parser.add_argument('-rr', '--run-runbook', type=str, help='Run the given runbook') parser.add_argument('-rc', '--run-checks', type=str, help='Run all available checks [all | connector | failed]') parser.add_argument('-df', '--display-failed-checks', help='Display Failed Checks [all | connector]') - parser.add_argument('-lc', '--list-checks', type=str, help='List available checks, per connector or all') + parser.add_argument('-lc', '--list-checks', type=str, help='List available checks, [all | connector]') parser.add_argument('-sa', '--show-audit-trail', type=str, help='Show audit trail [all | connector | execution_id]') args = parser.parse_args()