Skip to content

Commit

Permalink
README updates
Browse files Browse the repository at this point in the history
  • Loading branch information
asimihsan committed Dec 5, 2021
1 parent 33f3031 commit 9ca1f3e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@ like `cat`, `grep`, and shell globbing and query your logs.
## Key Features

* Access CloudWatch logs as if they are files. Use `cat` on certain time ranges, `grep --context`, etc.
* Query latest logs instantaneouly; don't wait for S3 exports or transferring to a stream.
* Cross platform
- Natively supports Linux and Mac OS X.
- Run on Windows via a Docker container.

## How To Use

You need IAM credentials for a IAM user or IAM role that can call [`logs:FilterLogEvents`](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html) and [`logs:DescribeLogGroups`](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeLogGroups.html).
You need IAM credentials for a IAM user or IAM role that can call
[`logs:FilterLogEvents`](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html)
and
[`logs:DescribeLogGroups`](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeLogGroups.html).

### Natively on Linux and Mac OS X

Expand Down Expand Up @@ -65,7 +69,8 @@ drwxrwxrwx 2 asimi staff 0 Dec 31 1969 2021

### Docker, for any OS

Since `cwl-mount` requires FUSE it will not work out of the box on Windows. You can instead use a Docker container:
Since `cwl-mount` requires FUSE it will not work out of the box on Windows. You can instead use a [Docker
container](https://gallery.ecr.aws/b5u6b4p0/cwl-mount):

```
IMAGE_VERSION=cwl-mount@sha256:1af81c199632e7cb0916ddecb0466ecdaa166671f57f253ca12165a49400f764
Expand All @@ -78,7 +83,11 @@ docker run \
"$IMAGE_VERSION"
```

The contents of `env-file` are some IAM role credentials that have access to [`logs:FilterLogEvents`](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html) and [`logs:DescribeLogGroups`](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeLogGroups.html), and look like:
The contents of `env-file` are some IAM role credentials that have access to
[`logs:FilterLogEvents`](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html)
and
[`logs:DescribeLogGroups`](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeLogGroups.html),
and look like:

```
AWS_ACCESS_KEY_ID=ABCDE
Expand Down Expand Up @@ -126,9 +135,9 @@ https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQu
docker build . --file Dockerfile.runnable --tag cwl-mount:latest
source ~/.aws_kitten_cat_credentials
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/b5u6b4p0
docker tag cwl-mount:latest public.ecr.aws/b5u6b4p0/cwl-mount:latest
docker push public.ecr.aws/b5u6b4p0/cwl-mount:latest
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/kittencat
docker tag cwl-mount:latest public.ecr.aws/kittencat/cwl-mount:latest
docker push public.ecr.aws/kittencat/cwl-mount:latest
```

To run it:
Expand Down Expand Up @@ -206,6 +215,8 @@ See: https://terminalizer.com/docs
```
npm install -g terminalizer
[ ! -d $HOME/demo ] && mkdir $HOME/demo
cd $HOME/demo
terminalizer record demo
# inside the demo...
Expand Down
7 changes: 5 additions & 2 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ docker run \
--workdir /workspace \
cwl-mount-debian:latest ./build_deb.sh

docker build . --file Dockerfile.runnable --tag cwl-mount:latest
(cd "$BASEDIR" && docker build . --file Dockerfile.runnable --tag cwl-mount:latest)
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/kittencat
docker tag cwl-mount:latest public.ecr.aws/kittencat/cwl-mount:latest
docker push public.ecr.aws/kittencat/cwl-mount:latest

"$BASEDIR"/build_mac.sh
"$BASEDIR"/build_mac.sh

0 comments on commit 9ca1f3e

Please sign in to comment.