Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to README #376

Merged
merged 6 commits into from
Mar 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ __pycache__
# Ignore temp files (build artifacts) that gets generated
# for custom Actions
custom/*
!custom/custom/contrib


# Ignore Temp files
*.jsonx
Expand Down
15 changes: 8 additions & 7 deletions README_extending_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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://<YOUR REPO LOCATION> $CUSTOM_DIR_NAME
git submodule add https://<YOUR REPO LOCATION> $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
```
Expand All @@ -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.

Expand Down
24 changes: 19 additions & 5 deletions README_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down Expand Up @@ -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/<YOUR_RUNBOOK_NAME.ipynb>` to begin using your xRunBook.

Expand All @@ -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.

<br/>

Expand All @@ -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

Expand All @@ -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]
```
Expand Down
23 changes: 23 additions & 0 deletions custom/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<p align="center">
<a href="https://github.com/unskript/Awesome-CloudOps-Automation">
<img src="https://unskript.com/assets/favicon.png" alt="Logo" width="80" height="80">
</a>
<p align="center">
<h3 align="center">Awesome CloudOps Automation</h3>
<p align="center">
CloudOps automation made simple!
<br />
<a href="https://docs.unskript.com/unskript-product-documentation/open-source/cloudops-automation-with-unskript"><strong>Explore the docs</strong></a>
<br />
<a href="https://www.youtube.com/channel/UCvtSYNHVvuogq2u-F7UDMkw"><strong>unSkript on YouTube</strong></a>
<br />
<br />
<a href="https://unskript.com/blog">Visit our blog</a>
·
<a href="https://github.com/unskript/Awesome-CloudOps-Automation/issues/new?assignees=&labels=&template=bug_report.md&title=">Report Bug</a>
·
<a href="https://github.com/unskript/Awesome-CloudOps-Automation/issues/new?assignees=&labels=&template=feature_request.md&title=">Request Feature</a>
</p>
</p>

This directory will store all the changes to your runbooks and actions. Awesome docker will internally map this directory to /data.
4 changes: 2 additions & 2 deletions unskript-ctl/unskript-client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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()
Expand Down