Skip to content

Commit

Permalink
Rename resoto -> fixinventory
Browse files Browse the repository at this point in the history
  • Loading branch information
lloesche committed Feb 28, 2024
1 parent 2402024 commit e4cb2a2
Show file tree
Hide file tree
Showing 28 changed files with 58 additions and 60 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ body:
id: version
attributes:
label: Version
description: What version of Resoto are you running?
description: What version of Fix Inventory are you running?
validations:
required: true
- type: input
Expand Down Expand Up @@ -52,4 +52,4 @@ body:
- type: markdown
attributes:
value: |
By submitting this bug report, I agree to follow the [code of conduct](https://resoto.com/code-of-conduct).
By submitting this bug report, I agree to follow the [code of conduct](https://inventory.fix.security/code-of-conduct).
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ contact_links:
url: https://discord.gg/someengineering
about: Chat with other users and the development team
- name: 📄 Documentation
url: https://resoto.com/docs
url: https://inventory.fix.security/docs
about: Read and search documentation
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/enhancement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ body:
- type: markdown
attributes:
value: |
By submitting this feature request, I agree to follow the [code of conduct](https://resoto.com/code-of-conduct).
By submitting this feature request, I agree to follow the [code of conduct](https://inventory.fix.security/code-of-conduct).
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

- [ ] Add test coverage for new or updated functionality
- [ ] Lint and test with `tox`
- [ ] Document new or updated functionality (someengineering/resoto.com#XXXX)
- [ ] Document new or updated functionality (someengineering/inventory.fix.security#XXXX)

# Issues Fixed

Expand All @@ -21,4 +21,4 @@

# Code of Conduct

By submitting this pull request, I agree to follow the [code of conduct](https://resoto.com/code-of-conduct).
By submitting this pull request, I agree to follow the [code of conduct](https://inventory.fix.security/code-of-conduct).
14 changes: 7 additions & 7 deletions .github/workflows/update-app-index.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Update Resoto Infrastucture Apps Index
name: Update Fix Inventory Infrastucture Apps Index
on:
push:
tags:
Expand All @@ -12,8 +12,8 @@ on:
workflow_dispatch:

jobs:
resoto-apps:
name: "resoto-apps"
fixinventory-apps:
name: "fixinventory-apps"
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -29,11 +29,11 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install python-dateutil
pip install resotoappbundler
pip install fixinventoryappbundler
- name: Build the index
run: |
resotoappbundler --discover --path . > index.json
fixinventoryappbundler --discover --path . > index.json
- name: Upload the index to the CDN
if: github.ref_type == 'tag' || github.event_name == 'workflow_dispatch'
Expand All @@ -49,6 +49,6 @@ jobs:
host_base = ${{ secrets.SPACES_REGION }}.digitaloceanspaces.com
host_bucket = %(bucket)s.${{ secrets.SPACES_REGION }}.digitaloceanspaces.com
EOL
s3cmd put index.json s3://${{ secrets.SPACES_NAME }}/resoto/apps/ --acl-public
s3cmd put index.json s3://${{ secrets.SPACES_NAME }}/fixinventory/apps/ --acl-public
rm -f ~/.s3cfg
curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Bearer ${{ secrets.API_TOKEN }}" -d '{"files": ["/resoto/apps/index.json"]}' "https://api.digitalocean.com/v2/cdn/endpoints/${{ secrets.CDN_ENDPOINT_ID }}/cache"
curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Bearer ${{ secrets.API_TOKEN }}" -d '{"files": ["/fixinventory/apps/index.json"]}' "https://api.digitalocean.com/v2/cdn/endpoints/${{ secrets.CDN_ENDPOINT_ID }}/cache"
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# resoto-apps
Resoto Infrastructure Apps
# fixinventory-apps
Fix Inventory Infrastructure Apps

## Usage of `resotoappbundler`
## Usage of `fixinventoryappbundler`

```bash
resotoappbundler --discover --path . > index.json
fixinventoryappbundler --discover --path . > index.json
```

This command discovers all apps in the current directory and writes the index to `index.json`. This file can then be uploaded to a http server like a CDN and used as an app index in Resoto.
This command discovers all apps in the current directory and writes the index to `index.json`. This file can then be uploaded to a http server like a CDN and used as an app index in Fix Inventory.


## Usage of the `app` command in Resoto
## Usage of the `app` command in Fix Inventory

```bash
apps search [pattern] [--index-url https://cdn.some.engineering/resoto/apps/index.json]
app info <app_name> [--index-url https://cdn.some.engineering/resoto/apps/index.json]
app install <app_name> [--index-url https://cdn.some.engineering/resoto/apps/index.json]
apps search [pattern] [--index-url https://cdn.some.engineering/fixinventory/apps/index.json]
app info <app_name> [--index-url https://cdn.some.engineering/fixinventory/apps/index.json]
app install <app_name> [--index-url https://cdn.some.engineering/fixinventory/apps/index.json]
app edit <app_name>
app uninstall <app_name>
app update <app_name>|all
Expand All @@ -24,5 +24,3 @@ app run <app_name> [--dry-run] [--validate] --config [config_name]
config create <config_name>
config copy <old_config> <new_config>
```

[Design Doc](https://docs.google.com/document/d/1tHZpPAWKh1XMLqsoapAKibAkLnnqH0edCIC6Li-W2b8/edit?usp=sharing)
2 changes: 1 addition & 1 deletion cleanup-aws-alarms/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# cleanup-aws-alarms
AWS Cloudwatch Alarms Cleanup Plugin for Resoto
AWS Cloudwatch Alarms Cleanup Plugin for Fix Inventory

This plugin marks all orphaned AWS CloudWatch Instance Alarms for cleanup.

Expand Down
2 changes: 1 addition & 1 deletion cleanup-aws-alarms/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: "1.0.0"
language: jinja2
license: "Apache 2.0"
authors: ["someengineering"]
url: "https://resoto.com/"
url: "https://inventory.fix.security/"
categories: ["cleanup"]
default_config:
cleanup_aws_alarms:
Expand Down
2 changes: 1 addition & 1 deletion cleanup-aws-loadbalancers/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# cleanup-aws-loadbalancers
AWS Loadbalancers Cleanup Resoto App
AWS Loadbalancers Cleanup Fix Inventory App

This app cleans up AWS ALB/ELB load balancers with no instances attached to them.

Expand Down
2 changes: 1 addition & 1 deletion cleanup-aws-loadbalancers/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: "1.0.0"
language: jinja2
license: "Apache 2.0"
authors: ["someengineering"]
url: "https://resoto.com/"
url: "https://inventory.fix.security/"
categories: ["cleanup"]
default_config:
cleanup_aws_loadbalancers:
Expand Down
2 changes: 1 addition & 1 deletion cleanup-aws-vpcs/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# cleanup-aws-vpcs
AWS VPC Cleanup App for Resoto
AWS VPC Cleanup App for Fix Inventory

This app marks all VPC dependencies for cleanup. The VPC must have been previously marked for cleanup by another cleanup plugin.

Expand Down
2 changes: 1 addition & 1 deletion cleanup-aws-vpcs/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: "1.0.0"
language: jinja2
license: "Apache 2.0"
authors: ["someengineering"]
url: "https://resoto.com/"
url: "https://inventory.fix.security/"
categories: ["cleanup"]
default_config:
cleanup_aws_vpcs:
Expand Down
6 changes: 3 additions & 3 deletions cleanup-expired/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# cleanup-expired
Resoto app for cleanup of expired resources
Fix Inventory app for cleanup of expired resources

This app looks for resources with the tags `expiration` or `resoto:expires` and flags them for cleanup if they are expired.
This app looks for resources with the tags `expiration` or `fix:expires` and flags them for cleanup if they are expired.

## Tag format

| Tag | Format | Description |
| ---------------- | --------------------------- | ---------------------------------------------------- |
| `resoto:expires` | `2019-09-05T10:40:11+00:00` | ISO 8601 Timestamp |
| `fix:expires` | `2019-09-05T10:40:11+00:00` | ISO 8601 Timestamp |
| `expiration` | `24h` | A timedelta relative to the resource's creation time |

Example of valid units for the `expiration` tag:
Expand Down
2 changes: 1 addition & 1 deletion cleanup-expired/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: "1.0.0"
language: jinja2
license: "Apache 2.0"
authors: ["someengineering"]
url: "https://resoto.com/"
url: "https://inventory.fix.security/"
categories: ["cleanup"]
default_config:
config_schema:
Expand Down
6 changes: 3 additions & 3 deletions cleanup-untagged/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# cleanup-untagged - Resoto Infrastructure App
Cleanup Untagged App for Resoto
# cleanup-untagged - Fix Inventory Infrastructure App
Cleanup Untagged App for Fix Inventory

This app deletes cloud resources that are missing mandatory tags after a certain amount of time has passed since their creation.

Expand All @@ -8,7 +8,7 @@ This app deletes cloud resources that are missing mandatory tags after a certain
In `resh` execute

```
> config edit resoto.apps.cleanup_untagged
> config edit fix.apps.cleanup_untagged
```

```
Expand Down
2 changes: 1 addition & 1 deletion cleanup-untagged/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: "1.0.0"
language: jinja2
license: "Apache 2.0"
authors: ["someengineering"]
url: "https://resoto.com/"
url: "https://inventory.fix.security/"
categories: ["cleanup"]
default_config:
cleanup_untagged:
Expand Down
2 changes: 1 addition & 1 deletion cleanup-volumes/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# cleanup-volumes
Volume cleanup app for Resoto
Volume cleanup app for Fix Inventory

This app cleans up unused storage volumes that have reached a certain age threshold.

Expand Down
2 changes: 1 addition & 1 deletion cleanup-volumes/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: "1.0.0"
language: jinja2
license: "Apache 2.0"
authors: ["someengineering"]
url: "https://resoto.com/"
url: "https://inventory.fix.security/"
categories: ["cleanup"]
default_config:
cleanup_volumes:
Expand Down
2 changes: 1 addition & 1 deletion discord/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# discord
Resoto discord client.
Fix Inventory Discord client.
4 changes: 2 additions & 2 deletions discord/app.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
{%- do ns.fields.append(field) %}
{% set ns.resource_count = ns.resource_count + 1 %}
{%- if loop.index % 25 == 0 or loop.last %}
{%- set discord_data = {"embeds": [{"type": "rich", "title": args.title, "description": args.message, "fields": ns.fields, "footer": {"text": "Message created by Resoto"}}]} %}
{%- set discord_data = {"embeds": [{"type": "rich", "title": args.title, "description": args.message, "fields": ns.fields, "footer": {"text": "Message created by Fix Inventory"}}]} %}
json {{ discord_data | tojson }} | http POST {{ webhook }}
{%- set ns.fields = [] %}
{%- endif %}
{%- endfor %}
{%- if ns.resource_count == 0 %}
{%- set discord_data = {"embeds": [{"type": "rich", "title": args.title, "description": args.message, "footer": {"text": "Message created by Resoto"}}]} %}
{%- set discord_data = {"embeds": [{"type": "rich", "title": args.title, "description": args.message, "footer": {"text": "Message created by Fix Inventory"}}]} %}
json {{ discord_data | tojson }} | http POST {{ webhook }}
{%- endif %}
6 changes: 3 additions & 3 deletions discord/app.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: discord
description: "Discord client for Resoto"
description: "Discord client for Fix Inventory"
version: "1.0.0"
language: jinja2
license: "Apache 2.0"
authors: ["someengineering"]
url: "https://resoto.com/"
url: "https://inventory.fix.security/"
categories: ["notification"]
default_config:
discord:
Expand All @@ -25,7 +25,7 @@ args_schema:
message:
help: "Message that comes before the resources."
type: str
default: "Resoto found the following resources:"
default: "Fix Inventory found the following resources:"
webhook:
help: "Optional Discord Webhook URL."
type: str
Expand Down
6 changes: 3 additions & 3 deletions protector/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# protector
Protector App for Resoto
Protector App for Fix Inventory

This app protects important resources from deletion by Resoto.
This app protects important resources from deletion by Fix Inventory.

## Usage

Expand All @@ -27,4 +27,4 @@ cloud.id:

### Implementation details

Each Resoto resource has an attributed `/metadata.protected` which takes a boolean value. By default it is set to `false`. Each Resoto resource inherits BaseResource which contains two methods for cleaning up a resource, `cleanup()` and `delete()`. Both those methods will refuse to manipulate a resource once the `protected` attribute has been set to `true`. Meaning if a resource is marked as protected but has also been flagged for cleanup the cleanup will fail because protected resources cannot be deleted.
Each Fix Inventory resource has an attributed `/metadata.protected` which takes a boolean value. By default it is set to `false`. Each Fix Inventory resource inherits BaseResource which contains two methods for cleaning up a resource, `cleanup()` and `delete()`. Both those methods will refuse to manipulate a resource once the `protected` attribute has been set to `true`. Meaning if a resource is marked as protected but has also been flagged for cleanup the cleanup will fail because protected resources cannot be deleted.
4 changes: 2 additions & 2 deletions protector/app.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: protector
description: "This app protects important resources from deletion by Resoto."
description: "This app protects important resources from deletion by Fix Inventory."
version: "1.0.0"
language: jinja2
license: "Apache 2.0"
authors: ["someengineering"]
url: "https://resoto.com/"
url: "https://inventory.fix.security/"
categories: ["protection"]
default_config:
protector:
Expand Down
2 changes: 1 addition & 1 deletion slack/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# slack
Resoto Slack client.
Fix Inventory Slack client.
4 changes: 2 additions & 2 deletions slack/app.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
{%- do ns.fields.append(field) %}
{% set ns.resource_count = ns.resource_count + 1 %}
{%- if loop.index % 10 == 0 or loop.last %}
{%- set discord_data = { "blocks": [{ "type": "header", "text": { "type": "plain_text", "text": args.title } }, { "type": "section", "text": { "type": "mrkdwn", "text": args.message } }, { "type": "section", "fields": ns.fields }, { "type": "context", "elements": [ { "type": "mrkdwn", "text": "Message created by Resoto" } ] } ] } %}
{%- set discord_data = { "blocks": [{ "type": "header", "text": { "type": "plain_text", "text": args.title } }, { "type": "section", "text": { "type": "mrkdwn", "text": args.message } }, { "type": "section", "fields": ns.fields }, { "type": "context", "elements": [ { "type": "mrkdwn", "text": "Message created by Fix Inventory" } ] } ] } %}
json {{ discord_data | tojson }} | http POST {{ webhook }}
{%- set ns.fields = [] %}
{%- endif %}
{%- endfor %}
{%- if ns.resource_count == 0 %}
{%- set discord_data = { "blocks": [{ "type": "header", "text": { "type": "plain_text", "text": args.title } }, { "type": "section", "text": { "type": "mrkdwn", "text": args.message } }, { "type": "context", "elements": [ { "type": "mrkdwn", "text": "Message created by Resoto" } ] } ] } %}
{%- set discord_data = { "blocks": [{ "type": "header", "text": { "type": "plain_text", "text": args.title } }, { "type": "section", "text": { "type": "mrkdwn", "text": args.message } }, { "type": "context", "elements": [ { "type": "mrkdwn", "text": "Message created by Fix Inventory" } ] } ] } %}
json {{ discord_data | tojson }} | http POST {{ webhook }}
{%- endif %}
6 changes: 3 additions & 3 deletions slack/app.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: slack
description: "Slack client for Resoto"
description: "Slack client for Fix Inventory"
version: "1.0.0"
language: jinja2
license: "Apache 2.0"
authors: ["someengineering"]
url: "https://resoto.com/"
url: "https://inventory.fix.security/"
categories: ["notification"]
default_config:
discord:
Expand All @@ -25,7 +25,7 @@ args_schema:
message:
help: "Message that comes before the resources."
type: str
default: "Resoto found the following resources:"
default: "Fix found the following resources:"
webhook:
help: "Optional Slack Webhook URL."
type: str
Expand Down
2 changes: 1 addition & 1 deletion tagvalidator/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# tagvalidator
Tag Validator app for Resoto
Tag Validator app for Fix Inventory

This app validates the contents of expiration tags. With it you can enforce a max. expiration length for certain resources in an account. For instance you could have an org policy that says in our "dev" account compute instances are only allowed to exist for 2 days max. Then this plugin can ensure that the expiration tag on those instances is set to no more than 2 days. If it is set to e.g. 50h it would be corrected down to 48h.

Expand Down
4 changes: 2 additions & 2 deletions tagvalidator/app.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: tagvalidator
description: "Tag Validator app for Resoto."
description: "Tag Validator app for Fix Inventory."
version: "1.0.0"
language: jinja2
license: "Apache 2.0"
authors: ["someengineering"]
url: "https://resoto.com/"
url: "https://inventory.fix.security/"
categories: ["tagging"]
default_config:
tagvalidator:
Expand Down

0 comments on commit e4cb2a2

Please sign in to comment.